removed some unneeded component styles

git-svn-id: trunk@13460 -
This commit is contained in:
paul 2007-12-26 04:48:15 +00:00
parent 9233f84d8e
commit 6055944e29
6 changed files with 22 additions and 44 deletions

View File

@ -40,9 +40,7 @@ const
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
constructor TCustomSpeedButton.Create(AOwner: TComponent); constructor TCustomSpeedButton.Create(AOwner: TComponent);
begin begin
Inherited Create(AOwner); inherited Create(AOwner);
FCompStyle := csSpeedButton;
FGlyph := TButtonGlyph.Create; FGlyph := TButtonGlyph.Create;
FGlyph.OnChange := @GlyphChanged; FGlyph.OnChange := @GlyphChanged;

View File

@ -62,7 +62,6 @@ begin
FNewStyle := True; FNewStyle := True;
FWrapable := True; FWrapable := True;
FButtons := TList.Create; FButtons := TList.Create;
fCompStyle := csToolbar;
FIndent := 1; FIndent := 1;
FList:=false; FList:=false;
FImageChangeLink := TChangeLink.Create; FImageChangeLink := TChangeLink.Create;

View File

@ -56,7 +56,6 @@ end;
constructor TToolButton.Create(TheOwner: TComponent); constructor TToolButton.Create(TheOwner: TComponent);
begin begin
inherited Create(TheOwner); inherited Create(TheOwner);
fCompStyle := csToolButton;
FImageIndex := -1; FImageIndex := -1;
FStyle := tbsButton; FStyle := tbsButton;
ControlStyle := [csCaptureMouse, csSetCaption, csDesignNoSmoothResize]; ControlStyle := [csCaptureMouse, csSetCaption, csDesignNoSmoothResize];

View File

@ -4771,7 +4771,7 @@ begin
csFontDialog : csFontDialog :
InitializeFontDialog(TFontDialog(Sender),p,PChar(ACaption)); InitializeFontDialog(TFontDialog(Sender),p,PChar(ACaption));
csWinControl: csWinControl: // code moved for TCustomControl
p:=CreateAPIWidget(TWinControl(Sender)); p:=CreateAPIWidget(TWinControl(Sender));
@ -4815,29 +4815,11 @@ begin
gtk_object_set_data(PGTKObject(Adjustment), odnScrollBar, P); gtk_object_set_data(PGTKObject(Adjustment), odnScrollBar, P);
end; end;
csScrolledWindow :
begin
P := gtk_scrolled_window_new(nil,nil);
end;
csSpeedButton:
Begin
p := gtk_button_new_with_label(PChar(ACaption));
end;
csStatusBar : csStatusBar :
begin begin
p:=CreateStatusBar(Sender); p:=CreateStatusBar(Sender);
end; end;
csToolbar:
P:=CreateToolBar(Sender);
csToolButton:
begin
p := CreateFixedClientWidget;
end;
csTrackBar: csTrackBar:
with (TCustomTrackBar (Sender)) do with (TCustomTrackBar (Sender)) do
begin begin

View File

@ -552,24 +552,24 @@ end;
Shows or hides a control Shows or hides a control
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWin32WidgetSet.ShowHide(Sender: TObject); procedure TWin32WidgetSet.ShowHide(Sender: TObject);
Var var
Handle: HWND; Handle: HWND;
ParentPanel: HWND; ParentPanel: HWND;
Flags: dword; Flags: dword;
Begin begin
If (TControl(Sender).FCompStyle = csToolButton) then exit;
Handle := ObjectToHWND(Sender); Handle := ObjectToHWND(Sender);
ParentPanel := GetWindowInfo(Handle)^.ParentPanel; ParentPanel := GetWindowInfo(Handle)^.ParentPanel;
if ParentPanel <> 0 then if ParentPanel <> 0 then
Handle := ParentPanel; Handle := ParentPanel;
If TControl(Sender).HandleObjectShouldBeVisible Then if TControl(Sender).HandleObjectShouldBeVisible then
Begin begin
Assert(False, 'Trace: [TWin32WidgetSet.ShowHide] Showing the window'); Assert(False, 'Trace: [TWin32WidgetSet.ShowHide] Showing the window');
if TControl(Sender).FCompStyle = csHintWindow then if TControl(Sender).FCompStyle = csHintWindow then
begin begin
Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER); Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER);
end else begin end else
begin
Flags := SW_SHOW; Flags := SW_SHOW;
if TControl(Sender) is TCustomForm then if TControl(Sender) is TCustomForm then
case TCustomForm(Sender).WindowState of case TCustomForm(Sender).WindowState of
@ -582,15 +582,15 @@ Begin
if Flags = SW_SHOWMAXIMIZED then if Flags = SW_SHOWMAXIMIZED then
Windows.SendMessage(Handle, WM_SHOWWINDOW, 1, 0); Windows.SendMessage(Handle, WM_SHOWWINDOW, 1, 0);
end; end;
If (Sender Is TCustomForm) Then if (Sender Is TCustomForm) then
SetClassLong(Handle, GCL_HICON, LONG(TCustomForm(Sender).GetIconHandle)); SetClassLong(Handle, GCL_HICON, LONG(TCustomForm(Sender).GetIconHandle));
End end
Else else
Begin begin
Assert(False, 'TRACE: [TWin32WidgetSet.ShowHide] Hiding the window'); Assert(False, 'TRACE: [TWin32WidgetSet.ShowHide] Hiding the window');
ShowWindow(Handle, SW_HIDE); ShowWindow(Handle, SW_HIDE);
End; end;
End; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TWin32WidgetSet.DCReDraw Method: TWin32WidgetSet.DCReDraw

View File

@ -2406,11 +2406,11 @@ const
csWinControl = 40; csWinControl = 40;
csFixed = csWinControl; //TODO remove csFixed = csWinControl; //TODO remove
csImage = 41; csImage = 41;
csToolbar = 42; // csToolbar = 42;
csToolButton = 43; // csToolButton = 43;
csBitBtn = 44; csBitBtn = 44;
csCListBox = 45; csCListBox = 45;
csSpeedButton = 46; // csSpeedButton = 46;
csPopupMenu = 47; csPopupMenu = 47;
csHintWindow = 48; csHintWindow = 48;
@ -2740,16 +2740,16 @@ Begin
Result := 'csFixed'; Result := 'csFixed';
csImage: csImage:
Result := 'csImage'; Result := 'csImage';
csToolbar: { csToolbar:
Result := 'csToolbar'; Result := 'csToolbar';
csToolButton: csToolButton:
Result := 'csToolButton'; Result := 'csToolButton';}
csBitBtn: csBitBtn:
Result := 'csBitBtn'; Result := 'csBitBtn';
csCListBox: csCListBox:
Result := 'csCListBox'; Result := 'csCListBox';
csSpeedButton: { csSpeedButton:
Result := 'csSpeedButton'; Result := 'csSpeedButton';}
csPopupMenu: csPopupMenu:
Result := 'csPopupMenu'; Result := 'csPopupMenu';
csHintWinDow: csHintWinDow: