wxMSW builds in minimal configuration (i.e. without anything)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2968,6 +2968,10 @@ if test "$wxUSE_APPLE_IEEE" = "yes"; then
|
||||
AC_DEFINE(wxUSE_APPLE_IEEE)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_TIMER" = "yes"; then
|
||||
AC_DEFINE(wxUSE_TIMER)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_WAVE" = "yes"; then
|
||||
AC_DEFINE(wxUSE_WAVE)
|
||||
fi
|
||||
|
@@ -48,7 +48,7 @@
|
||||
wxUSE_TOOLTIPS || \
|
||||
wxUSE_TREECTRL
|
||||
# if !wxUSE_CONTROLS
|
||||
#if wxABORT_ON_CONFIG_ERROR
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_CONTROLS unset but some controls used"
|
||||
# else
|
||||
# undef wxUSE_CONTROLS
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
#if wxUSE_STOPWATCH
|
||||
# if !wxUSE_LONGLONG
|
||||
#if wxABORT_ON_CONFIG_ERROR
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
|
||||
# else
|
||||
# undef wxUSE_LONGLONG
|
||||
@@ -68,3 +68,29 @@
|
||||
# endif
|
||||
#endif /* wxUSE_STOPWATCH */
|
||||
|
||||
#if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
|
||||
# if wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
|
||||
# else
|
||||
# undef wxUSE_DYNAMIC_CLASSES
|
||||
# define wxUSE_DYNAMIC_CLASSES
|
||||
# endif
|
||||
#endif /* wxUSE_DYNAMIC_CLASSES */
|
||||
|
||||
#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
|
||||
# if wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
|
||||
# else
|
||||
# undef wxUSE_TEXTFILE
|
||||
# define wxUSE_TEXTFILE 1
|
||||
# endif
|
||||
#endif /* wxUSE_MIMETYPE */
|
||||
|
||||
#if wxUSE_TEXTFILE && !wxUSE_FILE
|
||||
# if wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_TEXTFILE requires wxUSE_FILE"
|
||||
# else
|
||||
# undef wxUSE_FILE
|
||||
# define wxUSE_FILE 1
|
||||
# endif
|
||||
#endif /* wxUSE_TEXTFILE */
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_DRAGIMAG_H_BASE_
|
||||
#define _WX_DRAGIMAG_H_BASE_
|
||||
|
||||
#if wxUSE_DRAGIMAG
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#ifdef __WIN16__
|
||||
#include "wx/generic/dragimgg.h"
|
||||
@@ -42,5 +44,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_DRAGIMAG
|
||||
|
||||
#endif
|
||||
// _WX_DRAGIMAG_H_BASE_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "menubase.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -419,5 +421,7 @@ protected:
|
||||
#endif
|
||||
#endif // wxUSE_BASE_CLASSES_ONLY/!wxUSE_BASE_CLASSES_ONLY
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#endif
|
||||
// _WX_MENU_H_BASE_
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#ifndef _WX_MENUITEM_H_BASE_
|
||||
#define _WX_MENUITEM_H_BASE_
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -143,5 +145,7 @@ private:
|
||||
#endif
|
||||
#endif // wxUSE_BASE_CLASSES_ONLY/!wxUSE_BASE_CLASSES_ONLY
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#endif
|
||||
// _WX_MENUITEM_H_BASE_
|
||||
|
@@ -24,7 +24,7 @@ class wxMimeTypesManagerImpl;
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_FILE
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
// the things we really need
|
||||
#include "wx/string.h"
|
||||
@@ -242,8 +242,7 @@ private:
|
||||
// the default mime manager for wxWindows programs
|
||||
WXDLLEXPORT_DATA(extern wxMimeTypesManager *) wxTheMimeTypesManager;
|
||||
|
||||
#endif
|
||||
// wxUSE_FILE
|
||||
#endif // wxUSE_MIMETYPE
|
||||
|
||||
#endif
|
||||
//_MIMETYPE_H
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_BMPBUTTON
|
||||
|
||||
#include "wx/button.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
@@ -84,5 +86,7 @@ protected:
|
||||
int m_marginY;
|
||||
};
|
||||
|
||||
#endif // wxUSE_BMPBUTTON
|
||||
|
||||
#endif
|
||||
// _WX_BMPBUTTN_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checkbox.h
|
||||
// Name: wx/msw/checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -16,6 +16,8 @@
|
||||
#pragma interface "checkbox.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxCheckBoxNameStr;
|
||||
@@ -80,5 +82,8 @@ public:
|
||||
|
||||
virtual void SetLabel(const wxBitmap& bitmap);
|
||||
};
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "gauge95.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_SLIDER
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
|
||||
@@ -75,5 +77,7 @@ protected:
|
||||
int m_gaugePos;
|
||||
};
|
||||
|
||||
#endif // wxUSE_GAUGE
|
||||
|
||||
#endif
|
||||
// _GAUGEMSW_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "listbox.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// simple types
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -133,5 +135,7 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
};
|
||||
|
||||
#endif // wxUSE_LISTBOX
|
||||
|
||||
#endif
|
||||
// _WX_LISTBOX_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "listctrl.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/hash.h"
|
||||
@@ -358,5 +360,7 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxListCtrl)
|
||||
};
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
||||
#endif
|
||||
// _WX_LISTCTRL_H_
|
||||
|
@@ -18,8 +18,9 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include "wx/mimetype.h"
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
#include "wx/mimetype.h"
|
||||
|
||||
class WXDLLEXPORT wxFileTypeImpl
|
||||
{
|
||||
@@ -89,6 +90,7 @@ private:
|
||||
wxArrayFileTypeInfo m_fallbacks;
|
||||
};
|
||||
|
||||
#endif // wxUSE_MIMETYPE
|
||||
|
||||
#endif
|
||||
//_MIMETYPE_IMPL_H
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#pragma interface "notebook.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -165,4 +167,6 @@ protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
|
||||
#endif // _NOTEBOOK_H
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "radiobox.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxRadioBoxNameStr;
|
||||
@@ -124,5 +126,7 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
};
|
||||
|
||||
#endif // wxUSE_RADIOBOX
|
||||
|
||||
#endif
|
||||
// _WX_RADIOBOX_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "radiobut.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_RADIOBTN
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxRadioButtonNameStr;
|
||||
@@ -54,41 +56,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
void Command(wxCommandEvent& event);
|
||||
};
|
||||
|
||||
// Not implemented
|
||||
#if 0
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
|
||||
|
||||
class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
|
||||
protected:
|
||||
wxBitmap *theButtonBitmap;
|
||||
public:
|
||||
inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; }
|
||||
inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr);
|
||||
|
||||
virtual void SetLabel(const wxBitmap *label);
|
||||
virtual void SetValue(bool val) ;
|
||||
virtual bool GetValue(void) const ;
|
||||
};
|
||||
#endif
|
||||
#endif // wxUSE_RADIOBTN
|
||||
|
||||
#endif
|
||||
// _WX_RADIOBUT_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "scrolbar.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_SCROLLBAR
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxScrollBarNameStr;
|
||||
@@ -87,5 +89,7 @@ protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // wxUSE_SCROLLBAR
|
||||
|
||||
#endif
|
||||
// _WX_SCROLBAR_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "slider95.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_SLIDER
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxSliderNameStr;
|
||||
@@ -105,5 +107,7 @@ protected:
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
};
|
||||
|
||||
#endif // wxUSE_SLIDER
|
||||
|
||||
#endif
|
||||
// _SLIDER95_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "statbmp.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATBMP
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/bitmap.h"
|
||||
@@ -86,5 +88,7 @@ protected:
|
||||
wxGDIImage *m_image;
|
||||
};
|
||||
|
||||
#endif // wxUSE_STATBMP
|
||||
|
||||
#endif
|
||||
// _WX_STATBMP_H_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "statbox.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxStaticBoxNameStr;
|
||||
@@ -57,5 +59,7 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
};
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
#endif
|
||||
// _WX_STATBOX_H_
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma interface "treectrl.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/treebase.h"
|
||||
@@ -449,5 +451,7 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
|
||||
};
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
#endif
|
||||
// _WX_TREECTRL_H_
|
||||
|
@@ -109,7 +109,9 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
@@ -154,12 +156,14 @@ public:
|
||||
void GetCaretPos(int *x, int *y) const;
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
||||
// FIXME: should they really be all virtual?
|
||||
virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id);
|
||||
virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name);
|
||||
wxWindow* GetWindowChild1(wxWindowID id);
|
||||
wxWindow* GetWindowChild(wxWindowID id);
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
// a MSW only function which sends a size event to the window using its
|
||||
// current size - this has an effect of refreshing the window layout
|
||||
@@ -232,11 +236,13 @@ public:
|
||||
virtual void MSWDeviceToLogical(float *x, float *y) const;
|
||||
#endif // WXWIN_COMPATIBILITY
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
// Create an appropriate wxWindow from a HWND
|
||||
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
|
||||
|
||||
// Make sure the window style reflects the HWND style (roughly)
|
||||
virtual void AdoptAttributesFromHWND();
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
// Setup background and foreground colours correctly
|
||||
virtual void SetupColours();
|
||||
|
@@ -15,7 +15,16 @@
|
||||
#error No __WXxxx__ define set! Please define one of __WXBASE__,__WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXPM__,__WXSTUBS__
|
||||
#endif
|
||||
|
||||
#ifdef __WXBASE__
|
||||
// wxUniversal is defined together with one of other ports, so test for it
|
||||
// first
|
||||
#ifdef __WXUNIVERSAL__
|
||||
#if defined(__USE_WXCONFIG__) && defined(__WXDEBUG__)
|
||||
#include "wx/univd/setup.h"
|
||||
#else
|
||||
#include "wx/univ/setup.h"
|
||||
#endif
|
||||
|
||||
#elif defined(__WXBASE__)
|
||||
#if defined(__USE_WXCONFIG__) && defined(__WXDEBUG__)
|
||||
#include "wx/based/setup.h"
|
||||
#else
|
||||
@@ -56,5 +65,7 @@
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
/* _WX_SETUP_H_BASE_ */
|
||||
|
||||
#include "chkconf.h"
|
||||
|
||||
#endif /* _WX_SETUP_H_BASE_ */
|
||||
|
21
include/wx/univ/app.h
Normal file
21
include/wx/univ/app.h
Normal file
@@ -0,0 +1,21 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/app.h
|
||||
// Purpose: wxUniversalApp class extends wxApp for wxUniv port
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_UNIX_APP_H_
|
||||
#define _WX_UNIX_APP_H_
|
||||
|
||||
class WXDLLEXPORT wxUniversalApp : public wxApp
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#endif // _WX_UNIX_APP_H_
|
||||
|
33
include/wx/univ/renderer.h
Normal file
33
include/wx/univ/renderer.h
Normal file
@@ -0,0 +1,33 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/renderer.h
|
||||
// Purpose: wxRenderer class declaration
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
wxRenderer class is used to draw all wxWindows controls. This is an ABC and
|
||||
the look of the application is determined by the concrete derivation of
|
||||
wxRenderer used in the program.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _WX_UNIX_RENDERER_H_
|
||||
#define _WX_UNIX_RENDERER_H_
|
||||
|
||||
class WXDLLEXPORT wxRenderer
|
||||
{
|
||||
public:
|
||||
// draw the label
|
||||
virtual void DrawLabel(wxDC& dc, wxWindow *window) = 0;
|
||||
|
||||
// draw the border and adjust the DC
|
||||
virtual void DrawBorder(wxDC& dc, wxWindow *window) = 0;
|
||||
};
|
||||
|
||||
#endif // _WX_UNIX_RENDERER_H_
|
||||
|
153
include/wx/univ/setup.h
Normal file
153
include/wx/univ/setup.h
Normal file
@@ -0,0 +1,153 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/setup.h
|
||||
// Purpose: configuration settings for wxUniversal/MSW
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 14.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_UNIV_SETUP_H_
|
||||
#define _WX_UNIV_SETUP_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// undef everything
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxUSE_GUI 1
|
||||
#define WXWIN_COMPATIBILITY 0
|
||||
#define wxICON_IS_BITMAP 0
|
||||
#define wxFONT_SIZE_COMPATIBILITY 0
|
||||
#define wxDIALOG_UNIT_COMPATIBILITY 1
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#define wxUSE_ON_FATAL_EXCEPTION 0
|
||||
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_WCHAR_T 0
|
||||
#define wxUSE_LOG 1
|
||||
#define wxUSE_THREADS 0
|
||||
#define wxUSE_STREAMS 0
|
||||
#define wxUSE_STD_IOSTREAM 0
|
||||
#define wxUSE_SERIAL 0
|
||||
#define wxUSE_LONGLONG 0
|
||||
#define wxUSE_TIMER 0
|
||||
#define wxUSE_TIMEDATE 0
|
||||
#define wxUSE_DATETIME 0
|
||||
#define wxUSE_CONFIG 0
|
||||
#define wxUSE_CONFIG_NATIVE 0
|
||||
#define wxUSE_DIALUP_MANAGER 0
|
||||
#define wxUSE_DYNLIB_CLASS 0
|
||||
#define wxUSE_SOCKETS 0
|
||||
#define wxUSE_FILESYSTEM 0
|
||||
#define wxUSE_FS_ZIP 0
|
||||
#define wxUSE_FS_INET 0
|
||||
#define wxUSE_ZIPSTREAM 0
|
||||
#define wxUSE_ZLIB 0
|
||||
#define wxUSE_FILESYSTEM 0
|
||||
#define wxUSE_FS_ZIP 0
|
||||
#define wxUSE_FS_INET 0
|
||||
#define wxUSE_ZIPSTREAM 0
|
||||
#define wxUSE_ZLIB 0
|
||||
#define wxUSE_APPLE_IEEE 0
|
||||
#define wxUSE_FILE 0
|
||||
#define wxUSE_TEXTFILE 0
|
||||
#define wxUSE_INTL 0
|
||||
#define wxUSE_MENUS 0
|
||||
#define wxUSE_TOOLBAR 0
|
||||
#define wxUSE_TOOLBAR_NATIVE 0
|
||||
#define wxUSE_TOOLBAR_SIMPLE 0
|
||||
#define wxUSE_NOTEBOOK 0
|
||||
#define wxUSE_FONTMAP 0
|
||||
#define wxUSE_MIMETYPE 0
|
||||
|
||||
#define wxUSE_BUTTON 0
|
||||
#define wxUSE_BMPBUTTON 0
|
||||
#define wxUSE_CARET 0
|
||||
#define wxUSE_CHECKBOX 0
|
||||
#define wxUSE_CHECKLISTBOX 0
|
||||
#define wxUSE_CHOICE 0
|
||||
#define wxUSE_COMBOBOX 0
|
||||
#define wxUSE_GAUGE 0
|
||||
#define wxUSE_LISTBOX 0
|
||||
#define wxUSE_LISTCTRL 0
|
||||
#define wxUSE_RADIOBOX 0
|
||||
#define wxUSE_RADIOBTN 0
|
||||
#define wxUSE_SASH 0
|
||||
#define wxUSE_SCROLLBAR 0
|
||||
#define wxUSE_SLIDER 0
|
||||
#define wxUSE_SPINBTN 0
|
||||
#define wxUSE_SPINCTRL 0
|
||||
#define wxUSE_STATLINE 0
|
||||
#define wxUSE_STATTEXT 0
|
||||
#define wxUSE_STATLBMP 0
|
||||
#define wxUSE_STATUSBAR 0
|
||||
#define wxUSE_TOOLTIPS 0
|
||||
#define wxUSE_TREECTRL 0
|
||||
|
||||
#define wxUSE_NATIVE_STATUSBAR 0
|
||||
#define wxUSE_BUTTONBAR 0
|
||||
#define wxUSE_GRID 0
|
||||
#define wxUSE_NEW_GRID 0
|
||||
#define wxUSE_VALIDATORS 0
|
||||
#define wxUSE_ACCEL 0
|
||||
#define wxUSE_GENERIC_DIALOGS_IN_MSW 0
|
||||
#define wxUSE_COMMON_DIALOGS 0
|
||||
#define wxUSE_TEXTDLG 0
|
||||
#define wxUSE_PROGRESSDLG 0
|
||||
#define wxUSE_BUSYINFO 0
|
||||
#define wxUSE_DIRDLG 0
|
||||
#define wxUSE_FONTDLG 0
|
||||
#define wxUSE_FILEDLG 0
|
||||
#define wxUSE_TEXTDLG 0
|
||||
#define wxUSE_CHOICEDLG 0
|
||||
#define wxUSE_NUMBERDLG 0
|
||||
#define wxUSE_STARTUP_TIPS 0
|
||||
|
||||
#define wxUSE_METAFILE 0
|
||||
#define wxUSE_ENH_METAFILE 0
|
||||
#define wxUSE_WIN_METAFILES_ALWAYS 0
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 0
|
||||
#define wxUSE_MDI_ARCHITECTURE 0
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 0
|
||||
#define wxUSE_HTML 0
|
||||
#define wxUSE_PLOT 0
|
||||
#define wxUSE_GLCANVAS 0
|
||||
#define wxUSE_TREELAYOUT 0
|
||||
#define wxUSE_IPC 0
|
||||
#define wxUSE_HELP 0
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
#define wxUSE_RESOURCES 0
|
||||
#define wxUSE_CONSTRAINTS 0
|
||||
#define wxUSE_CLIPBOARD 0
|
||||
#define wxUSE_SPLINES 0
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
#define wxUSE_XPM_IN_MSW 0
|
||||
#define wxUSE_IMAGE_LOADING_IN_MSW 0
|
||||
#define wxUSE_RESOURCE_LOADING_IN_MSW 0
|
||||
#define wxUSE_WX_RESOURCES 0
|
||||
#define wxUSE_POSTSCRIPT 0
|
||||
#define wxUSE_AFM_FOR_POSTSCRIPT 0
|
||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
|
||||
#define wxUSE_ODBC 0
|
||||
#define wxODBC_FWD_ONLY_CURSORS 0
|
||||
#define wxODBC_BACKWARD_COMPATABILITY 0
|
||||
#define REMOVE_UNUSED_ARG 1
|
||||
#define wxUSE_IOSTREAMH 0
|
||||
#define wxUSE_LIBPNG 0
|
||||
#define wxUSE_LIBJPEG 0
|
||||
#define wxUSE_LIBTIFF 0
|
||||
#define wxUSE_GIF 0
|
||||
#define wxUSE_PNM 0
|
||||
#define wxUSE_PCX 0
|
||||
#define wxUSE_MFC 0
|
||||
#define wxUSE_OLE 0
|
||||
#define wxUSE_CTL3D 0
|
||||
#define wxUSE_ITSY_BITSY 0
|
||||
#define wxUSE_DYNAMIC_CLASSES 1
|
||||
|
||||
#endif // _WX_UNIV_SETUP_H_
|
40
include/wx/univ/theme.h
Normal file
40
include/wx/univ/theme.h
Normal file
@@ -0,0 +1,40 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/theme.h
|
||||
// Purpose: wxTheme class manages all configurable aspects of the
|
||||
// application including the look (wxRenderer), feel
|
||||
// (wxInputHandler) and the colours (wxColourScheme)
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_UNIX_THEME_H_
|
||||
#define _WX_UNIX_THEME_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTheme
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxRenderer;
|
||||
class WXDLLEXPORT wxInputHandler;
|
||||
class WXDLLEXPORT wxColourScheme;
|
||||
|
||||
class WXDLLEXPORT wxTheme
|
||||
{
|
||||
public:
|
||||
virtual wxRenderer *GetRenderer() = 0;
|
||||
virtual wxInputHandler *GetInputHandler() = 0;
|
||||
virtual wxColourScheme *GetColourScheme() = 0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global variables
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern WXDLLEXPORT_DATA(wxTheme *) wxTheTheme;
|
||||
|
||||
#endif // _WX_UNIX_THEME_H_
|
||||
|
55
include/wx/univ/window.h
Normal file
55
include/wx/univ/window.h
Normal file
@@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/window.h
|
||||
// Purpose: wxUniversalWindow class which is the base class for all
|
||||
// wxUniv port controls, it supports the customization of the
|
||||
// window drawing and input processing.
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_UNIX_WINDOW_H_
|
||||
#define _WX_UNIX_WINDOW_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "univwindow.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxRenderer;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxUniversalWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxUniversalWindow : public wxWindow
|
||||
{
|
||||
public:
|
||||
// ctor
|
||||
wxUniversalWindow(wxWindowBase *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
: wxWindow(parent, id, pos, size, style, validator, name)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// 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);
|
||||
|
||||
// event handlers
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_UNIX_WINDOW_H_
|
@@ -15,17 +15,16 @@
|
||||
|
||||
// for compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
#include "wx/module.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
#if (wxUSE_FILE && wxUSE_TEXTFILE) || defined(__WXMSW__)
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
@@ -34,9 +33,6 @@
|
||||
#endif
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
// Doesn't compile in WIN16 mode
|
||||
#ifndef __WIN16__
|
||||
|
||||
#include "wx/log.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/intl.h"
|
||||
@@ -370,10 +366,4 @@ public:
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
// wxUSE_FILE && wxUSE_TEXTFILE
|
||||
|
||||
#endif
|
||||
// __WIN16__
|
||||
#endif // wxUSE_MIMETYPE
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpbuttn.cpp
|
||||
// Name: src/msw/bmpbuttn.cpp
|
||||
// Purpose: wxBitmapButton
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_BMPBUTTN
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/bmpbuttn.h"
|
||||
#include "wx/log.h"
|
||||
@@ -384,3 +386,5 @@ void wxBitmapButton::SetDefault()
|
||||
{
|
||||
wxButton::SetDefault();
|
||||
}
|
||||
|
||||
#endif // wxUSE_BMPBUTTN
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_BMPBUTTN
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/button.h"
|
||||
#include "wx/brush.h"
|
||||
@@ -524,3 +526,5 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
|
||||
}
|
||||
|
||||
#endif // __WIN32__
|
||||
|
||||
#endif // wxUSE_BMPBUTTN
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/checkbox.h"
|
||||
#include "wx/brush.h"
|
||||
@@ -269,3 +271,5 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap& bitmap)
|
||||
{
|
||||
wxFAIL_MSG(wxT("not implemented"));
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/choice.h"
|
||||
#include "wx/utils.h"
|
||||
@@ -370,4 +372,4 @@ WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
return (WXHBRUSH)brush->GetResourceHandle();
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.cpp
|
||||
// Name: msw/control.cpp
|
||||
// Purpose: wxControl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/event.h"
|
||||
#include "wx/app.h"
|
||||
@@ -297,3 +299,4 @@ void wxFindMaxSize(WXHWND wnd, RECT *rect)
|
||||
rect->bottom = bottom;
|
||||
}
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
@@ -87,7 +87,10 @@ wxCursor *wxHOURGLASS_CURSOR = NULL;
|
||||
wxCursor *wxCROSS_CURSOR = NULL;
|
||||
|
||||
// 'Null' objects
|
||||
#if wxUSE_ACCEL
|
||||
wxAcceleratorTable wxNullAcceleratorTable;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
wxBitmap wxNullBitmap;
|
||||
wxIcon wxNullIcon;
|
||||
wxCursor wxNullCursor;
|
||||
|
@@ -16,6 +16,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "dirdlg.h"
|
||||
#endif
|
||||
@@ -27,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DIRDLG
|
||||
|
||||
#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__)
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
@@ -182,3 +185,5 @@ static void ItemListFree(LPITEMIDLIST pidl)
|
||||
#else
|
||||
#include "../generic/dirdlgg.cpp"
|
||||
#endif // compiler/platform on which the code here compiles
|
||||
|
||||
#endif // wxUSE_DIRDLG
|
||||
|
@@ -23,12 +23,13 @@
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DRAGIMAG
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
@@ -41,6 +42,7 @@
|
||||
#include "wx/settings.h"
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/frame.h"
|
||||
@@ -376,3 +378,4 @@ bool wxDragImage::Hide()
|
||||
#endif
|
||||
// __WIN95__
|
||||
|
||||
#endif // wxUSE_DRAGIMAG
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/msgdlg.h"
|
||||
@@ -512,4 +514,5 @@ WXDLLEXPORT wxString wxSaveFileSelector(const wxChar *what,
|
||||
return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
|
||||
}
|
||||
|
||||
#endif // wxUSE_FILEDLG
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: fontdlg.cpp
|
||||
// Name: src/msw/fontdlg.cpp
|
||||
// Purpose: wxFontDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FONTDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/utils.h"
|
||||
@@ -156,3 +158,5 @@ int wxFontDialog::ShowModal()
|
||||
return wxID_CANCEL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_FONTDLG
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/font.h"
|
||||
#endif
|
||||
@@ -258,3 +260,4 @@ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
|
||||
return fontEnum->OnFont(lplf, lptm);
|
||||
}
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
@@ -371,7 +371,9 @@ void wxFillLogFont(LOGFONT *logFont, const wxFont *font)
|
||||
wxFontEncoding encoding = font->GetEncoding();
|
||||
if ( !wxGetNativeFontEncoding(encoding, &info) )
|
||||
{
|
||||
#if wxUSE_FONTMAP
|
||||
if ( !wxTheFontMapper->GetAltForEncoding(encoding, &info) )
|
||||
#endif // wxUSE_FONTMAP
|
||||
{
|
||||
// unsupported encoding, replace with the default
|
||||
info.charset = ANSI_CHARSET;
|
||||
|
@@ -62,7 +62,10 @@
|
||||
extern wxWindowList wxModelessWindows;
|
||||
extern wxList WXDLLEXPORT wxPendingDelete;
|
||||
extern const wxChar *wxFrameClassName;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
extern wxMenu *wxCurrentPopupMenu;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event tables
|
||||
@@ -83,11 +86,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
||||
// static class members
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
#if wxUSE_NATIVE_STATUSBAR
|
||||
bool wxFrame::m_useNativeStatusBar = TRUE;
|
||||
#else
|
||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
||||
#endif
|
||||
#endif // wxUSE_NATIVE_STATUSBAR
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// creation/destruction
|
||||
@@ -127,9 +132,15 @@ bool wxFrame::Create(wxWindow *parent,
|
||||
{
|
||||
SetName(name);
|
||||
m_windowStyle = style;
|
||||
#if wxUSE_MENUS
|
||||
m_frameMenuBar = NULL;
|
||||
#endif // wxUSE_MENUS
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = NULL;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
#if wxUSE_STATUSBAR
|
||||
m_frameStatusBar = NULL;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
|
||||
@@ -417,15 +428,18 @@ void wxFrame::PositionStatusBar()
|
||||
|
||||
void wxFrame::DetachMenuBar()
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
if ( m_frameMenuBar )
|
||||
{
|
||||
m_frameMenuBar->Detach();
|
||||
m_frameMenuBar = NULL;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
void wxFrame::SetMenuBar(wxMenuBar *menubar)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
if ( !menubar )
|
||||
{
|
||||
DetachMenuBar();
|
||||
@@ -461,6 +475,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menubar)
|
||||
m_frameMenuBar = menubar;
|
||||
menubar->Attach(this);
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
void wxFrame::InternalSetMenuBar()
|
||||
@@ -477,12 +492,14 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
Refresh();
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( m_frameStatusBar )
|
||||
{
|
||||
wxSysColourChangedEvent event2;
|
||||
event2.SetEventObject( m_frameStatusBar );
|
||||
m_frameStatusBar->GetEventHandler()->ProcessEvent(event2);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Propagate the event to the non-top-level children
|
||||
wxWindow::OnSysColourChanged(event);
|
||||
@@ -499,15 +516,10 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
||||
m_fsIsShowing = TRUE;
|
||||
m_fsStyle = style;
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar *theToolBar = GetToolBar();
|
||||
wxStatusBar *theStatusBar = GetStatusBar();
|
||||
|
||||
int dummyWidth;
|
||||
|
||||
if (theToolBar)
|
||||
theToolBar->GetSize(&dummyWidth, &m_fsToolBarHeight);
|
||||
if (theStatusBar)
|
||||
theStatusBar->GetSize(&dummyWidth, &m_fsStatusBarHeight);
|
||||
theToolBar->GetSize(NULL, &m_fsToolBarHeight);
|
||||
|
||||
// zap the toolbar, menubar, and statusbar
|
||||
|
||||
@@ -516,10 +528,16 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
||||
theToolBar->SetSize(-1,0);
|
||||
theToolBar->Show(FALSE);
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
if (style & wxFULLSCREEN_NOMENUBAR)
|
||||
SetMenu((HWND)GetHWND(), (HMENU) NULL);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
wxStatusBar *theStatusBar = GetStatusBar();
|
||||
if (theStatusBar)
|
||||
theStatusBar->GetSize(NULL, &m_fsStatusBarHeight);
|
||||
|
||||
// Save the number of fields in the statusbar
|
||||
if ((style & wxFULLSCREEN_NOSTATUSBAR) && theStatusBar)
|
||||
{
|
||||
@@ -529,6 +547,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
||||
}
|
||||
else
|
||||
m_fsStatusBarFields = 0;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// zap the frame borders
|
||||
|
||||
@@ -578,6 +597,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
||||
|
||||
m_fsIsShowing = FALSE;
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar *theToolBar = GetToolBar();
|
||||
|
||||
// restore the toolbar, menubar, and statusbar
|
||||
@@ -586,12 +606,15 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
||||
theToolBar->SetSize(-1, m_fsToolBarHeight);
|
||||
theToolBar->Show(TRUE);
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ((m_fsStyle & wxFULLSCREEN_NOSTATUSBAR) && (m_fsStatusBarFields > 0))
|
||||
{
|
||||
CreateStatusBar(m_fsStatusBarFields);
|
||||
PositionStatusBar();
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0))
|
||||
SetMenu((HWND)GetHWND(), (HMENU)m_hMenu);
|
||||
@@ -799,7 +822,11 @@ void wxFrame::IconizeChildFrames(bool bIconize)
|
||||
// the child MDI frames are a special case and should not be touched by
|
||||
// the parent frame - instead, they are managed by the user
|
||||
wxFrame *frame = wxDynamicCast(win, wxFrame);
|
||||
if ( frame && !wxDynamicCast(frame, wxMDIChildFrame) )
|
||||
if ( frame
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
&& !wxDynamicCast(frame, wxMDIChildFrame)
|
||||
#endif // wxUSE_MDI_ARCHITECTURE
|
||||
)
|
||||
{
|
||||
frame->Iconize(bIconize);
|
||||
}
|
||||
@@ -819,6 +846,7 @@ bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
|
||||
if ( wxWindow::MSWTranslateMessage(pMsg) )
|
||||
return TRUE;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// try the menu bar accels
|
||||
wxMenuBar *menuBar = GetMenuBar();
|
||||
if ( !menuBar )
|
||||
@@ -826,6 +854,9 @@ bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
|
||||
|
||||
const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
|
||||
return acceleratorTable.Translate(this, pMsg);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -913,8 +944,13 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
|
||||
|
||||
if ( !m_iconized )
|
||||
{
|
||||
#if wxUSE_STATUSBAR
|
||||
PositionStatusBar();
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
wxSizeEvent event(wxSize(x, y), m_windowId);
|
||||
event.SetEventObject( this );
|
||||
@@ -937,6 +973,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
// handle here commands from menus and accelerators
|
||||
if ( cmd == 0 || cmd == 1 )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
if ( wxCurrentPopupMenu )
|
||||
{
|
||||
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||
@@ -944,6 +981,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
|
||||
return popupMenu->MSWCommand(cmd, id);
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
if ( ProcessCommand(id) )
|
||||
{
|
||||
@@ -968,6 +1006,7 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxUSE_STATUSBAR
|
||||
// don't give hints for separators (doesn't make sense) nor for the
|
||||
// items opening popup menus (they don't have them anyhow) but do clear
|
||||
// the status line - otherwise, we would be left with the help message
|
||||
@@ -977,6 +1016,7 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
|
||||
{
|
||||
statbar->SetStatusText(wxEmptyString);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.cpp
|
||||
// Name: src/msw/listbox.cpp
|
||||
// Purpose: wxListBox
|
||||
// Author: Julian Smart
|
||||
// Modified by: Vadim Zeitlin (owner drawn stuff)
|
||||
@@ -20,8 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/msw/private.h"
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/listbox.h"
|
||||
@@ -32,6 +31,9 @@
|
||||
#include "wx/utils.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#include <windowsx.h>
|
||||
|
||||
#ifdef __WXWINE__
|
||||
@@ -771,5 +773,6 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
(wxOwnerDrawn::wxODStatus)pStruct->itemState);
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_OWNER_DRAWN
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
#endif // wxUSE_LISTBOX
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
#ifdef __WIN95__
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
@@ -1872,3 +1874,4 @@ wxListEvent::wxListEvent(wxEventType commandType, int id)
|
||||
|
||||
#endif // __WIN95__
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/frame.h"
|
||||
#include "wx/menu.h"
|
||||
@@ -872,3 +874,4 @@ wxMenuItem *wxMenuBar::FindItem(int id, wxMenu **itemMenu) const
|
||||
return item;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/font.h"
|
||||
#include "wx/bitmap.h"
|
||||
@@ -272,3 +274,5 @@ wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu,
|
||||
{
|
||||
return new wxMenuItem(parentMenu, id, name, help, isCheckable, subMenu);
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
// Doesn't compile in WIN16 mode
|
||||
#ifndef __WIN16__
|
||||
|
||||
@@ -443,3 +445,5 @@ size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
|
||||
|
||||
#endif
|
||||
// __WIN16__
|
||||
|
||||
#endif // wxUSE_MIMETYPE
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
// wxWindows
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
@@ -659,3 +661,5 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
|
||||
|
||||
s_bInsideChangePage = FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_OLE
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
// Watcom C++ gives a linker error if this is compiled in.
|
||||
@@ -1171,3 +1173,4 @@ void ShowException(LPOLESTR szMember, HRESULT hr, EXCEPINFO *pexcep, unsigned in
|
||||
|
||||
#endif // __WATCOMC__
|
||||
|
||||
#endif // wxUSE_OLE
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/brush.h"
|
||||
@@ -1032,3 +1034,4 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
|
||||
|
||||
#endif // __WIN32__
|
||||
|
||||
#endif // wxUSE_RADIOBOX
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobut.cpp
|
||||
// Name: msw/radiobut.cpp
|
||||
// Purpose: wxRadioButton
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -20,9 +20,9 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_RADIOBTN
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/setup.h"
|
||||
#include "wx/radiobut.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/brush.h"
|
||||
@@ -270,3 +270,5 @@ bool wxBitmapRadioButton::GetValue(void) const
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_RADIOBTN
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: scrolbar.cpp
|
||||
// Name: msw/scrolbar.cpp
|
||||
// Purpose: wxScrollBar
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -20,8 +20,9 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_SCROLLBAR
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/utils.h"
|
||||
#endif
|
||||
|
||||
@@ -352,3 +353,5 @@ void wxScrollBar::OnScroll(wxScrollEvent& event)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_SCROLLBAR
|
||||
|
@@ -20,8 +20,9 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_SLIDER
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/utils.h"
|
||||
#include "wx/brush.h"
|
||||
#endif
|
||||
@@ -637,3 +638,4 @@ bool wxSlider95::Show(bool show)
|
||||
#endif
|
||||
// __WIN95__
|
||||
|
||||
#endif // wxUSE_SLIDER
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATBMP
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
@@ -266,3 +268,4 @@ long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
|
||||
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
#endif // wxUSE_STATBMP
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/dcclient.h"
|
||||
@@ -115,3 +117,4 @@ long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATTEXT
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/event.h"
|
||||
#include "wx/app.h"
|
||||
@@ -158,4 +160,4 @@ long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_STATTEXT
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TEXTCTRL
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/settings.h"
|
||||
@@ -1253,3 +1255,4 @@ bool wxRichEditModule::Load(int version)
|
||||
|
||||
#endif // wxUSE_RICHEDIT
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TIMER
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/setup.h"
|
||||
#include "wx/window.h"
|
||||
@@ -136,3 +138,5 @@ UINT WINAPI _EXPORT wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TIMER
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: treectrl.cpp
|
||||
// Name: src/msw/treectrl.cpp
|
||||
// Purpose: wxTreeCtrl
|
||||
// Author: Julian Smart
|
||||
// Modified by: Vadim Zeitlin to be less MSW-specific on 10.10.98
|
||||
@@ -16,6 +16,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "treectrl.h"
|
||||
#endif
|
||||
@@ -27,9 +28,12 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
// Set this to 1 to be _absolutely_ sure that repainting will work for all comctl32.dll versions
|
||||
// Set this to 1 to be _absolutely_ sure that repainting will work for all
|
||||
// comctl32.dll versions
|
||||
#define wxUSE_COMCTL32_SAFELY 0
|
||||
|
||||
// Mingw32 is a bit mental even though this is done in winundef
|
||||
@@ -2332,3 +2336,4 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
|
||||
#endif // __WIN95__
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
@@ -51,8 +51,6 @@ extern "C" {
|
||||
|
||||
#include "wx/timer.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
|
||||
#include <direct.h>
|
||||
|
||||
@@ -90,15 +88,11 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef __WATCOMC__
|
||||
#if !(defined(_MSC_VER) && (_MSC_VER > 800))
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
//// BEGIN for console support: VC++ only
|
||||
#ifdef __VISUALC__
|
||||
@@ -109,13 +103,7 @@ extern "C" {
|
||||
|
||||
#include "wx/ioswrap.h"
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <io.h>
|
||||
# include <fstream.h>
|
||||
#else
|
||||
# include <fstream>
|
||||
#endif
|
||||
#include "wx/ioswrap.h"
|
||||
|
||||
/* Need to undef new if including crtdbg.h */
|
||||
# ifdef new
|
||||
@@ -632,6 +620,8 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn)
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#if wxUSE_TIMER
|
||||
|
||||
// Sleep for nSecs seconds. Attempt a Windows implementation using timers.
|
||||
static bool gs_inTimer = FALSE;
|
||||
|
||||
@@ -651,7 +641,7 @@ void wxUsleep(unsigned long milliseconds)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
::Sleep(milliseconds);
|
||||
#else
|
||||
#else // !Win32
|
||||
if (gs_inTimer)
|
||||
return;
|
||||
|
||||
@@ -665,7 +655,7 @@ void wxUsleep(unsigned long milliseconds)
|
||||
}
|
||||
delete wxTheSleepTimer;
|
||||
wxTheSleepTimer = NULL;
|
||||
#endif
|
||||
#endif // Win32/!Win32
|
||||
}
|
||||
|
||||
void wxSleep(int nSecs)
|
||||
@@ -691,6 +681,8 @@ void wxFlushEvents()
|
||||
// wxYield();
|
||||
}
|
||||
|
||||
#endif // wxUSE_TIMER
|
||||
|
||||
#elif defined(__WIN32__) // wxUSE_GUI
|
||||
|
||||
void wxUsleep(unsigned long milliseconds)
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_WAVE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
@@ -165,4 +167,4 @@ bool wxWave::Free()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_WAVE
|
||||
|
@@ -110,7 +110,10 @@
|
||||
// the last Windows message we got (MT-UNSAFE)
|
||||
extern MSG s_currentMsg;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu *wxCurrentPopupMenu = NULL;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
extern wxList WXDLLEXPORT wxPendingDelete;
|
||||
extern const wxChar *wxCanvasClassName;
|
||||
|
||||
@@ -162,6 +165,7 @@ END_EVENT_TABLE()
|
||||
// Find an item given the MS Windows id
|
||||
wxWindow *wxWindow::FindItem(long id) const
|
||||
{
|
||||
#if wxUSE_CONTROLS
|
||||
wxControl *item = wxDynamicCast(this, wxControl);
|
||||
if ( item )
|
||||
{
|
||||
@@ -172,6 +176,7 @@ wxWindow *wxWindow::FindItem(long id) const
|
||||
return item;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
wxWindowList::Node *current = GetChildren().GetFirst();
|
||||
while (current)
|
||||
@@ -201,7 +206,11 @@ wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const
|
||||
if ( wnd )
|
||||
return wnd;
|
||||
|
||||
if ( !controlOnly || parent->IsKindOf(CLASSINFO(wxControl)) )
|
||||
if ( !controlOnly
|
||||
#if wxUSE_CONTROLS
|
||||
|| parent->IsKindOf(CLASSINFO(wxControl))
|
||||
#endif // wxUSE_CONTROLS
|
||||
)
|
||||
{
|
||||
wxWindow *item = current->GetData();
|
||||
if ( item->GetHWND() == hWnd )
|
||||
@@ -881,7 +890,11 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle,
|
||||
{
|
||||
// If matches certain criteria, then assume no 3D effects
|
||||
// unless specifically requested (dealt with in MakeExtendedStyle)
|
||||
if ( !GetParent() || !IsKindOf(CLASSINFO(wxControl)) || (m_windowStyle & wxNO_BORDER) )
|
||||
if ( !GetParent()
|
||||
#if wxUSE_CONTROLS
|
||||
|| !IsKindOf(CLASSINFO(wxControl))
|
||||
#endif // wxUSE_CONTROLS
|
||||
|| (m_windowStyle & wxNO_BORDER) )
|
||||
{
|
||||
*want3D = FALSE;
|
||||
return MakeExtendedStyle(m_windowStyle, FALSE);
|
||||
@@ -1447,6 +1460,8 @@ void wxWindow::GetCaretPos(int *x, int *y) const
|
||||
// popup menu
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
{
|
||||
menu->SetInvokingWindow(this);
|
||||
@@ -1468,6 +1483,8 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// ===========================================================================
|
||||
// pre/post message processing
|
||||
// ===========================================================================
|
||||
@@ -1558,6 +1575,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
||||
// buttons want process Enter themselevs
|
||||
bProcess = FALSE;
|
||||
}
|
||||
#if wxUSE_BUTTON
|
||||
else
|
||||
{
|
||||
wxPanel *panel = wxDynamicCast(this, wxPanel);
|
||||
@@ -1580,6 +1598,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
||||
// it work like a TAB - and that's what we do.
|
||||
// Note that Ctrl-Enter always works this way.
|
||||
}
|
||||
#endif // wxUSE_BUTTON
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1596,12 +1615,14 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
||||
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
{
|
||||
#if wxUSE_BUTTON
|
||||
wxButton *btn = wxDynamicCast(FindFocus(), wxButton);
|
||||
if ( btn )
|
||||
{
|
||||
// the button which has focus should be default
|
||||
btn->SetDefault();
|
||||
}
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1659,7 +1680,11 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
||||
|
||||
bool wxWindow::MSWTranslateMessage(WXMSG* pMsg)
|
||||
{
|
||||
#if wxUSE_ACCEL
|
||||
return m_acceleratorTable.Translate(this, pMsg);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif // wxUSE_ACCEL
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -2778,6 +2803,8 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
|
||||
bool wxWindow::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
|
||||
{
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// is it a menu item?
|
||||
if ( id == 0 )
|
||||
{
|
||||
@@ -2800,12 +2827,16 @@ bool wxWindow::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
|
||||
(wxOwnerDrawn::wxODStatus)pDrawStruct->itemState
|
||||
);
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
wxWindow *item = FindItem(id);
|
||||
if ( item && item->IsKindOf(CLASSINFO(wxControl)) )
|
||||
{
|
||||
return ((wxControl *)item)->MSWOnDraw(itemStruct);
|
||||
}
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
#endif // USE_OWNER_DRAWN
|
||||
|
||||
return FALSE;
|
||||
@@ -2861,12 +2892,14 @@ bool wxWindow::HandleCtlColor(WXHBRUSH *brush,
|
||||
{
|
||||
hBrush = OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
|
||||
}
|
||||
#if wxUSE_CONTROLS
|
||||
else
|
||||
{
|
||||
wxControl *item = (wxControl *)FindItemByHWND(pWnd, TRUE);
|
||||
if ( item )
|
||||
hBrush = item->OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
|
||||
}
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
if ( hBrush )
|
||||
*brush = hBrush;
|
||||
@@ -3096,6 +3129,7 @@ void wxWindow::SendSizeEvent()
|
||||
|
||||
bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
if ( wxCurrentPopupMenu )
|
||||
{
|
||||
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||
@@ -3103,6 +3137,7 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
|
||||
return popupMenu->MSWCommand(cmd, id);
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
wxWindow *win = (wxWindow*) NULL;
|
||||
if ( cmd == 0 || cmd == 1 ) // menu or accel - use id
|
||||
|
245
src/univ/themes/win32.cpp
Normal file
245
src/univ/themes/win32.cpp
Normal file
@@ -0,0 +1,245 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: univ/themes/win32.cpp
|
||||
// Purpose: wxUniversal theme implementing Win32-like LNF
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ===========================================================================
|
||||
// declarations
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxWin32Renderer : public wxRenderer
|
||||
{
|
||||
public:
|
||||
// implement the base class pure virtuals
|
||||
virtual void DrawLabel(wxDC& dc, wxWindow *window);
|
||||
virtual void DrawBorder(wxDC& dc, wxWindow *window);
|
||||
|
||||
protected:
|
||||
// DrawBorder() helpers: all of them shift and clip the DC after drawing
|
||||
// the border
|
||||
|
||||
// just draw a rectangle with the given pen
|
||||
void DrawRect(wxDC& dc, wxCoord x, wxCoord y, const wxPen& pen);
|
||||
|
||||
// draw the lower left part of rectangle
|
||||
void DrawHalfRect(wxDC& dc, wxCoord x, wxCoord y, const wxPen& pen);
|
||||
|
||||
// draw the rectange using the first brush for the left and top sides and
|
||||
// the second one for the bottom and right ones
|
||||
void DrawShadedRect(wxDC& dc, wxCoord x, wxCoord y,
|
||||
const wxPen& pen1, const wxPen& pen2);
|
||||
|
||||
// draw the normal 3D border
|
||||
void DrawRaisedBorder(wxDC& dc, wxCoord x, wxCoord y);
|
||||
};
|
||||
|
||||
class wxWin32Theme : public wxTheme
|
||||
{
|
||||
public:
|
||||
wxWin32Theme();
|
||||
|
||||
virtual wxRenderer *GetRenderer() { return m_renderer; }
|
||||
virtual wxInputHandler *GetInputHandler() { return m_handler; }
|
||||
virtual wxColourScheme *GetColourScheme() { return m_scheme; }
|
||||
|
||||
private:
|
||||
wxWin32Renderer *m_renderer;
|
||||
wxWin32InputHandler *m_handler;
|
||||
wxWin32ColourScheme *m_scheme;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin32Theme
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxWin32Theme::wxWin32Theme()
|
||||
{
|
||||
m_renderer = new wxWin32Renderer;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin32Renderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// construction
|
||||
wxWin32Renderer::wxWin32Renderer()
|
||||
{
|
||||
m_penBlack = new wxPen("BLACK");
|
||||
m_penDarkGrey = new wxPen("GREY");
|
||||
m_penLightGrey = new wxPen("LIGHT GREY");
|
||||
m_penWhite = new wxPen("WHITE");
|
||||
}
|
||||
|
||||
/*
|
||||
The normal (== raised) border in Win32 looks like this:
|
||||
|
||||
WWWWWWWWWWWWWWWWWWWWWWB
|
||||
W GB
|
||||
W GB W = white (HILIGHT)
|
||||
W GB H = light grey (LIGHT)
|
||||
W GB G = dark grey (SHADOW)
|
||||
W GB B = black (DKSHADOW)
|
||||
W GB
|
||||
W GB
|
||||
WGGGGGGGGGGGGGGGGGGGGGB
|
||||
BBBBBBBBBBBBBBBBBBBBBBB
|
||||
|
||||
The sunken border looks like this:
|
||||
|
||||
GGGGGGGGGGGGGGGGGGGGGGW
|
||||
GBBBBBBBBBBBBBBBBBBBBHW
|
||||
GB HW
|
||||
GB HW
|
||||
GB HW
|
||||
GB HW
|
||||
GB HW
|
||||
GB HW
|
||||
GHHHHHHHHHHHHHHHHHHHHHW
|
||||
WWWWWWWWWWWWWWWWWWWWWWW
|
||||
|
||||
The static border (used for the controls which don't get focus) is like
|
||||
this:
|
||||
|
||||
GGGGGGGGGGGGGGGGGGGGGGW
|
||||
G W
|
||||
G W
|
||||
G W
|
||||
G W
|
||||
G W
|
||||
G W
|
||||
G W
|
||||
WWWWWWWWWWWWWWWWWWWWWWW
|
||||
|
||||
The most complicated is the double border:
|
||||
|
||||
HHHHHHHHHHHHHHHHHHHHHHB
|
||||
HWWWWWWWWWWWWWWWWWWWWGB
|
||||
HWHHHHHHHHHHHHHHHHHHHGB
|
||||
HWH HGB
|
||||
HWH HGB
|
||||
HWH HGB
|
||||
HWH HGB
|
||||
HWHHHHHHHHHHHHHHHHHHHGB
|
||||
HGGGGGGGGGGGGGGGGGGGGGB
|
||||
BBBBBBBBBBBBBBBBBBBBBBB
|
||||
|
||||
And the simple border is, well, simple:
|
||||
|
||||
BBBBBBBBBBBBBBBBBBBBBBB
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
B B
|
||||
BBBBBBBBBBBBBBBBBBBBBBB
|
||||
*/
|
||||
|
||||
void wxWin32Renderer::DrawRect(wxDC& dc, wxCorod x, wxCoord y, const wxPen& pen)
|
||||
{
|
||||
// draw
|
||||
dc.SetPen(pen);
|
||||
dc.DrawRectangle(0, 0, x, y);
|
||||
|
||||
// adjust
|
||||
dc.SetLogicalOrigin(1, 1);
|
||||
dc.SetClippingRegion(0, 0, x - 1, y - 1);
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawHalfRect(wxDC& dc, wxCorod x, wxCoord y,
|
||||
const wxPen& pen)
|
||||
{
|
||||
// draw the bottom and right sides
|
||||
dc.SetPen(pen);
|
||||
dc.DrawLine(1, y, x, y);
|
||||
dc.DrawLine(x, 0, x, y - 1);
|
||||
|
||||
// clip the DC
|
||||
dc.SetClippingRegion(0, 0, x - 1, y - 1);
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawShadedRect(wxDC& dc, wxCorod x, wxCoord y,
|
||||
const wxPen& pen1, const wxPen& pen2)
|
||||
{
|
||||
// draw the rectangle
|
||||
dc.SetPen(pen1);
|
||||
dc.DrawLine(0, 0, 0, y - 1);
|
||||
dc.DrawLine(1, 0, x - 1, 0);
|
||||
dc.SetPen(pen2);
|
||||
dc.DrawLine(x, 0, x, y);
|
||||
dc.DrawLine(0, y, x - 1, y);
|
||||
|
||||
// shift the DC and clip it
|
||||
dc.SetLogicalOrigin(1, 1);
|
||||
dc.SetClippingRegion(0, 0, x - 1, y - 1);
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawRaisedBorder(wxDC& dc, wxCoord x, wxCoord y)
|
||||
{
|
||||
DrawShadedRect(dc, x--, y--, m_penWhite, m_penBlack);
|
||||
DrawHalfRect(dc, x, y, m_penDarkGrey);
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawBorder(wxDC& dc, wxWindow *window)
|
||||
{
|
||||
wxCoord x, y;
|
||||
window->GetClientSize(&x, &y);
|
||||
long style = window->GetWindowStyle();
|
||||
if ( style & wxSUNKEN_BORDER )
|
||||
{
|
||||
DrawShadedRect(dc, x--, y--, m_penDarkGrey, m_penWhite);
|
||||
DrawShadedRect(dc, x, y, m_penBlack, m_penLightGrey);
|
||||
}
|
||||
else if ( style & wxSTATIC_BORDER )
|
||||
{
|
||||
DrawShadedRect(dc, x, y, m_penDarkGrey, m_penWhite);
|
||||
}
|
||||
else if ( style & wxRAISED_BORDER )
|
||||
{
|
||||
DrawRaisedBorder(dc, x, y);
|
||||
}
|
||||
else if ( style & wxDOUBLE_BORDER )
|
||||
{
|
||||
DrawShadedRect(dc, x--, y--, m_penLightGrey, m_penBlack);
|
||||
DrawShadedRect(dc, x--, y--, m_penWhite, m_penDarkGrey);
|
||||
DrawRect(dc, x, y, m_penLightGrey);
|
||||
}
|
||||
else if ( style & wxSIMPLE_BORDER )
|
||||
{
|
||||
DrawRect(dc, x, y, m_penBlack);
|
||||
}
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawLabel(wxDC& dc, wxWindow *window)
|
||||
{
|
||||
}
|
61
src/univ/window.cpp
Normal file
61
src/univ/window.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: univ/window.cpp
|
||||
// Purpose: wxUniversalWindow implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ===========================================================================
|
||||
// declarations
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "univwindow.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// drawing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// the event handler executed when the window must be repainted
|
||||
void wxUniversalWindow::OnPaint(wxPaintEvent& event)
|
||||
{
|
||||
// get the renderer to use
|
||||
wxRenderer *renderer = wxTheTheme->GetRenderer();
|
||||
|
||||
// draw the control
|
||||
wxPaintDC dc(this);
|
||||
DoDraw(dc, renderer);
|
||||
}
|
||||
|
||||
// draw the border
|
||||
void DoDrawBorder(wxRenderer *renderer, wxDC& dc, const wxRect& rect)
|
||||
{
|
||||
if ( !(m_windowStyle & wxNO_BORDER) )
|
||||
{
|
||||
renderer->DrawBorder(dc, this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user