mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 05:37:08 +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
|
uses
|
||||||
Forms, SysUtils, Buttons, Classes, Graphics, GraphType, StdCtrls, LCLType,
|
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;
|
LResources, XMLCfg, Menus, Dialogs;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -188,8 +188,8 @@ type
|
|||||||
procedure ValueButtonClick(Sender: TObject);
|
procedure ValueButtonClick(Sender: TObject);
|
||||||
|
|
||||||
procedure WMVScroll(var Msg: TWMScroll); message WM_VSCROLL;
|
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 WMMouseMove(var Msg: TWMMouseMove); message WM_MOUSEMOVE;
|
||||||
|
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
|
||||||
procedure SetBorderStyle(Value: TBorderStyle);
|
procedure SetBorderStyle(Value: TBorderStyle);
|
||||||
procedure SetBackgroundColor(const AValue: TColor);
|
procedure SetBackgroundColor(const AValue: TColor);
|
||||||
procedure UpdateScrollBar;
|
procedure UpdateScrollBar;
|
||||||
@ -261,7 +261,6 @@ type
|
|||||||
procedure AvailComboBoxChange(Sender:TObject);
|
procedure AvailComboBoxChange(Sender:TObject);
|
||||||
procedure OnBackgroundColPopupMenuItemClick(Sender :TObject);
|
procedure OnBackgroundColPopupMenuItemClick(Sender :TObject);
|
||||||
procedure OnShowHintPopupMenuItemClick(Sender :TObject);
|
procedure OnShowHintPopupMenuItemClick(Sender :TObject);
|
||||||
procedure FormResize(Sender: TObject);
|
|
||||||
private
|
private
|
||||||
FComponentList: TComponentSelectionList;
|
FComponentList: TComponentSelectionList;
|
||||||
FPropertyEditorHook:TPropertyEditorHook;
|
FPropertyEditorHook:TPropertyEditorHook;
|
||||||
@ -276,7 +275,6 @@ type
|
|||||||
procedure PropEditLookupRootChange;
|
procedure PropEditLookupRootChange;
|
||||||
procedure OnGridModified(Sender: TObject);
|
procedure OnGridModified(Sender: TObject);
|
||||||
public
|
public
|
||||||
//procedure SetBounds(aLeft,aTop,aWidth,aHeight:integer); override;
|
|
||||||
property Selections:TComponentSelectionList
|
property Selections:TComponentSelectionList
|
||||||
read FComponentList write SetSelections;
|
read FComponentList write SetSelections;
|
||||||
procedure RefreshSelections;
|
procedure RefreshSelections;
|
||||||
@ -289,7 +287,6 @@ type
|
|||||||
property PropertyEditorHook:TPropertyEditorHook
|
property PropertyEditorHook:TPropertyEditorHook
|
||||||
read FPropertyEditorHook write SetPropertyEditorHook;
|
read FPropertyEditorHook write SetPropertyEditorHook;
|
||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
procedure DoInnerResize;
|
|
||||||
constructor Create(AnOwner: TComponent); override;
|
constructor Create(AnOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
@ -460,7 +457,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOIPropertyGrid.WMSize(var Msg: TWMSize);
|
procedure TOIPropertyGrid.WMSize(var Msg: TLMSize);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
UpdateScrollBar;
|
UpdateScrollBar;
|
||||||
@ -1647,6 +1644,7 @@ begin
|
|||||||
Name:='StatusBar';
|
Name:='StatusBar';
|
||||||
Parent:=Self;
|
Parent:=Self;
|
||||||
SimpleText:='All';
|
SimpleText:='All';
|
||||||
|
Align:= alBottom;
|
||||||
Visible:=true;
|
Visible:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1676,6 +1674,7 @@ begin
|
|||||||
Text:='';
|
Text:='';
|
||||||
OnChange:=@AvailComboBoxChange;
|
OnChange:=@AvailComboBoxChange;
|
||||||
//Sorted:=true;
|
//Sorted:=true;
|
||||||
|
Align:= alTop;
|
||||||
Visible:=true;
|
Visible:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1687,6 +1686,7 @@ begin
|
|||||||
Pages.Strings[0]:='Properties';
|
Pages.Strings[0]:='Properties';
|
||||||
Pages.Add('Events');
|
Pages.Add('Events');
|
||||||
PopupMenu:=MainPopupMenu;
|
PopupMenu:=MainPopupMenu;
|
||||||
|
Align:= alClient;
|
||||||
Visible:=true;
|
Visible:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1724,7 +1724,6 @@ begin
|
|||||||
Visible:=true;
|
Visible:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnResize:=@FormResize;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TObjectInspector.Destroy;
|
destructor TObjectInspector.Destroy;
|
||||||
@ -1733,22 +1732,6 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
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);
|
procedure TObjectInspector.SetPropertyEditorHook(NewValue:TPropertyEditorHook);
|
||||||
begin
|
begin
|
||||||
if FPropertyEditorHook<>NewValue then begin
|
if FPropertyEditorHook<>NewValue then begin
|
||||||
@ -1862,13 +1845,6 @@ begin
|
|||||||
EventGrid.RefreshPropertyValues;
|
EventGrid.RefreshPropertyValues;
|
||||||
end;
|
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);
|
procedure TObjectInspector.AvailComboBoxChange(Sender:TObject);
|
||||||
var NewComponent,Root:TComponent;
|
var NewComponent,Root:TComponent;
|
||||||
a:integer;
|
a:integer;
|
||||||
@ -1933,10 +1909,5 @@ begin
|
|||||||
EventGrid.ShowHint:=not EventGrid.ShowHint;
|
EventGrid.ShowHint:=not EventGrid.ShowHint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspector.FormResize(Sender: TObject);
|
|
||||||
begin
|
|
||||||
DoInnerResize;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -57,12 +57,12 @@ type
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TPage = class(TCustomControl)
|
TPage = class(TWinControl)
|
||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
procedure AttachSignals; override;
|
procedure AttachSignals; override;
|
||||||
procedure ReadState(Reader: TAbstractReader); override;
|
procedure ReadState(Reader: TAbstractReader); override;
|
||||||
procedure Paint; override;
|
//procedure Paint; override;
|
||||||
procedure WMPaint(var Msg: TLMPaint); message LM_PAINT;
|
procedure WMPaint(var Msg: TLMPaint); message LM_PAINT;
|
||||||
public
|
public
|
||||||
procedure AddControl; override;
|
procedure AddControl; override;
|
||||||
@ -435,6 +435,11 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.18 2002/02/24 20:51:23 lazarus
|
||||||
Improved TSpeedButton (Glyph, Spacing, Margin, drawing)
|
Improved TSpeedButton (Glyph, Spacing, Margin, drawing)
|
||||||
Added PageCount to TNotebook
|
Added PageCount to TNotebook
|
||||||
|
@ -93,6 +93,8 @@ LM_SETDESIGNING = LM_COMUSER+60;
|
|||||||
|
|
||||||
LM_SETSHORTCUT = LM_COMUSER+61;
|
LM_SETSHORTCUT = LM_COMUSER+61;
|
||||||
|
|
||||||
|
LM_SETGEOMETRY = LM_COMUSER+62;
|
||||||
|
|
||||||
//end of messages that are sent to the interface
|
//end of messages that are sent to the interface
|
||||||
|
|
||||||
|
|
||||||
@ -797,6 +799,11 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.20 2002/02/18 22:46:11 lazarus
|
||||||
Implented TMenuItem.ShortCut (not much tested).
|
Implented TMenuItem.ShortCut (not much tested).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user