removed wxUniversalWindow class and merged its methods into wxWindow itself,
wxGTK builds with the generic wxStaticText enabled (but doesn't work...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,6 +32,7 @@ include ./src/make.env
|
|||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
|
||||||
VP1 = @top_srcdir@/src/common
|
VP1 = @top_srcdir@/src/common
|
||||||
|
VP1_5 = @top_srcdir@/src/univ
|
||||||
VP2 = @top_srcdir@/src/@TOOLKIT_DIR@
|
VP2 = @top_srcdir@/src/@TOOLKIT_DIR@
|
||||||
VP3 = @top_srcdir@/src/motif/xmcombo
|
VP3 = @top_srcdir@/src/motif/xmcombo
|
||||||
VP4 = @top_srcdir@/src/generic
|
VP4 = @top_srcdir@/src/generic
|
||||||
@@ -46,7 +47,7 @@ VP11 = @top_srcdir@/src/iodbc
|
|||||||
# the comment at the end of the next line is needed because otherwise autoconf
|
# the comment at the end of the next line is needed because otherwise autoconf
|
||||||
# would remove this line completely - it contains a built-in hack to remove
|
# would remove this line completely - it contains a built-in hack to remove
|
||||||
# any VPATH assignment not containing ':'
|
# any VPATH assignment not containing ':'
|
||||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
|
VPATH = $(VP1)@PATH_IFS@$(VP1_5)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
@@ -561,7 +562,7 @@ ALL_GUI_DIST: ALL_DIST
|
|||||||
mkdir $(DISTDIR)/src/tiff
|
mkdir $(DISTDIR)/src/tiff
|
||||||
mkdir $(DISTDIR)/src/iodbc
|
mkdir $(DISTDIR)/src/iodbc
|
||||||
mkdir $(DISTDIR)/src/unix
|
mkdir $(DISTDIR)/src/unix
|
||||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||||
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
||||||
@@ -601,7 +602,7 @@ BASE_DIST: ALL_DIST
|
|||||||
mkdir $(DISTDIR)/include/wx/unix
|
mkdir $(DISTDIR)/include/wx/unix
|
||||||
mkdir $(DISTDIR)/src/common
|
mkdir $(DISTDIR)/src/common
|
||||||
mkdir $(DISTDIR)/src/unix
|
mkdir $(DISTDIR)/src/unix
|
||||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||||
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
||||||
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
||||||
cp $(WXDIR)/wxBase.dsp $(DISTDIR)
|
cp $(WXDIR)/wxBase.dsp $(DISTDIR)
|
||||||
|
36
configure.in
36
configure.in
@@ -804,6 +804,7 @@ if test $DEBUG_CONFIGURE = 1; then
|
|||||||
DEFAULT_wxUSE_STATBMP=no
|
DEFAULT_wxUSE_STATBMP=no
|
||||||
DEFAULT_wxUSE_STATBOX=no
|
DEFAULT_wxUSE_STATBOX=no
|
||||||
DEFAULT_wxUSE_STATLINE=no
|
DEFAULT_wxUSE_STATLINE=no
|
||||||
|
DEFAULT_wxUSE_STATTEXT=no
|
||||||
DEFAULT_wxUSE_STATUSBAR=no
|
DEFAULT_wxUSE_STATUSBAR=no
|
||||||
DEFAULT_wxUSE_TABDIALOG=no
|
DEFAULT_wxUSE_TABDIALOG=no
|
||||||
DEFAULT_wxUSE_TEXTCTRL=no
|
DEFAULT_wxUSE_TEXTCTRL=no
|
||||||
@@ -941,6 +942,7 @@ else
|
|||||||
DEFAULT_wxUSE_STATBMP=yes
|
DEFAULT_wxUSE_STATBMP=yes
|
||||||
DEFAULT_wxUSE_STATBOX=yes
|
DEFAULT_wxUSE_STATBOX=yes
|
||||||
DEFAULT_wxUSE_STATLINE=yes
|
DEFAULT_wxUSE_STATLINE=yes
|
||||||
|
DEFAULT_wxUSE_STATTEXT=yes
|
||||||
DEFAULT_wxUSE_STATUSBAR=yes
|
DEFAULT_wxUSE_STATUSBAR=yes
|
||||||
DEFAULT_wxUSE_TABDIALOG=no
|
DEFAULT_wxUSE_TABDIALOG=no
|
||||||
DEFAULT_wxUSE_TEXTCTRL=yes
|
DEFAULT_wxUSE_TEXTCTRL=yes
|
||||||
@@ -1235,6 +1237,7 @@ WX_ARG_ENABLE(splitter, [ --enable-splitter use wxSplitterWindow class
|
|||||||
WX_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP)
|
WX_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP)
|
||||||
WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX)
|
WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX)
|
||||||
WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
|
WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
|
||||||
|
WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
|
||||||
WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
|
WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
|
||||||
WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG)
|
WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG)
|
||||||
WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
|
WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
|
||||||
@@ -1962,6 +1965,9 @@ if test "$wxUSE_GUI" = "yes"; then
|
|||||||
dnl are we using the generic version with this low level toolkit?
|
dnl are we using the generic version with this low level toolkit?
|
||||||
if test "$wxUSE_UNIVERSAL" = "yes"; then
|
if test "$wxUSE_UNIVERSAL" = "yes"; then
|
||||||
TOOLKIT_NAME="${TOOLKIT_NAME}univ"
|
TOOLKIT_NAME="${TOOLKIT_NAME}univ"
|
||||||
|
SETUPH_DIR="univ"
|
||||||
|
else
|
||||||
|
SETUPH_DIR="${TOOLKIT_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl append 'd' to the debug library name
|
dnl append 'd' to the debug library name
|
||||||
@@ -1980,7 +1986,7 @@ if test "$wxUSE_GUI" = "yes"; then
|
|||||||
|
|
||||||
dnl the sources, their dependenices and the headers
|
dnl the sources, their dependenices and the headers
|
||||||
if test "$wxUSE_UNIVERSAL" = "yes"; then
|
if test "$wxUSE_UNIVERSAL" = "yes"; then
|
||||||
ALL_OBJECTS="\$(GUI_LOWLEVEL_OBJS)"
|
ALL_OBJECTS="\$(GUI_LOWLEVEL_OBJS) \${UNIVOBJS}"
|
||||||
else
|
else
|
||||||
ALL_OBJECTS="\$(GUIOBJS)"
|
ALL_OBJECTS="\$(GUIOBJS)"
|
||||||
fi
|
fi
|
||||||
@@ -2018,6 +2024,9 @@ if test "$wxUSE_GUI" = "yes"; then
|
|||||||
ALL_DEPFILES="${ALL_DEPFILES} \$(COMMONDEPS) \$(GENERICDEPS) \$(UNIXDEPS) \$(HTMLDEPS) \$(OGLDEPS)"
|
ALL_DEPFILES="${ALL_DEPFILES} \$(COMMONDEPS) \$(GENERICDEPS) \$(UNIXDEPS) \$(HTMLDEPS) \$(OGLDEPS)"
|
||||||
|
|
||||||
PORT_FILES="src/\$(TOOLKITDIR)/files.lst"
|
PORT_FILES="src/\$(TOOLKITDIR)/files.lst"
|
||||||
|
if test "$wxUSE_UNIVERSAL" = "yes"; then
|
||||||
|
PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst"
|
||||||
|
fi
|
||||||
RPM_FILES="src/\$(TOOLKITDIR)/rpmfiles.lst"
|
RPM_FILES="src/\$(TOOLKITDIR)/rpmfiles.lst"
|
||||||
RPM_SPEC="wx\$(TOOLKIT).spec"
|
RPM_SPEC="wx\$(TOOLKIT).spec"
|
||||||
|
|
||||||
@@ -3668,6 +3677,10 @@ if test "$wxUSE_STATBOX" = "yes"; then
|
|||||||
AC_DEFINE(wxUSE_STATBOX)
|
AC_DEFINE(wxUSE_STATBOX)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wxUSE_STATTEXT" = "yes"; then
|
||||||
|
AC_DEFINE(wxUSE_STATTEXT)
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_STATLINE" = "yes"; then
|
if test "$wxUSE_STATLINE" = "yes"; then
|
||||||
if test "$wxUSE_WINE" = 1 ; then
|
if test "$wxUSE_WINE" = 1 ; then
|
||||||
AC_MSG_WARN([wxStaticLine is not supported under WINE])
|
AC_MSG_WARN([wxStaticLine is not supported under WINE])
|
||||||
@@ -3968,6 +3981,7 @@ AC_SUBST(AFMINSTALL)
|
|||||||
AC_SUBST(TOOLKIT)
|
AC_SUBST(TOOLKIT)
|
||||||
AC_SUBST(TOOLKIT_DEF)
|
AC_SUBST(TOOLKIT_DEF)
|
||||||
AC_SUBST(TOOLKIT_DIR)
|
AC_SUBST(TOOLKIT_DIR)
|
||||||
|
AC_SUBST(SETUPH_DIR)
|
||||||
AC_SUBST(TOOLKIT_NAME)
|
AC_SUBST(TOOLKIT_NAME)
|
||||||
AC_SUBST(TOOLKIT_INCLUDE)
|
AC_SUBST(TOOLKIT_INCLUDE)
|
||||||
AC_SUBST(WXCONFIG_INCLUDE)
|
AC_SUBST(WXCONFIG_INCLUDE)
|
||||||
@@ -4032,9 +4046,9 @@ AC_PROG_MAKE_SET
|
|||||||
dnl move setup.h back if available
|
dnl move setup.h back if available
|
||||||
if test -d include; then
|
if test -d include; then
|
||||||
if test -d include/wx; then
|
if test -d include/wx; then
|
||||||
if test -d include/wx/${TOOLKIT_DIR}; then
|
if test -d include/wx/${SETUPH_DIR}; then
|
||||||
if test -f include/wx/${TOOLKIT_DIR}/setup.h; then
|
if test -f include/wx/${SETUPH_DIR}/setup.h; then
|
||||||
mv -f include/wx/${TOOLKIT_DIR}/setup.h setup.h
|
mv -f include/wx/${SETUPH_DIR}/setup.h setup.h
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -4085,11 +4099,11 @@ AC_OUTPUT([
|
|||||||
if test ! -d lib/wx/include/wx; then
|
if test ! -d lib/wx/include/wx; then
|
||||||
mkdir lib/wx/include/wx
|
mkdir lib/wx/include/wx
|
||||||
fi
|
fi
|
||||||
if test ! -d lib/wx/include/wx/${TOOLKIT_NAME}; then
|
if test ! -d lib/wx/include/wx/${SETUPH_DIR}; then
|
||||||
mkdir lib/wx/include/wx/${TOOLKIT_NAME}
|
mkdir lib/wx/include/wx/${SETUPH_DIR}
|
||||||
fi
|
fi
|
||||||
if test -f setup.h; then
|
if test -f setup.h; then
|
||||||
cp -f setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h
|
cp -f setup.h lib/wx/include/wx/${SETUPH_DIR}/setup.h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl *move* setup.h to its final place
|
dnl *move* setup.h to its final place
|
||||||
@@ -4100,16 +4114,16 @@ AC_OUTPUT([
|
|||||||
if test ! -d include/wx; then
|
if test ! -d include/wx; then
|
||||||
mkdir include/wx
|
mkdir include/wx
|
||||||
fi
|
fi
|
||||||
if test ! -d include/wx/${TOOLKIT_DIR}; then
|
if test ! -d include/wx/${SETUPH_DIR}; then
|
||||||
mkdir include/wx/${TOOLKIT_DIR}
|
mkdir include/wx/${SETUPH_DIR}
|
||||||
fi
|
fi
|
||||||
if test -f setup.h; then
|
if test -f setup.h; then
|
||||||
mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h
|
mv -f setup.h include/wx/${SETUPH_DIR}/setup.h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
TOOLKIT_DIR="${TOOLKIT_DIR}"
|
SETUPH_DIR="${SETUPH_DIR}"
|
||||||
TOOLKIT_NAME="${TOOLKIT_NAME}"
|
TOOLKIT_NAME="${TOOLKIT_NAME}"
|
||||||
LN_S="${LN_S}"
|
LN_S="${LN_S}"
|
||||||
]
|
]
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
// depend on the toolkit. default version does nothing.
|
// depend on the toolkit. default version does nothing.
|
||||||
//
|
//
|
||||||
// Override: rarely.
|
// Override: rarely.
|
||||||
virtual bool OnInitGui() { return TRUE; }
|
virtual bool OnInitGui();
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
// called to start program execution - the default version just enters
|
// called to start program execution - the default version just enters
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "wx/window.h" // base class
|
#include "wx/window.h" // base class
|
||||||
|
|
||||||
|
extern const wxChar* wxControlNameStr; // the default name
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxControl is the base class for all controls
|
// wxControl is the base class for all controls
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -31,6 +33,14 @@
|
|||||||
class WXDLLEXPORT wxControlBase : public wxWindow
|
class WXDLLEXPORT wxControlBase : public wxWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Create() function adds the validator parameter
|
||||||
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = 0,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxControlNameStr);
|
||||||
|
|
||||||
// simulates the event of given type (i.e. wxButton::Command() is just as
|
// simulates the event of given type (i.e. wxButton::Command() is just as
|
||||||
// if the button was clicked)
|
// if the button was clicked)
|
||||||
virtual void Command(wxCommandEvent &event);
|
virtual void Command(wxCommandEvent &event);
|
||||||
@@ -57,7 +67,9 @@ protected:
|
|||||||
// include platform-dependent wxControl declarations
|
// include platform-dependent wxControl declarations
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXUNIVERSAL__)
|
||||||
|
#include "wx/univ/control.h"
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
#include "wx/msw/control.h"
|
#include "wx/msw/control.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
#include "wx/motif/control.h"
|
#include "wx/motif/control.h"
|
||||||
|
@@ -29,8 +29,6 @@ class wxControl;
|
|||||||
// wxControl
|
// wxControl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern const wxChar* wxControlNameStr;
|
|
||||||
|
|
||||||
class wxControl : public wxControlBase
|
class wxControl : public wxControlBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -30,8 +30,6 @@ class wxStaticText;
|
|||||||
// global data
|
// global data
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern const wxChar *wxStaticTextNameStr;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxStaticText
|
// wxStaticText
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -29,8 +29,6 @@ class wxControl;
|
|||||||
// wxControl
|
// wxControl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern const wxChar* wxControlNameStr;
|
|
||||||
|
|
||||||
class wxControl : public wxControlBase
|
class wxControl : public wxControlBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -30,8 +30,6 @@ class wxStaticText;
|
|||||||
// global data
|
// global data
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern const wxChar *wxStaticTextNameStr;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxStaticText
|
// wxStaticText
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -36,6 +36,7 @@ public:
|
|||||||
virtual ~wxApp();
|
virtual ~wxApp();
|
||||||
|
|
||||||
// override base class (pure) virtuals
|
// override base class (pure) virtuals
|
||||||
|
virtual bool OnInitGui() { return TRUE; }
|
||||||
virtual int MainLoop();
|
virtual int MainLoop();
|
||||||
virtual void ExitMainLoop();
|
virtual void ExitMainLoop();
|
||||||
virtual bool Initialized();
|
virtual bool Initialized();
|
||||||
|
@@ -3,7 +3,20 @@
|
|||||||
|
|
||||||
#if wxUSE_STATTEXT
|
#if wxUSE_STATTEXT
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#include "wx/control.h"
|
||||||
|
|
||||||
|
extern const wxChar *wxStaticTextNameStr;
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxStaticTextBase : public wxControl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// overriden base class virtuals
|
||||||
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(__WXUNIVERSAL__)
|
||||||
|
#include "wx/univ/stattext.h"
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
#include "wx/msw/stattext.h"
|
#include "wx/msw/stattext.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
#include "wx/motif/stattext.h"
|
#include "wx/motif/stattext.h"
|
||||||
|
@@ -19,6 +19,9 @@
|
|||||||
#ifndef _WX_UNIX_RENDERER_H_
|
#ifndef _WX_UNIX_RENDERER_H_
|
||||||
#define _WX_UNIX_RENDERER_H_
|
#define _WX_UNIX_RENDERER_H_
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxDC;
|
||||||
|
class WXDLLEXPORT wxWindow;
|
||||||
|
|
||||||
class WXDLLEXPORT wxRenderer
|
class WXDLLEXPORT wxRenderer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -14,6 +14,10 @@
|
|||||||
#ifndef _WX_UNIX_THEME_H_
|
#ifndef _WX_UNIX_THEME_H_
|
||||||
#define _WX_UNIX_THEME_H_
|
#define _WX_UNIX_THEME_H_
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "theme.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTheme
|
// wxTheme
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -25,16 +29,25 @@ class WXDLLEXPORT wxColourScheme;
|
|||||||
class WXDLLEXPORT wxTheme
|
class WXDLLEXPORT wxTheme
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// create the default theme
|
||||||
|
static bool CreateDefault();
|
||||||
|
|
||||||
|
// change the current scheme
|
||||||
|
static wxTheme *Set(wxTheme *theme);
|
||||||
|
|
||||||
|
// get the current theme (never NULL)
|
||||||
|
static wxTheme *Get() { return ms_theme; }
|
||||||
|
|
||||||
virtual wxRenderer *GetRenderer() = 0;
|
virtual wxRenderer *GetRenderer() = 0;
|
||||||
virtual wxInputHandler *GetInputHandler() = 0;
|
virtual wxInputHandler *GetInputHandler() = 0;
|
||||||
virtual wxColourScheme *GetColourScheme() = 0;
|
virtual wxColourScheme *GetColourScheme() = 0;
|
||||||
|
|
||||||
|
virtual ~wxTheme();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// the current theme
|
||||||
|
static wxTheme *ms_theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// global variables
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
extern WXDLLEXPORT_DATA(wxTheme *) wxTheTheme;
|
|
||||||
|
|
||||||
#endif // _WX_UNIX_THEME_H_
|
#endif // _WX_UNIX_THEME_H_
|
||||||
|
|
||||||
|
@@ -48,6 +48,9 @@ class WXDLLEXPORT wxDC;
|
|||||||
class WXDLLEXPORT wxDropTarget;
|
class WXDLLEXPORT wxDropTarget;
|
||||||
class WXDLLEXPORT wxItemResource;
|
class WXDLLEXPORT wxItemResource;
|
||||||
class WXDLLEXPORT wxLayoutConstraints;
|
class WXDLLEXPORT wxLayoutConstraints;
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
class WXDLLEXPORT wxRenderer;
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
class WXDLLEXPORT wxResourceTable;
|
class WXDLLEXPORT wxResourceTable;
|
||||||
class WXDLLEXPORT wxSizer;
|
class WXDLLEXPORT wxSizer;
|
||||||
class WXDLLEXPORT wxToolTip;
|
class WXDLLEXPORT wxToolTip;
|
||||||
@@ -852,6 +855,20 @@ protected:
|
|||||||
ClientData_Void // client data is untyped and we don't own it
|
ClientData_Void // client data is untyped and we don't own it
|
||||||
} m_clientDataType;
|
} m_clientDataType;
|
||||||
|
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
// draw the controls contents: the base class version draws the border as
|
||||||
|
// required (depending on the window style flags and enabled state) and
|
||||||
|
// adjusts the DC so that subsequent drawing is clipped to the area inside
|
||||||
|
// the border
|
||||||
|
virtual void DoDraw(wxDC& dc, wxRenderer *renderer);
|
||||||
|
|
||||||
|
// draw the border corresponding to the window style
|
||||||
|
virtual void DoDrawBorder(wxDC& dc, wxRenderer *renderer);
|
||||||
|
|
||||||
|
// event handlers
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// contains the last id generated by NewControlId
|
// contains the last id generated by NewControlId
|
||||||
static int ms_lastControlId;
|
static int ms_lastControlId;
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
|
#include "wx/stattext.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Define a new application type, each program should derive a class from wxApp
|
// Define a new application type, each program should derive a class from wxApp
|
||||||
@@ -57,7 +59,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// event handlers
|
// event handlers
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
void OnLeftUp(wxMouseEvent& event);
|
void OnLeftUp(wxMouseEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -72,8 +73,6 @@ private:
|
|||||||
IMPLEMENT_APP(MyUnivApp)
|
IMPLEMENT_APP(MyUnivApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyUnivFrame, wxFrame)
|
BEGIN_EVENT_TABLE(MyUnivFrame, wxFrame)
|
||||||
EVT_PAINT(MyUnivFrame::OnPaint)
|
|
||||||
|
|
||||||
EVT_LEFT_UP(MyUnivFrame::OnLeftUp)
|
EVT_LEFT_UP(MyUnivFrame::OnLeftUp)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -100,12 +99,8 @@ bool MyUnivApp::OnInit()
|
|||||||
MyUnivFrame::MyUnivFrame(const wxString& title)
|
MyUnivFrame::MyUnivFrame(const wxString& title)
|
||||||
: wxFrame(NULL, -1, title, wxDefaultPosition, wxSize(300, 150))
|
: wxFrame(NULL, -1, title, wxDefaultPosition, wxSize(300, 150))
|
||||||
{
|
{
|
||||||
}
|
new wxStaticText(this, _T("Test static text"), wxPoint(10, 10));
|
||||||
|
new wxStaticText(this, _T("Ctrl-click to exit."), wxPoint(40, 10));
|
||||||
void MyUnivFrame::OnPaint(wxPaintEvent& event)
|
|
||||||
{
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
dc.DrawText(_T("Ctrl-click to exit."), 10, 10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyUnivFrame::OnLeftUp(wxMouseEvent& event)
|
void MyUnivFrame::OnLeftUp(wxMouseEvent& event)
|
||||||
|
@@ -374,6 +374,10 @@
|
|||||||
* Use this control
|
* Use this control
|
||||||
*/
|
*/
|
||||||
#define wxUSE_STATLINE 0
|
#define wxUSE_STATLINE 0
|
||||||
|
/*
|
||||||
|
* Use this control
|
||||||
|
*/
|
||||||
|
#define wxUSE_STATTEXT 0
|
||||||
/*
|
/*
|
||||||
* Use this control
|
* Use this control
|
||||||
*/
|
*/
|
||||||
|
@@ -36,10 +36,43 @@
|
|||||||
#include "wx/thread.h"
|
#include "wx/thread.h"
|
||||||
#include "wx/confbase.h"
|
#include "wx/confbase.h"
|
||||||
|
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
#include "wx/univ/theme.h"
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// initialization and termination
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxAppBase::OnInitGui()
|
||||||
|
{
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
if ( !wxTheme::CreateDefault() )
|
||||||
|
return FALSE;
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int wxAppBase::OnExit()
|
||||||
|
{
|
||||||
|
#if wxUSE_CONFIG
|
||||||
|
// delete the config object if any (don't use Get() here, but Set()
|
||||||
|
// because Get() could create a new config object)
|
||||||
|
delete wxConfigBase::Set((wxConfigBase *) NULL);
|
||||||
|
#endif // wxUSE_CONFIG
|
||||||
|
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
delete wxTheme::Set(NULL);
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// wxAppBase
|
// wxAppBase
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -74,13 +107,3 @@ void wxAppBase::ProcessPendingEvents()
|
|||||||
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
|
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxAppBase::OnExit()
|
|
||||||
{
|
|
||||||
#if wxUSE_CONFIG
|
|
||||||
// delete the config object if any (don't use Get() here, but Set()
|
|
||||||
// because Get() could create a new config object)
|
|
||||||
delete wxConfigBase::Set((wxConfigBase *) NULL);
|
|
||||||
#endif // wxUSE_CONFIG
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
@@ -39,6 +39,24 @@
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
bool wxControlBase::Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxPoint &pos,
|
||||||
|
const wxSize &size,
|
||||||
|
long style,
|
||||||
|
const wxValidator& validator,
|
||||||
|
const wxString &name)
|
||||||
|
{
|
||||||
|
bool ret = wxWindow::Create(parent, id, pos, size, style, name);
|
||||||
|
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
if ( ret )
|
||||||
|
SetValidator(validator);
|
||||||
|
#endif // wxUSE_VALIDATORS
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
bool wxControlBase::CreateControl(wxWindowBase *parent,
|
bool wxControlBase::CreateControl(wxWindowBase *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/control.h"
|
||||||
#include "wx/checkbox.h"
|
#include "wx/checkbox.h"
|
||||||
#include "wx/radiobut.h"
|
#include "wx/radiobut.h"
|
||||||
#include "wx/textctrl.h"
|
#include "wx/textctrl.h"
|
||||||
@@ -77,6 +78,11 @@ BEGIN_EVENT_TABLE(wxWindowBase, wxEvtHandler)
|
|||||||
EVT_SYS_COLOUR_CHANGED(wxWindowBase::OnSysColourChanged)
|
EVT_SYS_COLOUR_CHANGED(wxWindowBase::OnSysColourChanged)
|
||||||
EVT_INIT_DIALOG(wxWindowBase::OnInitDialog)
|
EVT_INIT_DIALOG(wxWindowBase::OnInitDialog)
|
||||||
EVT_MIDDLE_DOWN(wxWindowBase::OnMiddleClick)
|
EVT_MIDDLE_DOWN(wxWindowBase::OnMiddleClick)
|
||||||
|
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
EVT_PAINT(wxWindowBase::OnPaint)
|
||||||
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
@@ -275,6 +275,9 @@ wxApp::~wxApp()
|
|||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
{
|
{
|
||||||
|
if ( !wxAppBase::OnInitGui() )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
GdkVisual *visual = gdk_visual_get_system();
|
GdkVisual *visual = gdk_visual_get_system();
|
||||||
|
|
||||||
/* on some machines, the default visual is just 256 colours, so
|
/* on some machines, the default visual is just 256 colours, so
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
|
#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/gtk/setup.h"
|
#include "wx/setup.h"
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
#include "gtk/gtksignal.h"
|
#include "gtk/gtksignal.h"
|
||||||
#include "gtk/gtkprivate.h"
|
#include "gtk/gtkprivate.h"
|
||||||
|
@@ -275,6 +275,9 @@ wxApp::~wxApp()
|
|||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
{
|
{
|
||||||
|
if ( !wxAppBase::OnInitGui() )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
GdkVisual *visual = gdk_visual_get_system();
|
GdkVisual *visual = gdk_visual_get_system();
|
||||||
|
|
||||||
/* on some machines, the default visual is just 256 colours, so
|
/* on some machines, the default visual is just 256 colours, so
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
|
#define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/gtk/setup.h"
|
#include "wx/setup.h"
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
#include "gtk/gtksignal.h"
|
#include "gtk/gtksignal.h"
|
||||||
#include "gtk/gtkprivate.h"
|
#include "gtk/gtkprivate.h"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: univ/window.cpp
|
// Name: univ/window.cpp
|
||||||
// Purpose: wxUniversalWindow implementation
|
// Purpose: implementation of extra wxWindow methods for wxUniv port
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 06.08.00
|
// Created: 06.08.00
|
||||||
@@ -29,8 +29,22 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/event.h"
|
||||||
|
|
||||||
|
#include "wx/univ/renderer.h"
|
||||||
|
#include "wx/univ/theme.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// macros
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// we don't have any objects of type wxWindowBase so this cast is always safe
|
||||||
|
#define self ((wxWindow *)this)
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -40,22 +54,28 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// the event handler executed when the window must be repainted
|
// the event handler executed when the window must be repainted
|
||||||
void wxUniversalWindow::OnPaint(wxPaintEvent& event)
|
void wxWindowBase::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
// get the renderer to use
|
// get the renderer and the DC to use
|
||||||
wxRenderer *renderer = wxTheTheme->GetRenderer();
|
wxRenderer *renderer = wxTheme::Get()->GetRenderer();
|
||||||
|
wxPaintDC dc(self);
|
||||||
|
|
||||||
|
// draw the border
|
||||||
|
DoDrawBorder(dc, renderer);
|
||||||
|
|
||||||
// draw the control
|
// draw the control
|
||||||
wxPaintDC dc(this);
|
|
||||||
DoDraw(dc, renderer);
|
DoDraw(dc, renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the border
|
// draw the border
|
||||||
void DoDrawBorder(wxRenderer *renderer, wxDC& dc, const wxRect& rect)
|
void wxWindowBase::DoDrawBorder(wxDC& dc, wxRenderer *renderer)
|
||||||
{
|
{
|
||||||
if ( !(m_windowStyle & wxNO_BORDER) )
|
if ( !(m_windowStyle & wxNO_BORDER) )
|
||||||
{
|
{
|
||||||
renderer->DrawBorder(dc, this);
|
renderer->DrawBorder(dc, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWindowBase::DoDraw(wxDC& dc, wxRenderer *renderer)
|
||||||
|
{
|
||||||
|
}
|
Reference in New Issue
Block a user