-#include "wx/accel.h"
-
-#define wxKEY_SHIFT 1
-#define wxKEY_CTRL 2
-
-/*
- * Base class for frame, panel, canvas, panel items, dialog box.
- *
- */
-
-/*
- * Event handler: windows have themselves as their event handlers
- * by default, but their event handlers could be set to another
- * object entirely. This separation can reduce the amount of
- * derivation required, and allow alteration of a window's functionality
- * (e.g. by a resource editor that temporarily switches event handlers).
- */
-
-class WXDLLEXPORT wxWindow;
-class WXDLLEXPORT wxEvent;
-class WXDLLEXPORT wxCommandEvent;
-class WXDLLEXPORT wxKeyEvent;
-class WXDLLEXPORT wxControl;
-class WXDLLEXPORT wxCursor;
-class WXDLLEXPORT wxColourMap;
-class WXDLLEXPORT wxFont;
-class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxRectangle;
-class WXDLLEXPORT wxBitmap;
-class WXDLLEXPORT wxSizer;
-class WXDLLEXPORT wxList;
-class WXDLLEXPORT wxLayoutConstraints;
-class WXDLLEXPORT wxMouseEvent;
-class WXDLLEXPORT wxButton;
-class WXDLLEXPORT wxColour;
-class WXDLLEXPORT wxBrush;
-class WXDLLEXPORT wxPen;
-class WXDLLEXPORT wxIcon;
-class WXDLLEXPORT wxDC;
-class WXDLLEXPORT wxValidator;
-
-#if USE_DRAG_AND_DROP
-class WXDLLEXPORT wxDropTarget;
-#endif
-
-#if USE_WX_RESOURCES
-class WXDLLEXPORT wxResourceTable;
-class WXDLLEXPORT wxItemResource;
-#endif
-
-WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
-
-WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
-WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
-
-class WXDLLEXPORT wxWindow: public wxEvtHandler
-{
- DECLARE_ABSTRACT_CLASS(wxWindow)
-
- friend class wxDC;
- friend class wxPaintDC;
-
-public:
- wxWindow();
- inline wxWindow(wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr)
- {
- m_children = new wxList;
- Create(parent, id, pos, size, style, name);
- }
-
- virtual ~wxWindow();
-
- bool Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
-
- // Fit the window around the items
- virtual void Fit();
-
- // Show or hide the window
- virtual bool Show(bool show);
-
- // Is the window shown?
- virtual bool IsShown() const;
-
- // Raise the window to the top of the Z order
- virtual void Raise();
-
- // Lower the window to the bottom of the Z order
- virtual void Lower();
-
- // Is the window enabled?
- virtual bool IsEnabled() const;
-
- // For compatibility
- inline bool Enabled() const { return IsEnabled(); }
-
- // Dialog support: override these and call
- // base class members to add functionality
- // that can't be done using validators.
-
- // Transfer values to controls. If returns FALSE,
- // it's an application error (pops up a dialog)
- virtual bool TransferDataToWindow();
-
- // Transfer values from controls. If returns FALSE,
- // transfer failed: don't quit
- virtual bool TransferDataFromWindow();
-
- // Validate controls. If returns FALSE,
- // validation failed: don't quit
- virtual bool Validate();
-
- // Return code for dialogs
- inline void SetReturnCode(int retCode);
- inline int GetReturnCode();
-
- // Set the cursor
- virtual void SetCursor(const wxCursor& cursor);
- inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; };
-
- // Get the window with the focus
- static wxWindow *FindFocus();
-
- // Get character size
- virtual int GetCharHeight() const;
- virtual int GetCharWidth() const;
-
- // Get overall window size
- virtual void GetSize(int *width, int *height) const;
-
- // Get window position, relative to parent (or screen if no parent)
- virtual void GetPosition(int *x, int *y) const;
-
- // Get client (application-useable) size
- virtual void GetClientSize(int *width, int *height) const;
-
- // Set overall size and position
- virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
- inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
- inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
-
- // Set client size
- virtual void SetClientSize(int width, int size);
-
- // Convert client to screen coordinates
- virtual void ClientToScreen(int *x, int *y) const;
-
- // Convert screen to client coordinates
- virtual void ScreenToClient(int *x, int *y) const;