distribution things
implemented native docking for menus and toolbars (see toolbar sample) someone may have to create the new wxMenuBar constructor corrected wxFileDlg appearance and made it i18n implemented defaults buttons improved look of all common dlgs except print setup corrected forty's player dlg added wxMB_DOCKABLE and wxTB_DOCKABLE flags augmented BETA_VERSION to 4 prevent wxListBox from sending a list_item_selected event when adding the first item to a list that is a single selection list using AppendXX() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -20,7 +20,7 @@ include/install-sh
|
|||||||
|
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/Makefile.in
|
src/Makefile.in
|
||||||
src/*.inc
|
src/gtk.inc
|
||||||
src/make.env
|
src/make.env
|
||||||
src/makelib.env
|
src/makelib.env
|
||||||
src/makeprog.env
|
src/makeprog.env
|
||||||
|
@@ -16,7 +16,7 @@ src/makelib.env
|
|||||||
|
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/Makefile.in
|
src/Makefile.in
|
||||||
src/*.inc
|
src/motif.inc
|
||||||
|
|
||||||
src/motif/*.cpp
|
src/motif/*.cpp
|
||||||
src/motif/*.c
|
src/motif/*.c
|
||||||
|
@@ -17,6 +17,12 @@ installed it, but you also have another version of the
|
|||||||
GTK installed, which you may need to removed including
|
GTK installed, which you may need to removed including
|
||||||
other versions of glib (and its headers).
|
other versions of glib (and its headers).
|
||||||
|
|
||||||
|
You get errors during compilation. The reason is that you
|
||||||
|
probably have a broken compiler, which includes almost
|
||||||
|
everything that is called gcc. If there is just any way
|
||||||
|
for you to use egcs, use egcs. We are sorry, but we cannot
|
||||||
|
fix gcc for the moment.
|
||||||
|
|
||||||
* The most simple program
|
* The most simple program
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
@@ -48,7 +54,7 @@ this has no effect, but I tried...
|
|||||||
|
|
||||||
wxWindows/GTK requires the GTK+ library to be installed on your system.
|
wxWindows/GTK requires the GTK+ library to be installed on your system.
|
||||||
It has to be a stable version, preferebly version 1.0.6. When using
|
It has to be a stable version, preferebly version 1.0.6. When using
|
||||||
a version previous to 1.0.6 you'll get crashes here and there.
|
a version previous to 1.0.6 you'll might get crashes here and there.
|
||||||
|
|
||||||
wxWindows/GTK does NOT work with the 1.1.X versions of the GTK+ library
|
wxWindows/GTK does NOT work with the 1.1.X versions of the GTK+ library
|
||||||
and we will wait until the 1.2 version comes out and has stabilized
|
and we will wait until the 1.2 version comes out and has stabilized
|
||||||
@@ -93,6 +99,10 @@ problem will disappear in the near future when all major
|
|||||||
Linux Variants have moved to glibc 2. Also, the Linux
|
Linux Variants have moved to glibc 2. Also, the Linux
|
||||||
Base Standard will include glibc 2 and Posix threads.
|
Base Standard will include glibc 2 and Posix threads.
|
||||||
|
|
||||||
|
NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE
|
||||||
|
ALL PROGRAMS WILL CRASH UPON START-UP. Just always
|
||||||
|
use egcs and be happy.
|
||||||
|
|
||||||
* Create your configuration
|
* Create your configuration
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
@@ -6,6 +6,6 @@
|
|||||||
# if you're feeling brave, you may wish to compile with threads.
|
# if you're feeling brave, you may wish to compile with threads.
|
||||||
# -- Julian Smart
|
# -- Julian Smart
|
||||||
chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
|
chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
|
||||||
./configure --with-shared --with-gtk --with-debug_flag --with-debug_info --without-threads -without-odbc
|
./configure --with-shared --with-gtk --with-debug_flag --with-debug_info --without-threads
|
||||||
make makefiles
|
make makefiles
|
||||||
make
|
make
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Welcome to wxWindows/Gtk 2.01 (beta 3),
|
Welcome to wxWindows/Gtk 2.01 (beta 4),
|
||||||
|
|
||||||
you have downloaded version 2.01 of the GTK+ 1.0 port of
|
you have downloaded version 2.01 of the GTK+ 1.0 port of
|
||||||
the wxWindows GUI library.
|
the wxWindows GUI library.
|
||||||
|
@@ -7,7 +7,7 @@ OwnerDraw for wxListCtrl and others
|
|||||||
-> Postponed.
|
-> Postponed.
|
||||||
|
|
||||||
DnD
|
DnD
|
||||||
-> Must be rewritten for GTK+ 1.1.3
|
-> Must be rewritten for GTK+ 1.2
|
||||||
|
|
||||||
wxDebugContext <-> wxLogXXX functions
|
wxDebugContext <-> wxLogXXX functions
|
||||||
-> Remove either
|
-> Remove either
|
||||||
@@ -15,8 +15,11 @@ wxDebugContext <-> wxLogXXX functions
|
|||||||
Implement wxPalette
|
Implement wxPalette
|
||||||
-> I never understood that. Postponed.
|
-> I never understood that. Postponed.
|
||||||
|
|
||||||
|
Implement different visuals and displays
|
||||||
|
-> I never understood that. Postponed.
|
||||||
|
|
||||||
Show accelerator in menus
|
Show accelerator in menus
|
||||||
-> Changed in GTK 1.1.X. Postponed.
|
-> Changed in GTK 1.2. Postponed.
|
||||||
|
|
||||||
Cooperation with Qt
|
Cooperation with Qt
|
||||||
-> Would be nice.
|
-> Would be nice.
|
||||||
|
@@ -437,17 +437,24 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
/*
|
/*
|
||||||
* wxToolBar style flags
|
* wxToolBar style flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxTB_3DBUTTONS 0x8000
|
#define wxTB_3DBUTTONS 0x8000
|
||||||
#define wxTB_HORIZONTAL 0x0002
|
#define wxTB_HORIZONTAL 0x0002
|
||||||
#define wxTB_VERTICAL 0x0004
|
#define wxTB_VERTICAL 0x0004
|
||||||
// Flatbar/Coolbar under Win98
|
// Flatbar/Coolbar under Win98
|
||||||
#define wxTB_FLAT 0x0008
|
#define wxTB_FLAT 0x0008
|
||||||
|
// use native docking
|
||||||
|
#define wxTB_DOCKABLE 0x0010
|
||||||
|
|
||||||
|
/*
|
||||||
|
* wxMenuBar style flags
|
||||||
|
*/
|
||||||
|
// use native docking
|
||||||
|
#define wxMB_DOCKABLE 0x0001
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Apply to all panel items
|
* Apply to all panel items
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxCOLOURED 0x0800
|
#define wxCOLOURED 0x0800
|
||||||
// Alignment for panel item labels: replaces characters with zeros
|
// Alignment for panel item labels: replaces characters with zeros
|
||||||
// when creating label, so spaces can be included in string for alignment.
|
// when creating label, so spaces can be included in string for alignment.
|
||||||
@@ -460,7 +467,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
/*
|
/*
|
||||||
* Styles for wxListBox
|
* Styles for wxListBox
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxLB_SORT 0x0010
|
#define wxLB_SORT 0x0010
|
||||||
#define wxLB_SINGLE 0x0020
|
#define wxLB_SINGLE 0x0020
|
||||||
#define wxLB_MULTIPLE 0x0040
|
#define wxLB_MULTIPLE 0x0040
|
||||||
@@ -516,7 +522,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
/*
|
/*
|
||||||
* wxSlider flags
|
* wxSlider flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxSL_HORIZONTAL wxHORIZONTAL
|
#define wxSL_HORIZONTAL wxHORIZONTAL
|
||||||
#define wxSL_VERTICAL wxVERTICAL
|
#define wxSL_VERTICAL wxVERTICAL
|
||||||
// The next one is obsolete - use scroll events instead
|
// The next one is obsolete - use scroll events instead
|
||||||
@@ -534,21 +539,18 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
/*
|
/*
|
||||||
* wxScrollBar flags
|
* wxScrollBar flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxSB_HORIZONTAL wxHORIZONTAL
|
#define wxSB_HORIZONTAL wxHORIZONTAL
|
||||||
#define wxSB_VERTICAL wxVERTICAL
|
#define wxSB_VERTICAL wxVERTICAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxButton flags
|
* wxButton flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxBU_AUTODRAW 0x0004
|
#define wxBU_AUTODRAW 0x0004
|
||||||
#define wxBU_NOAUTODRAW 0x0000
|
#define wxBU_NOAUTODRAW 0x0000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxTreeCtrl flags
|
* wxTreeCtrl flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxTR_HAS_BUTTONS 0x0004
|
#define wxTR_HAS_BUTTONS 0x0004
|
||||||
#define wxTR_EDIT_LABELS 0x0008
|
#define wxTR_EDIT_LABELS 0x0008
|
||||||
#define wxTR_LINES_AT_ROOT 0x0010
|
#define wxTR_LINES_AT_ROOT 0x0010
|
||||||
@@ -556,7 +558,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
/*
|
/*
|
||||||
* wxListCtrl flags
|
* wxListCtrl flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxLC_ICON 0x0004
|
#define wxLC_ICON 0x0004
|
||||||
#define wxLC_SMALL_ICON 0x0008
|
#define wxLC_SMALL_ICON 0x0008
|
||||||
#define wxLC_LIST 0x0010
|
#define wxLC_LIST 0x0010
|
||||||
|
@@ -44,6 +44,7 @@ class wxMenuBar: public wxWindow
|
|||||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
wxMenuBar( long style );
|
||||||
wxMenuBar();
|
wxMenuBar();
|
||||||
void Append( wxMenu *menu, const wxString &title );
|
void Append( wxMenu *menu, const wxString &title );
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@ class wxMenuBar: public wxWindow
|
|||||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
wxMenuBar( long style );
|
||||||
wxMenuBar();
|
wxMenuBar();
|
||||||
void Append( wxMenu *menu, const wxString &title );
|
void Append( wxMenu *menu, const wxString &title );
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#define wxRELEASE_NUMBER 1
|
#define wxRELEASE_NUMBER 1
|
||||||
#define wxVERSION_STRING "wxWindows 2.0.1"
|
#define wxVERSION_STRING "wxWindows 2.0.1"
|
||||||
#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
|
#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
|
||||||
#define wxBETA_NUMBER 3
|
#define wxBETA_NUMBER 4
|
||||||
#define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
|
#define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -153,9 +153,7 @@ void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
if (event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED)
|
if (event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED)
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK__
|
// if (event.IsSelection())
|
||||||
if (event.IsSelection())
|
|
||||||
#endif
|
|
||||||
m_textField->SetValue(event.GetString());
|
m_textField->SetValue(event.GetString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -61,7 +61,7 @@ bool MyApp::OnInit(void)
|
|||||||
wxMenu *helpMenu = new wxMenu;
|
wxMenu *helpMenu = new wxMenu;
|
||||||
helpMenu->Append(wxID_HELP, "&About", "About toolbar sample");
|
helpMenu->Append(wxID_HELP, "&About", "About toolbar sample");
|
||||||
|
|
||||||
wxMenuBar* menuBar = new wxMenuBar;
|
wxMenuBar* menuBar = new wxMenuBar( wxMB_DOCKABLE );
|
||||||
|
|
||||||
menuBar->Append(fileMenu, "&File");
|
menuBar->Append(fileMenu, "&File");
|
||||||
menuBar->Append(helpMenu, "&Help");
|
menuBar->Append(helpMenu, "&Help");
|
||||||
@@ -70,7 +70,7 @@ bool MyApp::OnInit(void)
|
|||||||
frame->SetMenuBar(menuBar);
|
frame->SetMenuBar(menuBar);
|
||||||
|
|
||||||
// Create the toolbar
|
// Create the toolbar
|
||||||
frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT, ID_TOOLBAR);
|
frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT|wxTB_DOCKABLE, ID_TOOLBAR);
|
||||||
|
|
||||||
frame->GetToolBar()->SetMargins( 2, 2 );
|
frame->GetToolBar()->SetMargins( 2, 2 );
|
||||||
|
|
||||||
|
@@ -284,6 +284,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
|||||||
// Insert a sizer for the buttons
|
// Insert a sizer for the buttons
|
||||||
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
||||||
buttonSizer->SetName("buttonSizer");
|
buttonSizer->SetName("buttonSizer");
|
||||||
|
buttonSizer->SetSpacing(12,0);
|
||||||
|
|
||||||
// Specify constraints for the button sizer
|
// Specify constraints for the button sizer
|
||||||
wxLayoutConstraints *c = new wxLayoutConstraints;
|
wxLayoutConstraints *c = new wxLayoutConstraints;
|
||||||
@@ -297,12 +298,12 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
|||||||
wxButton *cancel = NULL;
|
wxButton *cancel = NULL;
|
||||||
|
|
||||||
if (style & wxOK) {
|
if (style & wxOK) {
|
||||||
ok = new wxButton(this, wxID_OK, _("OK"));
|
ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
buttonSizer->AddSizerChild(ok);
|
buttonSizer->AddSizerChild(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style & wxCANCEL) {
|
if (style & wxCANCEL) {
|
||||||
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1));
|
||||||
buttonSizer->AddSizerChild(cancel);
|
buttonSizer->AddSizerChild(cancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -228,11 +228,11 @@ void wxGenericColourDialog::CreateWidgets(void)
|
|||||||
{
|
{
|
||||||
wxBeginBusyCursor();
|
wxBeginBusyCursor();
|
||||||
|
|
||||||
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY));
|
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY), wxSize(75,-1) );
|
||||||
int bw, bh;
|
int bw, bh;
|
||||||
okButton->GetSize(&bw, &bh);
|
okButton->GetSize(&bw, &bh);
|
||||||
|
|
||||||
(void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY));
|
(void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY), wxSize(75,-1));
|
||||||
(void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
|
(void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
|
||||||
wxPoint(customButtonX, buttonY));
|
wxPoint(customButtonX, buttonY));
|
||||||
|
|
||||||
|
@@ -338,7 +338,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
|
|||||||
m_input = new wxTextCtrl( this, ID_TEXTCTRL, m_path, wxDefaultPosition );
|
m_input = new wxTextCtrl( this, ID_TEXTCTRL, m_path, wxDefaultPosition );
|
||||||
// m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden") );
|
// m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden") );
|
||||||
m_ok = new wxButton( this, ID_OK, _("OK") );
|
m_ok = new wxButton( this, ID_OK, _("OK") );
|
||||||
m_cancel = new wxButton( this, ID_CANCEL, _("Cancel") );
|
m_cancel = new wxButton( this, ID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
m_new = new wxButton( this, ID_NEW, _("New...") );
|
m_new = new wxButton( this, ID_NEW, _("New...") );
|
||||||
|
|
||||||
// m_check->SetValue(TRUE);
|
// m_check->SetValue(TRUE);
|
||||||
@@ -364,7 +364,7 @@ void wxDirDialog::doSize()
|
|||||||
m_input->GetSize(&w,&h2); h -= h2;
|
m_input->GetSize(&w,&h2); h -= h2;
|
||||||
m_ok->GetSize(&w, &h2); h -= h2;
|
m_ok->GetSize(&w, &h2); h -= h2;
|
||||||
//m_check->GetSize(&w, &h2); h -= h2;
|
//m_check->GetSize(&w, &h2); h -= h2;
|
||||||
h -= 20;
|
h -= 30;
|
||||||
|
|
||||||
wxLayoutConstraints *c = new wxLayoutConstraints;
|
wxLayoutConstraints *c = new wxLayoutConstraints;
|
||||||
c->left.SameAs (this, wxLeft,5);
|
c->left.SameAs (this, wxLeft,5);
|
||||||
@@ -390,14 +390,14 @@ void wxDirDialog::doSize()
|
|||||||
c = new wxLayoutConstraints;
|
c = new wxLayoutConstraints;
|
||||||
c->width.SameAs (m_cancel, wxWidth);
|
c->width.SameAs (m_cancel, wxWidth);
|
||||||
c->height.AsIs ();
|
c->height.AsIs ();
|
||||||
c->top.Below (m_input,5);
|
c->top.Below (m_input,10);
|
||||||
c->centreX.PercentOf (this, wxWidth, 25);
|
c->centreX.PercentOf (this, wxWidth, 20);
|
||||||
m_ok->SetConstraints(c);
|
m_ok->SetConstraints(c);
|
||||||
|
|
||||||
c = new wxLayoutConstraints;
|
c = new wxLayoutConstraints;
|
||||||
c->width.SameAs (m_cancel, wxWidth);
|
c->width.SameAs (m_cancel, wxWidth);
|
||||||
c->height.AsIs ();
|
c->height.AsIs ();
|
||||||
c->top.Below (m_input,5);
|
c->top.Below (m_input,10);
|
||||||
c->bottom.SameAs (this, wxBottom, 5);
|
c->bottom.SameAs (this, wxBottom, 5);
|
||||||
c->centreX.PercentOf (this, wxWidth, 50);
|
c->centreX.PercentOf (this, wxWidth, 50);
|
||||||
m_new->SetConstraints(c);
|
m_new->SetConstraints(c);
|
||||||
@@ -405,8 +405,8 @@ void wxDirDialog::doSize()
|
|||||||
c = new wxLayoutConstraints;
|
c = new wxLayoutConstraints;
|
||||||
c->width.AsIs ();
|
c->width.AsIs ();
|
||||||
c->height.AsIs ();
|
c->height.AsIs ();
|
||||||
c->top.Below (m_input,5);
|
c->top.Below (m_input,10);
|
||||||
c->centreX.PercentOf (this, wxWidth, 75);
|
c->centreX.PercentOf (this, wxWidth, 80);
|
||||||
m_cancel->SetConstraints(c);
|
m_cancel->SetConstraints(c);
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
@@ -255,10 +255,10 @@ void wxGenericFontDialog::CreateWidgets(void)
|
|||||||
|
|
||||||
fontRect.y+=y+5; //NL mod
|
fontRect.y+=y+5; //NL mod
|
||||||
|
|
||||||
int by = (fontRect.y + fontRect.height + 10);
|
int by = (fontRect.y + fontRect.height + 15);
|
||||||
|
|
||||||
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(220, by), wxSize(100,-1));
|
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(230, by), wxSize(75,-1));
|
||||||
(void) new wxButton(this, wxID_OK, _("Cancel"), wxPoint(340, by), wxSize(100,-1));
|
(void) new wxButton(this, wxID_OK, _("Cancel"), wxPoint(330, by), wxSize(75,-1));
|
||||||
|
|
||||||
familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
|
familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
|
||||||
styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
|
styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
|
||||||
|
@@ -111,6 +111,7 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
|
|||||||
|
|
||||||
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
||||||
buttonSizer->SetName("buttonSizer");
|
buttonSizer->SetName("buttonSizer");
|
||||||
|
buttonSizer->SetSpacing(12,0);
|
||||||
|
|
||||||
// Specify constraints for the button sizer
|
// Specify constraints for the button sizer
|
||||||
wxLayoutConstraints *c = new wxLayoutConstraints;
|
wxLayoutConstraints *c = new wxLayoutConstraints;
|
||||||
@@ -126,20 +127,20 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
|
|||||||
wxButton *no = (wxButton *) NULL;
|
wxButton *no = (wxButton *) NULL;
|
||||||
|
|
||||||
if (style & wxYES_NO) {
|
if (style & wxYES_NO) {
|
||||||
yes = new wxButton(this, wxID_YES, _("Yes"));
|
yes = new wxButton(this, wxID_YES, _("Yes"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
no = new wxButton(this, wxID_NO, _("No"));
|
no = new wxButton(this, wxID_NO, _("No"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
|
|
||||||
buttonSizer->AddSizerChild(yes);
|
buttonSizer->AddSizerChild(yes);
|
||||||
buttonSizer->AddSizerChild(no);
|
buttonSizer->AddSizerChild(no);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style & wxOK) {
|
if (style & wxOK) {
|
||||||
ok = new wxButton(this, wxID_OK, _("OK"));
|
ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
buttonSizer->AddSizerChild(ok);
|
buttonSizer->AddSizerChild(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style & wxCANCEL) {
|
if (style & wxCANCEL) {
|
||||||
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1) );
|
||||||
buttonSizer->AddSizerChild(cancel);
|
buttonSizer->AddSizerChild(cancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,17 +127,18 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message,
|
|||||||
c->top.Below (spacingSizer2);
|
c->top.Below (spacingSizer2);
|
||||||
c->centreX.SameAs (textSizer, wxCentreX);
|
c->centreX.SameAs (textSizer, wxCentreX);
|
||||||
buttonSizer->SetConstraints(c);
|
buttonSizer->SetConstraints(c);
|
||||||
|
buttonSizer->SetSpacing(12,0);
|
||||||
|
|
||||||
wxButton *ok = NULL;
|
wxButton *ok = NULL;
|
||||||
wxButton *cancel = NULL;
|
wxButton *cancel = NULL;
|
||||||
|
|
||||||
if (style & wxOK) {
|
if (style & wxOK) {
|
||||||
ok = new wxButton(this, wxID_OK, _("OK"));
|
ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1));
|
||||||
buttonSizer->AddSizerChild(ok);
|
buttonSizer->AddSizerChild(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style & wxCANCEL) {
|
if (style & wxCANCEL) {
|
||||||
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1));
|
||||||
buttonSizer->AddSizerChild(cancel);
|
buttonSizer->AddSizerChild(cancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -163,10 +163,10 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
|
|
||||||
void wxBitmapButton::SetDefault()
|
void wxBitmapButton::SetDefault()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
||||||
gtk_widget_grab_default( m_widget );
|
gtk_widget_grab_default( m_widget );
|
||||||
*/
|
|
||||||
|
SetSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapButton::SetLabel( const wxString &label )
|
void wxBitmapButton::SetLabel( const wxString &label )
|
||||||
|
@@ -97,10 +97,10 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
|
|
||||||
void wxButton::SetDefault(void)
|
void wxButton::SetDefault(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
||||||
gtk_widget_grab_default( m_widget );
|
gtk_widget_grab_default( m_widget );
|
||||||
*/
|
|
||||||
|
SetSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxButton::SetLabel( const wxString &label )
|
void wxButton::SetLabel( const wxString &label )
|
||||||
|
@@ -110,6 +110,7 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
gtk_widget_set_uposition( m_widget, x, y );
|
gtk_widget_set_uposition( m_widget, x, y );
|
||||||
|
|
||||||
GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
|
GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
|
||||||
|
gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway
|
||||||
|
|
||||||
m_path.Append(m_dir);
|
m_path.Append(m_dir);
|
||||||
if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/');
|
if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/');
|
||||||
@@ -120,9 +121,15 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
|
gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
// strange way to internationalize
|
||||||
|
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), _("OK") );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
|
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
// strange way to internationalize
|
||||||
|
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), _("Cancel") );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
|
||||||
}
|
}
|
||||||
|
@@ -316,6 +316,8 @@ void wxListBox::AppendCommon( const wxString &item )
|
|||||||
list_item = gtk_list_item_new_with_label( item );
|
list_item = gtk_list_item_new_with_label( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_list), list_item );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
||||||
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
||||||
|
|
||||||
@@ -323,8 +325,6 @@ void wxListBox::AppendCommon( const wxString &item )
|
|||||||
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
|
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
|
||||||
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_container_add( GTK_CONTAINER(m_list), list_item );
|
|
||||||
|
|
||||||
if (m_widgetStyle) ApplyWidgetStyle();
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||||
|
@@ -26,6 +26,32 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
|
||||||
|
|
||||||
|
wxMenuBar::wxMenuBar( long style )
|
||||||
|
{
|
||||||
|
m_needParent = FALSE; // hmmm
|
||||||
|
|
||||||
|
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
|
||||||
|
|
||||||
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
m_menubar = gtk_menu_bar_new();
|
||||||
|
|
||||||
|
if (style & wxMB_DOCKABLE)
|
||||||
|
{
|
||||||
|
m_widget = gtk_handle_box_new();
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_menubar) );
|
||||||
|
gtk_widget_show( GTK_WIDGET(m_menubar) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_widget = GTK_WIDGET(m_menubar);
|
||||||
|
}
|
||||||
|
|
||||||
|
PostCreation();
|
||||||
|
|
||||||
|
Show( TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
wxMenuBar::wxMenuBar()
|
wxMenuBar::wxMenuBar()
|
||||||
{
|
{
|
||||||
m_needParent = FALSE; // hmmm
|
m_needParent = FALSE; // hmmm
|
||||||
|
@@ -124,7 +124,16 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
|||||||
gtk_toolbar_set_space_size( m_toolbar, m_separation );
|
gtk_toolbar_set_space_size( m_toolbar, m_separation );
|
||||||
m_hasToolAlready = FALSE;
|
m_hasToolAlready = FALSE;
|
||||||
|
|
||||||
|
if (style & wxTB_DOCKABLE)
|
||||||
|
{
|
||||||
|
m_widget = gtk_handle_box_new();
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
|
||||||
|
gtk_widget_show( GTK_WIDGET(m_toolbar) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_widget = GTK_WIDGET(m_toolbar);
|
m_widget = GTK_WIDGET(m_toolbar);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
||||||
|
|
||||||
|
@@ -1828,12 +1828,25 @@ void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||||
|
|
||||||
|
if (GTK_WIDGET_HAS_DEFAULT(m_widget))
|
||||||
|
{
|
||||||
|
/* the default button has a border around it */
|
||||||
|
int border = 5;
|
||||||
|
|
||||||
|
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
||||||
|
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x-border, m_y+pt.y-border );
|
||||||
|
|
||||||
|
gtk_widget_set_usize( m_widget, m_width+2*border, m_height+2*border );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
||||||
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
|
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
|
||||||
|
|
||||||
if ((old_width != m_width) || (old_height != m_height))
|
if ((old_width != m_width) || (old_height != m_height))
|
||||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_sizeSet = TRUE;
|
m_sizeSet = TRUE;
|
||||||
|
|
||||||
|
@@ -163,10 +163,10 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
|
|
||||||
void wxBitmapButton::SetDefault()
|
void wxBitmapButton::SetDefault()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
||||||
gtk_widget_grab_default( m_widget );
|
gtk_widget_grab_default( m_widget );
|
||||||
*/
|
|
||||||
|
SetSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapButton::SetLabel( const wxString &label )
|
void wxBitmapButton::SetLabel( const wxString &label )
|
||||||
|
@@ -97,10 +97,10 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
|
|
||||||
void wxButton::SetDefault(void)
|
void wxButton::SetDefault(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
||||||
gtk_widget_grab_default( m_widget );
|
gtk_widget_grab_default( m_widget );
|
||||||
*/
|
|
||||||
|
SetSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxButton::SetLabel( const wxString &label )
|
void wxButton::SetLabel( const wxString &label )
|
||||||
|
@@ -110,6 +110,7 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
gtk_widget_set_uposition( m_widget, x, y );
|
gtk_widget_set_uposition( m_widget, x, y );
|
||||||
|
|
||||||
GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
|
GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
|
||||||
|
gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway
|
||||||
|
|
||||||
m_path.Append(m_dir);
|
m_path.Append(m_dir);
|
||||||
if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/');
|
if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/');
|
||||||
@@ -120,9 +121,15 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
|
gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
// strange way to internationalize
|
||||||
|
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), _("OK") );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
|
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
// strange way to internationalize
|
||||||
|
gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), _("Cancel") );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
|
||||||
}
|
}
|
||||||
|
@@ -316,6 +316,8 @@ void wxListBox::AppendCommon( const wxString &item )
|
|||||||
list_item = gtk_list_item_new_with_label( item );
|
list_item = gtk_list_item_new_with_label( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_list), list_item );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
||||||
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
||||||
|
|
||||||
@@ -323,8 +325,6 @@ void wxListBox::AppendCommon( const wxString &item )
|
|||||||
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
|
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
|
||||||
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_container_add( GTK_CONTAINER(m_list), list_item );
|
|
||||||
|
|
||||||
if (m_widgetStyle) ApplyWidgetStyle();
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||||
|
@@ -26,6 +26,32 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
|
||||||
|
|
||||||
|
wxMenuBar::wxMenuBar( long style )
|
||||||
|
{
|
||||||
|
m_needParent = FALSE; // hmmm
|
||||||
|
|
||||||
|
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
|
||||||
|
|
||||||
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
m_menubar = gtk_menu_bar_new();
|
||||||
|
|
||||||
|
if (style & wxMB_DOCKABLE)
|
||||||
|
{
|
||||||
|
m_widget = gtk_handle_box_new();
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_menubar) );
|
||||||
|
gtk_widget_show( GTK_WIDGET(m_menubar) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_widget = GTK_WIDGET(m_menubar);
|
||||||
|
}
|
||||||
|
|
||||||
|
PostCreation();
|
||||||
|
|
||||||
|
Show( TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
wxMenuBar::wxMenuBar()
|
wxMenuBar::wxMenuBar()
|
||||||
{
|
{
|
||||||
m_needParent = FALSE; // hmmm
|
m_needParent = FALSE; // hmmm
|
||||||
|
@@ -124,7 +124,16 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
|||||||
gtk_toolbar_set_space_size( m_toolbar, m_separation );
|
gtk_toolbar_set_space_size( m_toolbar, m_separation );
|
||||||
m_hasToolAlready = FALSE;
|
m_hasToolAlready = FALSE;
|
||||||
|
|
||||||
|
if (style & wxTB_DOCKABLE)
|
||||||
|
{
|
||||||
|
m_widget = gtk_handle_box_new();
|
||||||
|
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
|
||||||
|
gtk_widget_show( GTK_WIDGET(m_toolbar) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_widget = GTK_WIDGET(m_toolbar);
|
m_widget = GTK_WIDGET(m_toolbar);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
||||||
|
|
||||||
|
@@ -1828,12 +1828,25 @@ void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
|
||||||
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
|
||||||
|
|
||||||
|
if (GTK_WIDGET_HAS_DEFAULT(m_widget))
|
||||||
|
{
|
||||||
|
/* the default button has a border around it */
|
||||||
|
int border = 5;
|
||||||
|
|
||||||
|
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
||||||
|
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x-border, m_y+pt.y-border );
|
||||||
|
|
||||||
|
gtk_widget_set_usize( m_widget, m_width+2*border, m_height+2*border );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
wxPoint pt( m_parent->GetClientAreaOrigin() );
|
||||||
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
|
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
|
||||||
|
|
||||||
if ((old_width != m_width) || (old_height != m_height))
|
if ((old_width != m_width) || (old_height != m_height))
|
||||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_sizeSet = TRUE;
|
m_sizeSet = TRUE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user