#include "wx/list.h"
#include "wx/region.h"
#include "wx/accel.h"
+#include "wx/intl.h"
#define wxKEY_SHIFT 1
#define wxKEY_CTRL 2
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
+//-----------------------------------------------------------------------------
+// wxClientData
+//-----------------------------------------------------------------------------
+
+class wxClientData
+{
+public:
+ wxClientData() { }
+ virtual ~wxClientData() { }
+};
+
+//-----------------------------------------------------------------------------
+// wxStringClientData
+//-----------------------------------------------------------------------------
+
+class wxStringClientData: public wxClientData
+{
+public:
+ wxStringClientData() { }
+ wxStringClientData( wxString &data ) { m_data = data; }
+ void SetData( wxString &data ) { m_data = data; }
+ wxString GetData() const { return m_data; }
+
+private:
+ wxString m_data;
+};
+
class WXDLLEXPORT wxWindow: public wxEvtHandler
{
DECLARE_ABSTRACT_CLASS(wxWindow)
// Accept files for dragging
virtual void DragAcceptFiles(bool accept);
+ // tooltips
+ // create a tooltip with this text
+ void SetToolTip(const wxString& tip);
+
+ // TODO
+#if 0
+ // pointer may be NULL to remove the tooltip
+ void SetToolTip(wxToolTip *tooltip);
+ // get the current tooltip (may return NULL if none)
+ wxToolTip* GetToolTip() const { return m_tooltip; }
+#endif
+
// Update region access
virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed(int x, int y, int w, int h) const;
inline wxWindow *GetParent() const;
inline void SetParent(wxWindow *p) ;
inline wxWindow *GetGrandParent() const;
- inline wxList *GetChildren() const;
+ inline wxList& GetChildren() const;
// Set/get the window's font
virtual void SetFont(const wxFont& f);
- inline virtual wxFont *GetFont() const;
+ inline virtual wxFont& GetFont() const;
// Set/get the window's validator
void SetValidator(const wxValidator& validator);
void OnEraseBackground(wxEraseEvent& event);
void OnChar(wxKeyEvent& event);
+ void OnKeyDown(wxKeyEvent& event);
+ void OnKeyUp(wxKeyEvent& event);
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent& event);
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
inline wxString wxWindow::GetName() const { return m_windowName; }
inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }