mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 20:30:33 +02:00
MG: JITForms now sets csDesigning before creation
git-svn-id: trunk@900 -
This commit is contained in:
parent
c402ffdf5a
commit
81c4bdafa2
@ -3583,50 +3583,33 @@ end;
|
|||||||
Tells GTK Engine to create a widget
|
Tells GTK Engine to create a widget
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TgtkObject.CreateComponent(Sender : TObject);
|
procedure TgtkObject.CreateComponent(Sender : TObject);
|
||||||
const
|
|
||||||
FormStyleMap : array[TFormBorderStyle] of integer = (
|
|
||||||
GTK_WINDOW_DIALOG, // bsNone
|
|
||||||
GTK_WINDOW_TOPLEVEL,// bsSingle
|
|
||||||
GTK_WINDOW_TOPLEVEL,// bsSizeable
|
|
||||||
GTK_WINDOW_DIALOG, // bsDialog
|
|
||||||
GTK_WINDOW_DIALOG, // bsToolWindow
|
|
||||||
GTK_WINDOW_DIALOG // bsSizeToolWin
|
|
||||||
);
|
|
||||||
FormResizableMap : array[TFormBorderStyle] of gint = (
|
|
||||||
0, // bsNone
|
|
||||||
1, // bsSingle
|
|
||||||
1, // bsSizeable
|
|
||||||
0, // bsDialog
|
|
||||||
0, // bsToolWindow
|
|
||||||
1 // bsSizeToolWin
|
|
||||||
);
|
|
||||||
//unused: FormBorderWidth : array[TFormBorderStyle] of gint = (0, 1, 2, 1, 1, 2);
|
|
||||||
|
|
||||||
//unused:type
|
//unused:type
|
||||||
//unused: Tpixdata = Array[1..20] of String;
|
//unused: Tpixdata = Array[1..20] of String;
|
||||||
|
|
||||||
var
|
var
|
||||||
Caption : ansistring; // the caption of "Sender"
|
Caption : ansistring; // the caption of "Sender"
|
||||||
StrTemp : PChar; // same as "caption" but as PChar
|
StrTemp : PChar; // same as "caption" but as PChar
|
||||||
TempWidget,
|
TempWidget,
|
||||||
TempWidget2 : PGTKWidget; // pointer to gtk-widget (local use when neccessary)
|
TempWidget2 : PGTKWidget; // pointer to gtk-widget (local use when neccessary)
|
||||||
p : pointer; // ptr to the newly created GtkWidget
|
p : pointer; // ptr to the newly created GtkWidget
|
||||||
CompStyle, // componentstyle (type) of GtkWidget which will be created
|
CompStyle, // componentstyle (type) of GtkWidget which will be created
|
||||||
TempInt : Integer; // local use when neccessary
|
TempInt : Integer; // local use when neccessary
|
||||||
Adjustment: PGTKAdjustment; // currently only used for csFixed
|
Adjustment: PGTKAdjustment; // currently only used for csFixed
|
||||||
// - for csBitBtn
|
// - for csBitBtn
|
||||||
Box : Pointer; // currently only used for TBitBtn and TForm and TListView
|
Box : Pointer; // currently only used for TBitBtn and TForm and TListView
|
||||||
//pixmap : pGdkPixMap; // TBitBtn - the default pixmap
|
//pixmap : pGdkPixMap; // TBitBtn - the default pixmap
|
||||||
pixmapwid : pGtkWidget; // currently only used for TBitBtn
|
pixmapwid : pGtkWidget; // currently only used for TBitBtn
|
||||||
//mask : pGDKBitmap; // currently only used for TBitBtn
|
//mask : pGDKBitmap; // currently only used for TBitBtn
|
||||||
//style : pgtkStyle; // currently only used for TBitBtn
|
//style : pgtkStyle; // currently only used for TBitBtn
|
||||||
label1 : pgtkwidget; // currently only used for TBitBtn
|
label1 : pgtkwidget; // currently only used for TBitBtn
|
||||||
//TempStr : String; // currently only used for TBitBtn to load default pixmap
|
//TempStr : String; // currently only used for TBitBtn to load default pixmap
|
||||||
//pStr : PChar; // currently only used for TBitBtn to load default pixmap
|
//pStr : PChar; // currently only used for TBitBtn to load default pixmap
|
||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomForm;
|
||||||
Accel : PChar;
|
Accel : PChar;
|
||||||
SetupProps : boolean;
|
SetupProps : boolean;
|
||||||
Titles: PPGChar;
|
Titles: PPGChar;
|
||||||
|
ABorderStyle: TFormBorderStyle;
|
||||||
|
|
||||||
procedure Set_RC_Name(AWidget: PGtkWidget);
|
procedure Set_RC_Name(AWidget: PGtkWidget);
|
||||||
var RCName: string;
|
var RCName: string;
|
||||||
@ -3826,10 +3809,16 @@ begin
|
|||||||
csForm :
|
csForm :
|
||||||
begin
|
begin
|
||||||
Assert(Sender is TForm);
|
Assert(Sender is TForm);
|
||||||
p := gtk_window_new(FormStyleMap[TForm(Sender).BorderStyle]);
|
|
||||||
|
|
||||||
gtk_window_set_policy (GTK_WINDOW (p), FormResizableMap[TForm(Sender).BorderStyle],
|
if csDesigning in TForm(Sender).ComponentState then
|
||||||
FormResizableMap[TForm(Sender).BorderStyle], 0);
|
ABorderStyle:=bsSizeable
|
||||||
|
else
|
||||||
|
ABorderStyle:=TForm(Sender).BorderStyle;
|
||||||
|
|
||||||
|
p := gtk_window_new(FormStyleMap[ABorderStyle]);
|
||||||
|
|
||||||
|
gtk_window_set_policy (GTK_WINDOW (p), FormResizableMap[ABorderStyle],
|
||||||
|
FormResizableMap[ABorderStyle], 0);
|
||||||
gtk_window_set_title(pGtkWindow(p), strTemp);
|
gtk_window_set_title(pGtkWindow(p), strTemp);
|
||||||
|
|
||||||
// the clipboard needs a widget
|
// the clipboard needs a widget
|
||||||
@ -5908,6 +5897,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.233 2002/10/06 17:55:45 lazarus
|
||||||
|
MG: JITForms now sets csDesigning before creation
|
||||||
|
|
||||||
Revision 1.232 2002/10/05 10:37:21 lazarus
|
Revision 1.232 2002/10/05 10:37:21 lazarus
|
||||||
MG: fixed TComboBox.ItemIndex on CreateWnd
|
MG: fixed TComboBox.ItemIndex on CreateWnd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user