mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 00:35:56 +02:00
MG: TNotebook is now streamable
git-svn-id: trunk@801 -
This commit is contained in:
parent
dd48bbf613
commit
7b68ee0230
@ -1332,19 +1332,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
LM_AddPage :
|
LM_AddPage :
|
||||||
begin
|
if Sender is TCustomNoteBook then begin
|
||||||
if Sender is TControl then begin
|
AddNBPage(TControl(Sender), TLMNotebookEvent(Data^).Child,
|
||||||
Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> Add NB page: %s', [Sender.ClassName, TLMNotebookEvent(Data^).Child.ClassName]));
|
|
||||||
AddNBPage(TControl(Sender), TLMNotebookEvent(Data^).Child,
|
|
||||||
TLMNotebookEvent(Data^).Page);
|
TLMNotebookEvent(Data^).Page);
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
LM_RemovePage :
|
LM_RemovePage :
|
||||||
begin
|
if Sender is TCustomNoteBook then begin
|
||||||
if Sender is TControl then
|
|
||||||
RemoveNBPage(TControl(Sender), TLMNotebookEvent(Data^).Page);
|
RemoveNBPage(TControl(Sender), TLMNotebookEvent(Data^).Page);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
LM_MovePage :
|
||||||
|
if Sender is TCustomNoteBook then begin
|
||||||
|
MoveNBPage(TControl(Sender), TLMNotebookEvent(Data^).Child,
|
||||||
|
TLMNotebookEvent(Data^).Page);
|
||||||
|
end;
|
||||||
|
|
||||||
LM_ShowTabs :
|
LM_ShowTabs :
|
||||||
begin
|
begin
|
||||||
@ -2747,7 +2749,14 @@ begin
|
|||||||
then
|
then
|
||||||
DestroyCaret(Handle);
|
DestroyCaret(Handle);
|
||||||
|
|
||||||
if Sender is TCommonDialog then begin
|
if Sender is TControl then begin
|
||||||
|
case TControl(Sender).fCompStyle of
|
||||||
|
csComboBox:
|
||||||
|
SetComboBoxText(PGtkCombo(Handle),nil);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else if Sender is TCommonDialog then begin
|
||||||
DestroyCommonDialogAddOns(TCommonDialog(Sender));
|
DestroyCommonDialogAddOns(TCommonDialog(Sender));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4539,6 +4548,20 @@ begin
|
|||||||
UpdateNoteBookClientWidget(ANoteBook);
|
UpdateNoteBookClientWidget(ANoteBook);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
procedure TgtkObject.MoveNBPage(ANoteBook, APage: TObject; NewIndex: Integer);
|
||||||
|
|
||||||
|
Move a notebook page.
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TgtkObject.MoveNBPage(ANoteBook, APage: TObject; NewIndex: Integer);
|
||||||
|
var
|
||||||
|
NoteBookWidget: PGtkNotebook;
|
||||||
|
begin
|
||||||
|
NoteBookWidget:=PGtkNotebook(TWinControl(ANoteBook).Handle);
|
||||||
|
gtk_notebook_reorder_child(NoteBookWidget,
|
||||||
|
PGtkWidget(TWinControl(APage).Handle),NewIndex);
|
||||||
|
UpdateNoteBookClientWidget(ANoteBook);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TGtkObject ReDraw }
|
{ TGtkObject ReDraw }
|
||||||
@ -4546,20 +4569,21 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
procedure TgtkObject.ReDraw(Child : Pointer);
|
procedure TgtkObject.ReDraw(Child : Pointer);
|
||||||
var
|
var
|
||||||
fWindow :pGdkWindow;
|
fWindow :pGdkWindow;
|
||||||
widget : PgtkWIdget;
|
widget : PgtkWIdget;
|
||||||
PixMap : pgdkPixMap;
|
PixMap : pgdkPixMap;
|
||||||
//gc : PGDKGc;
|
//gc : PGDKGc;
|
||||||
begin
|
begin
|
||||||
Assert(False, 'Trace:In AutoRedraw in GTKObject');
|
Assert(False, 'Trace:In AutoRedraw in GTKObject');
|
||||||
|
|
||||||
Widget := GetFixedWidget(Child);
|
Widget := GetFixedWidget(Child);
|
||||||
pixmap := gtk_Object_get_data(pgtkobject(Child),'Pixmap');
|
pixmap := gtk_Object_get_data(pgtkobject(Child),'Pixmap');
|
||||||
if PixMap = nil then Exit;
|
if PixMap = nil then Exit;
|
||||||
fWindow := pGtkWidget(widget)^.window;
|
fWindow := pGtkWidget(widget)^.window;
|
||||||
//gc := gdk_gc_new(PgdkWindow(fWindow));
|
//gc := gdk_gc_new(PgdkWindow(fWindow));
|
||||||
|
|
||||||
gdk_draw_pixmap(fwindow,PGtkStyle(widget^.TheStyle)^.fg_gc[GTK_WIDGET_STATE (widget)],
|
gdk_draw_pixmap(fwindow,
|
||||||
|
PGtkStyle(widget^.TheStyle)^.fg_gc[GTK_WIDGET_STATE (widget)],
|
||||||
pixmap,
|
pixmap,
|
||||||
0,0,
|
0,0,
|
||||||
0,0,
|
0,0,
|
||||||
@ -5700,7 +5724,11 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.199 2002/09/05 12:11:44 lazarus
|
||||||
|
MG: TNotebook is now streamable
|
||||||
|
|
||||||
Revision 1.198 2002/09/05 10:12:07 lazarus
|
Revision 1.198 2002/09/05 10:12:07 lazarus
|
||||||
|
|
||||||
New dialog for multiline caption of TCustomLabel.
|
New dialog for multiline caption of TCustomLabel.
|
||||||
Prettified TStrings property editor.
|
Prettified TStrings property editor.
|
||||||
Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property
|
Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property
|
||||||
|
Loading…
Reference in New Issue
Block a user