#endif
-#define wxUSE_PRIVATE_CLIPBOARD_FORMAT 1
+#define wxUSE_PRIVATE_CLIPBOARD_FORMAT 0
enum
{
WXLOWIN_MENU_TYPEWRITER,
WXLOWIN_MENU_SANSSERIF,
WXLOWIN_MENU_RCLICK,
- WXLOWIN_MENU_LCLICK,
WXLOWIN_MENU_DBLCLICK,
+ WXLOWIN_MENU_MDOWN,
+ WXLOWIN_MENU_LDOWN,
+ WXLOWIN_MENU_LCLICK = WXLOWIN_MENU_LDOWN,
+ WXLOWIN_MENU_LUP,
WXLOWIN_MENU_MOUSEMOVE,
WXLOWIN_MENU_LAST = WXLOWIN_MENU_MOUSEMOVE
};
int underline=0,
wxColour *fg=NULL,
wxColour *bg=NULL);
+
+ /// override base class virtual to also refresh the scrollbar position
+ virtual void Refresh(bool eraseBackground = TRUE,
+ const wxRect *rect = (const wxRect *)NULL);
+
/** Sets a background image, only used on screen, not on printouts.
@param bitmap a pointer to a wxBitmap or NULL to remove it
*/
m_BGbitmap = bitmap;
}
/// Enable or disable editing, i.e. processing of keystrokes.
- void SetEditable(bool toggle) { m_Editable = toggle; }
+ void SetEditable(bool toggle)
+ { m_Editable = toggle; SetCursorVisibility(toggle); }
/// Query whether list can be edited by user.
bool IsEditable(void) const { return m_Editable; }
/** Sets cursor visibility, visible=1, invisible=0,
m_CursorVisibility = visibility; return v;}
/// Pastes text from clipboard.
- void Paste(void);
+ void Paste(bool usePrimarySelection = FALSE);
/** Copies selection to clipboard.
@param invalidate used internally, see wxllist.h for details
*/
/**@name Callbacks */
//@{
+ void OnSize(wxSizeEvent &event);
void OnPaint(wxPaintEvent &event);
void OnChar(wxKeyEvent& event);
void OnKeyUp(wxKeyEvent& event);
void OnUpdateMenuBold(wxUpdateUIEvent& event);
void OnUpdateMenuItalic(wxUpdateUIEvent& event);
void OnMenu(wxCommandEvent& event);
- void OnLeftMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_LCLICK, event); }
+ void OnLeftMouseDown(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_LDOWN, event); }
+ void OnLeftMouseUp(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_LUP, event); }
void OnRightMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_RCLICK, event); }
+ void OnMiddleMouseDown(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_MDOWN, event); }
void OnMouseDblClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_DBLCLICK, event); }
void OnMouseMove(wxMouseEvent &event) { OnMouse(WXLOWIN_MENU_MOUSEMOVE, event) ; }
void OnSetFocus(wxFocusEvent &ev);
int m_maxx;
int m_maxy;
int m_lineHeight;
+
+ /// do we have the corresponding scrollbar?
+ bool m_hasHScrollbar,
+ m_hasVScrollbar;
+
/** Visibility parameter for cursor. 0/1 as expected, -1: visible
on demand.
*/
int m_CursorVisibility;
+
+ bool SetAutoDeleteSelection(bool enable = TRUE)
+ {
+ bool old = m_AutoDeleteSelection;
+ m_AutoDeleteSelection = enable;
+ return old;
+ }
private:
/// The layout list to be displayed.
wxLayoutList *m_llist;
int m_StatusFieldCursor;
/// a pointer to a bitmap for the background
wxBitmap *m_BGbitmap;
+ /**@name Some configuration options */
+ //@{
+ /// Do we want to auto-replace the selection with new text?
+ bool m_AutoDeleteSelection;
+ //@}
DECLARE_EVENT_TABLE()
};