+ /// Enable or disable editing, i.e. processing of keystrokes.
+ void SetEditable(bool toggle) { m_Editable = toggle; }
+ /// Query whether list can be edited by user.
+ bool IsEditable(void) const { return m_Editable; }
+ /// Pastes text from clipboard.
+ void Paste(void);
+
+ //@}
+
+ void EnablePopup(bool enable = true) { m_DoPopupMenu = enable; }
+
+ /** Sets the wrap margin.
+ @param margin set this to 0 to disable it
+ */
+ void SetWrapMargin(CoordType margin) { m_WrapMargin = margin; }
+
+ /** Redraws the window.
+ Internally, this stores the parameter and calls a refresh on
+ wxMSW, draws directly on wxGTK.
+ */
+ void DoPaint(const wxRect *updateRect);
+
+#ifdef __WXMSW__
+ virtual long MSWGetDlgCode();
+#endif //MSW
+
+ /// if exact == false, assume 50% extra size for the future
+ void ResizeScrollbars(bool exact = false); // don't change this to true!
+
+ /// if the flag is true, we send events when user clicks on embedded objects
+ inline void SetMouseTracking(bool doIt = true) { m_doSendEvents = doIt; }
+
+ /* Returns a pointer to the wxLayoutList object.
+ @return the list
+ */
+ wxLayoutList * GetLayoutList(void) { return m_llist; }
+
+ /**@name Callbacks */
+ //@{
+ void OnPaint(wxPaintEvent &event);
+ void OnChar(wxKeyEvent& event);
+ void OnMenu(wxCommandEvent& event);
+ void OnLeftMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_LCLICK, event); }
+ void OnRightMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_RCLICK, event); }
+ void OnMouseDblClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_DBLCLICK, event); }
+ void OnMouseMove(wxMouseEvent &event) { OnMouse(WXLOWIN_MENU_MOUSEMOVE, event) ; }
+ void OnSetFocus(wxFocusEvent &ev);
+ void OnKillFocus(wxFocusEvent &ev);
+ //@}
+
+ /// Creates a wxMenu for use as a format popup.
+ static wxMenu * MakeFormatMenu(void);
+ /**@name Dirty flag handling for optimisations. */
+ //@{
+ /// Set dirty flag.
+ void SetDirty(void) { m_Dirty = true; }
+ /// Query whether window needs redrawing.
+ bool IsDirty(void) const { return m_Dirty; }
+ /// Reset dirty flag.
+ void ResetDirty(void) { m_Dirty = false; }
+ //@}
+ /// Redraws the window, used by DoPaint() or OnPaint().
+ void InternalPaint(const wxRect *updateRect);
+
+ /// Has list been modified/edited?
+ bool IsModified(void) const { return m_Modified; }
+ /// Mark list as modified or unchanged.
+ void SetModified(bool modified = true) { m_Modified = modified; }
+
+protected:
+ /// generic function for mouse events processing
+ void OnMouse(int eventId, wxMouseEvent& event);