The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home GuiPack ColSel Interface of SDL_ColSel | |
Interface of SDL_ColSel |
|
const {$IFDEF PAIDVERS} COLSEL_MAXCOLORS = 255; SDLVersionInfo = 'colsel_r1200_full'; IsLightEd = false; {$ELSE} COLSEL_MAXCOLORS = 47; SDLVersionInfo = 'colsel_r1200_lighted'; IsLightEd = true; {$ENDIF} Release = 1200; type TOnColorNameChangeEvent = procedure (Sender: TObject; var ColorName: string) of object; TColSel = class(TCustomComboBox) private FColorBarWidth : Integer; FSelColorIx : integer; FNumColors : integer; FEnabled : boolean; FMouseAreaCode : integer; FColors : array[1..COLSEL_MAXCOLORS] of TColor; FColorNames : array[1..COLSEL_MAXCOLORS] of string; FIsUserEditable: array[1..COLSEL_MAXCOLORS] of boolean; FOnCNameChange : TOnColorNameChangeEvent; procedure SetSelColor(Color: TColor); function GetSelColor: TColor; procedure SetColorBarWidth (W: Integer); function GetSelColorID: string; function GetArrayColor (Index: integer): TColor; procedure SetArrayColor (Index: integer; value: TColor); function GetArrayColorName (Index: integer): string; procedure SetArrayColorName (Index: integer; value: string); function GetArrayAllowEdit (Index: integer): boolean; procedure SetArrayAllowEdit (Index: integer; value: boolean); procedure SetNumColors (num: integer); protected procedure Click; override; {$IFNDEF ISCLX} procedure DrawItem (Index: Integer; Rect: TRect; State: TOwnerDrawState); override; {$ELSE} function DrawItem (Index: Integer; Rect: TRect; State: TOwnerDrawState): Boolean; override; {$ENDIF} procedure DropDown; override; procedure Loaded; override; procedure LoadColorsIntoComboList; procedure MouseMove (Shift: TShiftState; X,Y: integer); override; procedure SetEnabled (value: boolean); override; public constructor Create(AOwner : TComponent); override; procedure SetAllColorEditFlags; procedure ResetAllColorEditFlags; property SelColorID: string read GetSelColorID; property ColorEditAllowed[Index: integer]: boolean read GetArrayAllowEdit write SetArrayAllowEdit; property Colors[Index: integer]: TColor read GetArrayColor write SetArrayColor; property ColorNames[Index: integer]: string read GetArrayColorName write SetArrayColorName; function FindColorEntry (color: TColor): integer; procedure LoadBasicVGAPalette; procedure LoadExtendedPalette; procedure LoadWindowsSystemPalette; procedure LoadStandardPalette; published property Anchors; property Color; property ColorBarWidth: Integer read FColorBarWidth write SetColorBarWidth; property DropDownCount; property Enabled: boolean read FEnabled write SetEnabled; property Font; property NumColors: integer read FNumColors write SetNumColors; property ParentColor; property ParentFont; property ParentShowHint; property SelColor: TColor read GetSelColor write SetSelColor; property ShowHint; {$IFDEF GE_LEV17} (**) property StyleElements; {$ENDIF} property TabOrder; property TabStop; property Visible; property OnColorNameChange: TOnColorNameChangeEvent read FOnCNameChange write FOnCNameChange; property OnChange; property OnClick; property OnDropDown; property OnEnter; property OnExit; end;
|