You've already forked lazarus-ccr
jvcllaz: Add component editor for TJvXPBar. Add ImageIndex property editor for TJvXPBarItem.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5413 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -11,7 +11,7 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="..\resource"/>
|
<IncludeFiles Value="..\resource"/>
|
||||||
<OtherUnitFiles Value="..\run"/>
|
<OtherUnitFiles Value="..\run;..\design"/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"/>
|
"/>
|
||||||
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||||
<Version Major="1" Release="1"/>
|
<Version Major="1" Release="1"/>
|
||||||
<Files Count="7">
|
<Files Count="8">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\run\JvXPCoreUtils.pas"/>
|
<Filename Value="..\run\JvXPCoreUtils.pas"/>
|
||||||
<UnitName Value="JvXPCoreUtils"/>
|
<UnitName Value="JvXPCoreUtils"/>
|
||||||
@ -54,18 +54,25 @@
|
|||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="JvXPCtrlsReg"/>
|
<UnitName Value="JvXPCtrlsReg"/>
|
||||||
</Item7>
|
</Item7>
|
||||||
|
<Item8>
|
||||||
|
<Filename Value="..\design\JvXPPropertyEditors.pas"/>
|
||||||
|
<UnitName Value="JvXPPropertyEditors"/>
|
||||||
|
</Item8>
|
||||||
</Files>
|
</Files>
|
||||||
<RequiredPkgs Count="3">
|
<RequiredPkgs Count="4">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="JvCoreLaz"/>
|
<PackageName Value="IDEIntf"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="JvCoreLaz"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item3>
|
||||||
|
<Item4>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="FCL"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
<MinVersion Major="1" Valid="True"/>
|
||||||
</Item3>
|
</Item4>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
<UnitPath Value="$(PkgOutDir)"/>
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
|
@ -9,7 +9,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
JvXPCoreUtils, JvXPBar, JvXPCore, JvXPContainer, JvXPButtons,
|
JvXPCoreUtils, JvXPBar, JvXPCore, JvXPContainer, JvXPButtons,
|
||||||
JvXPCheckCtrls, JvXPCtrlsReg, LazarusPackageIntf;
|
JvXPCheckCtrls, JvXPCtrlsReg, JvXPPropertyEditors, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
JvXPCore, JvXPBar, JvXPContainer, JvXPButtons, JvXPCheckCtrls;
|
ComponentEditors, PropEdits, GraphPropEdits, ImgList,
|
||||||
|
JvXPCore, JvXPPropertyEditors,
|
||||||
|
JvXPBar, JvXPContainer, JvXPButtons, JvXPCheckCtrls;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
@ -24,6 +26,16 @@ begin
|
|||||||
TJvXPCheckbox,
|
TJvXPCheckbox,
|
||||||
TJvXPStyleManager
|
TJvXPStyleManager
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
{
|
||||||
|
RegisterPropertyEditor(TypeInfo(TImageIndex), TJvXPBarItem, 'ImageIndex',
|
||||||
|
TJvXPItemImageIndexProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
RegisterPropertyEditor(TypeInfo(TImageIndex), TJvXPBarItem, 'ImageIndex',
|
||||||
|
TImageIndexPropertyEditor);
|
||||||
|
|
||||||
|
RegisterComponentEditor(TJvXPBar, TJvXPBarItemEditor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -60,8 +60,7 @@ type
|
|||||||
|
|
||||||
TJvXPBarRollMode = (rmFixed, rmShrink); // rmFixed is default
|
TJvXPBarRollMode = (rmFixed, rmShrink); // rmFixed is default
|
||||||
|
|
||||||
TJvXPBarHitTest =
|
TJvXPBarHitTest = (
|
||||||
(
|
|
||||||
htNone, // mouse is inside non-supported rect
|
htNone, // mouse is inside non-supported rect
|
||||||
htHeader, // mouse is inside header
|
htHeader, // mouse is inside header
|
||||||
htRollButton // mouse is inside rollbutton
|
htRollButton // mouse is inside rollbutton
|
||||||
@ -89,6 +88,9 @@ const
|
|||||||
dxColor_FocusedFrameColorXP = clHotLight;
|
dxColor_FocusedFrameColorXP = clHotLight;
|
||||||
dxColor_CheckedFrameColorXP = clHighlight;
|
dxColor_CheckedFrameColorXP = clHighlight;
|
||||||
|
|
||||||
|
dxColor_FontColorXP = TColor($00840000);
|
||||||
|
dxColor_HeaderFontColorXP = TColor($00840000);
|
||||||
|
|
||||||
type
|
type
|
||||||
TJvXPBarItem = class;
|
TJvXPBarItem = class;
|
||||||
TJvXPBarItems = class;
|
TJvXPBarItems = class;
|
||||||
@ -1310,6 +1312,7 @@ begin
|
|||||||
Self.CheckedFrameColor := CheckedFrameColor;
|
Self.CheckedFrameColor := CheckedFrameColor;
|
||||||
Self.FocusedFrameColor := FocusedFrameColor;
|
Self.FocusedFrameColor := FocusedFrameColor;
|
||||||
Self.BodyColor := BodyColor;
|
Self.BodyColor := BodyColor;
|
||||||
|
Self.BodyBorderColor := BodyBorderColor;
|
||||||
Self.GradientTo := GradientTo;
|
Self.GradientTo := GradientTo;
|
||||||
Self.GradientFrom := GradientFrom;
|
Self.GradientFrom := GradientFrom;
|
||||||
Self.SeparatorColor := SeparatorColor;
|
Self.SeparatorColor := SeparatorColor;
|
||||||
@ -1439,14 +1442,14 @@ begin
|
|||||||
FTopSpace := 5;
|
FTopSpace := 5;
|
||||||
|
|
||||||
FFont := TFont.Create;
|
FFont := TFont.Create;
|
||||||
FFont.Color := $00840000;
|
FFont.Color := dxColor_FontColorXP; //$00840000;
|
||||||
FFont.Size := 0; //8;
|
FFont.Size := 0; //8;
|
||||||
FFont.OnChange := @FontChange;
|
FFont.OnChange := @FontChange;
|
||||||
FHeaderHeight := 28;
|
FHeaderHeight := 28;
|
||||||
FHeaderRounded := True;
|
FHeaderRounded := True;
|
||||||
FGradientWidth := 0;
|
FGradientWidth := 0;
|
||||||
FHeaderFont := TFont.Create;
|
FHeaderFont := TFont.Create;
|
||||||
FHeaderFont.Color := $00840000;
|
FHeaderFont.Color := dxColor_HeaderFontColorXP; //$00840000;
|
||||||
FHeaderFont.Size := 0; //8;
|
FHeaderFont.Size := 0; //8;
|
||||||
FHeaderFont.Style := [fsBold];
|
FHeaderFont.Style := [fsBold];
|
||||||
FHeaderFont.OnChange := @FontChange;
|
FHeaderFont.OnChange := @FontChange;
|
||||||
@ -1696,13 +1699,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
FFontChanging := True;
|
FFontChanging := True;
|
||||||
try
|
try
|
||||||
FFont.Color := $00E75100;
|
FFont.Color := dxColor_FontColorXP;
|
||||||
FFont.Name := inherited Font.Name;
|
FFont.Name := 'default';
|
||||||
FFont.Size := 8;
|
FFont.Size := 0;
|
||||||
FFont.Style := inherited Font.Style;
|
FFont.Style := inherited Font.Style;
|
||||||
FHeaderFont.Color := $00E75100;
|
FHeaderFont.Color := dxColor_HeaderFontColorXP;
|
||||||
FHeaderFont.Name := Font.Name;
|
FHeaderFont.Name := 'default';
|
||||||
FHeaderFont.Size := 8;
|
FHeaderFont.Size := 0;
|
||||||
FHeaderFont.Style := [fsBold];
|
FHeaderFont.Style := [fsBold];
|
||||||
finally
|
finally
|
||||||
FFontChanging := False;
|
FFontChanging := False;
|
||||||
|
@ -151,6 +151,7 @@ type
|
|||||||
procedure CMMouseEnter(var Msg: TLMessage); message CM_MOUSEENTER;
|
procedure CMMouseEnter(var Msg: TLMessage); message CM_MOUSEENTER;
|
||||||
procedure CMMouseLeave(var Msg: TLMessage); message CM_MOUSELEAVE;
|
procedure CMMouseLeave(var Msg: TLMessage); message CM_MOUSELEAVE;
|
||||||
procedure CMParentColorChanged(var Msg: TLMessage); message CM_PARENTCOLORCHANGED;
|
procedure CMParentColorChanged(var Msg: TLMessage); message CM_PARENTCOLORCHANGED;
|
||||||
|
procedure CMParentFontChanged(var Msg: TLMessage); message CM_PARENTFONTCHANGED;
|
||||||
|
|
||||||
//LCL doesnt fire it
|
//LCL doesnt fire it
|
||||||
//procedure CMParentFontChanged(var Msg: TLMessage); message CM_PARENTFONTCHANGED;
|
//procedure CMParentFontChanged(var Msg: TLMessage); message CM_PARENTFONTCHANGED;
|
||||||
@ -439,6 +440,13 @@ begin
|
|||||||
HookParentColorChanged;
|
HookParentColorChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TJvXPCustomControl.CMParentFontChanged(var Msg: TLMessage);
|
||||||
|
begin
|
||||||
|
// delegate message "ParentFontChanged" to hook.
|
||||||
|
inherited;
|
||||||
|
HookParentFontChanged;
|
||||||
|
end;
|
||||||
|
|
||||||
//LCL doesnt fire it...
|
//LCL doesnt fire it...
|
||||||
(*
|
(*
|
||||||
procedure TJvXPCustomControl.CMParentFontChanged(var Msg: TLMessage);
|
procedure TJvXPCustomControl.CMParentFontChanged(var Msg: TLMessage);
|
||||||
|
Reference in New Issue
Block a user