Unit INISec

****************************************************** ****************************************************** Project: Delphi Initialization Database Author: JBD E-mail: binel@alf.tel.hr Comment: The core unit. Defines main types and classes. ******************************************************

Classes

TCfgSubPanel -
TClassOfFormSearchMultiSection -
TClassOfINIEntry -
TClassOfINIEntryStreamed -
TClassOfINISection -
TCreateInfo -
TDestinationProperty -
TDirs -
TEntryObjectClass -
TFormSearchMultiSection -
TGlyphDescriptor -
TGlyphs -
TGroupInfo - TGroupInfo
TINICustomMultiSection -
TINICustomSection -
TINIDatabase -
TINIEntry - TINEntry
TINIEntryLink -
TINIEntrySaveList -
TINIEntryStreamed -
TINIEntrySubSection -
TINIField - TINIField
TINIMultiSection -
TINISection -
TINITable -
TNames -
TObjectClassDescription - Register classes
TSectionObjectClass -
TStreamObjectClass -

Functions

CreateStream -
CreateTitledControl -
CreateUntitledControl - functions
GetEntryClass -
GetEntryClassDescription -
GetEntryClassesCount -
GetEntryClassImageIndex -
GetEntryClassImageIndexByName -
GetEntryClassIndex -
GetSectionClass -
GetSectionClassDescription -
GetSectionClassesCount -
GetSectionClassIndex -
GetStreamClassDescription -
GetStreamClassesCount -
IsStreamFileBased -
PromoteToLeader -
RegisterINIEntry -
RegisterINISection -
RegisterINIStream -
ShiftDown - misc.
UnRegisterINIEntry -
UnRegisterINISection -

Types

TButtonClickEvent
TCaptionStyle
TCompressKeyMode
TCreateDirection
TCreateInfoState
TEntryImageIndex
TForEachProcedure
TGroupTitlePosition
TGroupType
TINIFieldNotifyEvent
TMultiSectionButton
TMultiSectionButtons
TPrivateModes
TSectionProcedure
TSectionState
TSectionStates
TStoreItNotifyEvent
TStreamInfo
TSyncronizeDirection

Constants

CCDistance
CDefDisplayWidth
CDefGroup
CMaxEntryImageIndex
CMaxPrivilegLevel
CResCannotRegisterEntry
CResCannotRegisterSection
CResCannotRegisterStream
CResDuplicateFieldName
CResFieldNotFound
CResINIDatabaseMissing
CResPVFCalled
CResReadOnlyMode
CResSectionIndexOutOfRange
CResSectionNotFound
CResStreamNotAssigned
CResStreamNotRegistered
CUntitled

Variables

AutoRename
DebugMode
DefaultGroupName
FormSearchMultiSectionClass
WarnOnDuplicateFieldName


Functions


function CreateStream(const ComputerName,Name,StreamDescription:string):TINIStream;


function CreateTitledControl(AOwner:TComponent;TCC:TControlClass;WParent:TControl;cInfo:TCreateInfo):TControl;


function CreateUntitledControl(AOwner:TComponent;TCC:TControlClass;WParent:TControl;cInfo:TCreateInfo):TControl;

functions

function GetEntryClass(Index:Integer):TClassOfINIEntry;


function GetEntryClassDescription(Index:Integer):string;


function GetEntryClassesCount:Integer;


function GetEntryClassImageIndex(Index:Integer):Integer;


function GetEntryClassImageIndexByName(const EntryClassName:string):Integer;


function GetEntryClassIndex(const ClassName:string):Integer;


function GetSectionClass(Index:Integer):TClassOfINISection;


function GetSectionClassDescription(Index:Integer):string;


function GetSectionClassesCount:Integer;


function GetSectionClassIndex(const ClassName:string):Integer;


function GetStreamClassDescription(Index:Integer):string;


function GetStreamClassesCount:Integer;


function IsStreamFileBased(const StreamDescription:string):Boolean;


procedure PromoteToLeader(sList:TStrings;Index:LongInt);


procedure RegisterINIEntry(const EntryDescription:string;ImageIndex:TEntryImageIndex;EntryClass:TClassOfINIEntry);


procedure RegisterINISection(const SectionDescription:string;SectionClass:TClassOfINISection);


procedure RegisterINIStream(const StreamDescription:string;StreamClass:TClassOfINIStream);


procedure ShiftDown(List:TStrings);

misc. functions

procedure UnRegisterINIEntry(EntryClass:TClassOfINIEntry);


procedure UnRegisterINISection(SectionClass:TClassOfINISection);


Types


TButtonClickEvent=procedure(Sender:TObject;Button:TMultiSectionButton) of object

TCaptionStyle=(csLeftTop,csLeftCenter,csLeftBottom,csTopLeft,csTopCenter,csTopRight,csWithout);

TCompressKeyMode=(ciYes,ciNo,ciExcludeBlanks);

TCreateDirection=(cdTopToBottom,cdLeftToRight);

TCreateInfoState = record
Title : string;
X : Integer;
Y : Integer;
CtrlW : Integer;
CtrlH : Integer;
MaxCtrlH : Integer;
fcCol : Integer;
fcRow : Integer;
cCol : Integer;
cRow : Integer;
end;

TEntryImageIndex=(eiiBoolean,eiiButton,eiiColor,eiiFloat,eiiInteger,eiiNextColumn,
  								  eiiPaintBox,eiiSeparator,eiiString,eiiCombo,eiiCheckGroup,eiiPrinter,
                    eiiFont,eiiDate,eiiBinary);

TForEachProcedure=procedure(Item:TObject;Data:Pointer) of object

TGroupTitlePosition=(gtpTop,gtpBottom);

TGroupType=(gtTile,gtCascade);

TINIFieldNotifyEvent=procedure(Sender:TINIField) of object

TMultiSectionButton=(isSave,isClear,isDelete,isChange,isExchange);

TMultiSectionButtons=set of TMultiSectionButton

TPrivateModes=set of TPrivateMode

TSectionProcedure=procedure(Data:Pointer) of object

TSectionState=(ssLoading,ssReading,ssWriting,ssDeleting,ssEdit);

TSectionStates=set of TSectionState

TStoreItNotifyEvent=procedure(Sender:TINIField;var Store:Boolean) of object

TStreamInfo = record
Stream : TStream;
Level : Integer;
end;

TSyncronizeDirection=(sdToControl,sdToEntry);

Constants

CCDistance = 2

CDefDisplayWidth = 8

CDefGroup = CUntitled

CMaxEntryImageIndex = 14

CMaxPrivilegLevel = 128

CResCannotRegisterEntry = 20113

CResCannotRegisterSection = 20112

CResCannotRegisterStream = 20111

CResDuplicateFieldName = 20105

CResFieldNotFound = 20104

CResINIDatabaseMissing = 20103

CResPVFCalled = 20108

CResReadOnlyMode = 20106

CResSectionIndexOutOfRange = 20109

CResSectionNotFound = 20107

CResStreamNotAssigned = 20102

CResStreamNotRegistered = 20101

CUntitled = 'Untitled'


Variables

AutoRename : Boolean

DebugMode : Boolean

DefaultGroupName : string

FormSearchMultiSectionClass : TClassOfFormSearchMultiSection

WarnOnDuplicateFieldName : Boolean