Introduction Downloads Applications News FAQ
Forum Subscribe Articles Links Other

 

 Key Objects Library     

 Key Objects Library     

KOL Project status

 
  • Base object TObj is replacing TObject class in VCL. It has similar method Free, which allows to release object safely (to ignore call with parameter nil), and also two methods RefInc and RefDec to prevent freeing of object between to consequence calls of RefInc and RefDec.
    • Very important TList object ("constructor": NewList:PList). Similar to TList in VCL, allows to store pointers to any data (or numbers).
    • Object TStrList to store strings in dynamic array. Constructor: NewStrList:PStrList. Can work very fast with huge text arrays (millions lines a second).
    • Object TTree to organize data in memory (non-visual).
    • Object type TGraphicTool is implementing brush (NewBrush), font (NewFont) and pen (NewPen) GDI objects (all in one, without deriving three different object types like it is done in VCL or XCL). The most of code is included only in case if your project accesses properties Font, Brush of TControl, or Font, Brush, Pen of TCanvas, or creates TGraphicTool instances by itself.
         Font is implemented even more power than in VCL. Having property FontOrientation, it allows easy support rotated text (used in label effect). Other additional properties are FontWidth, FontWeight.
         Pen is implemented even more power than in VCL. Having property GeometricPen, it allows easy implement high quality drawing with hatched or custom pen, tune up end caps, join style etc.
    • Object type TCanvas, very similar to VCL TCanvas (but more smart and efficient). To draw onto existing DC, a constructor is provided: NewCanvas( DC ): PCanvas.
    • Object type TBitmap, very similar to VCL's TBitmap. Constructors:
      • NewBitmap( Width, Height ): PBitmap
      • NewDIBBitmap( Width, Height, PixelFormat ): PBitmap
    • Object TImageList, very similar to VCL TImageList. Constructor: NewImageList( AOwner: PControl ): PImageList.
    • The main object of KOL is TControl. It can play role of any visual control depending on constructor used to create its instance. Available constructing functions are following (syntax consiuosly is not observed):
      • NewApplet( Caption: String ): PControl (Note: in KOL, it is not necessary, if application has a single form, and there are no needs to hide application button on taskbar).
      • NewForm( AParent: PControl ): PControl
      • NewPanel( AParent; EdgeStyle:{ esRaised, esLowered, esNone } ): PControl
      • NewSplitter( AParent; MinSize1, MinSize2: Integer ): PControl
        NewSplitterEx( AParent, MinSize1, MinSize2, edgeStyle ): PControl
      • NewGroupbox( AParent; Caption ): PControl
      • NewLabel( AParent; Caption ): PControl
      • NewWordWrapLabel( AParent; Caption ): PControl
      • NewLabelEffect( AParent; Caption; ShadowDeep: SmallInt ): PControl
      • NewButton( AParent; Caption ): PControl
      • NewBitBtn( aParent, aCaption, aOptions: [ bboImageList, bboNoBorder, bboNoCaption, bboFixed ], aLayout: { glyphLeft, glyphTop, glyphRight, glyphBottom, glyphOver }, GlyphBmp_or_ImageList, GlyphCount__or__ImgIdx_and_GlyphCount_shl16 ): PControl
      • NewCheckbox( AParent; Caption ): PControl
      • NewRadiobox( AParent; Caption ): PControl
      • NewEditbox( AParent; Options: Set of [ eoNoHScroll, eoNoVScroll, eoLowercase, eoMultiline, eoNoHideSel, eoOemConvert, eoPassword, eoReadonly, eoUpperCase, eoWantReturn, eoWantTab ] ): PControl
      • NewRichEdit( AParent, Options ): PControl
      • NewRichEdit1( AParent, Options ): PControl
      • NewListbox( AParent; Options: Set of [ loNoHideScroll, loNoExtendSel, loMultiColumn, loMultiSelect, loNoIntegralHeight, loNoSel, loSort, loTabstops ] ): PControl
      • NewCombobox( AParent; Options: Set of [ coReadOnly, coNoHScroll, coAlwaysVScroll, coLowerCase, coNoIntegralHeight, coOemConvert, coSort, coUpperCase ] ): PControl
      • NewPaintbox( AParent )
      • NewImageShow( AParent, ImgList, ImgIdx )
      • NewGradientPanel( AParent; Color1, Color2 ): PControl
      • NewGradientPanelEx( Color1, Color2, Style: (gsHorizontal, gsVertical, gsRectangle, gsElliptic, gsRombic), Layout: (glTopLeft, glTop, glTopRight, glLeft, glCenter, glRight, glBottomLeft, glBottom, glBottomRight) ): PControl
      • NewProgressbar( AParent ): PControl
      • NewProgressbarEx( AParent; Options: set of [ pboVertical, pboSmooth ] ): PControl
      • NewListView( AParent, Style:{ lvsIcon, lvsSmallIcon, lsvList, lvsDetail, lvsDetailNoHeader}, Options: set of [ lvoIconLeft, lvoAutoArrange, lvoButton, lvoEditLabel, lvoNoLabelWrap, lvoNoScroll, lvoNoSortHeader, lvoHideSel, lvoMultiselect, lvoSortAscending,lvoSortDescending, lvoGridLines, lvoSubItemImages, lvoCheckBoxes, lvoTrackSelect, lvoHeaderDragDrop, lvoRowSelect, lvoOneClickActivate, lvoTwoClickActivate, lvoFlatsb, lvoRegional, lvoInfoTip, lvoUnderlineHot, lvoMultiWorkares ]; ImageListSmall, ImageListBig, ImageListState: PImageList ): PControl
      • NewTreeView( parent, options: set of [ tvoNoLines, tvoLinesRoot, tvoNoButtons, tvoEditLabels, tvoHideSel, tvoDragDrop, tvoNoTooltips, tvoCheckBoxes, tvoTrackSelect, tvoSingleExpand, tvoInfoTip, tvoFullRowSelect, tvoNoScroll, tvoNonEvenHeight ], ImgListNormal, ImgListState ): PControl
      • NewToolbar( parent, align: { caLeft, caTop, caRight, caBottom }, options: set of [ tboTextRight, tboFlat, tboTransparent, tboWrapable ], Bitmap, Buttons: array of PChar; BtnImgIdxArray: array of Integer ): PControl
      • NewTabControl( parent, tabs: array of string, options: set of [ tcoButtons, tcoFixedWidth, tcoFocusTabs, tcoIconLeft, tcoLabelLeft, tcoMultiline, tcoMultiselect, tcoFitRows, tcoScrollOpposite, tcoBottom, tcoVertical, tcoFlat, tcoHotTrack ], ImgList, ImgIdx1st ): PControl
    • Dynamic menu object TMenu (main menu and popup menu incapsulation). Constructors:
      • NewMenu( AParent; FirstCmd:Integer; Template: array of PChar; aOnItem: procedure( Sender; Item: integer) of object ): PMenu
      • NewMenuEx( AParent; FirstCmd:Integer; Template: array of PChar; aOnItems: array of procedure( Sender; Item: integer) of object ): PMenu
    • Non-visual object TIniFile. Constructor: OpenIniFile( filename ): PIniFile;
    • Non-visual object TDirList. Constructors:
      • NewDirList( path; 'filemask'; Attr ): PDirList
      • NewDirListEx( path; '[^]filemask1[;[^]filemask2]...'; Attr ): PDirList
    • Object TOpenSaveDialog to select files for open/save using standard open/save dialog. Constructor: NewOpenSaveDialog( Title, StrtDir: String; Options: [ OSCreatePrompt, OSExtensionDiffent, OSFileMustExist, OSHideReadonly, OSNoChangedir, OSNoReferenceLinks, OSAllowMultiSelect, OSNoNetworkButton, OSNoReadonlyReturn, OSOverwritePrompt, OSPathMustExist, OSReadonly ] ): POpenSaveDialog
    • Object TOpenDirDialog to select directories using standard browse for folder dialog. Constructor: NewOpenDirDialog( Title, Options: [ odfBrowseForComputer, odfBrowseForPrinter, odfDontGoBelowDomain, odfOnlyFileSystemAncestors, odfOnlySystemDirs ] ): POpenDirDialog
      (Note: it is possible to set InitialDir, and assign OnSelChanged event handler for TOpenDirDialog object).
    • Object TColorDialog to select color using standard choose color dialog: NewColorDialog( FullOpenOption ): PColorDialog
    • Object TCABFile to extract files from CAB files - OpenCABFile( [ Filenames ] );
    • Streaming objects of type TStream:
      • NewMemoryStream: PStream
      • NewReadFileStream( filename ): PStream
      • NewWriteFileStream( filename ): PStream
      • NewReadWriteFileStream( filename ): PStream
    • Non-visual object TImageList. Constructor: NewImageList( AOwner: PControl ): PImageList
    • Non-visual object TTimer. Constructor: NewTimer( interval ): PTimer
    • Non-visual object TThread. Constructors:
      • NewThread: PThread
      • NewThreadEx( Proc: TOnThreadExecute ): PThread
    • Non-visual file and directory change notifier object TDirChange:
      • NewDirChangeNotifier( Path; Filter: set of [ fncFileName, fncDirName, fncAttributes, fncSize,
        fncLastWrite, fncLastAccess, fncCreation, fncSecurity
        ]; WatchSubtree; ChangeProc: TOnDirChange ): PDirChange
    • Non-visual object TMediaPlayer. NewMediaPlayer( FileName, Window ): PMediaPlayer
      (Note: some additional functions allows to play waveform audio from memory, stream, file or resource and to control wave output as well).
    • Non-visual (?) object TTrayIcon. Constructor: NewTrayIcon( Wnd:PControl; Icon: HIcon ): PTrayIcon
      (Now with additional property AutoRecreate: Boolean)
    • Functions JustOne( Wnd:PControl; Id:String): Boolean and JustOneNotify( Wnd; Id; OnAnotherInstance: procedure( cmdline: string ) of object )
    • Procedure SortData to sort quickly any kind of arrays.
    • Set of windows, file, date/time, string, conversation utility routines.
    • Additionally following features are implemented:
      • Support of keyboard tabulating between controls on form: call form's method Tabulate for easy tabulating, and TabulateEx to tabulate smarter using arrow keys.
      • Set of properties, simplifying adjustment of non-client part of form (window): HasCaption, HasBorder, CanResize, StayOnTop.
      • Set of "transparent" methods, simplifying non-visual form designing:
        PlaceRight, PlaceDown, PlaceUnder, SetSize(x,y), Size(w, h),  AlignLeft(fromcontrol), AlignTop(fromcontrol), ResizeParent, ResizeParentRight, ResizeParentBottom, CenterOnParent, Shift(x,y), SetAlign(where) and also property Margin.
      • Support of rotating text by changing Font.FontOrientation property - in LabelEffect, TCanvas.
      • Support of GEOMETRIC pen in TGraphicTool. Also FontWeight   property for adjusting boldness of fonts.
      • Double buffered drawing support (necessary in LabelEffect) - by assigning True to DoubleBuffered property (can be inherited by child controls from parent windows)
      • Transparent property (also requires DoubleBuffered) - true transparency of controls.
      • Property AlphaBlend allows to make any form or control semi-transparent (in Win2K).
      • Align property, which allows to adjust placement of controls like in VCL. Additional "transparent" method SetAlign allows to adjust control alignment very easy at startup.
      • PreventResizeFlicks method can eliminate the most flicks during resizing of form and splitting of controls (useful when Align property is used to adjust controls placement, especially effective with DoubleBuffered = True).
      • Status bar embedding into form (when properties StatusText[ ], SimpleStatusText, etc. are changed/accessed).
      • OnMouseOver/OnMouseLeave events.
      • Capability to attach programmer-defined extended event handler to control's window procedure using AttachProc method (of TControl object) - without deriving new object from TControl.

   See also MCK status (Mirror Classes Kit - a visual environment for programming with KOL).

 


Copyright (C) by Vladimir Kladov, 1999-2001