diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-17 16:18:15 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-17 16:18:15 +0100 |
| commit | d884d5168984d36a5c08f4814e81b070d7c964d3 (patch) | |
| tree | 9743d99642487bececce0093866e71196a0731ba /libgtk_kylix/GTKExtCtrls.pas | |
| parent | cb5cb517c068a470662bd1d08bef61265376c802 (diff) | |
| download | tuxcmd-d884d5168984d36a5c08f4814e81b070d7c964d3.tar.xz | |
Use getters instead of direct access to structuresv0.6.71
This will hopefully fix remaining GUI issues on PPC64. Needs further testing!
Also, libgtk_kylix sources have been altered for use with gtk2forpascal-1.0.7 for Kylix compilation.
Diffstat (limited to 'libgtk_kylix/GTKExtCtrls.pas')
| -rw-r--r-- | libgtk_kylix/GTKExtCtrls.pas | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libgtk_kylix/GTKExtCtrls.pas b/libgtk_kylix/GTKExtCtrls.pas index 13ea30f..8ae5abc 100644 --- a/libgtk_kylix/GTKExtCtrls.pas +++ b/libgtk_kylix/GTKExtCtrls.pas @@ -456,9 +456,11 @@ begin inherited Destroy; end; +function _gtk_notebook_append_page(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget): gint; cdecl; external gtklib name 'gtk_notebook_append_page'; + function TGTKNotebook.AppendPage(Child: TGTKControl; Caption: string): integer; begin - Result := gtk_notebook_append_page(PGtkNotebook(FWidget), Child.FWidget, nil); + Result := _gtk_notebook_append_page(PGtkNotebook(FWidget), Child.FWidget, nil); gtk_notebook_set_tab_label_text(PGtkNotebook(FWidget), Child.FWidget, StringToPgchar(Caption)); end; @@ -537,12 +539,14 @@ begin gtk_notebook_set_scrollable(PGtkNotebook(FWidget), Value); end; +procedure _gtk_notebook_query_tab_label_packing(notebook:PGtkNotebook;child:PGtkWidget;expand:Pgboolean;fill:Pgboolean;pack_type:PGtkPackType); cdecl; external gtklib name 'gtk_notebook_query_tab_label_packing'; + function TGTKNotebook.GetExpandTab(PageNo: integer): boolean; -var expand, fill: Pgboolean; - packtype: PGtkPackType; +var expand: gboolean; begin - gtk_notebook_query_tab_label_packing(PGtkNotebook(FWidget), gtk_notebook_get_nth_page(PGtkNotebook(FWidget), PageNo), expand, fill, packtype); - Result := expand <> nil; + expand := False; + _gtk_notebook_query_tab_label_packing(PGtkNotebook(FWidget), gtk_notebook_get_nth_page(PGtkNotebook(FWidget), PageNo), @expand, nil, nil); + Result := expand; end; procedure TGTKNotebook.SetExpandTab(PageNo: integer; Value: boolean); @@ -551,11 +555,11 @@ begin end; function TGTKNotebook.GetFillTab(PageNo: integer): boolean; -var expand, fill: Pgboolean; - packtype: PGtkPackType; +var fill: gboolean; begin - gtk_notebook_query_tab_label_packing(PGtkNotebook(FWidget), gtk_notebook_get_nth_page(PGtkNotebook(FWidget), PageNo), expand, fill, packtype); - Result := fill <> nil; + fill := False; + _gtk_notebook_query_tab_label_packing(PGtkNotebook(FWidget), gtk_notebook_get_nth_page(PGtkNotebook(FWidget), PageNo), nil, @fill, nil); + Result := fill; end; procedure TGTKNotebook.SetFillTab(PageNo: integer; Value: boolean); |
