X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41286fd1def19641be3ae5bb9666c84a1c0b5525..9b0f84db4a3988a17c380824e5b7183a18f89622:/include/wx/stc/stc.h diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 9eadfcd66a..157f970301 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -640,7 +640,14 @@ //---------------------------------------------------------------------- // Others -#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | \ + (1 << wxSTC_MARKNUM_FOLDEROPEN) | \ + (1 << wxSTC_MARKNUM_FOLDERSUB) | \ + (1 << wxSTC_MARKNUM_FOLDERTAIL) | \ + (1 << wxSTC_MARKNUM_FOLDERMIDTAIL) | \ + (1 << wxSTC_MARKNUM_FOLDEROPENMID) | \ + (1 << wxSTC_MARKNUM_FOLDEREND)) + @@ -1594,6 +1601,14 @@ public: // Send a message to Scintilla long SendMsg(int msg, long wp=0, long lp=0); + + // Set the vertical scrollbar to use instead of the ont that's built-in. + void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; } + + + // Set the horizontal scrollbar to use instead of the ont that's built-in. + void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; } + //---------------------------------------------------------------------- @@ -1602,10 +1617,12 @@ private: // Event handlers void OnPaint(wxPaintEvent& evt); void OnScrollWin(wxScrollWinEvent& evt); + void OnScroll(wxScrollEvent& evt); void OnSize(wxSizeEvent& evt); void OnMouseLeftDown(wxMouseEvent& evt); void OnMouseMove(wxMouseEvent& evt); void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); void OnContextMenu(wxContextMenuEvent& evt); void OnMouseWheel(wxMouseEvent& evt); void OnChar(wxKeyEvent& evt); @@ -1629,6 +1646,8 @@ private: ScintillaWX* m_swx; wxStopWatch m_stopWatch; + wxScrollBar* m_vScrollBar; + wxScrollBar* m_hScrollBar; bool m_lastKeyDownConsumed; @@ -1641,8 +1660,10 @@ private: class wxStyledTextEvent : public wxCommandEvent { public: - wxStyledTextEvent(const wxStyledTextEvent& event); wxStyledTextEvent(wxEventType commandType=0, int id=0); +#ifndef SWIG + wxStyledTextEvent(const wxStyledTextEvent& event); +#endif ~wxStyledTextEvent() {} void SetPosition(int pos) { m_position = pos; } @@ -1662,11 +1683,9 @@ public: void SetListType(int val) { m_listType = val; } void SetX(int val) { m_x = val; } void SetY(int val) { m_y = val; } -#ifndef __WXMAC__ // #if wxUSE_DRAG_AND_DROP void SetDragText(const wxString& val) { m_dragText = val; } void SetDragAllowMove(bool val) { m_dragAllowMove = val; } void SetDragResult(wxDragResult val) { m_dragResult = val; } -#endif int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -1685,17 +1704,14 @@ public: int GetListType() const { return m_listType; } int GetX() const { return m_x; } int GetY() const { return m_y; } -#ifndef __WXMAC__ // #if wxUSE_DRAG_AND_DROP wxString GetDragText() { return m_dragText; } bool GetDragAllowMove() { return m_dragAllowMove; } wxDragResult GetDragResult() { return m_dragResult; } -#endif bool GetShift() const; bool GetControl() const; bool GetAlt() const; -// void CopyObject(wxObject& obj) const; virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); } #ifndef SWIG @@ -1724,13 +1740,11 @@ private: int m_x; int m_y; -#ifndef __WXMAC__ // #if wxUSE_DRAG_AND_DROP wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP bool m_dragAllowMove; // wxEVT_STC_START_DRAG wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif -#endif }; #ifndef SWIG @@ -1754,11 +1768,9 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668) -#if wxUSE_DRAG_AND_DROP DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671) -#endif END_DECLARE_EVENT_TYPES() #else enum { @@ -1781,11 +1793,9 @@ END_DECLARE_EVENT_TYPES() wxEVT_STC_URIDROPPED, wxEVT_STC_DWELLSTART, wxEVT_STC_DWELLEND, -#ifndef __WXMAC__ // #if wxUSE_DRAG_AND_DROP wxEVT_STC_START_DRAG, wxEVT_STC_DRAG_OVER, wxEVT_STC_DO_DROP, -#endif }; #endif @@ -1813,12 +1823,10 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#if wxUSE_DRAG_AND_DROP #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #endif -#endif //---------------------------------------------------------------------- //----------------------------------------------------------------------