#include "wx/event.h"
#include "wx/string.h"
#include "wx/list.h"
+#include "wx/region.h"
#define wxKEY_SHIFT 1
#define wxKEY_CTRL 2
// Accept files for dragging
virtual void DragAcceptFiles(bool accept);
+ // Update region access
+ virtual wxRegion GetUpdateRegion() const;
+ virtual bool IsExposed(int x, int y, int w, int h) const;
+ virtual bool IsExposed(const wxPoint& pt) const;
+ virtual bool IsExposed(const wxRect& rect) const;
+
// Set/get the window title
virtual inline void SetTitle(const wxString& WXUNUSED(title)) {};
inline virtual wxString GetTitle(void) const { return wxString(""); };
// Do Update UI processing for controls
void UpdateWindowUI(void);
- void OnSize(wxSizeEvent& event);
void OnEraseBackground(wxEraseEvent& event);
void OnChar(wxKeyEvent& event);
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent& event);
+ // Does this window want to accept keyboard focus?
+ virtual bool AcceptsFocus() const;
+
public:
////////////////////////////////////////////////////////////////////////
//// IMPLEMENTATION
+ // For implementation purposes - sometimes decorations make the client area
+ // smaller
+ virtual wxPoint GetClientAreaOrigin() const;
+
+ // Makes an adjustment to the window position (for example, a frame that has
+ // a toolbar that it manages itself).
+ virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
+
// Windows subclassing
void SubclassWin(WXHWND hWnd);
void UnsubclassWin(void);
virtual WXHBRUSH MSWOnCtlColor(WXHDC dc, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
+ virtual long MSWOnPaletteChanged(WXHWND hWndPalChange);
+ virtual long MSWOnQueryNewPalette();
virtual bool MSWOnEraseBkgnd(WXHDC pDC);
virtual void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu);
virtual void MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem);
virtual void MSWOnJoyMove(int joystick, int x, int y, WXUINT flags);
virtual void MSWOnJoyZMove(int joystick, int z, WXUINT flags);
+ virtual long MSWGetDlgCode();
+
// Window procedure
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// Calls an appropriate default window procedure
virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWProcessMessage(WXMSG* pMsg);
+ virtual bool MSWTranslateMessage(WXMSG* pMsg);
virtual void MSWDestroyWindow(void);
// Detach "Window" menu from menu bar so it doesn't get deleted
WXUINT m_lastMsg;
WXWPARAM m_lastWParam;
WXLPARAM m_lastLParam;
+
+ wxRegion m_updateRegion;
+/*
wxRectangle m_updateRect; // Bounding box for screen damage area
#ifdef __WIN32__
WXHRGN m_updateRgn; // NT allows access to the rectangle list
#endif
- WXHANDLE m_acceleratorTable;
+*/
+
+// WXHANDLE m_acceleratorTable;
WXHMENU m_hMenu; // Menu, if any
wxList * m_children; // Window's children
int m_returnCode;
// Window specific (so far)
wxWindow* WXDLLEXPORT wxGetActiveWindow(void);
+// OBSOLETE
+#if 0
// Allows iteration through damaged rectangles in OnPaint
class WXDLLEXPORT wxUpdateIterator
{
int GetW();
int GetH();
};
+#endif
WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows;