Removal of previous wxValidtor code for wxOS2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,11 +42,7 @@ protected:
|
||||
const wxSize& size,
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name);
|
||||
|
||||
|
@@ -381,11 +381,7 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
||||
const wxString &value = "",
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
int style = 0, const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
int style = 0, const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString &name = "wxListTextCtrlText" );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
@@ -515,11 +511,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
wxListCtrl( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString &name = "listctrl" )
|
||||
{
|
||||
@@ -529,11 +521,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
bool Create( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString &name = "listctrl" );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
|
@@ -182,11 +182,7 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
|
||||
const wxString &value = wxEmptyString,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
int style = 0, const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
int style = 0, const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString &name = wxTextCtrlNameStr );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
@@ -211,11 +207,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator *validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxTreeCtrlNameStr)
|
||||
{
|
||||
@@ -229,11 +221,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator *validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxTreeCtrlNameStr);
|
||||
|
||||
|
@@ -27,11 +27,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
@@ -42,11 +38,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
|
@@ -26,11 +26,7 @@ class WXDLLEXPORT wxButton: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
@@ -41,11 +37,7 @@ class WXDLLEXPORT wxButton: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
|
@@ -28,11 +28,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
@@ -77,11 +69,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
|
@@ -32,11 +32,7 @@ public:
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
@@ -29,11 +29,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
@@ -46,11 +42,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
|
@@ -34,11 +34,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
@@ -52,11 +48,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
|
@@ -12,24 +12,11 @@
|
||||
#ifndef _WX_FRAME_H_
|
||||
#define _WX_FRAME_H_
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/os2/accel.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr;
|
||||
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
class WXDLLEXPORT wxToolBar;
|
||||
|
||||
class WXDLLEXPORT wxFrame : public wxWindow
|
||||
class WXDLLEXPORT wxFrame : public wxFrameBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
public:
|
||||
wxFrame();
|
||||
// construction
|
||||
wxFrame() { Init(); }
|
||||
wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
@@ -38,11 +25,11 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
@@ -51,103 +38,62 @@ public:
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual bool Destroy();
|
||||
virtual ~wxFrame();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
bool Show(bool show);
|
||||
|
||||
void DetachMenuBar();
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
|
||||
// Call this to simulate a menu command
|
||||
bool Command(int id) { return ProcessCommand(id); }
|
||||
|
||||
// process menu command: returns TRUE if processed
|
||||
bool ProcessCommand(int id);
|
||||
|
||||
// make the window modal (all other windows unresponsive)
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
|
||||
// Set icon
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void Restore();
|
||||
virtual void SetMenuBar(wxMenuBar *menubar);
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// override some more virtuals
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
// event handlers
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
||||
|
||||
virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
||||
virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
|
||||
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// Status bar
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
|
||||
wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||
void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
|
||||
|
||||
virtual void PositionStatusBar();
|
||||
virtual wxStatusBar *OnCreateStatusBar(int number,
|
||||
long style,
|
||||
wxWindowID id,
|
||||
const wxString& name);
|
||||
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||
// Hint to tell framework which status bar to use: the default is to use
|
||||
// native one for the platforms which support it (Win32), the generic one
|
||||
// otherwise
|
||||
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||
|
||||
// Hint to tell framework which status bar to use
|
||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||
static void UseNativeStatusBar(bool useNative)
|
||||
{ m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar()
|
||||
{ return m_useNativeStatusBar; };
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Iconize
|
||||
virtual void Iconize(bool iconize);
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
// Is it maximized?
|
||||
virtual bool IsMaximized() const;
|
||||
|
||||
// Compatibility
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
// virtual bool LoadAccelerators(const wxString& table);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Query app for menu item updates (called from OnIdle)
|
||||
void DoMenuUpdates();
|
||||
void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
|
||||
|
||||
WXHMENU GetWinMenu() const { return m_hMenu; }
|
||||
|
||||
// Returns the origin of client area (may be different from (0,0) if the
|
||||
// frame has a toolbar)
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
// Implementation only from here
|
||||
// event handlers
|
||||
bool HandlePaint();
|
||||
bool HandleSize(int x, int y, WXUINT flag);
|
||||
@@ -165,6 +111,12 @@ public:
|
||||
#endif // tooltips
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Iconize(), Maximize() and Restore()
|
||||
void DoShowWindow(int nShowCmd);
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
@@ -175,6 +127,9 @@ protected:
|
||||
virtual void DoClientToScreen(int *x, int *y) const;
|
||||
virtual void DoScreenToClient(int *x, int *y) const;
|
||||
|
||||
// helper
|
||||
void DetachMenuBar();
|
||||
|
||||
// a plug in for MDI frame classes which need to do something special when
|
||||
// the menubar is set
|
||||
virtual void InternalSetMenuBar();
|
||||
@@ -188,27 +143,20 @@ protected:
|
||||
// window proc for the frames
|
||||
MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
wxMenuBar * m_frameMenuBar;
|
||||
wxIcon m_icon;
|
||||
bool m_iconized;
|
||||
WXHICON m_defaultIcon;
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
wxStatusBar * m_frameStatusBar;
|
||||
|
||||
static bool m_useNativeStatusBar;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar* m_frameToolBar;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
private:
|
||||
#if wxUSE_TOOLTIPS
|
||||
WXHWND m_hwndToolTip;
|
||||
#endif // tooltips
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -28,11 +28,7 @@ class WXDLLEXPORT wxGauge: public wxControl
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
@@ -45,11 +41,7 @@ class WXDLLEXPORT wxGauge: public wxControl
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
|
@@ -43,11 +43,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
@@ -60,11 +56,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
@@ -30,11 +30,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
# else
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
@@ -47,11 +43,7 @@ public:
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
# else
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
virtual bool OS2Command(WXUINT param, WXWORD id);
|
||||
|
@@ -27,11 +27,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxRadioButtonNameStr)
|
||||
{
|
||||
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxRadioButtonNameStr);
|
||||
|
||||
@@ -76,11 +68,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxBitmapRadioButtonNameStr)
|
||||
{
|
||||
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxBitmapRadioButtonNameStr);
|
||||
|
||||
|
@@ -30,11 +30,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxScrollBarNameStr)
|
||||
{
|
||||
@@ -45,11 +41,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxScrollBarNameStr);
|
||||
|
||||
|
@@ -30,11 +30,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
@@ -49,11 +45,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
|
@@ -25,11 +25,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxTextCtrlNameStr)
|
||||
{
|
||||
@@ -42,11 +38,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name = wxTextCtrlNameStr);
|
||||
|
||||
|
@@ -82,11 +82,7 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxValidator)
|
||||
};
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
WXDLLEXPORT_DATA(extern const wxValidator*) wxDefaultValidator;
|
||||
#else
|
||||
WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator;
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
|
@@ -121,12 +121,9 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator = wxDefaultValidator,
|
||||
# else
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
# endif
|
||||
#endif // wxUSE_VALIDATORS
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
@@ -392,11 +389,7 @@ public:
|
||||
#if wxUSE_VALIDATORS
|
||||
// a window may have an associated validator which is used to control
|
||||
// user input
|
||||
# if defined(__VISAGECPP__)
|
||||
virtual void SetValidator( const wxValidator *validator );
|
||||
# else
|
||||
virtual void SetValidator( const wxValidator &validator );
|
||||
# endif
|
||||
virtual wxValidator *GetValidator() { return m_windowValidator; }
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
|
@@ -43,11 +43,7 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -32,14 +32,7 @@
|
||||
|
||||
#include "wx/validate.h"
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
// treated as a static global class by VA and thus cannot use in this form.
|
||||
// Defined as a pointer and then explicity allocated and deallocated
|
||||
// by user if desired
|
||||
const wxValidator* wxDefaultValidator = NULL;
|
||||
#else
|
||||
const wxValidator wxDefaultValidator;
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
|
||||
|
@@ -159,11 +159,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
|
||||
const wxSize& WXUNUSED(size),
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
@@ -619,18 +615,6 @@ void wxWindowBase::SetCaret(wxCaret *caret)
|
||||
// validators
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
# if defined(__VISAGECPP__)
|
||||
void wxWindowBase::SetValidator(const wxValidator* validator)
|
||||
{
|
||||
if ( m_windowValidator )
|
||||
delete m_windowValidator;
|
||||
|
||||
m_windowValidator = (wxValidator *)validator->Clone();
|
||||
|
||||
if ( m_windowValidator )
|
||||
m_windowValidator->SetWindow(this) ;
|
||||
}
|
||||
# else
|
||||
void wxWindowBase::SetValidator(const wxValidator& validator)
|
||||
{
|
||||
if ( m_windowValidator )
|
||||
@@ -641,7 +625,6 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
|
||||
if ( m_windowValidator )
|
||||
m_windowValidator->SetWindow(this) ;
|
||||
}
|
||||
# endif // __VISAGECPP__
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -981,11 +981,7 @@ wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||
bool *accept, wxString *res, wxListMainWindow *owner,
|
||||
const wxString &value, const wxPoint &pos, const wxSize &size,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
int style, const wxValidator* validator, const wxString &name ) :
|
||||
# else
|
||||
int style, const wxValidator& validator, const wxString &name ) :
|
||||
# endif
|
||||
#endif
|
||||
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
||||
{
|
||||
@@ -2576,11 +2572,7 @@ wxListCtrl::~wxListCtrl()
|
||||
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos, const wxSize &size,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
long style, const wxValidator *validator,
|
||||
# else
|
||||
long style, const wxValidator &validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString &name )
|
||||
{
|
||||
|
@@ -197,11 +197,7 @@ wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||
bool *accept, wxString *res, wxTreeCtrl *owner,
|
||||
const wxString &value, const wxPoint &pos, const wxSize &size,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
int style, const wxValidator* validator, const wxString &name ) :
|
||||
# else
|
||||
int style, const wxValidator& validator, const wxString &name ) :
|
||||
# endif
|
||||
#endif
|
||||
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
||||
{
|
||||
@@ -536,11 +532,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator *validator,
|
||||
# else
|
||||
const wxValidator &validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name )
|
||||
{
|
||||
|
@@ -292,6 +292,12 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
|
||||
// showtime
|
||||
if (m_NavigPan && m_Splitter) {
|
||||
m_Splitter -> SetMinimumPaneSize(20);
|
||||
if (m_Cfg.navig_on)
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
else {
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
m_Splitter -> Unsplit();
|
||||
}
|
||||
if (m_Cfg.navig_on) {
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
|
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
|
||||
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
||||
|
||||
# Change WXDIR or WXWIN to wherever wxWindows is found
|
||||
WXDIR = j:\dev\wx2\wxWindows
|
||||
WXDIR = h:\dev\wx2\wxWindows
|
||||
|
||||
OS2JPEGDIR=$(WXDIR)\src\jpeg
|
||||
OS2JPEGINC=$(WINJPEGDIR)
|
||||
|
@@ -350,22 +350,22 @@ test: $(MSWDIR)\$D\wave.obj
|
||||
test2: ..\common\Debug\config.obj
|
||||
|
||||
$D:
|
||||
mkdir $D
|
||||
md $D
|
||||
|
||||
$(COMMDIR)\$D:
|
||||
mkdir $(COMMDIR)\$D
|
||||
md $(COMMDIR)\$D
|
||||
|
||||
$(MSWDIR)\$D:
|
||||
mkdir $(MSWDIR)\$D
|
||||
md $(MSWDIR)\$D
|
||||
|
||||
$(GENDIR)\$D:
|
||||
mkdir $(GENDIR)\$D
|
||||
md $(GENDIR)\$D
|
||||
|
||||
$(OLEDIR)\$D:
|
||||
mkdir $(OLEDIR)\$D
|
||||
md $(OLEDIR)\$D
|
||||
|
||||
$(HTMLDIR)\$D:
|
||||
mkdir $(HTMLDIR)\$D
|
||||
md $(HTMLDIR)\$D
|
||||
|
||||
# wxWindows library as DLL
|
||||
dll:
|
||||
@@ -727,7 +727,7 @@ $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
|
||||
|
||||
$(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex
|
||||
cd $(DOCDIR)\latex\wx
|
||||
-mkdir $(DOCDIR)\html\wx
|
||||
-md $(DOCDIR)\html\wx
|
||||
-start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
|
||||
-erase $(DOCDIR)\html\wx\*.con
|
||||
-erase $(DOCDIR)\html\wx\*.ref
|
||||
@@ -743,7 +743,7 @@ $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
|
||||
|
||||
$(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
|
||||
cd $(DOCDIR)\latex\porting
|
||||
-mkdir $(DOCDIR)\html\porting
|
||||
-md $(DOCDIR)\html\porting
|
||||
-start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
|
||||
-erase $(DOCDIR)\html\porting\*.con
|
||||
-erase $(DOCDIR)\html\porting\*.ref
|
||||
@@ -753,7 +753,7 @@ $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
|
||||
|
||||
$(DOCDIR)\html\proplist\prop.htm: $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\latex\proplist\body.tex $(DOCDIR)\latex\proplist\classes.tex $(DOCDIR)\latex\proplist\changes.tex
|
||||
cd $(DOCDIR)\latex\proplist
|
||||
-mkdir $(DOCDIR)\html\proplist
|
||||
-md $(DOCDIR)\html\proplist
|
||||
-start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
|
||||
-erase $(DOCDIR)\html\proplist\*.con
|
||||
-erase $(DOCDIR)\html\proplist\*.ref
|
||||
|
@@ -29,11 +29,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -33,11 +33,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -50,11 +50,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
@@ -185,11 +181,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -260,11 +260,7 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
int nStrings, const wxString choices[],
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
long style, const wxValidator* val,
|
||||
# else
|
||||
long style, const wxValidator& val,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
: wxListBox()
|
||||
|
@@ -31,11 +31,7 @@ bool wxChoice::Create(wxWindow *parent,
|
||||
int n, const wxString choices[],
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -1,78 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colordlg.cpp
|
||||
// Purpose: wxColourDialog class. NOTE: you can use the generic class
|
||||
// if you wish, instead of implementing this.
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
// Created: 10/13/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) David Webster
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/defs.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/pen.h"
|
||||
#include "wx/brush.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#endif
|
||||
|
||||
#define INCL_PM
|
||||
#include <os2.h>
|
||||
|
||||
#include "wx/os2/private.h"
|
||||
#include "wx/colordlg.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define wxDIALOG_DEFAULT_X 300
|
||||
#define wxDIALOG_DEFAULT_Y 300
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wxColourDialog
|
||||
*/
|
||||
|
||||
wxColourDialog::wxColourDialog()
|
||||
{
|
||||
m_dialogParent = NULL;
|
||||
}
|
||||
|
||||
wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data)
|
||||
{
|
||||
Create(parent, data);
|
||||
}
|
||||
|
||||
bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
|
||||
{
|
||||
m_dialogParent = parent;
|
||||
|
||||
if (data)
|
||||
m_colourData = *data;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int wxColourDialog::ShowModal()
|
||||
{
|
||||
/* TODO: implement dialog
|
||||
*/
|
||||
|
||||
return wxID_CANCEL;
|
||||
}
|
||||
|
@@ -64,11 +64,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
int n, const wxString choices[],
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -12,10 +12,6 @@
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/setup.h"
|
||||
#include "wx/frame.h"
|
||||
@@ -28,38 +24,65 @@
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/os2/private.h"
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
#include "wx/statusbr.h"
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
#include "wx/toolbar.h"
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#include "wx/menuitem.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern wxWindowList wxModelessWindows;
|
||||
extern wxList WXDLLEXPORT wxPendingDelete;
|
||||
extern wxChar wxFrameClassName[];
|
||||
extern wxMenu *wxCurrentPopupMenu;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event tables
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
|
||||
EVT_SIZE(wxFrame::OnSize)
|
||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
||||
EVT_ACTIVATE(wxFrame::OnActivate)
|
||||
EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
|
||||
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
||||
EVT_IDLE(wxFrame::OnIdle)
|
||||
EVT_CLOSE(wxFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// static class members
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NATIVE_STATUSBAR
|
||||
bool wxFrame::m_useNativeStatusBar = TRUE;
|
||||
#else
|
||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
||||
#endif
|
||||
|
||||
wxFrame::wxFrame()
|
||||
// ----------------------------------------------------------------------------
|
||||
// creation/destruction
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFrame::Init()
|
||||
{
|
||||
m_frameToolBar = NULL ;
|
||||
m_frameMenuBar = NULL;
|
||||
m_frameStatusBar = NULL;
|
||||
|
||||
m_iconized = FALSE;
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
m_hwndToolTip = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxFrame::Create(wxWindow *parent,
|
||||
@@ -70,10 +93,6 @@ bool wxFrame::Create(wxWindow *parent,
|
||||
long style,
|
||||
const wxString& name)
|
||||
{
|
||||
#if wxUSE_TOOLTIPS
|
||||
m_hwndToolTip = 0;
|
||||
#endif
|
||||
|
||||
SetName(name);
|
||||
m_windowStyle = style;
|
||||
m_frameMenuBar = NULL;
|
||||
@@ -82,7 +101,6 @@ bool wxFrame::Create(wxWindow *parent,
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
|
||||
// m_icon = NULL;
|
||||
if ( id > -1 )
|
||||
m_windowId = id;
|
||||
else
|
||||
@@ -119,13 +137,9 @@ wxFrame::~wxFrame()
|
||||
m_isBeingDeleted = TRUE;
|
||||
wxTopLevelWindows.DeleteObject(this);
|
||||
|
||||
if (m_frameStatusBar)
|
||||
delete m_frameStatusBar;
|
||||
if (m_frameMenuBar)
|
||||
delete m_frameMenuBar;
|
||||
|
||||
/* New behaviour March 1998: check if it's the last top-level window */
|
||||
// if (wxTheApp && (this == wxTheApp->GetTopWindow()))
|
||||
// TODO:
|
||||
/*
|
||||
DeleteAllBars();
|
||||
|
||||
if (wxTheApp && (wxTopLevelWindows.Number() == 0))
|
||||
{
|
||||
@@ -133,7 +147,7 @@ wxFrame::~wxFrame()
|
||||
|
||||
if (wxTheApp->GetExitOnFrameDelete())
|
||||
{
|
||||
// PostQuitMessage(0);
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,9 +158,6 @@ wxFrame::~wxFrame()
|
||||
// Try to bring the parent to the top.
|
||||
// MT:Only do this if this frame is currently the active window, else weird
|
||||
// things start to happen
|
||||
|
||||
// TODO:
|
||||
/*
|
||||
if ( wxGetActiveWindow() == this )
|
||||
if (GetParent() && GetParent()->GetHWND())
|
||||
::BringWindowToTop((HWND) GetParent()->GetHWND());
|
||||
@@ -161,12 +172,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
|
||||
RECT rect;
|
||||
::GetClientRect(GetHwnd(), &rect);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( GetStatusBar() )
|
||||
{
|
||||
int statusX, statusY;
|
||||
GetStatusBar()->GetClientSize(&statusX, &statusY);
|
||||
rect.bottom -= statusY;
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
wxPoint pt(GetClientAreaOrigin());
|
||||
rect.bottom -= pt.y;
|
||||
@@ -199,12 +212,14 @@ void wxFrame::DoSetClientSize(int width, int height)
|
||||
int actual_width = rect2.right - rect2.left - rect.right + width;
|
||||
int actual_height = rect2.bottom - rect2.top - rect.bottom + height;
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( GetStatusBar() )
|
||||
{
|
||||
int statusX, statusY;
|
||||
GetStatusBar()->GetClientSize(&statusX, &statusY);
|
||||
actual_height += statusY;
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
wxPoint pt(GetClientAreaOrigin());
|
||||
actual_width += pt.y;
|
||||
@@ -248,73 +263,61 @@ void wxFrame::DoGetPosition(int *x, int *y) const
|
||||
*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// variations around ::ShowWindow()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFrame::DoShowWindow(int nShowCmd)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
::ShowWindow(GetHwnd(), nShowCmd);
|
||||
|
||||
m_iconized = nShowCmd == SW_MINIMIZE;
|
||||
*/
|
||||
}
|
||||
|
||||
bool wxFrame::Show(bool show)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
int cshow;
|
||||
if (show)
|
||||
cshow = SW_SHOW;
|
||||
else
|
||||
cshow = SW_HIDE;
|
||||
DoShowWindow(show ? SW_SHOW : SW_HIDE);
|
||||
|
||||
if (!show)
|
||||
{
|
||||
// Try to highlight the correct window (the parent)
|
||||
HWND hWndParent = 0;
|
||||
if (GetParent())
|
||||
{
|
||||
hWndParent = (HWND) GetParent()->GetHWND();
|
||||
if (hWndParent)
|
||||
::BringWindowToTop(hWndParent);
|
||||
}
|
||||
}
|
||||
|
||||
ShowWindow(GetHwnd(), (BOOL)cshow);
|
||||
if ( show )
|
||||
{
|
||||
BringWindowToTop(GetHwnd());
|
||||
::BringWindowToTop(GetHwnd());
|
||||
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId);
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
return TRUE;
|
||||
else
|
||||
{
|
||||
// Try to highlight the correct window (the parent)
|
||||
if ( GetParent() )
|
||||
{
|
||||
HWND hWndParent = GetHwndOf(GetParent());
|
||||
if (hWndParent)
|
||||
::BringWindowToTop(hWndParent);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxFrame::Iconize(bool iconize)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
if (!iconize)
|
||||
Show(TRUE);
|
||||
|
||||
int cshow;
|
||||
if (iconize)
|
||||
cshow = SW_MINIMIZE;
|
||||
else
|
||||
cshow = SW_RESTORE;
|
||||
ShowWindow(GetHwnd(), (BOOL)cshow);
|
||||
m_iconized = iconize;
|
||||
*/
|
||||
// DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
|
||||
}
|
||||
|
||||
// Equivalent to maximize/restore in Windows
|
||||
void wxFrame::Maximize(bool maximize)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
Show(TRUE);
|
||||
int cshow;
|
||||
if (maximize)
|
||||
cshow = SW_MAXIMIZE;
|
||||
else
|
||||
cshow = SW_RESTORE;
|
||||
ShowWindow(GetHwnd(), cshow);
|
||||
m_iconized = FALSE;
|
||||
*/
|
||||
// DoShowWindow(maximize ? SW_MAXIMIZE : SW_RESTORE);
|
||||
}
|
||||
|
||||
void wxFrame::Restore()
|
||||
{
|
||||
// DoShowWindow(SW_RESTORE);
|
||||
}
|
||||
|
||||
bool wxFrame::IsIconized() const
|
||||
@@ -330,81 +333,44 @@ bool wxFrame::IsIconized() const
|
||||
// Is it maximized?
|
||||
bool wxFrame::IsMaximized() const
|
||||
{
|
||||
// return (::IsZoomed(GetHwnd()) != 0) ;
|
||||
// TODO:
|
||||
/*
|
||||
return (::IsZoomed(GetHwnd()) != 0);
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxFrame::SetIcon(const wxIcon& icon)
|
||||
{
|
||||
wxFrameBase::SetIcon(icon);
|
||||
|
||||
// TODO:
|
||||
/*
|
||||
m_icon = icon;
|
||||
if ( m_icon.Ok() )
|
||||
{
|
||||
SendMessage(GetHwnd(), WM_SETICON,
|
||||
(WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number,
|
||||
long style,
|
||||
wxWindowID id,
|
||||
const wxString& name)
|
||||
{
|
||||
wxStatusBar *statusBar = NULL;
|
||||
{
|
||||
statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20),
|
||||
style, name);
|
||||
|
||||
// Set the height according to the font and the border size
|
||||
wxClientDC dc(statusBar);
|
||||
dc.SetFont(statusBar->GetFont());
|
||||
statusBar = wxFrameBase::OnCreateStatusBar(number, style, id, name);
|
||||
|
||||
long x, y;
|
||||
dc.GetTextExtent("X", &x, &y);
|
||||
|
||||
int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY());
|
||||
|
||||
statusBar->SetSize(-1, -1, 100, height);
|
||||
}
|
||||
|
||||
statusBar->SetFieldsCount(number);
|
||||
return statusBar;
|
||||
}
|
||||
|
||||
wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name)
|
||||
{
|
||||
// VZ: calling CreateStatusBar twice is an error - why anyone would do it?
|
||||
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE,
|
||||
wxT("recreating status bar in wxFrame") );
|
||||
|
||||
m_frameStatusBar = OnCreateStatusBar(number, style, id,
|
||||
name);
|
||||
if ( m_frameStatusBar )
|
||||
{
|
||||
PositionStatusBar();
|
||||
return m_frameStatusBar;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void wxFrame::SetStatusText(const wxString& text, int number)
|
||||
{
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") );
|
||||
|
||||
m_frameStatusBar->SetStatusText(text, number);
|
||||
}
|
||||
|
||||
void wxFrame::SetStatusWidths(int n, const int widths_field[])
|
||||
{
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") );
|
||||
|
||||
m_frameStatusBar->SetStatusWidths(n, widths_field);
|
||||
PositionStatusBar();
|
||||
}
|
||||
|
||||
void wxFrame::PositionStatusBar()
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
// native status bar positions itself
|
||||
if ( m_frameStatusBar )
|
||||
{
|
||||
@@ -417,6 +383,7 @@ void wxFrame::PositionStatusBar()
|
||||
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
|
||||
m_frameStatusBar->SetSize(0, h, w, sh);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
@@ -467,6 +434,8 @@ void wxFrame::InternalSetMenuBar()
|
||||
// Responds to colour changes, and passes event on to children.
|
||||
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
Refresh();
|
||||
|
||||
@@ -479,6 +448,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
|
||||
// Propagate the event to the non-top-level children
|
||||
wxWindow::OnSysColourChanged(event);
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -555,57 +525,8 @@ bool wxFrame::OS2Create(int id, wxWindow *parent, const wxChar *wclass, wxWindow
|
||||
// style instead of WS_OVERLAPPED
|
||||
if (width > -1 && height > -1)
|
||||
::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
|
||||
|
||||
return TRUE;
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Default resizing behaviour - if only ONE subwindow, resize to client
|
||||
// rectangle size
|
||||
void wxFrame::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// if we're using constraints - do use them
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if ( GetAutoLayout() )
|
||||
{
|
||||
Layout();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// do we have _exactly_ one child?
|
||||
wxWindow *child = NULL;
|
||||
for ( wxWindowList::Node *node = GetChildren().GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
{
|
||||
wxWindow *win = node->GetData();
|
||||
if ( !win->IsTopLevel()
|
||||
#if wxUSE_STATUSBAR
|
||||
&& (win != GetStatusBar())
|
||||
#endif // wxUSE_STATUSBAR
|
||||
#if wxUSE_TOOLBAR
|
||||
&& (win != GetToolBar())
|
||||
#endif // wxUSE_TOOLBAR
|
||||
)
|
||||
{
|
||||
if ( child )
|
||||
return; // it's our second subwindow - nothing to do
|
||||
child = win;
|
||||
}
|
||||
}
|
||||
|
||||
if ( child ) {
|
||||
// we have exactly one child - set it's size to fill the whole frame
|
||||
int clientW, clientH;
|
||||
GetClientSize(&clientW, &clientH);
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
child->SetSize(x, y, clientW, clientH);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Default activation behaviour - set the focus for the first child
|
||||
@@ -637,67 +558,11 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
// The default implementation for the close window event.
|
||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
bool wxFrame::Destroy()
|
||||
{
|
||||
if (!wxPendingDelete.Member(this))
|
||||
wxPendingDelete.Append(this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Default menu selection behaviour - display a help string
|
||||
void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
{
|
||||
if (GetStatusBar())
|
||||
{
|
||||
wxString help;
|
||||
int menuId = event.GetMenuId();
|
||||
if ( menuId != -1 )
|
||||
{
|
||||
wxMenuBar *menuBar = GetMenuBar();
|
||||
if (menuBar && menuBar->FindItem(menuId))
|
||||
{
|
||||
help = menuBar->GetHelpString(menuId);
|
||||
}
|
||||
}
|
||||
|
||||
// set status text even if the string is empty - this will at
|
||||
// least remove the string from the item which was previously
|
||||
// selected
|
||||
SetStatusText(help);
|
||||
}
|
||||
}
|
||||
|
||||
wxMenuBar *wxFrame::GetMenuBar() const
|
||||
{
|
||||
return m_frameMenuBar;
|
||||
}
|
||||
|
||||
bool wxFrame::ProcessCommand(int id)
|
||||
{
|
||||
wxMenuBar *bar = GetMenuBar() ;
|
||||
if ( !bar )
|
||||
return FALSE;
|
||||
|
||||
wxMenuItem *item = bar->FindItem(id);
|
||||
|
||||
if ( item && item->IsCheckable() )
|
||||
{
|
||||
bar->Check(id, !bar->IsChecked(id)) ;
|
||||
}
|
||||
|
||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
commandEvent.SetInt( id );
|
||||
commandEvent.SetEventObject( this );
|
||||
|
||||
return GetEventHandler()->ProcessEvent(commandEvent);
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFrame size management: we exclude the areas taken by menu/status/toolbars
|
||||
// from the client area, so the client area is what's really available for the
|
||||
// frame contents
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
||||
@@ -744,28 +609,20 @@ void wxFrame::DoClientToScreen(int *x, int *y) const
|
||||
wxWindow::DoClientToScreen(x, y);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// tool/status bar stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
||||
{
|
||||
wxCHECK_MSG( m_frameToolBar == NULL, FALSE,
|
||||
wxT("recreating toolbar in wxFrame") );
|
||||
|
||||
wxToolBar* toolBar = OnCreateToolBar(style, id, name);
|
||||
if (toolBar)
|
||||
if ( wxFrameBase::CreateToolBar(style, id, name) )
|
||||
{
|
||||
SetToolBar(toolBar);
|
||||
PositionToolBar();
|
||||
return toolBar;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name)
|
||||
{
|
||||
return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name);
|
||||
return m_frameToolBar;
|
||||
}
|
||||
|
||||
void wxFrame::PositionToolBar()
|
||||
@@ -775,12 +632,14 @@ void wxFrame::PositionToolBar()
|
||||
RECT rect;
|
||||
::GetClientRect(GetHwnd(), &rect);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( GetStatusBar() )
|
||||
{
|
||||
int statusX, statusY;
|
||||
GetStatusBar()->GetClientSize(&statusX, &statusY);
|
||||
rect.bottom -= statusY;
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
if ( GetToolBar() )
|
||||
{
|
||||
@@ -789,19 +648,24 @@ void wxFrame::PositionToolBar()
|
||||
|
||||
if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL )
|
||||
{
|
||||
// Use the 'real' MSW position
|
||||
GetToolBar()->SetSize(0, 0, tw, rect.bottom, wxSIZE_NO_ADJUSTMENTS);
|
||||
th = rect.bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use the 'real' MSW position
|
||||
GetToolBar()->SetSize(0, 0, rect.right, th, wxSIZE_NO_ADJUSTMENTS);
|
||||
tw = rect.right;
|
||||
}
|
||||
|
||||
// Use the 'real' MSW position here
|
||||
GetToolBar()->SetSize(0, 0, tw, th, wxSIZE_NO_ADJUSTMENTS);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// frame state (iconized/maximized/...)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// propagate our state change to all child frames: this allows us to emulate X
|
||||
// Windows behaviour where child frames float independently of the parent one
|
||||
// on the desktop, but are iconized/restored with it
|
||||
@@ -820,20 +684,6 @@ void wxFrame::IconizeChildFrames(bool bIconize)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// make the window modal (all other windows unresponsive)
|
||||
void wxFrame::MakeModal(bool modal)
|
||||
{
|
||||
if (modal) {
|
||||
wxEnableTopLevelWindows(FALSE);
|
||||
Enable(TRUE); // keep this window enabled
|
||||
}
|
||||
else {
|
||||
wxEnableTopLevelWindows(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// message processing
|
||||
// ===========================================================================
|
||||
@@ -844,9 +694,11 @@ void wxFrame::MakeModal(bool modal)
|
||||
|
||||
bool wxFrame::OS2TranslateMessage(WXMSG* pMsg)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
if ( wxWindow::OS2TranslateMessage(pMsg) )
|
||||
return TRUE;
|
||||
|
||||
*/
|
||||
// try the menu bar accels
|
||||
wxMenuBar *menuBar = GetMenuBar();
|
||||
if ( !menuBar )
|
||||
@@ -944,10 +796,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
|
||||
m_iconized = TRUE;
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
if ( !m_iconized )
|
||||
{
|
||||
// forward WM_SIZE to status bar control
|
||||
#if wxUSE_NATIVE_STATUSBAR
|
||||
if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
|
||||
{
|
||||
wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId());
|
||||
event.SetEventObject( m_frameStatusBar );
|
||||
|
||||
((wxStatusBar95 *)m_frameStatusBar)->OnSize(event);
|
||||
}
|
||||
#endif // wxUSE_NATIVE_STATUSBAR
|
||||
|
||||
PositionStatusBar();
|
||||
PositionToolBar();
|
||||
|
||||
@@ -955,18 +817,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
|
||||
event.SetEventObject( this );
|
||||
processed = GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
*/
|
||||
return processed;
|
||||
}
|
||||
|
||||
bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
{
|
||||
// TODO:
|
||||
/*
|
||||
if ( control )
|
||||
{
|
||||
// In case it's e.g. a toolbar.
|
||||
wxWindow *win = wxFindWinFromHandle(control);
|
||||
if ( win )
|
||||
return win->OS2Command(cmd, id);
|
||||
return win->MSWCommand(cmd, id);
|
||||
}
|
||||
|
||||
// handle here commands from menus and accelerators
|
||||
@@ -977,7 +841,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||
wxCurrentPopupMenu = NULL;
|
||||
|
||||
return popupMenu->OS2Command(cmd, id);
|
||||
return popupMenu->MSWCommand(cmd, id);
|
||||
}
|
||||
|
||||
if ( ProcessCommand(id) )
|
||||
@@ -985,7 +849,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1003,14 +867,13 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
|
||||
{
|
||||
item = nItem;
|
||||
}
|
||||
*/
|
||||
else
|
||||
{
|
||||
// don't give hints for separators (doesn't make sense) nor for the
|
||||
// items opening popup menus (they don't have them anyhow)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*/
|
||||
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
|
||||
event.SetEventObject( this );
|
||||
|
||||
@@ -1023,7 +886,7 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
|
||||
|
||||
MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
MRESULT rc = 0;
|
||||
long rc = 0;
|
||||
bool processed = FALSE;
|
||||
|
||||
// TODO:
|
||||
@@ -1074,10 +937,12 @@ MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPA
|
||||
processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
if ( !processed )
|
||||
rc = wxWindow::OS2WindowProc(hwnd, message, wParam, lParam);
|
||||
rc = wxWindow::MSWWindowProc(message, wParam, lParam);
|
||||
|
||||
return rc;
|
||||
*/
|
||||
return (MRESULT)0;
|
||||
}
|
||||
|
||||
|
@@ -58,11 +58,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -81,11 +81,7 @@ bool wxListBox::Create(wxWindow *parent,
|
||||
int n, const wxString choices[],
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -518,6 +518,7 @@ OS2LIBOBJS2 = \
|
||||
window.obj
|
||||
|
||||
HTMLOBJS = \
|
||||
..\html\$D\helpctrl.obj \
|
||||
..\html\$D\helpdata.obj \
|
||||
..\html\$D\helpfrm.obj \
|
||||
..\html\$D\htmlcell.obj \
|
||||
@@ -537,6 +538,7 @@ HTMLOBJS = \
|
||||
..\html\$D\winpars.obj
|
||||
|
||||
HTMLLIBOBJS = \
|
||||
helpctrl.obj \
|
||||
helpdata.obj \
|
||||
helpfrm.obj \
|
||||
htmlcell.obj \
|
||||
@@ -701,6 +703,7 @@ $(GENLIBOBJS):
|
||||
copy ..\generic\$D\treectrl.obj
|
||||
|
||||
$(HTMLLIBOBJS):
|
||||
copy ..\html\$D\helpctrl.obj
|
||||
copy ..\html\$D\helpdata.obj
|
||||
copy ..\html\$D\helpfrm.obj
|
||||
copy ..\html\$D\htmlcell.obj
|
||||
|
@@ -144,12 +144,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
int n, const wxString choices[],
|
||||
int majorDim, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* val, const wxString& name)
|
||||
# else
|
||||
const wxValidator& val, const wxString& name)
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
m_selectedButton = -1;
|
||||
m_noItems = n;
|
||||
|
@@ -47,11 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
@@ -159,11 +155,7 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -36,11 +36,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -47,11 +47,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -88,11 +88,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
#if wxUSE_VALIDATORS
|
||||
# if defined(__VISAGECPP__)
|
||||
const wxValidator* validator,
|
||||
# else
|
||||
const wxValidator& validator,
|
||||
# endif
|
||||
#endif
|
||||
const wxString& name)
|
||||
{
|
||||
|
@@ -29,6 +29,10 @@
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_DOS
|
||||
#include <os2.h>
|
||||
#define PURE_32
|
||||
#include <upm.h>
|
||||
#include <netcons.h>
|
||||
#include <netbios.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <direct.h>
|
||||
|
@@ -382,7 +382,7 @@ void wxWindow::SetTitle(
|
||||
const wxString& rTitle
|
||||
)
|
||||
{
|
||||
::WinSetWindowText(GetHwnd(), title.c_str());
|
||||
::WinSetWindowText(GetHwnd(), rTitle.c_str());
|
||||
}
|
||||
|
||||
wxString wxWindow::GetTitle() const
|
||||
@@ -392,24 +392,77 @@ wxString wxWindow::GetTitle() const
|
||||
|
||||
void wxWindow::CaptureMouse()
|
||||
{
|
||||
// TODO:
|
||||
HWND hWnd = GetHwnd();
|
||||
|
||||
if (hWnd && !m_bWinCaptured)
|
||||
{
|
||||
::WinSetCapture(HWND_DESKTOP, hWnd);
|
||||
m_bWinCaptured = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindow::ReleaseMouse()
|
||||
{
|
||||
// TODO:
|
||||
if ( m_bWinCaptured )
|
||||
{
|
||||
::WinSetCapture(HWND_DESKTOP, NULLHANDLE);
|
||||
m_bWinCaptured = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool wxWindow::SetFont(const wxFont& f)
|
||||
bool wxWindow::SetFont(
|
||||
const wxFont& rFont
|
||||
)
|
||||
{
|
||||
// TODO:
|
||||
if (!wxWindowBase::SetFont(rFont))
|
||||
{
|
||||
// nothing to do
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
HWND hWnd = GetHwnd();
|
||||
|
||||
if (hWnd != 0)
|
||||
{
|
||||
wxChar zFont[128];
|
||||
|
||||
sprintf(zFont, "%d.%s", rFont.GetPointSize(), rFont.GetFaceName().c_str());
|
||||
return(::WinSetPresParam(hWnd, PP_FONTNAMESIZE, strlen(zFont), (PVOID)zFont));
|
||||
}
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
bool wxWindow::SetCursor(const wxCursor& cursor) // check if base implementation is OK
|
||||
bool wxWindow::SetCursor(
|
||||
const wxCursor& rCursor
|
||||
) // check if base implementation is OK
|
||||
{
|
||||
// TODO:
|
||||
return(TRUE);
|
||||
if ( !wxWindowBase::SetCursor(rCursor))
|
||||
{
|
||||
// no change
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxASSERT_MSG( m_cursor.Ok(),
|
||||
wxT("cursor must be valid after call to the base version"));
|
||||
|
||||
HWND hWnd = GetHwnd();
|
||||
POINTL vPoint;
|
||||
RECTL vRect;
|
||||
HPS hPS;
|
||||
HRGN hRGN;
|
||||
|
||||
hPS = ::WinGetPS(hWnd);
|
||||
|
||||
::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
|
||||
::WinQueryWindowRect(hWnd, &vRect);
|
||||
|
||||
hRGN = ::GpiCreateRegion(hPS, 1L, &vRect);
|
||||
|
||||
if ((::GpiPtInRegion(hPS, hRGN, &vPoint) == PRGN_INSIDE) && !wxIsBusy())
|
||||
{
|
||||
// ::SetCursor((HCURSOR)m_cursor.GetHCURSOR());
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxWindow::WarpPointer(int x_pos, int y_pos)
|
||||
|
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
|
||||
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
||||
|
||||
# Change WXDIR or WXWIN to wherever wxWindows is found
|
||||
WXDIR = j:\dev\wx2\wxWindows
|
||||
WXDIR = h:\dev\wx2\wxWindows
|
||||
|
||||
OS2PNGDIR=$(WXDIR)\src\png
|
||||
OS2PNGINC=$(WINPNGDIR)
|
||||
|
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
|
||||
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
||||
|
||||
# Change WXDIR or WXWIN to wherever wxWindows is found
|
||||
WXDIR = j:\dev\wx2\wxWindows
|
||||
WXDIR = h:\dev\wx2\wxWindows
|
||||
|
||||
OS2XPMDIR=$(WXDIR)\src\xpm
|
||||
OS2XPMINC=$(WINXPMDIR)
|
||||
|
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
|
||||
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
||||
|
||||
# Change WXDIR or WXWIN to wherever wxWindows is found
|
||||
WXDIR = j:\dev\wx2\wxWindows
|
||||
WXDIR = h:\dev\wx2\wxWindows
|
||||
|
||||
OS2ZLIBDIR=$(WXDIR)\src\zlib
|
||||
OS2ZLIBINC=$(WINPNGDIR)
|
||||
|
Reference in New Issue
Block a user