mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 05:32:29 +02:00
Constraints implementation (first cut) and sizig - moving system rework to
better match Delphi/Kylix way of doing things (the existing implementation worked by acident IMHO :-) git-svn-id: trunk@1509 -
This commit is contained in:
parent
d0f37eeaf7
commit
daf0a4622d
@ -29,7 +29,7 @@ interface
|
||||
|
||||
uses
|
||||
Forms, SysUtils, Buttons, Classes, Graphics, GraphType, StdCtrls, LCLType,
|
||||
LCLLinux, Controls, ComCtrls, ExtCtrls, PropEdits, TypInfo, Messages,
|
||||
LCLLinux, LMessages, Controls, ComCtrls, ExtCtrls, PropEdits, TypInfo, Messages,
|
||||
LResources, XMLCfg, Menus, Dialogs;
|
||||
|
||||
type
|
||||
@ -188,8 +188,8 @@ type
|
||||
procedure ValueButtonClick(Sender: TObject);
|
||||
|
||||
procedure WMVScroll(var Msg: TWMScroll); message WM_VSCROLL;
|
||||
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
|
||||
procedure WMMouseMove(var Msg: TWMMouseMove); message WM_MOUSEMOVE;
|
||||
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
|
||||
procedure SetBorderStyle(Value: TBorderStyle);
|
||||
procedure SetBackgroundColor(const AValue: TColor);
|
||||
procedure UpdateScrollBar;
|
||||
@ -261,7 +261,6 @@ type
|
||||
procedure AvailComboBoxChange(Sender:TObject);
|
||||
procedure OnBackgroundColPopupMenuItemClick(Sender :TObject);
|
||||
procedure OnShowHintPopupMenuItemClick(Sender :TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
private
|
||||
FComponentList: TComponentSelectionList;
|
||||
FPropertyEditorHook:TPropertyEditorHook;
|
||||
@ -276,7 +275,6 @@ type
|
||||
procedure PropEditLookupRootChange;
|
||||
procedure OnGridModified(Sender: TObject);
|
||||
public
|
||||
//procedure SetBounds(aLeft,aTop,aWidth,aHeight:integer); override;
|
||||
property Selections:TComponentSelectionList
|
||||
read FComponentList write SetSelections;
|
||||
procedure RefreshSelections;
|
||||
@ -289,7 +287,6 @@ type
|
||||
property PropertyEditorHook:TPropertyEditorHook
|
||||
read FPropertyEditorHook write SetPropertyEditorHook;
|
||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||
procedure DoInnerResize;
|
||||
constructor Create(AnOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
@ -460,7 +457,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOIPropertyGrid.WMSize(var Msg: TWMSize);
|
||||
procedure TOIPropertyGrid.WMSize(var Msg: TLMSize);
|
||||
begin
|
||||
inherited;
|
||||
UpdateScrollBar;
|
||||
@ -1647,6 +1644,7 @@ begin
|
||||
Name:='StatusBar';
|
||||
Parent:=Self;
|
||||
SimpleText:='All';
|
||||
Align:= alBottom;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
@ -1676,6 +1674,7 @@ begin
|
||||
Text:='';
|
||||
OnChange:=@AvailComboBoxChange;
|
||||
//Sorted:=true;
|
||||
Align:= alTop;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
@ -1687,6 +1686,7 @@ begin
|
||||
Pages.Strings[0]:='Properties';
|
||||
Pages.Add('Events');
|
||||
PopupMenu:=MainPopupMenu;
|
||||
Align:= alClient;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
@ -1724,7 +1724,6 @@ begin
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
OnResize:=@FormResize;
|
||||
end;
|
||||
|
||||
destructor TObjectInspector.Destroy;
|
||||
@ -1733,22 +1732,6 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TObjectInspector.DoInnerResize;
|
||||
var MaxX,MaxY,NewTop:integer;
|
||||
begin
|
||||
if Visible=false then exit;
|
||||
MaxX:=ClientWidth;
|
||||
MaxY:=ClientHeight-20;
|
||||
|
||||
// combobox at top (filled with available components)
|
||||
AvailCompsComboBox.SetBounds(0,0,MaxX,20);
|
||||
|
||||
// notebook
|
||||
NewTop:=AvailCompsComboBox.Top+AvailCompsComboBox.Height+2;
|
||||
//writeln('[TObjectInspector.DoInnerResize]');
|
||||
NoteBook.SetBounds(0,NewTop,MaxX,MaxY-NewTop);
|
||||
end;
|
||||
|
||||
procedure TObjectInspector.SetPropertyEditorHook(NewValue:TPropertyEditorHook);
|
||||
begin
|
||||
if FPropertyEditorHook<>NewValue then begin
|
||||
@ -1862,13 +1845,6 @@ begin
|
||||
EventGrid.RefreshPropertyValues;
|
||||
end;
|
||||
|
||||
{procedure TObjectInspector.SetBounds(aLeft,aTop,aWidth,aHeight:integer);
|
||||
begin
|
||||
//writeln('[TObjectInspector.SetBounds] ',aLeft,',',aTop,',',aWidth,',',aHeight);
|
||||
inherited SetBounds(aLeft,aTop,aWidth,aHeight);
|
||||
DoInnerResize;
|
||||
end;}
|
||||
|
||||
procedure TObjectInspector.AvailComboBoxChange(Sender:TObject);
|
||||
var NewComponent,Root:TComponent;
|
||||
a:integer;
|
||||
@ -1933,10 +1909,5 @@ begin
|
||||
EventGrid.ShowHint:=not EventGrid.ShowHint;
|
||||
end;
|
||||
|
||||
procedure TObjectInspector.FormResize(Sender: TObject);
|
||||
begin
|
||||
DoInnerResize;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -57,12 +57,12 @@ type
|
||||
}
|
||||
|
||||
|
||||
TPage = class(TCustomControl)
|
||||
TPage = class(TWinControl)
|
||||
private
|
||||
protected
|
||||
procedure AttachSignals; override;
|
||||
procedure ReadState(Reader: TAbstractReader); override;
|
||||
procedure Paint; override;
|
||||
//procedure Paint; override;
|
||||
procedure WMPaint(var Msg: TLMPaint); message LM_PAINT;
|
||||
public
|
||||
procedure AddControl; override;
|
||||
@ -435,6 +435,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 2002/03/13 22:48:16 lazarus
|
||||
Constraints implementation (first cut) and sizig - moving system rework to
|
||||
better match Delphi/Kylix way of doing things (the existing implementation
|
||||
worked by acident IMHO :-)
|
||||
|
||||
Revision 1.18 2002/02/24 20:51:23 lazarus
|
||||
Improved TSpeedButton (Glyph, Spacing, Margin, drawing)
|
||||
Added PageCount to TNotebook
|
||||
|
@ -93,6 +93,8 @@ LM_SETDESIGNING = LM_COMUSER+60;
|
||||
|
||||
LM_SETSHORTCUT = LM_COMUSER+61;
|
||||
|
||||
LM_SETGEOMETRY = LM_COMUSER+62;
|
||||
|
||||
//end of messages that are sent to the interface
|
||||
|
||||
|
||||
@ -797,6 +799,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2002/03/13 22:48:16 lazarus
|
||||
Constraints implementation (first cut) and sizig - moving system rework to
|
||||
better match Delphi/Kylix way of doing things (the existing implementation
|
||||
worked by acident IMHO :-)
|
||||
|
||||
Revision 1.20 2002/02/18 22:46:11 lazarus
|
||||
Implented TMenuItem.ShortCut (not much tested).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user