X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29825f5fc4639b5aa86902cb4b1cd4fa07fb3593..3b2f109dbbea2847114c62315676eed7a3986dbc:/src/stc/stc.h.in diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 66686107c9..a7de3aa2e7 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -17,8 +17,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __stc_h__ -#define __stc_h__ +#ifndef _WX_STC_STC_H_ +#define _WX_STC_STC_H_ #include "wx/defs.h" @@ -28,16 +28,7 @@ #include "wx/dnd.h" #include "wx/stopwatch.h" -class WXDLLIMPEXP_CORE wxScrollBar; - -#ifdef WXMAKINGDLL_STC - #define WXDLLIMPEXP_STC WXEXPORT -#elif defined(WXUSINGDLL) - #define WXDLLIMPEXP_STC WXIMPORT -#else // not making nor using DLL - #define WXDLLIMPEXP_STC -#endif - +class WXDLLIMPEXP_FWD_CORE wxScrollBar; // SWIG can't handle "#if" type of conditionals, only "#ifdef" #ifdef SWIG @@ -78,8 +69,8 @@ struct SCNotification; #ifndef SWIG extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; -class WXDLLIMPEXP_STC wxStyledTextCtrl; -class WXDLLIMPEXP_STC wxStyledTextEvent; +class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; +class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; #endif //---------------------------------------------------------------------- @@ -143,6 +134,9 @@ public: void StyleSetSpec(int styleNum, const wxString& spec); + // Get the font of a style. + wxFont StyleGetFont(int style); + // Set style size, face, bold, italic, and underline attributes from // a wxFont's attributes. @@ -451,6 +445,8 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_DCLICK, 1674) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CALLTIP_CLICK, 1675) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_SELECTION, 1676) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_INDICATOR_CLICK, 1677) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_INDICATOR_RELEASE, 1678) END_DECLARE_EVENT_TYPES() #else enum { @@ -479,7 +475,9 @@ END_DECLARE_EVENT_TYPES() wxEVT_STC_HOTSPOT_CLICK, wxEVT_STC_HOTSPOT_DCLICK, wxEVT_STC_CALLTIP_CLICK, - wxEVT_STC_AUTOCOMP_SELECTION + wxEVT_STC_AUTOCOMP_SELECTION, + wxEVT_STC_INDICATOR_CLICK, + wxEVT_STC_INDICATOR_RELEASE }; #endif @@ -514,34 +512,11 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), #define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), #define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), -#endif - -//---------------------------------------------------------------------- -// Utility functions used within wxSTC +#define EVT_STC_INDICATOR_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), +#define EVT_STC_INDICATOR_RELEASE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), -#ifndef SWIG -#if wxUSE_UNICODE - -WXDLLIMPEXP_STC wxString stc2wx(const char* str); -WXDLLIMPEXP_STC wxString stc2wx(const char* str, size_t len); -WXDLLIMPEXP_STC const wxWX2MBbuf wx2stc(const wxString& str); - -#else // not UNICODE - -inline wxString stc2wx(const char* str) { - return wxString(str); -} -inline wxString stc2wx(const char* str, size_t len) { - return wxString(str, len); -} -inline const wxWX2MBbuf wx2stc(const wxString& str) { - return str.mbc_str(); -} - -#endif // UNICODE -#endif // SWIG - -//---------------------------------------------------------------------- #endif #endif // wxUSE_STC + +#endif // _WX_STC_STC_H_