Big color update with the newest information
from the GTK+ hot-line, eh mail-list. The news is that they don't know what they do. Conversion from 12pt, wxSWISS, wxNORMAL, wxNORMAL to GTK+ system font Probably some other things git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -5977,7 +5977,7 @@ else
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
min_gtk_version=0.99.7
|
min_gtk_version=1.0.6
|
||||||
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
|
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
|
||||||
echo "configure:5983: checking for GTK - version >= $min_gtk_version" >&5
|
echo "configure:5983: checking for GTK - version >= $min_gtk_version" >&5
|
||||||
no_gtk=""
|
no_gtk=""
|
||||||
@@ -6041,7 +6041,7 @@ fi
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
GTK_CFLAGS=""
|
GTK_CFLAGS=""
|
||||||
GTK_LIBS=""
|
GTK_LIBS=""
|
||||||
{ echo "configure: error: Are gtk-config and the GTK in path and up-to-date?" 1>&2; exit 1; }
|
{ echo "configure: error: Is gtk-config in path and GTK+ is version 1.0.6?" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1000,10 +1000,10 @@ GUI_TK_LINK=
|
|||||||
MAKEINCLUDE=
|
MAKEINCLUDE=
|
||||||
|
|
||||||
if test "$wxUSE_GTK" = 1; then
|
if test "$wxUSE_GTK" = 1; then
|
||||||
AM_PATH_GTK(0.99.7, [
|
AM_PATH_GTK(1.0.6, [
|
||||||
GUI_TK_INCLUDE="$GTK_CFLAGS"
|
GUI_TK_INCLUDE="$GTK_CFLAGS"
|
||||||
GUI_TK_LIBRARY="$GTK_LIBS"
|
GUI_TK_LIBRARY="$GTK_LIBS"
|
||||||
], AC_MSG_ERROR(Are gtk-config and the GTK in path and up-to-date?))
|
], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.6?))
|
||||||
TOOLKIT=GTK
|
TOOLKIT=GTK
|
||||||
TOOLKIT_DEF=__WXGTK__
|
TOOLKIT_DEF=__WXGTK__
|
||||||
MAKEINCLUDE=../gtk.inc
|
MAKEINCLUDE=../gtk.inc
|
||||||
|
@@ -35,38 +35,50 @@ for newest information.
|
|||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
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.
|
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. This
|
||||||
|
is certain to happen with colors in native widgets.
|
||||||
|
|
||||||
You can get the newest version of the GTK+ from the GTK homepage
|
You can get the newest version of the GTK+ from the GTK homepage
|
||||||
at
|
at
|
||||||
http://www.gtk.org
|
http://www.gtk.org
|
||||||
|
|
||||||
|
We also mirror GTK+ 1.0.6 at our ftp site. You'll find information
|
||||||
|
about downloading at my homepage.
|
||||||
|
|
||||||
* Additional libraries
|
* Additional libraries
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
There will be a few more features of wxWindows, which will
|
wxWindows/Gtk requires a thread library and X libraries
|
||||||
require further libraries (on some platforms). These
|
known to work with threads. This is the case on all
|
||||||
features will be optional. I hope to teach configure
|
commercial Unix-Variants and all Linux-Versions that
|
||||||
to check that out automatically.
|
are based on glibc 2 except RedHat 5.0 which is broken
|
||||||
|
in many aspects. As of writing this, these Linux
|
||||||
|
distributions have correct glibc 2 support:
|
||||||
|
|
||||||
Thread support:
|
- RedHat 5.1
|
||||||
|
- Debian 2.0
|
||||||
|
- Stampede
|
||||||
|
|
||||||
|
The next major version of SuSE will also support glibc 2,
|
||||||
|
but version 5.X does not. Also Caldera and Slackware
|
||||||
|
don't yet support glibc 2.
|
||||||
|
|
||||||
Requires pthreads under Linux with glibc 2. pthreads are
|
On IRIX you can also use SGI threads if Posix-Threads
|
||||||
always present on such systems, so just compile, unless
|
are not present. The SGI threads will be detected by
|
||||||
you have RedHat 5.0, which has a broken combination of
|
configure automatically.
|
||||||
glibc 2 and X. In this case, you have to run configure
|
|
||||||
with "--without-threads".
|
You can always disable thread support by running
|
||||||
|
|
||||||
Requires PCthreads under Linux with libc 5. If you
|
./configure "--without-threads"
|
||||||
haven't installed pcthreads, there will be no thread
|
make clean
|
||||||
support in wxWindows, but the library will compile.
|
make
|
||||||
|
|
||||||
Requires Posix threads on commercial Unix system,
|
|
||||||
which are always present. Just compile.
|
|
||||||
|
|
||||||
On SGI Irix we first look for sprocs, then pthreads and
|
|
||||||
use the last one found.
|
|
||||||
|
|
||||||
|
NB: I included thread support in wxWindows/Gtk, as this
|
||||||
|
problem will disappear in the near future when all major
|
||||||
|
Linux Variants have moved to glibc 2. Also, the Linux
|
||||||
|
Base Standard will include glibc 2.
|
||||||
|
|
||||||
* Create your configuration
|
* Create your configuration
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
@@ -16,12 +16,6 @@ wxHelpController
|
|||||||
Fix printing of bitmaps
|
Fix printing of bitmaps
|
||||||
-> No idea.
|
-> No idea.
|
||||||
|
|
||||||
Add support SetForegroundColour in GTK widgets
|
|
||||||
-> On the way.
|
|
||||||
|
|
||||||
wxBitmapCheckBox
|
|
||||||
-> Interface same as checkbox?
|
|
||||||
|
|
||||||
wxImage
|
wxImage
|
||||||
-> 24-bit support
|
-> 24-bit support
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ public:
|
|||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
// Process a keyboard navigation message (Tab traversal)
|
// Process a keyboard navigation message (Tab traversal)
|
||||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool SetFocusToNextChild(wxNode *nodeCurrent = (wxNode *) NULL, bool bForward = TRUE);
|
bool SetFocusToNextChild(wxNode *nodeCurrent = (wxNode *) NULL, bool bForward = TRUE);
|
||||||
|
|
||||||
|
@@ -63,6 +63,10 @@ class wxBitmapButton: public wxControl
|
|||||||
virtual void SetBitmapLabel( const wxBitmap& bitmap );
|
virtual void SetBitmapLabel( const wxBitmap& bitmap );
|
||||||
wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; }
|
wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; }
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
|
@@ -59,9 +59,11 @@ class wxButton: public wxControl
|
|||||||
void SetDefault(void);
|
void SetDefault(void);
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
// implementation
|
||||||
void SetForegroundColour( const wxColour &colour );
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKBUTTONH__
|
#endif // __GTKBUTTONH__
|
||||||
|
@@ -60,9 +60,12 @@ class wxCheckBox: public wxControl
|
|||||||
bool GetValue() const;
|
bool GetValue() const;
|
||||||
|
|
||||||
void SetLabel( const wxString& label );
|
void SetLabel( const wxString& label );
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKCHECKBOXH__
|
#endif // __GTKCHECKBOXH__
|
||||||
|
@@ -73,9 +73,9 @@ class wxChoice: public wxControl
|
|||||||
void SetSelection( int n );
|
void SetSelection( int n );
|
||||||
void SetStringSelection( const wxString &string );
|
void SetStringSelection( const wxString &string );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
// implementation
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKCHOICEH__
|
#endif // __GTKCHOICEH__
|
||||||
|
@@ -93,20 +93,16 @@ class wxComboBox: public wxControl
|
|||||||
void SetSelection(long from, long to);
|
void SetSelection(long from, long to);
|
||||||
void SetEditable(bool editable);
|
void SetEditable(bool editable);
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool m_alreadySent;
|
|
||||||
|
|
||||||
private:
|
bool m_alreadySent;
|
||||||
|
|
||||||
wxList m_clientData;
|
wxList m_clientData;
|
||||||
|
|
||||||
GtkWidget* GetConnectWidget(void);
|
GtkWidget* GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
// Id:
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: dnd.h
|
// Name: dnd.h
|
||||||
// Purpose: declaration of the wxDropTarget class
|
// Purpose: declaration of the wxDropTarget class
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
|
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: filedlg.h
|
// Name: filedlg.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
// Name: font.h
|
// Name: font.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: frame.h
|
// Name: frame.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -99,7 +98,10 @@ public:
|
|||||||
void OnCloseWindow( wxCloseEvent& event );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
void AddChild( wxWindow *child );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: gauge.h
|
// Name: gauge.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -72,9 +71,11 @@ class wxGauge: public wxControl
|
|||||||
|
|
||||||
// Are we a Win95/GTK progress bar, or a normal gauge?
|
// Are we a Win95/GTK progress bar, or a normal gauge?
|
||||||
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
||||||
|
|
||||||
protected:
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
int m_rangeMax;
|
int m_rangeMax;
|
||||||
int m_gaugePos;
|
int m_gaugePos;
|
||||||
bool m_useProgressBar;
|
bool m_useProgressBar;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: gdiobj.h
|
// Name: gdiobj.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: icon.h
|
// Name: icon.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: listbox.h
|
// Name: listbox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -83,18 +82,15 @@ class wxListBox: public wxControl
|
|||||||
void SetString( int n, const wxString &string );
|
void SetString( int n, const wxString &string );
|
||||||
void SetStringSelection( const wxString &string, bool select = TRUE );
|
void SetStringSelection( const wxString &string, bool select = TRUE );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetDropTarget( wxDropTarget *dropTarget );
|
void SetDropTarget( wxDropTarget *dropTarget );
|
||||||
virtual void SetBackgroundColour(const wxColour &colour);
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
int GetIndex( GtkWidget *item ) const;
|
int GetIndex( GtkWidget *item ) const;
|
||||||
GtkWidget *GetConnectWidget(void);
|
GtkWidget *GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
GtkList *m_list;
|
GtkList *m_list;
|
||||||
wxList m_clientData;
|
wxList m_clientData;
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: mdi.h
|
// Name: mdi.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -80,7 +79,7 @@ class wxMDIParentFrame: public wxFrame
|
|||||||
void OnActivate( wxActivateEvent& event );
|
void OnActivate( wxActivateEvent& event );
|
||||||
void OnSysColourChanged( wxSysColourChangedEvent& event );
|
void OnSysColourChanged( wxSysColourChangedEvent& event );
|
||||||
|
|
||||||
//private:
|
// implementation
|
||||||
|
|
||||||
wxMDIChildFrame *m_currentChild;
|
wxMDIChildFrame *m_currentChild;
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: menu.h
|
// Name: menu.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -138,13 +138,12 @@ public:
|
|||||||
wxWindow *GetPage(int nPage) const;
|
wxWindow *GetPage(int nPage) const;
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
|
||||||
// base class virtuals
|
void AddChild(wxWindow *child);
|
||||||
virtual void AddChild(wxWindow *child);
|
void SetConstraintSizes(bool recurse);
|
||||||
virtual void SetConstraintSizes(bool recurse);
|
bool DoPhase(int phase);
|
||||||
virtual bool DoPhase(int phase);
|
void ApplyWidgetStyle();
|
||||||
virtual void SetFont( const wxFont &font );
|
|
||||||
virtual void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: pen.h
|
// Name: pen.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: radiobox.h
|
// Name: radiobox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -80,13 +79,12 @@ class wxRadioBox: public wxControl
|
|||||||
int GetNumberOfRowsOrCols(void) const;
|
int GetNumberOfRowsOrCols(void) const;
|
||||||
void SetNumberOfRowsOrCols( int n );
|
void SetNumberOfRowsOrCols( int n );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
bool m_alreadySent;
|
bool m_alreadySent;
|
||||||
wxList m_boxes;
|
wxList m_boxes;
|
||||||
|
@@ -60,9 +60,11 @@ class wxRadioButton: public wxControl
|
|||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual void SetValue(bool val);
|
virtual void SetValue(bool val);
|
||||||
virtual bool GetValue(void) const;
|
virtual bool GetValue(void) const;
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKRADIOBUTTONH__
|
#endif // __GTKRADIOBUTTONH__
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: region.h
|
// Name: region.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: scrolbar.h
|
// Name: scrolbar.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -67,7 +66,8 @@ class wxScrollBar: public wxControl
|
|||||||
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
||||||
bool refresh = TRUE );
|
bool refresh = TRUE );
|
||||||
|
|
||||||
// Backward compatibility
|
// Backward compatibility
|
||||||
|
|
||||||
int GetValue(void) const;
|
int GetValue(void) const;
|
||||||
void SetValue( int viewStart );
|
void SetValue( int viewStart );
|
||||||
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
|
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
|
||||||
@@ -80,6 +80,7 @@ class wxScrollBar: public wxControl
|
|||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
GtkAdjustment *m_adjust;
|
GtkAdjustment *m_adjust;
|
||||||
float m_oldPos;
|
float m_oldPos;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: settings.h
|
// Name: settings.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
// Name: slider.h
|
// Name: slider.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -63,9 +62,6 @@ class wxSlider: public wxControl
|
|||||||
const wxString& name = wxSliderNameStr );
|
const wxString& name = wxSliderNameStr );
|
||||||
virtual int GetValue(void) const;
|
virtual int GetValue(void) const;
|
||||||
virtual void SetValue( int );
|
virtual void SetValue( int );
|
||||||
void GetSize( int *x, int *y ) const;
|
|
||||||
void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
|
||||||
void GetPosition( int *x, int *y ) const;
|
|
||||||
void SetRange( int minValue, int maxValue );
|
void SetRange( int minValue, int maxValue );
|
||||||
int GetMin(void) const;
|
int GetMin(void) const;
|
||||||
int GetMax(void) const;
|
int GetMax(void) const;
|
||||||
@@ -87,6 +83,7 @@ class wxSlider: public wxControl
|
|||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
GtkAdjustment *m_adjust;
|
GtkAdjustment *m_adjust;
|
||||||
float m_oldPos;
|
float m_oldPos;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: statbmp.h
|
// Name: statbmp.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -51,7 +50,7 @@ class wxStaticBitmap: public wxControl
|
|||||||
long style = 0, const wxString& name = wxStaticBitmapNameStr);
|
long style = 0, const wxString& name = wxStaticBitmapNameStr);
|
||||||
virtual void SetBitmap( const wxBitmap& bitmap );
|
virtual void SetBitmap( const wxBitmap& bitmap );
|
||||||
wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
|
wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: stabox.h
|
// Name: stabox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -51,6 +50,10 @@ class wxStaticBox: public wxControl
|
|||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKSTATICBOXH__
|
#endif // __GTKSTATICBOXH__
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: stattext.h
|
// Name: stattext.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -52,6 +51,10 @@ class wxStaticText: public wxControl
|
|||||||
long style = 0, const wxString &name = wxStaticTextNameStr );
|
long style = 0, const wxString &name = wxStaticTextNameStr );
|
||||||
wxString GetLabel(void) const;
|
wxString GetLabel(void) const;
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKSTATICTEXTH__
|
#endif // __GTKSTATICTEXTH__
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
// Name: tbargtk.h
|
// Name: tbargtk.h
|
||||||
// Purpose: GTK toolbar
|
// Purpose: GTK toolbar
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Modified by:
|
|
||||||
// Created: 01/02/97
|
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
|
@@ -101,12 +101,14 @@ class wxTextCtrl: public wxControl, public streambuf
|
|||||||
wxTextCtrl& operator<<(const char c);
|
wxTextCtrl& operator<<(const char c);
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
void SetFont( const wxFont &font );
|
||||||
virtual void SetBackgroundColour(const wxColour &colour);
|
void SetForegroundColour(const wxColour &colour);
|
||||||
|
void SetBackgroundColour(const wxColour &colour);
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
GtkWidget* GetConnectWidget(void);
|
GtkWidget* GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: timer.h
|
// Name: timer.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: win_gtk.h
|
// Name: win_gtk.h
|
||||||
// Purpose: wxWindows's GTK base widget
|
// Purpose: wxWindows's GTK base widget
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////// */
|
/////////////////////////////////////////////////////////////////////////// */
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: window.h
|
// Name: window.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -243,7 +242,9 @@ public:
|
|||||||
bool HasVMT();
|
bool HasVMT();
|
||||||
virtual void ImplementSetSize();
|
virtual void ImplementSetSize();
|
||||||
virtual void ImplementSetPosition();
|
virtual void ImplementSetPosition();
|
||||||
GtkStyle *GetWidgetStyle();
|
GtkStyle *GetWidgetStyle();
|
||||||
|
void SetWidgetStyle();
|
||||||
|
virtual void ApplyWidgetStyle();
|
||||||
|
|
||||||
wxWindow *m_parent;
|
wxWindow *m_parent;
|
||||||
wxList m_children;
|
wxList m_children;
|
||||||
|
@@ -63,6 +63,10 @@ class wxBitmapButton: public wxControl
|
|||||||
virtual void SetBitmapLabel( const wxBitmap& bitmap );
|
virtual void SetBitmapLabel( const wxBitmap& bitmap );
|
||||||
wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; }
|
wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; }
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
|
@@ -59,9 +59,11 @@ class wxButton: public wxControl
|
|||||||
void SetDefault(void);
|
void SetDefault(void);
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
// implementation
|
||||||
void SetForegroundColour( const wxColour &colour );
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKBUTTONH__
|
#endif // __GTKBUTTONH__
|
||||||
|
@@ -60,9 +60,12 @@ class wxCheckBox: public wxControl
|
|||||||
bool GetValue() const;
|
bool GetValue() const;
|
||||||
|
|
||||||
void SetLabel( const wxString& label );
|
void SetLabel( const wxString& label );
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKCHECKBOXH__
|
#endif // __GTKCHECKBOXH__
|
||||||
|
@@ -73,9 +73,9 @@ class wxChoice: public wxControl
|
|||||||
void SetSelection( int n );
|
void SetSelection( int n );
|
||||||
void SetStringSelection( const wxString &string );
|
void SetStringSelection( const wxString &string );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
// implementation
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKCHOICEH__
|
#endif // __GTKCHOICEH__
|
||||||
|
@@ -93,20 +93,16 @@ class wxComboBox: public wxControl
|
|||||||
void SetSelection(long from, long to);
|
void SetSelection(long from, long to);
|
||||||
void SetEditable(bool editable);
|
void SetEditable(bool editable);
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool m_alreadySent;
|
|
||||||
|
|
||||||
private:
|
bool m_alreadySent;
|
||||||
|
|
||||||
wxList m_clientData;
|
wxList m_clientData;
|
||||||
|
|
||||||
GtkWidget* GetConnectWidget(void);
|
GtkWidget* GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
// Id:
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: dnd.h
|
// Name: dnd.h
|
||||||
// Purpose: declaration of the wxDropTarget class
|
// Purpose: declaration of the wxDropTarget class
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
|
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: filedlg.h
|
// Name: filedlg.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
// Name: font.h
|
// Name: font.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: frame.h
|
// Name: frame.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -99,7 +98,10 @@ public:
|
|||||||
void OnCloseWindow( wxCloseEvent& event );
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
void AddChild( wxWindow *child );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: gauge.h
|
// Name: gauge.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -72,9 +71,11 @@ class wxGauge: public wxControl
|
|||||||
|
|
||||||
// Are we a Win95/GTK progress bar, or a normal gauge?
|
// Are we a Win95/GTK progress bar, or a normal gauge?
|
||||||
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
||||||
|
|
||||||
protected:
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
int m_rangeMax;
|
int m_rangeMax;
|
||||||
int m_gaugePos;
|
int m_gaugePos;
|
||||||
bool m_useProgressBar;
|
bool m_useProgressBar;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: gdiobj.h
|
// Name: gdiobj.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: icon.h
|
// Name: icon.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: listbox.h
|
// Name: listbox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -83,18 +82,15 @@ class wxListBox: public wxControl
|
|||||||
void SetString( int n, const wxString &string );
|
void SetString( int n, const wxString &string );
|
||||||
void SetStringSelection( const wxString &string, bool select = TRUE );
|
void SetStringSelection( const wxString &string, bool select = TRUE );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetDropTarget( wxDropTarget *dropTarget );
|
void SetDropTarget( wxDropTarget *dropTarget );
|
||||||
virtual void SetBackgroundColour(const wxColour &colour);
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
int GetIndex( GtkWidget *item ) const;
|
int GetIndex( GtkWidget *item ) const;
|
||||||
GtkWidget *GetConnectWidget(void);
|
GtkWidget *GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
GtkList *m_list;
|
GtkList *m_list;
|
||||||
wxList m_clientData;
|
wxList m_clientData;
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: mdi.h
|
// Name: mdi.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -80,7 +79,7 @@ class wxMDIParentFrame: public wxFrame
|
|||||||
void OnActivate( wxActivateEvent& event );
|
void OnActivate( wxActivateEvent& event );
|
||||||
void OnSysColourChanged( wxSysColourChangedEvent& event );
|
void OnSysColourChanged( wxSysColourChangedEvent& event );
|
||||||
|
|
||||||
//private:
|
// implementation
|
||||||
|
|
||||||
wxMDIChildFrame *m_currentChild;
|
wxMDIChildFrame *m_currentChild;
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: menu.h
|
// Name: menu.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -138,13 +138,12 @@ public:
|
|||||||
wxWindow *GetPage(int nPage) const;
|
wxWindow *GetPage(int nPage) const;
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
|
||||||
// base class virtuals
|
void AddChild(wxWindow *child);
|
||||||
virtual void AddChild(wxWindow *child);
|
void SetConstraintSizes(bool recurse);
|
||||||
virtual void SetConstraintSizes(bool recurse);
|
bool DoPhase(int phase);
|
||||||
virtual bool DoPhase(int phase);
|
void ApplyWidgetStyle();
|
||||||
virtual void SetFont( const wxFont &font );
|
|
||||||
virtual void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: pen.h
|
// Name: pen.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: radiobox.h
|
// Name: radiobox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -80,13 +79,12 @@ class wxRadioBox: public wxControl
|
|||||||
int GetNumberOfRowsOrCols(void) const;
|
int GetNumberOfRowsOrCols(void) const;
|
||||||
void SetNumberOfRowsOrCols( int n );
|
void SetNumberOfRowsOrCols( int n );
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
void OnSize( wxSizeEvent &event );
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
bool m_alreadySent;
|
bool m_alreadySent;
|
||||||
wxList m_boxes;
|
wxList m_boxes;
|
||||||
|
@@ -60,9 +60,11 @@ class wxRadioButton: public wxControl
|
|||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual void SetValue(bool val);
|
virtual void SetValue(bool val);
|
||||||
virtual bool GetValue(void) const;
|
virtual bool GetValue(void) const;
|
||||||
void SetFont( const wxFont &font );
|
|
||||||
void Enable( bool enable );
|
void Enable( bool enable );
|
||||||
void SetBackgroundColour( const wxColour &colour );
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKRADIOBUTTONH__
|
#endif // __GTKRADIOBUTTONH__
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: region.h
|
// Name: region.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: scrolbar.h
|
// Name: scrolbar.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -67,7 +66,8 @@ class wxScrollBar: public wxControl
|
|||||||
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
||||||
bool refresh = TRUE );
|
bool refresh = TRUE );
|
||||||
|
|
||||||
// Backward compatibility
|
// Backward compatibility
|
||||||
|
|
||||||
int GetValue(void) const;
|
int GetValue(void) const;
|
||||||
void SetValue( int viewStart );
|
void SetValue( int viewStart );
|
||||||
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
|
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
|
||||||
@@ -80,6 +80,7 @@ class wxScrollBar: public wxControl
|
|||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
GtkAdjustment *m_adjust;
|
GtkAdjustment *m_adjust;
|
||||||
float m_oldPos;
|
float m_oldPos;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: settings.h
|
// Name: settings.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
// Name: slider.h
|
// Name: slider.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -63,9 +62,6 @@ class wxSlider: public wxControl
|
|||||||
const wxString& name = wxSliderNameStr );
|
const wxString& name = wxSliderNameStr );
|
||||||
virtual int GetValue(void) const;
|
virtual int GetValue(void) const;
|
||||||
virtual void SetValue( int );
|
virtual void SetValue( int );
|
||||||
void GetSize( int *x, int *y ) const;
|
|
||||||
void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
|
||||||
void GetPosition( int *x, int *y ) const;
|
|
||||||
void SetRange( int minValue, int maxValue );
|
void SetRange( int minValue, int maxValue );
|
||||||
int GetMin(void) const;
|
int GetMin(void) const;
|
||||||
int GetMax(void) const;
|
int GetMax(void) const;
|
||||||
@@ -87,6 +83,7 @@ class wxSlider: public wxControl
|
|||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
GtkAdjustment *m_adjust;
|
GtkAdjustment *m_adjust;
|
||||||
float m_oldPos;
|
float m_oldPos;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: statbmp.h
|
// Name: statbmp.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -51,7 +50,7 @@ class wxStaticBitmap: public wxControl
|
|||||||
long style = 0, const wxString& name = wxStaticBitmapNameStr);
|
long style = 0, const wxString& name = wxStaticBitmapNameStr);
|
||||||
virtual void SetBitmap( const wxBitmap& bitmap );
|
virtual void SetBitmap( const wxBitmap& bitmap );
|
||||||
wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
|
wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: stabox.h
|
// Name: stabox.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -51,6 +50,10 @@ class wxStaticBox: public wxControl
|
|||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKSTATICBOXH__
|
#endif // __GTKSTATICBOXH__
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: stattext.h
|
// Name: stattext.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -52,6 +51,10 @@ class wxStaticText: public wxControl
|
|||||||
long style = 0, const wxString &name = wxStaticTextNameStr );
|
long style = 0, const wxString &name = wxStaticTextNameStr );
|
||||||
wxString GetLabel(void) const;
|
wxString GetLabel(void) const;
|
||||||
void SetLabel( const wxString &label );
|
void SetLabel( const wxString &label );
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
void ApplyWidgetStyle();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKSTATICTEXTH__
|
#endif // __GTKSTATICTEXTH__
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
// Name: tbargtk.h
|
// Name: tbargtk.h
|
||||||
// Purpose: GTK toolbar
|
// Purpose: GTK toolbar
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Modified by:
|
|
||||||
// Created: 01/02/97
|
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
|
@@ -101,12 +101,14 @@ class wxTextCtrl: public wxControl, public streambuf
|
|||||||
wxTextCtrl& operator<<(const char c);
|
wxTextCtrl& operator<<(const char c);
|
||||||
|
|
||||||
void SetFont( const wxFont &font );
|
void SetFont( const wxFont &font );
|
||||||
virtual void SetBackgroundColour(const wxColour &colour);
|
void SetForegroundColour(const wxColour &colour);
|
||||||
|
void SetBackgroundColour(const wxColour &colour);
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
GtkWidget* GetConnectWidget(void);
|
GtkWidget* GetConnectWidget(void);
|
||||||
bool IsOwnGtkWindow( GdkWindow *window );
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
void ApplyWidgetStyle();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: timer.h
|
// Name: timer.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: win_gtk.h
|
// Name: win_gtk.h
|
||||||
// Purpose: wxWindows's GTK base widget
|
// Purpose: wxWindows's GTK base widget
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////// */
|
/////////////////////////////////////////////////////////////////////////// */
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: window.h
|
// Name: window.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Id: $Id$
|
||||||
// Id:
|
// Copyright: (c) 1998 Robert Roebling
|
||||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -243,7 +242,9 @@ public:
|
|||||||
bool HasVMT();
|
bool HasVMT();
|
||||||
virtual void ImplementSetSize();
|
virtual void ImplementSetSize();
|
||||||
virtual void ImplementSetPosition();
|
virtual void ImplementSetPosition();
|
||||||
GtkStyle *GetWidgetStyle();
|
GtkStyle *GetWidgetStyle();
|
||||||
|
void SetWidgetStyle();
|
||||||
|
virtual void ApplyWidgetStyle();
|
||||||
|
|
||||||
wxWindow *m_parent;
|
wxWindow *m_parent;
|
||||||
wxList m_children;
|
wxList m_children;
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include "icons/list.xpm"
|
#include "icons/list.xpm"
|
||||||
#include "icons/radio.xpm"
|
#include "icons/radio.xpm"
|
||||||
#include "icons/text.xpm"
|
#include "icons/text.xpm"
|
||||||
#include "icons/stattext.xpm"
|
#include "icons/gauge.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -69,6 +69,8 @@ class MyPanel: public wxPanel
|
|||||||
wxChoice *m_choice;
|
wxChoice *m_choice;
|
||||||
wxComboBox *m_combo;
|
wxComboBox *m_combo;
|
||||||
wxRadioBox *m_radio;
|
wxRadioBox *m_radio;
|
||||||
|
wxGauge *m_gauge;
|
||||||
|
wxSlider *m_slider;
|
||||||
wxButton *m_fontButton;
|
wxButton *m_fontButton;
|
||||||
|
|
||||||
wxTextCtrl *m_text;
|
wxTextCtrl *m_text;
|
||||||
@@ -176,6 +178,10 @@ const ID_RADIOBOX_ENABLE = 164;
|
|||||||
|
|
||||||
const ID_SET_FONT = 170;
|
const ID_SET_FONT = 170;
|
||||||
|
|
||||||
|
const ID_GAUGE = 180;
|
||||||
|
const ID_SLIDER = 181;
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||||
EVT_SIZE ( MyPanel::OnSize)
|
EVT_SIZE ( MyPanel::OnSize)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
|
||||||
@@ -214,7 +220,7 @@ END_EVENT_TABLE()
|
|||||||
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
||||||
wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) )
|
wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) )
|
||||||
{
|
{
|
||||||
SetBackgroundColour("cadet blue");
|
// SetBackgroundColour("cadet blue");
|
||||||
|
|
||||||
m_text = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,50), wxSize(100,50), wxTE_MULTILINE );
|
m_text = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,50), wxSize(100,50), wxTE_MULTILINE );
|
||||||
m_text->SetBackgroundColour("wheat");
|
m_text->SetBackgroundColour("wheat");
|
||||||
@@ -233,14 +239,14 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
// image ids and names
|
// image ids and names
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Static, Image_Max
|
Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Gauge, Image_Max
|
||||||
};
|
};
|
||||||
|
|
||||||
// fill the image list
|
// fill the image list
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
const char *aIconNames[] =
|
const char *aIconNames[] =
|
||||||
{
|
{
|
||||||
"list.xpm", "choice.xpm", "combo.xpm", "text.xpm", "radio.xpm", "stattext.xpm"
|
"list.xpm", "choice.xpm", "combo.xpm", "text.xpm", "radio.xpm", "gauge.txt"
|
||||||
};
|
};
|
||||||
|
|
||||||
wxASSERT( WXSIZEOF(aIconNames) == Image_Max ); // keep in sync
|
wxASSERT( WXSIZEOF(aIconNames) == Image_Max ); // keep in sync
|
||||||
@@ -260,7 +266,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
imagelist-> Add( wxBitmap( combo_xpm ));
|
imagelist-> Add( wxBitmap( combo_xpm ));
|
||||||
imagelist-> Add( wxBitmap( text_xpm ));
|
imagelist-> Add( wxBitmap( text_xpm ));
|
||||||
imagelist-> Add( wxBitmap( radio_xpm ));
|
imagelist-> Add( wxBitmap( radio_xpm ));
|
||||||
imagelist-> Add( wxBitmap( stattext_xpm ));
|
imagelist-> Add( wxBitmap( gauge_xpm ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxButton *button = (wxButton*)NULL;
|
wxButton *button = (wxButton*)NULL;
|
||||||
@@ -268,8 +274,10 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
m_notebook->SetImageList(imagelist);
|
m_notebook->SetImageList(imagelist);
|
||||||
m_notebook->SetBackgroundColour("cadet blue");
|
m_notebook->SetBackgroundColour("cadet blue");
|
||||||
|
|
||||||
wxPanel *panel = new wxPanel(m_notebook);
|
wxPanel *panel = (wxPanel*) NULL;
|
||||||
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
panel->SetBackgroundColour("cadet blue");
|
||||||
|
panel->SetForegroundColour("blue");
|
||||||
m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 5, choices );
|
m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 5, choices );
|
||||||
m_listbox->SetBackgroundColour("wheat");
|
m_listbox->SetBackgroundColour("wheat");
|
||||||
(void)new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
(void)new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
||||||
@@ -283,7 +291,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
m_notebook->AddPage(panel, "wxList", FALSE, Image_List);
|
m_notebook->AddPage(panel, "wxList", FALSE, Image_List);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
// panel->SetBackgroundColour("cadet blue");
|
||||||
|
// panel->SetForegroundColour("blue");
|
||||||
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
|
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
|
||||||
m_choice->SetBackgroundColour("wheat");
|
m_choice->SetBackgroundColour("wheat");
|
||||||
(void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
(void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
||||||
@@ -296,9 +305,10 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
|
m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
// panel->SetBackgroundColour("cadet blue");
|
||||||
|
// panel->SetForegroundColour("blue");
|
||||||
m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
|
m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
|
||||||
m_combo->SetBackgroundColour("wheat");
|
// m_combo->SetBackgroundColour("wheat");
|
||||||
(void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
(void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
|
(void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
|
(void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
|
||||||
@@ -309,11 +319,12 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
|
m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
// panel->SetBackgroundColour("cadet blue");
|
||||||
|
// panel->SetForegroundColour("blue");
|
||||||
wxTextCtrl *tc = new wxTextCtrl( panel, ID_TEXT, "Write text here.", wxPoint(10,10), wxSize(350,28));
|
wxTextCtrl *tc = new wxTextCtrl( panel, ID_TEXT, "Write text here.", wxPoint(10,10), wxSize(350,28));
|
||||||
tc->SetBackgroundColour("wheat");
|
// tc->SetBackgroundColour("wheat");
|
||||||
tc = new wxTextCtrl( panel, ID_TEXT, "And here.", wxPoint(10,50), wxSize(350,160), wxTE_MULTILINE );
|
tc = new wxTextCtrl( panel, ID_TEXT, "And here.", wxPoint(10,50), wxSize(350,160), wxTE_MULTILINE );
|
||||||
tc->SetBackgroundColour("wheat");
|
// tc->SetBackgroundColour("wheat");
|
||||||
m_notebook->AddPage(panel, "wxTextCtrl" , FALSE, Image_Text);
|
m_notebook->AddPage(panel, "wxTextCtrl" , FALSE, Image_Text);
|
||||||
|
|
||||||
wxString choices2[] =
|
wxString choices2[] =
|
||||||
@@ -323,11 +334,12 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
};
|
};
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
// panel->SetBackgroundColour("cadet blue");
|
||||||
|
// panel->SetForegroundColour("blue");
|
||||||
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "That", wxPoint(10,160), wxSize(-1,-1), 2, choices2, 1, wxRA_HORIZONTAL );
|
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "That", wxPoint(10,160), wxSize(-1,-1), 2, choices2, 1, wxRA_HORIZONTAL );
|
||||||
m_radio->SetBackgroundColour("wheat");
|
// m_radio->SetBackgroundColour("wheat");
|
||||||
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices, 1, wxRA_VERTICAL );
|
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices, 1, wxRA_VERTICAL );
|
||||||
m_radio->SetBackgroundColour("wheat");
|
// m_radio->SetBackgroundColour("wheat");
|
||||||
(void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
(void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(180,80), wxSize(140,30) );
|
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(180,80), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_RADIOBOX_FONT, "Set Italic font", wxPoint(180,130), wxSize(140,30) );
|
(void)new wxButton( panel, ID_RADIOBOX_FONT, "Set Italic font", wxPoint(180,130), wxSize(140,30) );
|
||||||
@@ -336,9 +348,14 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
|
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
panel->SetBackgroundColour("cadet blue");
|
// panel->SetBackgroundColour("cadet blue");
|
||||||
(void)new wxStaticBox( panel, -1, "StaticBox", wxPoint(10,10), wxSize(160,130) );
|
// panel->SetForegroundColour("blue");
|
||||||
m_notebook->AddPage(panel, "wxStaticBox", FALSE, Image_Static);
|
(void)new wxStaticBox( panel, -1, "wxGauge and wxSlider", wxPoint(10,10), wxSize(180,130) );
|
||||||
|
m_gauge = new wxGauge( panel, -1, 200, wxPoint(18,50), wxSize(155,-1) );
|
||||||
|
// m_gauge->SetBackgroundColour("wheat");
|
||||||
|
m_slider = new wxSlider( panel, -1, 0, 0, 200, wxPoint(18,90), wxSize(155,-1) );
|
||||||
|
// m_slider->SetBackgroundColour("wheat");
|
||||||
|
m_notebook->AddPage(panel, "wxGauge", FALSE, Image_Gauge);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )
|
void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )
|
||||||
|
@@ -173,3 +173,4 @@ bool wxPanel::SetFocusToNextChild(wxNode *node, bool bForward)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -129,8 +129,7 @@ LIB_CPP_SRC=\
|
|||||||
generic/splitter.cpp \
|
generic/splitter.cpp \
|
||||||
generic/statusbr.cpp \
|
generic/statusbr.cpp \
|
||||||
generic/tabg.cpp \
|
generic/tabg.cpp \
|
||||||
generic/textdlgg.cpp
|
generic/textdlgg.cpp
|
||||||
|
|
||||||
|
|
||||||
LIB_C_SRC=\
|
LIB_C_SRC=\
|
||||||
common/extended.c \
|
common/extended.c \
|
||||||
|
@@ -130,3 +130,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
|||||||
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );
|
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxBitmapButton::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -74,6 +74,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -106,34 +107,10 @@ void wxButton::Enable( bool enable )
|
|||||||
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxButton::SetFont( const wxFont &font )
|
void wxButton::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxButton::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
}
|
|
||||||
|
|
||||||
void wxButton::SetForegroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
|
||||||
|
|
||||||
wxControl::SetForegroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_foregroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -72,6 +72,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
SetLabel( label );
|
SetLabel( label );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -113,23 +114,11 @@ void wxCheckBox::Enable( bool enable )
|
|||||||
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetFont( const wxFont &font )
|
void wxCheckBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -70,20 +70,22 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
|||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
GtkWidget *item = gtk_menu_item_new_with_label( choices[i] );
|
GtkWidget *item = gtk_menu_item_new_with_label( choices[i] );
|
||||||
gtk_signal_connect( GTK_OBJECT( item ), "activate",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
|
||||||
|
|
||||||
gtk_menu_append( GTK_MENU(menu), item );
|
gtk_menu_append( GTK_MENU(menu), item );
|
||||||
|
|
||||||
gtk_widget_show( item );
|
|
||||||
gtk_widget_realize( item );
|
gtk_widget_realize( item );
|
||||||
gtk_widget_realize( GTK_BIN(item)->child );
|
gtk_widget_realize( GTK_BIN(item)->child );
|
||||||
|
|
||||||
|
gtk_widget_show( item );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT( item ), "activate",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
||||||
}
|
}
|
||||||
gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu );
|
gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu );
|
||||||
|
|
||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -102,11 +104,7 @@ void wxChoice::Append( const wxString &item )
|
|||||||
gtk_widget_realize( menu_item );
|
gtk_widget_realize( menu_item );
|
||||||
gtk_widget_realize( GTK_BIN(menu_item)->child );
|
gtk_widget_realize( GTK_BIN(menu_item)->child );
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
{
|
|
||||||
gtk_widget_set_style( menu_item, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_BIN(menu_item)->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
|
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
|
||||||
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
||||||
@@ -259,34 +257,9 @@ void wxChoice::SetStringSelection( const wxString &string )
|
|||||||
if (n != -1) SetSelection( n );
|
if (n != -1) SetSelection( n );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxChoice::SetFont( const wxFont &font )
|
void wxChoice::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid choice" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
|
||||||
GList *child = menu_shell->children;
|
|
||||||
while (child)
|
|
||||||
{
|
|
||||||
GtkBin *bin = GTK_BIN( child->data );
|
|
||||||
GtkWidget *label = (GtkWidget *) NULL;
|
|
||||||
if (bin->child) label = bin->child;
|
|
||||||
if (!label) label = GTK_BUTTON(m_widget)->child;
|
|
||||||
|
|
||||||
gtk_widget_set_style( label, GetWidgetStyle() );
|
|
||||||
|
|
||||||
child = child->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxChoice::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid choice" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
||||||
|
|
||||||
@@ -297,9 +270,15 @@ void wxChoice::SetBackgroundColour( const wxColour &colour )
|
|||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
gtk_widget_set_style( GTK_WIDGET( child->data ), m_widgetStyle );
|
gtk_widget_set_style( GTK_WIDGET( child->data ), m_widgetStyle );
|
||||||
|
|
||||||
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
|
GtkWidget *label = (GtkWidget *) NULL;
|
||||||
|
if (bin->child) label = bin->child;
|
||||||
|
if (!label) label = GTK_BUTTON(m_widget)->child;
|
||||||
|
|
||||||
|
gtk_widget_set_style( label, m_widgetStyle );
|
||||||
|
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -104,6 +104,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value,
|
|||||||
gtk_widget_realize( GTK_COMBO(m_widget)->button );
|
gtk_widget_realize( GTK_COMBO(m_widget)->button );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -135,11 +136,7 @@ void wxComboBox::Append( const wxString &item, char *clientData )
|
|||||||
|
|
||||||
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
{
|
|
||||||
gtk_widget_set_style( list_item, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_BIN( list_item )->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
||||||
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
|
||||||
@@ -438,21 +435,21 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::SetFont( const wxFont &font )
|
void wxComboBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxWindow::SetFont( font );
|
gtk_widget_set_style( GTK_COMBO(m_widget)->button, m_widgetStyle );
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
||||||
|
gtk_widget_set_style( GTK_COMBO(m_widget)->list, m_widgetStyle );
|
||||||
|
|
||||||
GtkList *list = GTK_LIST( GTK_COMBO(m_widget)->list );
|
GtkList *list = GTK_LIST( GTK_COMBO(m_widget)->list );
|
||||||
|
|
||||||
GList *child = list->children;
|
GList *child = list->children;
|
||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
GtkBin *bin = (GtkBin*) child->data;
|
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
||||||
|
|
||||||
|
GtkBin *bin = GTK_BIN(child->data);
|
||||||
gtk_widget_set_style( bin->child, m_widgetStyle );
|
gtk_widget_set_style( bin->child, m_widgetStyle );
|
||||||
|
|
||||||
child = child->next;
|
child = child->next;
|
||||||
@@ -469,27 +466,3 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return ( (window == GTK_ENTRY( GTK_COMBO(m_widget)->entry )->text_area) ||
|
return ( (window == GTK_ENTRY( GTK_COMBO(m_widget)->entry )->text_area) ||
|
||||||
(window == GTK_COMBO(m_widget)->button->window ) );
|
(window == GTK_COMBO(m_widget)->button->window ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
// gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->button, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->list, m_widgetStyle );
|
|
||||||
|
|
||||||
GList *child = GTK_LIST( GTK_COMBO(m_widget)->list )->children;
|
|
||||||
while (child)
|
|
||||||
{
|
|
||||||
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
|
||||||
|
|
||||||
child = child->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -287,5 +287,3 @@ void wxDialog::SetIcon( const wxIcon &icon )
|
|||||||
|
|
||||||
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -361,8 +361,20 @@ GdkFont *wxFont::GetInternalFont(float scale) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
|
if ((int_scale == 100) &&
|
||||||
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
|
(M_FONTDATA->m_style == wxSWISS) &&
|
||||||
|
(M_FONTDATA->m_pointSize == 12) &&
|
||||||
|
(M_FONTDATA->m_weight == wxNORMAL) &&
|
||||||
|
(M_FONTDATA->m_underlined == FALSE) &&
|
||||||
|
(M_FONTDATA->m_style == wxNORMAL))
|
||||||
|
{
|
||||||
|
font = gdk_font_load( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
|
||||||
|
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
|
||||||
|
}
|
||||||
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
|
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
|
||||||
}
|
}
|
||||||
if (!font)
|
if (!font)
|
||||||
|
@@ -575,4 +575,3 @@ void wxFrame::SetIcon( const wxIcon &icon )
|
|||||||
|
|
||||||
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,3 +68,9 @@ int wxGauge::GetValue(void) const
|
|||||||
return m_gaugePos;
|
return m_gaugePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxGauge::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -126,6 +126,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
gtk_widget_realize( GTK_WIDGET(m_list) );
|
gtk_widget_realize( GTK_WIDGET(m_list) );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -143,11 +144,7 @@ void wxListBox::Append( const wxString &item, char *clientData )
|
|||||||
|
|
||||||
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
{
|
|
||||||
gtk_widget_set_style( list_item, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_BIN( list_item )->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
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 );
|
||||||
@@ -466,27 +463,9 @@ bool wxListBox::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::SetFont( const wxFont &font )
|
void wxListBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_list != NULL, "invalid listbox" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
GList *child = m_list->children;
|
|
||||||
while (child)
|
|
||||||
{
|
|
||||||
gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
|
|
||||||
child = child->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxListBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_list != NULL, "invalid listbox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
GdkWindow *window = GTK_WIDGET(m_list)->window;
|
GdkWindow *window = GTK_WIDGET(m_list)->window;
|
||||||
m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
|
m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
|
||||||
@@ -496,8 +475,8 @@ void wxListBox::SetBackgroundColour( const wxColour &colour )
|
|||||||
GList *child = m_list->children;
|
GList *child = m_list->children;
|
||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
|
gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
|
||||||
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -456,23 +456,9 @@ bool wxNotebook::DoPhase( int WXUNUSED(nPhase) )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxNotebook::SetFont( const wxFont &font )
|
void wxNotebook::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid notebook" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxNotebook::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid notebook" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -164,6 +164,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
SetLabel( title );
|
SetLabel( title );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -460,46 +461,25 @@ void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) )
|
|||||||
wxFAIL_MSG("wxRadioBox::SetNumberOfRowsOrCols not implemented.");
|
wxFAIL_MSG("wxRadioBox::SetNumberOfRowsOrCols not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetFont( const wxFont &font )
|
void wxRadioBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid radiobox" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
|
||||||
wxNode *node = m_boxes.First();
|
wxNode *node = m_boxes.First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
|
GtkWidget *widget = GTK_WIDGET( node->Data() );
|
||||||
|
gtk_widget_set_style( widget, m_widgetStyle );
|
||||||
|
|
||||||
GtkButton *button = GTK_BUTTON( node->Data() );
|
GtkButton *button = GTK_BUTTON( node->Data() );
|
||||||
|
|
||||||
gtk_widget_set_style( button->child, m_widgetStyle );
|
gtk_widget_set_style( button->child, m_widgetStyle );
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid radiobox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
|
|
||||||
wxNode *node = m_boxes.First();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
GtkWidget *button = GTK_WIDGET( node->Data() );
|
|
||||||
|
|
||||||
gtk_widget_set_style( button, m_widgetStyle );
|
|
||||||
|
|
||||||
node = node->Next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
||||||
{
|
{
|
||||||
if (window == m_widget->window) return TRUE;
|
if (window == m_widget->window) return TRUE;
|
||||||
|
@@ -62,6 +62,9 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
|
|||||||
|
|
||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -100,23 +103,11 @@ void wxRadioButton::Enable( bool enable )
|
|||||||
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioButton::SetFont( const wxFont &font )
|
void wxRadioButton::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid radiobutton" );
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioButton::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid radiobutton" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -261,3 +261,10 @@ bool wxScrollBar::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
(window == range->step_forw) ||
|
(window == range->step_forw) ||
|
||||||
(window == range->step_back) );
|
(window == range->step_back) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxScrollBar::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -166,7 +166,7 @@ wxFont wxSystemSettings::GetSystemFont( int index )
|
|||||||
case wxSYS_DEFAULT_GUI_FONT:
|
case wxSYS_DEFAULT_GUI_FONT:
|
||||||
{
|
{
|
||||||
if (!g_systemFont)
|
if (!g_systemFont)
|
||||||
g_systemFont = new wxFont( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" );
|
g_systemFont = new wxFont( 10, wxSWISS, wxNORMAL, wxNORMAL );
|
||||||
return *g_systemFont;
|
return *g_systemFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -90,6 +90,8 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
else
|
else
|
||||||
m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
|
m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
|
||||||
|
|
||||||
|
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), FALSE );
|
||||||
|
|
||||||
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
|
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed",
|
||||||
@@ -100,6 +102,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -187,23 +190,6 @@ int wxSlider::GetLineSize(void) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not supported in wxGTK (and GTK)
|
|
||||||
|
|
||||||
void wxSlider::GetSize( int *x, int *y ) const
|
|
||||||
{
|
|
||||||
wxWindow::GetSize( x, y );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags )
|
|
||||||
{
|
|
||||||
wxWindow::SetSize( x, y, width, height, sizeFlags );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSlider::GetPosition( int *x, int *y ) const
|
|
||||||
{
|
|
||||||
wxWindow::GetPosition( x, y );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSlider::SetTick( int WXUNUSED(tickPos) )
|
void wxSlider::SetTick( int WXUNUSED(tickPos) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -249,4 +235,8 @@ bool wxSlider::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
(window == range->step_back) );
|
(window == range->step_back) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSlider::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
}
|
||||||
|
@@ -21,14 +21,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl)
|
|||||||
|
|
||||||
wxStaticBitmap::wxStaticBitmap(void)
|
wxStaticBitmap::wxStaticBitmap(void)
|
||||||
{
|
{
|
||||||
};
|
}
|
||||||
|
|
||||||
wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
Create( parent, id, bitmap, pos, size, style, name );
|
Create( parent, id, bitmap, pos, size, style, name );
|
||||||
};
|
}
|
||||||
|
|
||||||
bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
@@ -62,7 +62,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
}
|
||||||
|
|
||||||
void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
||||||
{
|
{
|
||||||
@@ -74,5 +74,4 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
|||||||
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
||||||
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
|
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
@@ -44,6 +44,9 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
|
|
||||||
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -55,3 +58,10 @@ void wxStaticBox::SetLabel( const wxString &label )
|
|||||||
GtkFrame *frame = GTK_FRAME( m_widget );
|
GtkFrame *frame = GTK_FRAME( m_widget );
|
||||||
gtk_frame_set_label( frame, GetLabel() );
|
gtk_frame_set_label( frame, GetLabel() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxStaticBox::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -91,6 +91,9 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
|
|||||||
|
|
||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -110,3 +113,10 @@ void wxStaticText::SetLabel( const wxString &label )
|
|||||||
|
|
||||||
gtk_label_set( GTK_LABEL(m_widget), m_label );
|
gtk_label_set( GTK_LABEL(m_widget), m_label );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxStaticText::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -150,6 +150,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
|||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -617,11 +618,16 @@ bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return (window == GTK_ENTRY(m_text)->text_area);
|
return (window == GTK_ENTRY(m_text)->text_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::SetFont( const wxFont &font )
|
void wxTextCtrl::SetFont( const wxFont &WXUNUSED(font) )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_text != NULL, "invalid text ctrl" );
|
wxCHECK_RET( m_text != NULL, "invalid text ctrl" );
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
// doesn't work
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxTextCtrl::SetForegroundColour( const wxColour &WXUNUSED(colour) )
|
||||||
|
{
|
||||||
|
wxCHECK_RET( m_text != NULL, "invalid text ctrl" );
|
||||||
|
|
||||||
// doesn't work
|
// doesn't work
|
||||||
}
|
}
|
||||||
@@ -641,8 +647,16 @@ void wxTextCtrl::SetBackgroundColour( const wxColour &colour )
|
|||||||
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
||||||
gdk_window_clear( window );
|
gdk_window_clear( window );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxTextCtrl::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
if (m_windowStyle & wxTE_MULTILINE)
|
||||||
|
{
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
SetWidgetStyle();
|
||||||
gtk_widget_set_style( m_text, m_widgetStyle );
|
gtk_widget_set_style( m_text, m_widgetStyle );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1102,7 +1102,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
|
|||||||
m_cursor = new wxCursor( wxCURSOR_ARROW );
|
m_cursor = new wxCursor( wxCURSOR_ARROW );
|
||||||
m_font = *wxSWISS_FONT;
|
m_font = *wxSWISS_FONT;
|
||||||
// m_backgroundColour = wxWHITE;
|
// m_backgroundColour = wxWHITE;
|
||||||
m_foregroundColour = wxBLACK;
|
// m_foregroundColour = wxBLACK;
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
m_windowName = name;
|
m_windowName = name;
|
||||||
m_constraints = (wxLayoutConstraints *) NULL;
|
m_constraints = (wxLayoutConstraints *) NULL;
|
||||||
@@ -1965,19 +1965,8 @@ void wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
||||||
gdk_window_clear( window );
|
gdk_window_clear( window );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
ApplyWidgetStyle();
|
||||||
GtkStyle *style = GetWidgetStyle();
|
|
||||||
m_backgroundColour.CalcPixel( gdk_window_get_colormap( m_widget->window ) );
|
|
||||||
style->bg[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
|
|
||||||
style->base[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
|
|
||||||
style->bg[GTK_STATE_PRELIGHT] = *m_backgroundColour.GetColor();
|
|
||||||
style->base[GTK_STATE_PRELIGHT] = *m_backgroundColour.GetColor();
|
|
||||||
style->bg[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor();
|
|
||||||
style->base[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor();
|
|
||||||
style->bg[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor();
|
|
||||||
style->base[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour wxWindow::GetForegroundColour() const
|
wxColour wxWindow::GetForegroundColour() const
|
||||||
@@ -1992,23 +1981,51 @@ void wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
m_foregroundColour = colour;
|
m_foregroundColour = colour;
|
||||||
if (!m_foregroundColour.Ok()) return;
|
if (!m_foregroundColour.Ok()) return;
|
||||||
|
|
||||||
if (!m_wxwindow)
|
ApplyWidgetStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkStyle *wxWindow::GetWidgetStyle()
|
||||||
|
{
|
||||||
|
if (m_widgetStyle) gtk_style_unref( m_widgetStyle );
|
||||||
|
|
||||||
|
m_widgetStyle =
|
||||||
|
gtk_style_copy(
|
||||||
|
gtk_widget_get_style( m_widget ) );
|
||||||
|
|
||||||
|
return m_widgetStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxWindow::SetWidgetStyle()
|
||||||
|
{
|
||||||
|
GtkStyle *style = GetWidgetStyle();
|
||||||
|
|
||||||
|
gdk_font_unref( style->font );
|
||||||
|
style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
|
||||||
|
|
||||||
|
if (m_foregroundColour.Ok())
|
||||||
{
|
{
|
||||||
GtkStyle *style = GetWidgetStyle();
|
|
||||||
m_foregroundColour.CalcPixel( gdk_window_get_colormap( m_widget->window ) );
|
m_foregroundColour.CalcPixel( gdk_window_get_colormap( m_widget->window ) );
|
||||||
style->fg[GTK_STATE_NORMAL] = *m_foregroundColour.GetColor();
|
style->fg[GTK_STATE_NORMAL] = *m_foregroundColour.GetColor();
|
||||||
style->fg[GTK_STATE_PRELIGHT] = *m_foregroundColour.GetColor();
|
style->fg[GTK_STATE_PRELIGHT] = *m_foregroundColour.GetColor();
|
||||||
style->fg[GTK_STATE_ACTIVE] = *m_foregroundColour.GetColor();
|
style->fg[GTK_STATE_ACTIVE] = *m_foregroundColour.GetColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_backgroundColour.Ok())
|
||||||
|
{
|
||||||
|
m_backgroundColour.CalcPixel( gdk_window_get_colormap( m_widget->window ) );
|
||||||
|
style->bg[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
|
||||||
|
style->base[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
|
||||||
|
style->bg[GTK_STATE_PRELIGHT] = *m_backgroundColour.GetColor();
|
||||||
|
style->base[GTK_STATE_PRELIGHT] = *m_backgroundColour.GetColor();
|
||||||
|
style->bg[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor();
|
||||||
|
style->base[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor();
|
||||||
|
style->bg[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor();
|
||||||
|
style->base[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkStyle *wxWindow::GetWidgetStyle()
|
void wxWindow::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
if (!m_widgetStyle)
|
|
||||||
m_widgetStyle =
|
|
||||||
gtk_style_copy(
|
|
||||||
gtk_widget_get_style( m_widget ) );
|
|
||||||
return m_widgetStyle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::Validate()
|
bool wxWindow::Validate()
|
||||||
@@ -2172,10 +2189,8 @@ void wxWindow::SetFont( const wxFont &font )
|
|||||||
m_font = font;
|
m_font = font;
|
||||||
else
|
else
|
||||||
m_font = *wxSWISS_FONT;
|
m_font = *wxSWISS_FONT;
|
||||||
|
|
||||||
GtkStyle *style = GetWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
gdk_font_unref( style->font );
|
|
||||||
style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont *wxWindow::GetFont()
|
wxFont *wxWindow::GetFont()
|
||||||
|
@@ -130,3 +130,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
|||||||
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );
|
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxBitmapButton::ApplyWidgetStyle()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -74,6 +74,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -106,34 +107,10 @@ void wxButton::Enable( bool enable )
|
|||||||
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxButton::SetFont( const wxFont &font )
|
void wxButton::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxButton::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
}
|
|
||||||
|
|
||||||
void wxButton::SetForegroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
|
||||||
|
|
||||||
wxControl::SetForegroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_foregroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -72,6 +72,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
SetLabel( label );
|
SetLabel( label );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -113,23 +114,11 @@ void wxCheckBox::Enable( bool enable )
|
|||||||
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetFont( const wxFont &font )
|
void wxCheckBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
|
SetWidgetStyle();
|
||||||
|
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -70,20 +70,22 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
|||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
GtkWidget *item = gtk_menu_item_new_with_label( choices[i] );
|
GtkWidget *item = gtk_menu_item_new_with_label( choices[i] );
|
||||||
gtk_signal_connect( GTK_OBJECT( item ), "activate",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
|
||||||
|
|
||||||
gtk_menu_append( GTK_MENU(menu), item );
|
gtk_menu_append( GTK_MENU(menu), item );
|
||||||
|
|
||||||
gtk_widget_show( item );
|
|
||||||
gtk_widget_realize( item );
|
gtk_widget_realize( item );
|
||||||
gtk_widget_realize( GTK_BIN(item)->child );
|
gtk_widget_realize( GTK_BIN(item)->child );
|
||||||
|
|
||||||
|
gtk_widget_show( item );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT( item ), "activate",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
||||||
}
|
}
|
||||||
gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu );
|
gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu );
|
||||||
|
|
||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -102,11 +104,7 @@ void wxChoice::Append( const wxString &item )
|
|||||||
gtk_widget_realize( menu_item );
|
gtk_widget_realize( menu_item );
|
||||||
gtk_widget_realize( GTK_BIN(menu_item)->child );
|
gtk_widget_realize( GTK_BIN(menu_item)->child );
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
{
|
|
||||||
gtk_widget_set_style( menu_item, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_BIN(menu_item)->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
|
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
|
||||||
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
|
||||||
@@ -259,34 +257,9 @@ void wxChoice::SetStringSelection( const wxString &string )
|
|||||||
if (n != -1) SetSelection( n );
|
if (n != -1) SetSelection( n );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxChoice::SetFont( const wxFont &font )
|
void wxChoice::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid choice" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxControl::SetFont( font );
|
|
||||||
|
|
||||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
|
||||||
GList *child = menu_shell->children;
|
|
||||||
while (child)
|
|
||||||
{
|
|
||||||
GtkBin *bin = GTK_BIN( child->data );
|
|
||||||
GtkWidget *label = (GtkWidget *) NULL;
|
|
||||||
if (bin->child) label = bin->child;
|
|
||||||
if (!label) label = GTK_BUTTON(m_widget)->child;
|
|
||||||
|
|
||||||
gtk_widget_set_style( label, GetWidgetStyle() );
|
|
||||||
|
|
||||||
child = child->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxChoice::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid choice" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
|
||||||
|
|
||||||
@@ -297,9 +270,15 @@ void wxChoice::SetBackgroundColour( const wxColour &colour )
|
|||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
gtk_widget_set_style( GTK_WIDGET( child->data ), m_widgetStyle );
|
gtk_widget_set_style( GTK_WIDGET( child->data ), m_widgetStyle );
|
||||||
|
|
||||||
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
|
GtkWidget *label = (GtkWidget *) NULL;
|
||||||
|
if (bin->child) label = bin->child;
|
||||||
|
if (!label) label = GTK_BUTTON(m_widget)->child;
|
||||||
|
|
||||||
|
gtk_widget_set_style( label, m_widgetStyle );
|
||||||
|
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -104,6 +104,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value,
|
|||||||
gtk_widget_realize( GTK_COMBO(m_widget)->button );
|
gtk_widget_realize( GTK_COMBO(m_widget)->button );
|
||||||
|
|
||||||
SetBackgroundColour( parent->GetBackgroundColour() );
|
SetBackgroundColour( parent->GetBackgroundColour() );
|
||||||
|
SetForegroundColour( parent->GetForegroundColour() );
|
||||||
|
|
||||||
Show( TRUE );
|
Show( TRUE );
|
||||||
|
|
||||||
@@ -135,11 +136,7 @@ void wxComboBox::Append( const wxString &item, char *clientData )
|
|||||||
|
|
||||||
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
GtkWidget *list_item = gtk_list_item_new_with_label( item );
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle) ApplyWidgetStyle();
|
||||||
{
|
|
||||||
gtk_widget_set_style( list_item, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_BIN( list_item )->child, m_widgetStyle );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
gtk_signal_connect( GTK_OBJECT(list_item), "select",
|
||||||
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
|
||||||
@@ -438,21 +435,21 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::SetFont( const wxFont &font )
|
void wxComboBox::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
|
SetWidgetStyle();
|
||||||
|
|
||||||
wxWindow::SetFont( font );
|
gtk_widget_set_style( GTK_COMBO(m_widget)->button, m_widgetStyle );
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
||||||
|
gtk_widget_set_style( GTK_COMBO(m_widget)->list, m_widgetStyle );
|
||||||
|
|
||||||
GtkList *list = GTK_LIST( GTK_COMBO(m_widget)->list );
|
GtkList *list = GTK_LIST( GTK_COMBO(m_widget)->list );
|
||||||
|
|
||||||
GList *child = list->children;
|
GList *child = list->children;
|
||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
GtkBin *bin = (GtkBin*) child->data;
|
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
||||||
|
|
||||||
|
GtkBin *bin = GTK_BIN(child->data);
|
||||||
gtk_widget_set_style( bin->child, m_widgetStyle );
|
gtk_widget_set_style( bin->child, m_widgetStyle );
|
||||||
|
|
||||||
child = child->next;
|
child = child->next;
|
||||||
@@ -469,27 +466,3 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return ( (window == GTK_ENTRY( GTK_COMBO(m_widget)->entry )->text_area) ||
|
return ( (window == GTK_ENTRY( GTK_COMBO(m_widget)->entry )->text_area) ||
|
||||||
(window == GTK_COMBO(m_widget)->button->window ) );
|
(window == GTK_COMBO(m_widget)->button->window ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::SetBackgroundColour( const wxColour &colour )
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
|
|
||||||
|
|
||||||
wxControl::SetBackgroundColour( colour );
|
|
||||||
|
|
||||||
if (!m_backgroundColour.Ok()) return;
|
|
||||||
|
|
||||||
// gtk_widget_set_style( m_widget, m_widgetStyle );
|
|
||||||
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->button, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->entry, m_widgetStyle );
|
|
||||||
gtk_widget_set_style( GTK_COMBO(m_widget)->list, m_widgetStyle );
|
|
||||||
|
|
||||||
GList *child = GTK_LIST( GTK_COMBO(m_widget)->list )->children;
|
|
||||||
while (child)
|
|
||||||
{
|
|
||||||
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
|
|
||||||
|
|
||||||
child = child->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -287,5 +287,3 @@ void wxDialog::SetIcon( const wxIcon &icon )
|
|||||||
|
|
||||||
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -361,8 +361,20 @@ GdkFont *wxFont::GetInternalFont(float scale) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
|
if ((int_scale == 100) &&
|
||||||
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
|
(M_FONTDATA->m_style == wxSWISS) &&
|
||||||
|
(M_FONTDATA->m_pointSize == 12) &&
|
||||||
|
(M_FONTDATA->m_weight == wxNORMAL) &&
|
||||||
|
(M_FONTDATA->m_underlined == FALSE) &&
|
||||||
|
(M_FONTDATA->m_style == wxNORMAL))
|
||||||
|
{
|
||||||
|
font = gdk_font_load( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
|
||||||
|
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
|
||||||
|
}
|
||||||
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
|
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
|
||||||
}
|
}
|
||||||
if (!font)
|
if (!font)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user