repo_name
stringclasses
10 values
file_path
stringlengths
29
222
content
stringlengths
24
926k
extention
stringclasses
5 values
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/meta/implicitconversion.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/meta/implicitconversion.h // Purpose: Determine resulting type from implicit conversion // Author: Vaclav Slavik // Created: 2010-10-22 // Copyright: (c) 2010 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_META_IMPLICITCONVERSION_H_ #define _WX_META_IMPLICITCONVERSION_H_ #include "wx/defs.h" #include "wx/meta/if.h" // C++ hierarchy of data types is: // // Long double (highest) // Double // Float // Unsigned long int // Long int // Unsigned int // Int (lowest) // // Types lower in the hierarchy are converted into ones higher up if both are // involved e.g. in arithmetic expressions. namespace wxPrivate { template<typename T> struct TypeHierarchy { // consider unknown types (e.g. objects, pointers) to be of highest // level, always convert to them if they occur static const int level = 9999; }; #define WX_TYPE_HIERARCHY_LEVEL(level_num, type) \ template<> struct TypeHierarchy<type> \ { \ static const int level = level_num; \ } WX_TYPE_HIERARCHY_LEVEL( 1, char); WX_TYPE_HIERARCHY_LEVEL( 2, unsigned char); WX_TYPE_HIERARCHY_LEVEL( 3, short); WX_TYPE_HIERARCHY_LEVEL( 4, unsigned short); WX_TYPE_HIERARCHY_LEVEL( 5, int); WX_TYPE_HIERARCHY_LEVEL( 6, unsigned int); WX_TYPE_HIERARCHY_LEVEL( 7, long); WX_TYPE_HIERARCHY_LEVEL( 8, unsigned long); #ifdef wxLongLong_t WX_TYPE_HIERARCHY_LEVEL( 9, wxLongLong_t); WX_TYPE_HIERARCHY_LEVEL(10, wxULongLong_t); #endif WX_TYPE_HIERARCHY_LEVEL(11, float); WX_TYPE_HIERARCHY_LEVEL(12, double); WX_TYPE_HIERARCHY_LEVEL(13, long double); #if wxWCHAR_T_IS_REAL_TYPE #if SIZEOF_WCHAR_T == SIZEOF_SHORT template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<short> {}; #elif SIZEOF_WCHAR_T == SIZEOF_INT template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<int> {}; #elif SIZEOF_WCHAR_T == SIZEOF_LONG template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<long> {}; #else #error "weird wchar_t size, please update this code" #endif #endif #undef WX_TYPE_HIERARCHY_LEVEL } // namespace wxPrivate // Helper to determine resulting type of implicit conversion in // an expression with two arithmetic types. template<typename T1, typename T2> struct wxImplicitConversionType { typedef typename wxIf < // if T2 is "higher" type, convert to it (int)(wxPrivate::TypeHierarchy<T1>::level) < (int)(wxPrivate::TypeHierarchy<T2>::level), T2, // otherwise use T1 T1 >::value value; }; template<typename T1, typename T2, typename T3> struct wxImplicitConversionType3 : public wxImplicitConversionType< T1, typename wxImplicitConversionType<T2,T3>::value> { }; #endif // _WX_META_IMPLICITCONVERSION_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/meta/convertible.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/meta/convertible.h // Purpose: Test if types are convertible // Author: Arne Steinarson // Created: 2008-01-10 // Copyright: (c) 2008 Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_META_CONVERTIBLE_H_ #define _WX_META_CONVERTIBLE_H_ // // Introduce an extra class to make this header compilable with g++3.2 // template <class D, class B> struct wxConvertibleTo_SizeHelper { static char Match(B* pb); static int Match(...); }; // Helper to decide if an object of type D is convertible to type B (the test // succeeds in particular when D derives from B) template <class D, class B> struct wxConvertibleTo { enum { value = sizeof(wxConvertibleTo_SizeHelper<D,B>::Match(static_cast<D*>(NULL))) == sizeof(char) }; }; // This is similar to wxConvertibleTo, except that when using a C++11 compiler, // the case of D deriving from B non-publicly will be detected and the correct // value (false) will be deduced instead of getting a compile-time error as // with wxConvertibleTo. For pre-C++11 compilers there is no difference between // this helper and wxConvertibleTo. template <class D, class B> struct wxIsPubliclyDerived { enum { #if __cplusplus >= 201103 || (defined(_MSC_VER) && _MSC_VER >= 1600) // If C++11 is available we use this, as on most compilers it's a // built-in and will be evaluated at compile-time. value = std::is_base_of<B, D>::value && std::is_convertible<D*, B*>::value #else // When not using C++11, we fall back to wxConvertibleTo, which fails // at compile-time if D doesn't publicly derive from B. value = wxConvertibleTo<D, B>::value #endif }; }; #endif // _WX_META_CONVERTIBLE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/meta/removeref.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/meta/removeref.h // Purpose: Allows to remove a reference from a type. // Author: Vadim Zeitlin // Created: 2012-10-21 // Copyright: (c) 2012 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_META_REMOVEREF_H_ #define _WX_META_REMOVEREF_H_ // wxRemoveRef<> is similar to C++11 std::remove_reference<> but works with all // compilers (but, to compensate for this, doesn't work with rvalue references). template <typename T> struct wxRemoveRef { typedef T type; }; template <typename T> struct wxRemoveRef<T&> { typedef T type; }; // Define this for compatibility with the previous versions in which // wxRemoveRef() wasn't always defined as we supported MSVC6 for which it // couldn't be implemented. #define wxHAS_REMOVEREF #endif // _WX_META_REMOVEREF_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/meta/if.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/meta/if.h // Purpose: declares wxIf<> metaprogramming construct // Author: Vaclav Slavik // Created: 2008-01-22 // Copyright: (c) 2008 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_META_IF_H_ #define _WX_META_IF_H_ #include "wx/defs.h" namespace wxPrivate { template <bool Cond> struct wxIfImpl; // specialization for true: template <> struct wxIfImpl<true> { template<typename TTrue, typename TFalse> struct Result { typedef TTrue value; }; }; // specialization for false: template<> struct wxIfImpl<false> { template<typename TTrue, typename TFalse> struct Result { typedef TFalse value; }; }; } // namespace wxPrivate // wxIf<> template defines nested type "value" which is the same as // TTrue if the condition Cond (boolean compile-time constant) was met and // TFalse if it wasn't. // // See wxVector<T> in vector.h for usage example template<bool Cond, typename TTrue, typename TFalse> struct wxIf { typedef typename wxPrivate::wxIfImpl<Cond> ::template Result<TTrue, TFalse>::value value; }; #endif // _WX_META_IF_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/advprops.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/advprops.h // Purpose: wxPropertyGrid Advanced Properties (font, colour, etc.) // Author: Jaakko Salli // Modified by: // Created: 2004-09-25 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_ADVPROPS_H_ #define _WX_PROPGRID_ADVPROPS_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/propgrid/props.h" // ----------------------------------------------------------------------- // // Additional Value Type Handlers // bool WXDLLIMPEXP_PROPGRID operator==(const wxArrayInt& array1, const wxArrayInt& array2); // // Additional Property Editors // #if wxUSE_SPINBTN WX_PG_DECLARE_EDITOR_WITH_DECL(SpinCtrl,WXDLLIMPEXP_PROPGRID) #endif #if wxUSE_DATEPICKCTRL WX_PG_DECLARE_EDITOR_WITH_DECL(DatePickerCtrl,WXDLLIMPEXP_PROPGRID) #endif // ----------------------------------------------------------------------- // Web colour is currently unsupported #define wxPG_COLOUR_WEB_BASE 0x10000 //#define wxPG_TO_WEB_COLOUR(A) ((wxUint32)(A+wxPG_COLOUR_WEB_BASE)) #define wxPG_COLOUR_CUSTOM 0xFFFFFF #define wxPG_COLOUR_UNSPECIFIED (wxPG_COLOUR_CUSTOM+1) // Because text, background and other colours tend to differ between // platforms, wxSystemColourProperty must be able to select between system // colour and, when necessary, to pick a custom one. wxSystemColourProperty // value makes this possible. class WXDLLIMPEXP_PROPGRID wxColourPropertyValue : public wxObject { public: // An integer value relating to the colour, and which exact // meaning depends on the property with which it is used. // For wxSystemColourProperty: // Any of wxSYS_COLOUR_XXX, or any web-colour ( use wxPG_TO_WEB_COLOUR // macro - (currently unsupported) ), or wxPG_COLOUR_CUSTOM. // // For custom colour properties without values array specified: // index or wxPG_COLOUR_CUSTOM // For custom colour properties with values array specified: // m_arrValues[index] or wxPG_COLOUR_CUSTOM wxUint32 m_type; // Resulting colour. Should be correct regardless of type. wxColour m_colour; wxColourPropertyValue() : wxObject() { m_type = 0; } virtual ~wxColourPropertyValue() { } wxColourPropertyValue( const wxColourPropertyValue& v ) : wxObject() { m_type = v.m_type; m_colour = v.m_colour; } void Init( wxUint32 type, const wxColour& colour ) { m_type = type; m_colour = colour; } wxColourPropertyValue( const wxColour& colour ) : wxObject() { m_type = wxPG_COLOUR_CUSTOM; m_colour = colour; } wxColourPropertyValue( wxUint32 type ) : wxObject() { m_type = type; } wxColourPropertyValue( wxUint32 type, const wxColour& colour ) : wxObject() { Init( type, colour ); } void operator=(const wxColourPropertyValue& cpv) { if (this != &cpv) Init( cpv.m_type, cpv.m_colour ); } private: wxDECLARE_DYNAMIC_CLASS(wxColourPropertyValue); }; bool WXDLLIMPEXP_PROPGRID operator==(const wxColourPropertyValue&, const wxColourPropertyValue&); DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID) // ----------------------------------------------------------------------- // Declare part of custom colour property macro pairs. #if wxUSE_IMAGE #include "wx/image.h" #endif // ----------------------------------------------------------------------- // Property representing wxFont. class WXDLLIMPEXP_PROPGRID wxFontProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxFontProperty) public: wxFontProperty(const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxFont& value = wxFont()); virtual ~wxFontProperty(); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ) wxOVERRIDE; virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const wxOVERRIDE; virtual void RefreshChildren() wxOVERRIDE; protected: }; // ----------------------------------------------------------------------- // If set, then match from list is searched for a custom colour. #define wxPG_PROP_TRANSLATE_CUSTOM wxPG_PROP_CLASS_SPECIFIC_1 // Has dropdown list of wxWidgets system colours. Value used is // of wxColourPropertyValue type. class WXDLLIMPEXP_PROPGRID wxSystemColourProperty : public wxEnumProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxSystemColourProperty) public: wxSystemColourProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxColourPropertyValue& value = wxColourPropertyValue() ); virtual ~wxSystemColourProperty(); virtual void OnSetValue() wxOVERRIDE; virtual bool IntToValue(wxVariant& variant, int number, int argFlags = 0) const wxOVERRIDE; // Override in derived class to customize how colours are printed as // strings. virtual wxString ColourToString( const wxColour& col, int index, int argFlags = 0 ) const; // Returns index of entry that triggers colour picker dialog // (default is last). virtual int GetCustomColourIndex() const; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ) wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; virtual wxSize OnMeasureImage( int item ) const wxOVERRIDE; virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ) wxOVERRIDE; // Helper function to show the colour dialog bool QueryColourFromUser( wxVariant& variant ) const; // Default is to use wxSystemSettings::GetColour(index). Override to use // custom colour tables etc. virtual wxColour GetColour( int index ) const; wxColourPropertyValue GetVal( const wxVariant* pVariant = NULL ) const; protected: // Special constructors to be used by derived classes. wxSystemColourProperty( const wxString& label, const wxString& name, const char* const* labels, const long* values, wxPGChoices* choicesCache, const wxColourPropertyValue& value ); wxSystemColourProperty( const wxString& label, const wxString& name, const char* const* labels, const long* values, wxPGChoices* choicesCache, const wxColour& value ); void Init( int type, const wxColour& colour ); // Utility functions for internal use virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; wxVariant TranslateVal( wxColourPropertyValue& v ) const { return DoTranslateVal( v ); } wxVariant TranslateVal( int type, const wxColour& colour ) const { wxColourPropertyValue v(type, colour); return DoTranslateVal( v ); } // Translates colour to a int value, return wxNOT_FOUND if no match. int ColToInd( const wxColour& colour ) const; }; // ----------------------------------------------------------------------- class WXDLLIMPEXP_PROPGRID wxColourProperty : public wxSystemColourProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxColourProperty) public: wxColourProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxColour& value = *wxWHITE ); virtual ~wxColourProperty(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual wxColour GetColour( int index ) const wxOVERRIDE; protected: virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const wxOVERRIDE; private: void Init( wxColour colour ); }; // ----------------------------------------------------------------------- // Property representing wxCursor. class WXDLLIMPEXP_PROPGRID wxCursorProperty : public wxEnumProperty { wxDECLARE_DYNAMIC_CLASS(wxCursorProperty); wxCursorProperty( const wxString& label= wxPG_LABEL, const wxString& name= wxPG_LABEL, int value = 0 ); virtual ~wxCursorProperty(); virtual wxSize OnMeasureImage( int item ) const wxOVERRIDE; virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ) wxOVERRIDE; }; // ----------------------------------------------------------------------- #if wxUSE_IMAGE WXDLLIMPEXP_PROPGRID const wxString& wxPGGetDefaultImageWildcard(); // Property representing image file(name). class WXDLLIMPEXP_PROPGRID wxImageFileProperty : public wxFileProperty { wxDECLARE_DYNAMIC_CLASS(wxImageFileProperty); public: wxImageFileProperty( const wxString& label= wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString); virtual ~wxImageFileProperty(); virtual void OnSetValue() wxOVERRIDE; virtual wxSize OnMeasureImage( int item ) const wxOVERRIDE; virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ) wxOVERRIDE; protected: wxBitmap* m_pBitmap; // final thumbnail area wxImage* m_pImage; // intermediate thumbnail area private: // Initialize m_pImage using the current file name. void LoadImageFromFile(); }; #endif #if wxUSE_CHOICEDLG // Property that manages a value resulting from wxMultiChoiceDialog. Value is // array of strings. You can get value as array of choice values/indices by // calling wxMultiChoiceProperty::GetValueAsArrayInt(). class WXDLLIMPEXP_PROPGRID wxMultiChoiceProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxMultiChoiceProperty) public: wxMultiChoiceProperty( const wxString& label, const wxString& name, const wxArrayString& strings, const wxArrayString& value ); wxMultiChoiceProperty( const wxString& label, const wxString& name, const wxPGChoices& choices, const wxArrayString& value = wxArrayString() ); wxMultiChoiceProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& value = wxArrayString() ); virtual ~wxMultiChoiceProperty(); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ) wxOVERRIDE; wxArrayInt GetValueAsArrayInt() const { return m_choices.GetValuesForStrings(m_value.GetArrayString()); } protected: void GenerateValueAsString( wxVariant& value, wxString* target ) const; // Returns translation of values into string indices. wxArrayInt GetValueAsIndices() const; wxArrayString m_valueAsStrings; // Value as array of strings // Cache displayed text since generating it is relatively complicated. wxString m_display; }; #endif // wxUSE_CHOICEDLG // ----------------------------------------------------------------------- #if wxUSE_DATETIME // Property representing wxDateTime. class WXDLLIMPEXP_PROPGRID wxDateProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxDateProperty) public: wxDateProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxDateTime& value = wxDateTime() ); virtual ~wxDateProperty(); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; void SetFormat( const wxString& format ) { m_format = format; } const wxString& GetFormat() const { return m_format; } void SetDateValue( const wxDateTime& dt ) { //m_valueDateTime = dt; m_value = dt; } wxDateTime GetDateValue() const { //return m_valueDateTime; return m_value; } long GetDatePickerStyle() const { return m_dpStyle; } protected: wxString m_format; long m_dpStyle; // DatePicker style static wxString ms_defaultDateFormat; static wxString DetermineDefaultDateFormat( bool showCentury ); }; #endif // wxUSE_DATETIME // ----------------------------------------------------------------------- #if wxUSE_SPINBTN // // Implement an editor control that allows using wxSpinCtrl (actually, a // combination of wxTextCtrl and wxSpinButton) to edit value of wxIntProperty // and wxFloatProperty (and similar). // // Note that new editor classes needs to be registered before use. This can be // accomplished using wxPGRegisterEditorClass macro, which is used for SpinCtrl // in wxPropertyGridInterface::RegisterAdditionalEditors (see below). // Registration can also be performed in a constructor of a property that is // likely to require the editor in question. // #include "wx/spinbutt.h" #include "wx/propgrid/editors.h" // NOTE: Regardless that this class inherits from a working editor, it has // all necessary methods to work independently. wxTextCtrl stuff is only // used for event handling here. class WXDLLIMPEXP_PROPGRID wxPGSpinCtrlEditor : public wxPGTextCtrlEditor { wxDECLARE_DYNAMIC_CLASS(wxPGSpinCtrlEditor); public: virtual ~wxPGSpinCtrlEditor(); wxString GetName() const wxOVERRIDE; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd, wxEvent& event ) const wxOVERRIDE; private: mutable wxString m_tempString; }; #endif // wxUSE_SPINBTN // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_ADVPROPS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/propgridiface.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/propgridiface.h // Purpose: wxPropertyGridInterface class // Author: Jaakko Salli // Modified by: // Created: 2008-08-24 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __WX_PROPGRID_PROPGRIDIFACE_H__ #define __WX_PROPGRID_PROPGRIDIFACE_H__ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/propgrid/property.h" #include "wx/propgrid/propgridpagestate.h" // ----------------------------------------------------------------------- // Most property grid functions have this type as their argument, as it can // convey a property by either a pointer or name. class WXDLLIMPEXP_PROPGRID wxPGPropArgCls { public: wxPGPropArgCls( const wxPGProperty* property ) { m_ptr.property = (wxPGProperty*) property; m_flags = IsProperty; } wxPGPropArgCls( const wxString& str ) { m_ptr.stringName = &str; m_flags = IsWxString; } wxPGPropArgCls( const wxPGPropArgCls& id ) { m_ptr = id.m_ptr; m_flags = id.m_flags; } // This is only needed for wxPython bindings. wxPGPropArgCls( wxString* str, bool WXUNUSED(deallocPtr) ) { m_ptr.stringName = str; m_flags = IsWxString | OwnsWxString; } ~wxPGPropArgCls() { if ( m_flags & OwnsWxString ) delete m_ptr.stringName; } wxPGProperty* GetPtr() const { wxCHECK( m_flags == IsProperty, NULL ); return m_ptr.property; } wxPGPropArgCls( const char* str ) { m_ptr.charName = str; m_flags = IsCharPtr; } wxPGPropArgCls( const wchar_t* str ) { m_ptr.wcharName = str; m_flags = IsWCharPtr; } // This constructor is required for NULL. wxPGPropArgCls( int ) { m_ptr.property = NULL; m_flags = IsProperty; } wxPGProperty* GetPtr( wxPropertyGridInterface* iface ) const; wxPGProperty* GetPtr( const wxPropertyGridInterface* iface ) const { return GetPtr((wxPropertyGridInterface*)iface); } wxPGProperty* GetPtr0() const { return m_ptr.property; } bool HasName() const { return (m_flags != IsProperty); } const wxString& GetName() const { return *m_ptr.stringName; } private: enum { IsProperty = 0x00, IsWxString = 0x01, IsCharPtr = 0x02, IsWCharPtr = 0x04, OwnsWxString = 0x10 }; union { wxPGProperty* property; const char* charName; const wchar_t* wcharName; const wxString* stringName; } m_ptr; unsigned char m_flags; }; typedef const wxPGPropArgCls& wxPGPropArg; // ----------------------------------------------------------------------- WXDLLIMPEXP_PROPGRID void wxPGTypeOperationFailed( const wxPGProperty* p, const wxString& typestr, const wxString& op ); WXDLLIMPEXP_PROPGRID void wxPGGetFailed( const wxPGProperty* p, const wxString& typestr ); // ----------------------------------------------------------------------- // Helper macro that does necessary preparations when calling // some wxPGProperty's member function. #define wxPG_PROP_ARG_CALL_PROLOG_0(PROPERTY) \ PROPERTY *p = (PROPERTY*)id.GetPtr(this); \ if ( !p ) return; #define wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(PROPERTY, RETVAL) \ PROPERTY *p = (PROPERTY*)id.GetPtr(this); \ if ( !p ) return RETVAL; #define wxPG_PROP_ARG_CALL_PROLOG() \ wxPG_PROP_ARG_CALL_PROLOG_0(wxPGProperty) #define wxPG_PROP_ARG_CALL_PROLOG_RETVAL(RVAL) \ wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(wxPGProperty, RVAL) #define wxPG_PROP_ID_CONST_CALL_PROLOG() \ wxPG_PROP_ARG_CALL_PROLOG_0(const wxPGProperty) #define wxPG_PROP_ID_CONST_CALL_PROLOG_RETVAL(RVAL) \ wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(const wxPGProperty, RVAL) // ----------------------------------------------------------------------- // Most of the shared property manipulation interface shared by wxPropertyGrid, // wxPropertyGridPage, and wxPropertyGridManager is defined in this class. // In separate wxPropertyGrid component this class was known as // wxPropertyContainerMethods. // wxPropertyGridInterface's property operation member functions all accept // a special wxPGPropArg id argument, using which you can refer to properties // either by their pointer (for performance) or by their name (for conveniency). class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface { public: // Destructor. virtual ~wxPropertyGridInterface() { } // Appends property to the list. // wxPropertyGrid assumes ownership of the object. // Becomes child of most recently added category. // wxPropertyGrid takes the ownership of the property pointer. // If appending a category with name identical to a category already in // the wxPropertyGrid, then newly created category is deleted, and most // recently added category (under which properties are appended) is set // to the one with same name. This allows easier adding of items to same // categories in multiple passes. // Does not automatically redraw the control, so you may need to call // Refresh when calling this function after control has been shown for // the first time. // This functions deselects selected property, if any. Validation // failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. // selection is cleared even if editor had invalid value. wxPGProperty* Append( wxPGProperty* property ); // Same as Append(), but appends under given parent property. wxPGProperty* AppendIn( wxPGPropArg id, wxPGProperty* newproperty ); // In order to add new items into a property with fixed children (for // instance, wxFlagsProperty), you need to call this method. After // populating has been finished, you need to call EndAddChildren. void BeginAddChildren( wxPGPropArg id ); // Deletes all properties. virtual void Clear() = 0; // Clears current selection, if any. // validation - If set to false, deselecting the property will always work, // even if its editor had invalid value in it. // Returns true if successful or if there was no selection. May // fail if validation was enabled and active editor had invalid // value. // In wxPropertyGrid 1.4, this member function used to send // wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer // does that. bool ClearSelection( bool validation = false ); // Resets modified status of all properties. void ClearModifiedStatus(); // Collapses given category or property with children. // Returns true if actually collapses. bool Collapse( wxPGPropArg id ); // Collapses all items that can be collapsed. // Return false if failed (may fail if editor value cannot be validated). bool CollapseAll() { return ExpandAll(false); } // Changes value of a property, as if from an editor. // Use this instead of SetPropertyValue() if you need the value to run // through validation process, and also send the property change event. // Returns true if value was successfully changed. bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); // Removes and deletes a property and any children. // id - Pointer or name of a property. // If you delete a property in a wxPropertyGrid event // handler, the actual deletion is postponed until the next // idle event. // This functions deselects selected property, if any. // Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not // respected, ie. selection is cleared even if editor had // invalid value. void DeleteProperty( wxPGPropArg id ); // Removes a property. Does not delete the property object, but // instead returns it. // id - Pointer or name of a property. // Removed property cannot have any children. // Also, if you remove property in a wxPropertyGrid event // handler, the actual removal is postponed until the next // idle event. wxPGProperty* RemoveProperty( wxPGPropArg id ); // Disables a property. bool DisableProperty( wxPGPropArg id ) { return EnableProperty(id,false); } // Returns true if all property grid data changes have been committed. // Usually only returns false if value in active editor has been // invalidated by a wxValidator. bool EditorValidate(); // Enables or disables property, depending on whether enable is true or // false. Disabled property usually appears as having grey text. // id - Name or pointer to a property. // enable - If false, property is disabled instead. bool EnableProperty( wxPGPropArg id, bool enable = true ); // Called after population of property with fixed children has finished. void EndAddChildren( wxPGPropArg id ); // Expands given category or property with children. // Returns true if actually expands. bool Expand( wxPGPropArg id ); // Expands all items that can be expanded. bool ExpandAll( bool expand = true ); // Returns id of first child of given property. // Does not return sub-properties! wxPGProperty* GetFirstChild( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullProperty) if ( !p->GetChildCount() || p->HasFlag(wxPG_PROP_AGGREGATE) ) return wxNullProperty; return p->Item(0); } // Returns iterator class instance. // flags - See wxPG_ITERATOR_FLAGS. Value wxPG_ITERATE_DEFAULT causes // iteration over everything except private child properties. // firstProp - Property to start iteration from. If NULL, then first // child of root is used. wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) { return wxPropertyGridIterator( m_pState, flags, firstProp ); } wxPropertyGridConstIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) const { return wxPropertyGridConstIterator( m_pState, flags, firstProp ); } // Returns iterator class instance. // flags - See wxPG_ITERATOR_FLAGS. Value wxPG_ITERATE_DEFAULT causes // iteration over everything except private child properties. // startPos - Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start // from the first property from the top, and wxBOTTOM means that the // iteration will instead begin from bottommost valid item. wxPropertyGridIterator GetIterator( int flags, int startPos ) { return wxPropertyGridIterator( m_pState, flags, startPos ); } wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const { return wxPropertyGridConstIterator( m_pState, flags, startPos ); } // Returns id of first item that matches given criteria. wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) { wxPropertyGridIterator it( m_pState, flags, wxNullProperty, 1 ); return *it; } const wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) const { return ((wxPropertyGridInterface*)this)->GetFirst(flags); } // Returns pointer to a property with given name (case-sensitive). // If there is no property with such name, NULL pointer is returned. // Properties which have non-category, non-root parent // cannot be accessed globally by their name. Instead, use // "<property>.<subproperty>" instead of "<subproperty>". wxPGProperty* GetProperty( const wxString& name ) const { return GetPropertyByName(name); } // Returns map-like storage of property's attributes. // Note that if extra style wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES is set, // then builtin-attributes are not included in the storage. const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const { // If 'id' refers to invalid property, then we will return dummy // attributes (i.e. root property's attributes, which contents should // should always be empty and of no consequence). wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes()); return p->GetAttributes(); } // Adds to 'targetArr' pointers to properties that have given // flags 'flags' set. However, if 'inverse' is set to true, then // only properties without given flags are stored. // flags - Property flags to use. // iterFlags - Iterator flags to use. Default is everything expect private children. void GetPropertiesWithFlag( wxArrayPGProperty* targetArr, wxPGProperty::FlagType flags, bool inverse = false, int iterFlags = wxPG_ITERATE_PROPERTIES | wxPG_ITERATE_HIDDEN | wxPG_ITERATE_CATEGORIES) const; // Returns value of given attribute. If none found, returns wxNullVariant. wxVariant GetPropertyAttribute( wxPGPropArg id, const wxString& attrName ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullVariant) return p->GetAttribute(attrName); } // Returns pointer of property's nearest parent category. If no category // found, returns NULL. wxPropertyCategory* GetPropertyCategory( wxPGPropArg id ) const { wxPG_PROP_ID_CONST_CALL_PROLOG_RETVAL(NULL) return m_pState->GetPropertyCategory(p); } // Returns client data (void*) of a property. void* GetPropertyClientData( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) return p->GetClientData(); } // Returns first property which label matches given string. // NULL if none found. Note that this operation is extremely slow when // compared to GetPropertyByName(). wxPGProperty* GetPropertyByLabel( const wxString& label ) const; // Returns pointer to a property with given name (case-sensitive). // If there is no property with such name, @NULL pointer is returned. wxPGProperty* GetPropertyByName( const wxString& name ) const; // Returns child property 'subname' of property 'name'. Same as // calling GetPropertyByName("name.subname"), albeit slightly faster. wxPGProperty* GetPropertyByName( const wxString& name, const wxString& subname ) const; // Returns property's editor. const wxPGEditor* GetPropertyEditor( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) return p->GetEditorClass(); } // Returns help string associated with a property. wxString GetPropertyHelpString( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxEmptyString) return p->GetHelpString(); } // Returns property's custom value image (NULL of none). wxBitmap* GetPropertyImage( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) return p->GetValueImage(); } // Returns label of a property. const wxString& GetPropertyLabel( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_emptyString) return p->GetLabel(); } // Returns name of a property, by which it is globally accessible. wxString GetPropertyName( wxPGProperty* property ) { return property->GetName(); } // Returns parent item of a property. wxPGProperty* GetPropertyParent( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullProperty) return p->GetParent(); } #if wxUSE_VALIDATORS // Returns validator of a property as a reference, which you // can pass to any number of SetPropertyValidator. wxValidator* GetPropertyValidator( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) return p->GetValidator(); } #endif // Returns value as wxVariant. To get wxObject pointer from it, // you will have to use WX_PG_VARIANT_TO_WXOBJECT(VARIANT,CLASSNAME) macro. // If property value is unspecified, wxNullVariant is returned. wxVariant GetPropertyValue( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxVariant()) return p->GetValue(); } wxString GetPropertyValueAsString( wxPGPropArg id ) const; long GetPropertyValueAsLong( wxPGPropArg id ) const; unsigned long GetPropertyValueAsULong( wxPGPropArg id ) const { return (unsigned long) GetPropertyValueAsLong(id); } int GetPropertyValueAsInt( wxPGPropArg id ) const { return (int)GetPropertyValueAsLong(id); } bool GetPropertyValueAsBool( wxPGPropArg id ) const; double GetPropertyValueAsDouble( wxPGPropArg id ) const; #define wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL(PGTypeName, DEFVAL) \ wxPG_PROP_ARG_CALL_PROLOG_RETVAL(DEFVAL) \ wxVariant value = p->GetValue(); \ if ( !value.IsType(PGTypeName) ) \ { \ wxPGGetFailed(p, PGTypeName); \ return DEFVAL; \ } #define wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL_WFALLBACK(PGTypeName, DEFVAL) \ wxPG_PROP_ARG_CALL_PROLOG_RETVAL(DEFVAL) \ wxVariant value = p->GetValue(); \ if ( !value.IsType(PGTypeName) ) \ return DEFVAL; \ wxArrayString GetPropertyValueAsArrayString( wxPGPropArg id ) const { wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL(wxPG_VARIANT_TYPE_ARRSTRING, wxArrayString()) return value.GetArrayString(); } #if defined(wxLongLong_t) && wxUSE_LONGLONG wxLongLong_t GetPropertyValueAsLongLong( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) return p->GetValue().GetLongLong().GetValue(); } wxULongLong_t GetPropertyValueAsULongLong( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) return p->GetValue().GetULongLong().GetValue(); } #endif wxArrayInt GetPropertyValueAsArrayInt( wxPGPropArg id ) const { wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL(wxArrayInt_VariantType, wxArrayInt()) wxArrayInt arr; arr << value; return arr; } #if wxUSE_DATETIME wxDateTime GetPropertyValueAsDateTime( wxPGPropArg id ) const { wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL(wxPG_VARIANT_TYPE_DATETIME, wxDateTime()) return value.GetDateTime(); } #endif // Returns a wxVariant list containing wxVariant versions of all // property values. Order is not guaranteed. // flags - Use wxPG_KEEP_STRUCTURE to retain category structure; each sub // category will be its own wxVariantList of wxVariant. // Use wxPG_INC_ATTRIBUTES to include property attributes as well. // Each attribute will be stored as list variant named // "@<propname>@attr." wxVariant GetPropertyValues( const wxString& listname = wxEmptyString, wxPGProperty* baseparent = NULL, long flags = 0 ) const { return m_pState->DoGetPropertyValues(listname, baseparent, flags); } // Returns currently selected property. NULL if none. // When wxPG_EX_MULTIPLE_SELECTION extra style is used, this // member function returns the focused property, that is the // one which can have active editor. wxPGProperty* GetSelection() const; // Returns list of currently selected properties. // wxArrayPGProperty should be compatible with std::vector API. const wxArrayPGProperty& GetSelectedProperties() const { return m_pState->m_selection; } wxPropertyGridPageState* GetState() const { return m_pState; } // Similar to GetIterator(), but instead returns wxPGVIterator instance, // which can be useful for forward-iterating through arbitrary property // containers. // flags - See wxPG_ITERATOR_FLAGS. virtual wxPGVIterator GetVIterator( int flags ) const; // Hides or reveals a property. // hide - If true, hides property, otherwise reveals it. // flags - By default changes are applied recursively. Set this paramter // wxPG_DONT_RECURSE to prevent this. bool HideProperty( wxPGPropArg id, bool hide = true, int flags = wxPG_RECURSE ); #if wxPG_INCLUDE_ADVPROPS // Initializes *all* property types. Causes references to most object // files in the library, so calling this may cause significant increase // in executable size when linking with static library. static void InitAllTypeHandlers(); #else static void InitAllTypeHandlers() { } #endif // Inserts property to the property container. // priorThis - New property is inserted just prior to this. Available only // in the first variant. There are two versions of this function // to allow this parameter to be either an id or name to // a property. // newproperty - Pointer to the inserted property. wxPropertyGrid will take // ownership of this object. // Returns id for the property, // wxPropertyGrid takes the ownership of the property pointer. // While Append may be faster way to add items, make note that when // both types of data storage (categoric and // non-categoric) are active, Insert becomes even more slow. This is // especially true if current mode is non-categoric. // Example of use: // // append category // wxPGProperty* my_cat_id = propertygrid->Append( // new wxPropertyCategory("My Category") ); // ... // // insert into category - using second variant // wxPGProperty* my_item_id_1 = propertygrid->Insert( // my_cat_id, 0, new wxStringProperty("My String 1") ); // // insert before to first item - using first variant // wxPGProperty* my_item_id_2 = propertygrid->Insert( // my_item_id, new wxStringProperty("My String 2") ); wxPGProperty* Insert( wxPGPropArg priorThis, wxPGProperty* newproperty ); // Inserts property to the property container. //See the other overload for more details. // parent - New property is inserted under this category. Available only // in the second variant. There are two versions of this function // to allow this parameter to be either an id or name to // a property. // index - Index under category. Available only in the second variant. // If index is < 0, property is appended in category. // newproperty - Pointer to the inserted property. wxPropertyGrid will take // ownership of this object. // Returns id for the property. wxPGProperty* Insert( wxPGPropArg parent, int index, wxPGProperty* newproperty ); // Returns true if property is a category. bool IsPropertyCategory( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return p->IsCategory(); } // Returns true if property is enabled. bool IsPropertyEnabled( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return !p->HasFlag(wxPG_PROP_DISABLED); } // Returns true if given property is expanded. // Naturally, always returns false for properties that cannot be expanded. bool IsPropertyExpanded( wxPGPropArg id ) const; // Returns true if property has been modified after value set or modify // flag clear by software. bool IsPropertyModified( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) #if WXWIN_COMPATIBILITY_3_0 return p->HasFlag(wxPG_PROP_MODIFIED)?true:false; #else return p->HasFlag(wxPG_PROP_MODIFIED); #endif } // Returns true if property is selected. bool IsPropertySelected( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return m_pState->DoIsPropertySelected(p); } // Returns true if property is shown (i.e. HideProperty with true not // called for it). bool IsPropertyShown( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return !p->HasFlag(wxPG_PROP_HIDDEN); } // Returns true if property value is set to unspecified. bool IsPropertyValueUnspecified( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return p->IsValueUnspecified(); } // Disables (limit = true) or enables (limit = false) wxTextCtrl editor // of a property, if it is not the sole mean to edit the value. void LimitPropertyEditing( wxPGPropArg id, bool limit = true ); // If state is shown in it's grid, refresh it now. virtual void RefreshGrid( wxPropertyGridPageState* state = NULL ); #if wxPG_INCLUDE_ADVPROPS // Initializes additional property editors (SpinCtrl etc.). Causes // references to most object files in the library, so calling this may // cause significant increase in executable size when linking with static // library. static void RegisterAdditionalEditors(); #else static void RegisterAdditionalEditors() { } #endif // Replaces property with id with newly created property. For example, // this code replaces existing property named "Flags" with one that // will have different set of items: // pg->ReplaceProperty("Flags", // wxFlagsProperty("Flags", wxPG_LABEL, newItems)) // For more info, see wxPropertyGrid::Insert. wxPGProperty* ReplaceProperty( wxPGPropArg id, wxPGProperty* property ); // Flags for wxPropertyGridInterface::SaveEditableState() // and wxPropertyGridInterface::RestoreEditableState(). enum EditableStateFlags { // Include selected property. SelectionState = 0x01, // Include expanded/collapsed property information. ExpandedState = 0x02, // Include scrolled position. ScrollPosState = 0x04, // Include selected page information. // Only applies to wxPropertyGridManager. PageState = 0x08, // Include splitter position. Stored for each page. SplitterPosState = 0x10, // Include description box size. // Only applies to wxPropertyGridManager. DescBoxState = 0x20, // Include all supported user editable state information. // This is usually the default value. AllStates = SelectionState | ExpandedState | ScrollPosState | PageState | SplitterPosState | DescBoxState }; // Restores user-editable state. // See also wxPropertyGridInterface::SaveEditableState(). // src - String generated by SaveEditableState. // restoreStates - Which parts to restore from source string. See @ref // propgridinterface_editablestate_flags "list of editable state // flags". // Returns false if there was problem reading the string. // If some parts of state (such as scrolled or splitter position) fail to // restore correctly, please make sure that you call this function after // wxPropertyGrid size has been set (this may sometimes be tricky when // sizers are used). bool RestoreEditableState( const wxString& src, int restoreStates = AllStates ); // Used to acquire user-editable state (selected property, expanded // properties, scrolled position, splitter positions). // includedStates - Which parts of state to include. See EditableStateFlags. wxString SaveEditableState( int includedStates = AllStates ) const; // Lets user set the strings listed in the choice dropdown of a // wxBoolProperty. Defaults are "True" and "False", so changing them to, // say, "Yes" and "No" may be useful in some less technical applications. static void SetBoolChoices( const wxString& trueChoice, const wxString& falseChoice ); // Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER // window style needs to be used to indicate that columns are auto- // resizable. // Returns false on failure. // You should call this for individual pages of wxPropertyGridManager // (if used). bool SetColumnProportion( unsigned int column, int proportion ); // Returns auto-resize proportion of the given column. int GetColumnProportion( unsigned int column ) const { return m_pState->DoGetColumnProportion(column); } // Sets an attribute for this property. // name - Text identifier of attribute. See @ref propgrid_property_attributes. // value - Value of attribute. // argFlags - Optional. Use wxPG_RECURSE to set the attribute to child // properties recursively. // Setting attribute's value to wxNullVariant will simply remove it // from property's set of attributes. void SetPropertyAttribute( wxPGPropArg id, const wxString& attrName, wxVariant value, long argFlags = 0 ) { DoSetPropertyAttribute(id,attrName,value,argFlags); } // Sets property attribute for all applicable properties. // Be sure to use this method only after all properties have been // added to the grid. void SetPropertyAttributeAll( const wxString& attrName, wxVariant value ); // Sets background colour of a property. // id - Property name or pointer. // colour - New background colour. // flags - Default is wxPG_RECURSE which causes colour to be set recursively. // Omit this flag to only set colour for the property in question // and not any of its children. void SetPropertyBackgroundColour( wxPGPropArg id, const wxColour& colour, int flags = wxPG_RECURSE ); // Resets text and background colours of given property. // id - Property name or pointer. // flags - Default is wxPG_DONT_RECURSE which causes colour to be reset // only for the property in question (for backward compatibility). #if WXWIN_COMPATIBILITY_3_0 void SetPropertyColoursToDefault(wxPGPropArg id); void SetPropertyColoursToDefault(wxPGPropArg id, int flags); #else void SetPropertyColoursToDefault(wxPGPropArg id, int flags = wxPG_DONT_RECURSE); #endif // WXWIN_COMPATIBILITY_3_0 // Sets text colour of a property. // id - Property name or pointer. // colour - New background colour. // flags - Default is wxPG_RECURSE which causes colour to be set recursively. // Omit this flag to only set colour for the property in question // and not any of its children. void SetPropertyTextColour( wxPGPropArg id, const wxColour& col, int flags = wxPG_RECURSE ); // Returns background colour of first cell of a property. wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour()) return p->GetCell(0).GetBgCol(); } // Returns text colour of first cell of a property. wxColour GetPropertyTextColour( wxPGPropArg id ) const { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour()) return p->GetCell(0).GetFgCol(); } // Sets text, bitmap, and colours for given column's cell. // You can set label cell by setting column to 0. // You can use wxPG_LABEL as text to use default text for column. void SetPropertyCell( wxPGPropArg id, int column, const wxString& text = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxColour& fgCol = wxNullColour, const wxColour& bgCol = wxNullColour ); // Sets client data (void*) of a property. // This untyped client data has to be deleted manually. void SetPropertyClientData( wxPGPropArg id, void* clientData ) { wxPG_PROP_ARG_CALL_PROLOG() p->SetClientData(clientData); } // Sets editor for a property. // editor - For builtin editors, use wxPGEditor_X, where X is builtin editor's // name (TextCtrl, Choice, etc. see wxPGEditor documentation for full // list). // For custom editors, use pointer you received from // wxPropertyGrid::RegisterEditorClass(). void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor ) { wxPG_PROP_ARG_CALL_PROLOG() wxCHECK_RET( editor, wxS("unknown/NULL editor") ); p->SetEditor(editor); RefreshProperty(p); } // Sets editor control of a property. As editor argument, use // editor name string, such as "TextCtrl" or "Choice". void SetPropertyEditor( wxPGPropArg id, const wxString& editorName ) { SetPropertyEditor(id,GetEditorByName(editorName)); } // Sets label of a property. // Properties under same parent may have same labels. However, // property names must still remain unique. void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel ); // Sets name of a property. // id - Name or pointer of property which name to change. // newName - New name for property. void SetPropertyName( wxPGPropArg id, const wxString& newName ) { wxPG_PROP_ARG_CALL_PROLOG() m_pState->DoSetPropertyName( p, newName ); } // Sets property (and, recursively, its children) to have read-only value. // In other words, user cannot change the value in the editor, but they // can still copy it. // This is mainly for use with textctrl editor. Not all other editors fully // support it. // By default changes are applied recursively. Set parameter "flags" // to wxPG_DONT_RECURSE to prevent this. void SetPropertyReadOnly( wxPGPropArg id, bool set = true, int flags = wxPG_RECURSE ); // Sets property's value to unspecified. // If it has children (it may be category), then the same thing is done to // them. void SetPropertyValueUnspecified( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG() p->SetValueToUnspecified(); } // Sets property values from a list of wxVariants. void SetPropertyValues( const wxVariantList& list, wxPGPropArg defaultCategory = wxNullProperty ) { wxPGProperty *p; if ( defaultCategory.HasName() ) p = defaultCategory.GetPtr(this); else p = defaultCategory.GetPtr0(); m_pState->DoSetPropertyValues(list, p); } // Sets property values from a list of wxVariants. void SetPropertyValues( const wxVariant& list, wxPGPropArg defaultCategory = wxNullProperty ) { SetPropertyValues(list.GetList(),defaultCategory); } // Associates the help string with property. // By default, text is shown either in the manager's "description" // text box or in the status bar. If extra window style // wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as a // tooltip. void SetPropertyHelpString( wxPGPropArg id, const wxString& helpString ) { wxPG_PROP_ARG_CALL_PROLOG() p->SetHelpString(helpString); } // Set wxBitmap in front of the value. // Bitmap will be scaled to a size returned by // wxPropertyGrid::GetImageSize(); void SetPropertyImage( wxPGPropArg id, wxBitmap& bmp ) { wxPG_PROP_ARG_CALL_PROLOG() p->SetValueImage(bmp); RefreshProperty(p); } // Sets max length of property's text. bool SetPropertyMaxLength( wxPGPropArg id, int maxLen ); #if wxUSE_VALIDATORS // Sets validator of a property. void SetPropertyValidator( wxPGPropArg id, const wxValidator& validator ) { wxPG_PROP_ARG_CALL_PROLOG() p->SetValidator(validator); } #endif // Sets value (long integer) of a property. void SetPropertyValue( wxPGPropArg id, long value ) { wxVariant v(value); SetPropVal( id, v ); } // Sets value (integer) of a property. void SetPropertyValue( wxPGPropArg id, int value ) { wxVariant v((long)value); SetPropVal( id, v ); } // Sets value (floating point) of a property. void SetPropertyValue( wxPGPropArg id, double value ) { wxVariant v(value); SetPropVal( id, v ); } // Sets value (bool) of a property. void SetPropertyValue( wxPGPropArg id, bool value ) { wxVariant v(value); SetPropVal( id, v ); } // Sets value (wchar_t*) of a property. void SetPropertyValue( wxPGPropArg id, const wchar_t* value ) { SetPropertyValueString( id, wxString(value) ); } // Sets value (char*) of a property. void SetPropertyValue( wxPGPropArg id, const char* value ) { SetPropertyValueString( id, wxString(value) ); } // Sets value (string) of a property. void SetPropertyValue( wxPGPropArg id, const wxString& value ) { SetPropertyValueString( id, value ); } // Sets value (wxArrayString) of a property. void SetPropertyValue( wxPGPropArg id, const wxArrayString& value ) { wxVariant v(value); SetPropVal( id, v ); } #if wxUSE_DATETIME // Sets value (wxDateTime) of a property. void SetPropertyValue( wxPGPropArg id, const wxDateTime& value ) { wxVariant v(value); SetPropVal( id, v ); } #endif // Sets value (wxObject*) of a property. void SetPropertyValue( wxPGPropArg id, wxObject* value ) { wxVariant v(value); SetPropVal( id, v ); } // Sets value (wxObject&) of a property. void SetPropertyValue( wxPGPropArg id, wxObject& value ) { wxVariant v(&value); SetPropVal( id, v ); } #if wxUSE_LONGLONG #ifdef wxLongLong_t // Sets value (native 64-bit int) of a property. void SetPropertyValue(wxPGPropArg id, wxLongLong_t value) { wxVariant v = WXVARIANT(wxLongLong(value)); SetPropVal(id, v); } #endif // Sets value (wxLongLong) of a property. void SetPropertyValue( wxPGPropArg id, wxLongLong value ) { wxVariant v = WXVARIANT(value); SetPropVal( id, v ); } #ifdef wxULongLong_t // Sets value (native 64-bit unsigned int) of a property. void SetPropertyValue(wxPGPropArg id, wxULongLong_t value) { wxVariant v = WXVARIANT(wxULongLong(value)); SetPropVal(id, v); } #endif // Sets value (wxULongLong) of a property. void SetPropertyValue( wxPGPropArg id, wxULongLong value ) { wxVariant v = WXVARIANT(value); SetPropVal( id, v ); } #endif // Sets value (wxArrayInt&) of a property. void SetPropertyValue( wxPGPropArg id, const wxArrayInt& value ) { wxVariant v = WXVARIANT(value); SetPropVal( id, v ); } // Sets value (wxString) of a property. // This method uses wxPGProperty::SetValueFromString, which all properties // should implement. This means that there should not be a type error, // and instead the string is converted to property's actual value type. void SetPropertyValueString( wxPGPropArg id, const wxString& value ); // Sets value (wxVariant) of a property. // Use wxPropertyGrid::ChangePropertyValue() instead if you need to run // through validation process and send property change event. void SetPropertyValue( wxPGPropArg id, wxVariant value ) { SetPropVal( id, value ); } // Sets value (wxVariant&) of a property. Same as SetPropertyValue, // but accepts reference. void SetPropVal( wxPGPropArg id, wxVariant& value ); // Adjusts how wxPropertyGrid behaves when invalid value is entered // in a property. // vfbFlags - See wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS for possible values. void SetValidationFailureBehavior( int vfbFlags ); // Sorts all properties recursively. // flags - This can contain any of the following options: // wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their // immediate children. Sorting done by wxPG_AUTO_SORT option // uses this. // See SortChildren, wxPropertyGrid::SetSortFunction void Sort( int flags = 0 ); // Sorts children of a property. // id - Name or pointer to a property. // flags - This can contain any of the following options: // wxPG_RECURSE: Sorts recursively. // See Sort, wxPropertyGrid::SetSortFunction void SortChildren( wxPGPropArg id, int flags = 0 ) { wxPG_PROP_ARG_CALL_PROLOG() m_pState->DoSortChildren(p, flags); } // GetPropertyByName() with nice assertion error message. wxPGProperty* GetPropertyByNameA( const wxString& name ) const; // Returns editor pointer of editor with given name. static wxPGEditor* GetEditorByName( const wxString& editorName ); // NOTE: This function reselects the property and may cause // excess flicker, so to just call Refresh() on a rect // of single property, call DrawItem() instead. virtual void RefreshProperty( wxPGProperty* p ) = 0; protected: bool DoClearSelection( bool validation = false, int selFlags = 0 ); // In derived class, implement to set editable state component with // given name to given value. virtual bool SetEditableStateItem( const wxString& name, wxVariant value ) { wxUnusedVar(name); wxUnusedVar(value); return false; } // In derived class, implement to return editable state component with // given name. virtual wxVariant GetEditableStateItem( const wxString& name ) const { wxUnusedVar(name); return wxNullVariant; } // Returns page state data for given (sub) page (-1 means current page). virtual wxPropertyGridPageState* GetPageState( int pageIndex ) const { if ( pageIndex <= 0 ) return m_pState; return NULL; } virtual bool DoSelectPage( int WXUNUSED(index) ) { return true; } // Default call's m_pState's BaseGetPropertyByName virtual wxPGProperty* DoGetPropertyByName( const wxString& name ) const; // Deriving classes must set this (it must be only or current page). wxPropertyGridPageState* m_pState; // Intermediate version needed due to wxVariant copying inefficiency void DoSetPropertyAttribute( wxPGPropArg id, const wxString& name, wxVariant& value, long argFlags ); // Empty string object to return from member functions returning const // wxString&. wxString m_emptyString; private: // Cannot be GetGrid() due to ambiguity issues. wxPropertyGrid* GetPropertyGrid() { if ( !m_pState ) return NULL; return m_pState->GetGrid(); } // Cannot be GetGrid() due to ambiguity issues. const wxPropertyGrid* GetPropertyGrid() const { if ( !m_pState ) return NULL; return m_pState->GetGrid(); } friend class wxPropertyGrid; friend class wxPropertyGridManager; }; #endif // wxUSE_PROPGRID #endif // __WX_PROPGRID_PROPGRIDIFACE_H__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/manager.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/manager.h // Purpose: wxPropertyGridManager // Author: Jaakko Salli // Modified by: // Created: 2005-01-14 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_MANAGER_H_ #define _WX_PROPGRID_MANAGER_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/propgrid/propgrid.h" #include "wx/dcclient.h" #include "wx/scrolwin.h" #include "wx/toolbar.h" #include "wx/stattext.h" #include "wx/button.h" #include "wx/textctrl.h" #include "wx/dialog.h" #include "wx/headerctrl.h" // ----------------------------------------------------------------------- #ifndef SWIG extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridManagerNameStr[]; #endif // Holder of property grid page information. You can subclass this and // give instance in wxPropertyGridManager::AddPage. It inherits from // wxEvtHandler and can be used to process events specific to this // page (id of events will still be same as manager's). If you don't // want to use it to process all events of the page, you need to // return false in the derived wxPropertyGridPage::IsHandlingAllEvents. // // Please note that wxPropertyGridPage lacks many non-const property // manipulation functions found in wxPropertyGridManager. Please use // parent manager (m_manager member variable) when needed. // // Please note that most member functions are inherited and as such not // documented on this page. This means you will probably also want to read // wxPropertyGridInterface class reference. // // wxPropertyGridPage receives events emitted by its wxPropertyGridManager, but // only those events that are specific to that page. If // wxPropertyGridPage::IsHandlingAllEvents returns false, then unhandled // events are sent to the manager's parent, as usual. class WXDLLIMPEXP_PROPGRID wxPropertyGridPage : public wxEvtHandler, public wxPropertyGridInterface, public wxPropertyGridPageState { friend class wxPropertyGridManager; wxDECLARE_CLASS(wxPropertyGridPage); public: wxPropertyGridPage(); virtual ~wxPropertyGridPage(); // Deletes all properties on page. virtual void Clear() wxOVERRIDE; // Reduces column sizes to minimum possible that contents are still // visibly (naturally some margin space will be applied as well). // Returns minimum size for the page to still display everything. // This function only works properly if size of containing grid was // already fairly large. // Note that you can also get calculated column widths by calling // GetColumnWidth() immediately after this function returns. wxSize FitColumns(); // Returns page index in manager; inline int GetIndex() const; // Returns x-coordinate position of splitter on a page. int GetSplitterPosition( int col = 0 ) const { return GetStatePtr()->DoGetSplitterPosition(col); } // Returns "root property". It does not have name, etc. and it is not // visible. It is only useful for accessing its children. wxPGProperty* GetRoot() const { return GetStatePtr()->DoGetRoot(); } // Returns pointer to contained property grid state. wxPropertyGridPageState* GetStatePtr() { return this; } // Returns pointer to contained property grid state. const wxPropertyGridPageState* GetStatePtr() const { return this; } // Returns id of the tool bar item that represents this page on // wxPropertyGridManager's wxToolBar. int GetToolId() const { return m_toolId; } // Do any member initialization in this method. // Notes: // - Called every time the page is added into a manager. // - You can add properties to the page here. virtual void Init() {} // Return false here to indicate unhandled events should be // propagated to manager's parent, as normal. virtual bool IsHandlingAllEvents() const { return true; } // Called every time page is about to be shown. // Useful, for instance, creating properties just-in-time. virtual void OnShow(); // Refreshes given property on page. virtual void RefreshProperty( wxPGProperty* p ) wxOVERRIDE; // Sets splitter position on page. // Splitter position cannot exceed grid size, and therefore setting it // during form creation may fail as initial grid size is often smaller // than desired splitter position, especially when sizers are being used. void SetSplitterPosition( int splitterPos, int col = 0 ); #if WXWIN_COMPATIBILITY_3_0 // To avoid ambiguity between functions inherited // from both wxPropertyGridInterface and wxPropertyGridPageState using wxPropertyGridInterface::GetPropertyByLabel; #endif // WXWIN_COMPATIBILITY_3_0 protected: // Propagate to other pages. virtual void DoSetSplitterPosition( int pos, int splitterColumn = 0, int flags = wxPG_SPLITTER_REFRESH ) wxOVERRIDE; // Page label (may be referred as name in some parts of documentation). // Can be set in constructor, or passed in // wxPropertyGridManager::AddPage(), but *not* in both. wxString m_label; //virtual bool ProcessEvent( wxEvent& event ); wxPropertyGridManager* m_manager; // Toolbar tool id. Note that this is only valid when the tool bar // exists. int m_toolId; private: bool m_isDefault; // is this base page object? wxDECLARE_EVENT_TABLE(); }; // ----------------------------------------------------------------------- #if wxUSE_HEADERCTRL class wxPGHeaderCtrl; #endif // wxPropertyGridManager is an efficient multi-page version of wxPropertyGrid, // which can optionally have toolbar for mode and page selection, and help // text box. // Use window flags to select components to include. class WXDLLIMPEXP_PROPGRID wxPropertyGridManager : public wxPanel, public wxPropertyGridInterface { wxDECLARE_CLASS(wxPropertyGridManager); friend class wxPropertyGridPage; public: #ifndef SWIG // Two step constructor. // Call Create when this constructor is called to build up the // wxPropertyGridManager. wxPropertyGridManager(); #endif // The default constructor. The styles to be used are styles valid for // the wxWindow. wxPropertyGridManager( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, const wxString& name = wxPropertyGridManagerNameStr ); // Destructor. virtual ~wxPropertyGridManager(); // Creates new property page. Note that the first page is not created // automatically. // label - A label for the page. This may be shown as a toolbar tooltip etc. // bmp - Bitmap image for toolbar. If wxNullBitmap is used, then a built-in // default image is used. // pageObj - wxPropertyGridPage instance. Manager will take ownership of this object. // NULL indicates that a default page instance should be created. // Returns pointer to created page. // If toolbar is used, it is highly recommended that the pages are // added when the toolbar is not turned off using window style flag // switching. wxPropertyGridPage* AddPage( const wxString& label = wxEmptyString, const wxBitmap& bmp = wxNullBitmap, wxPropertyGridPage* pageObj = NULL ) { return InsertPage(-1, label, bmp, pageObj); } // Deletes all all properties and all pages. virtual void Clear() wxOVERRIDE; // Deletes all properties on given page. void ClearPage( int page ); // Forces updating the value of property from the editor control. // Returns true if DoPropertyChanged was actually called. bool CommitChangesFromEditor( wxUint32 flags = 0 ) { return m_pPropGrid->CommitChangesFromEditor(flags); } // Two step creation. // Whenever the control is created without any parameters, use Create to // actually create it. Don't access the control's public methods before // this is called. bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, const wxString& name = wxPropertyGridManagerNameStr ); // Enables or disables (shows/hides) categories according to parameter // enable. // Calling this may not properly update toolbar buttons. bool EnableCategories( bool enable ) { long fl = m_windowStyle | wxPG_HIDE_CATEGORIES; if ( enable ) fl = m_windowStyle & ~(wxPG_HIDE_CATEGORIES); SetWindowStyleFlag(fl); return true; } // Selects page, scrolls and/or expands items to ensure that the // given item is visible. Returns true if something was actually done. bool EnsureVisible( wxPGPropArg id ); // Returns number of columns on given page. By the default, // returns number of columns on current page. int GetColumnCount( int page = -1 ) const; // Returns height of the description text box. int GetDescBoxHeight() const; // Returns pointer to the contained wxPropertyGrid. This does not change // after wxPropertyGridManager has been created, so you can safely obtain // pointer once and use it for the entire lifetime of the manager instance. wxPropertyGrid* GetGrid() { wxASSERT(m_pPropGrid); return m_pPropGrid; } const wxPropertyGrid* GetGrid() const { wxASSERT(m_pPropGrid); return (const wxPropertyGrid*)m_pPropGrid; } // Returns iterator class instance. // Calling this method in wxPropertyGridManager causes run-time assertion // failure. Please only iterate through individual pages or use // CreateVIterator(). wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) { wxFAIL_MSG( wxS("Please only iterate through individual pages ") wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, firstProp ); } wxPropertyGridConstIterator GetIterator(int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL) const { wxFAIL_MSG( wxS("Please only iterate through individual pages ") wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, firstProp ); } // Returns iterator class instance. // Calling this method in wxPropertyGridManager causes run-time assertion // failure. Please only iterate through individual pages or use // CreateVIterator(). wxPropertyGridIterator GetIterator( int flags, int startPos ) { wxFAIL_MSG( wxS("Please only iterate through individual pages ") wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, startPos ); } wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const { wxFAIL_MSG( wxS("Please only iterate through individual pages ") wxS("or use CreateVIterator()") ); return wxPropertyGridInterface::GetIterator( flags, startPos ); } // Similar to GetIterator, but instead returns wxPGVIterator instance, // which can be useful for forward-iterating through arbitrary property // containers. virtual wxPGVIterator GetVIterator( int flags ) const wxOVERRIDE; // Returns currently selected page. wxPropertyGridPage* GetCurrentPage() const { return GetPage(m_selPage); } // Returns page object for given page index. wxPropertyGridPage* GetPage( unsigned int ind ) const { return m_arrPages[ind]; } // Returns page object for given page name. wxPropertyGridPage* GetPage( const wxString& name ) const { return GetPage(GetPageByName(name)); } // Returns index for a page name. // If no match is found, wxNOT_FOUND is returned. int GetPageByName( const wxString& name ) const; // Returns index for a relevant propertygrid state. // If no match is found, wxNOT_FOUND is returned. int GetPageByState( const wxPropertyGridPageState* pstate ) const; protected: // Returns wxPropertyGridPageState of given page, current page's for -1. virtual wxPropertyGridPageState* GetPageState( int page ) const wxOVERRIDE; public: // Returns number of managed pages. size_t GetPageCount() const; // Returns name of given page. const wxString& GetPageName( int index ) const; // Returns "root property" of the given page. It does not have name, etc. // and it is not visible. It is only useful for accessing its children. wxPGProperty* GetPageRoot( int index ) const; // Returns index to currently selected page. int GetSelectedPage() const { return m_selPage; } // Alias for GetSelection(). wxPGProperty* GetSelectedProperty() const { return GetSelection(); } // Shortcut for GetGrid()->GetSelection(). wxPGProperty* GetSelection() const { return m_pPropGrid->GetSelection(); } #if wxUSE_TOOLBAR // Returns a pointer to the toolbar currently associated with the // wxPropertyGridManager (if any). wxToolBar* GetToolBar() const { return m_pToolbar; } #endif // wxUSE_TOOLBAR // Creates new property page. Note that the first page is not created // automatically. // index - Add to this position. -1 will add as the last item. // label - A label for the page. This may be shown as a toolbar tooltip etc. // bmp - Bitmap image for toolbar. If wxNullBitmap is used, then a built-in // default image is used. // pageObj - wxPropertyGridPage instance. Manager will take ownership of this object. // If NULL, default page object is constructed. // Returns pointer to created page. virtual wxPropertyGridPage* InsertPage( int index, const wxString& label, const wxBitmap& bmp = wxNullBitmap, wxPropertyGridPage* pageObj = NULL ); // Returns true if any property on any page has been modified by the user. bool IsAnyModified() const; // Returns true if any property on given page has been modified by the // user. bool IsPageModified( size_t index ) const; // Returns true if property is selected. Since selection is page // based, this function checks every page in the manager. virtual bool IsPropertySelected( wxPGPropArg id ) const; virtual void Refresh( bool eraseBackground = true, const wxRect* rect = (const wxRect*) NULL ) wxOVERRIDE; // Removes a page. // Returns false if it was not possible to remove page in question. virtual bool RemovePage( int page ); // Select and displays a given page. // index - Index of page being selected. Can be -1 to select nothing. void SelectPage( int index ); // Select and displays a given page (by label). void SelectPage( const wxString& label ) { int index = GetPageByName(label); wxCHECK_RET( index >= 0, wxS("No page with such name") ); SelectPage( index ); } // Select and displays a given page. void SelectPage( wxPropertyGridPage* ptr ) { SelectPage( GetPageByState(ptr) ); } // Select a property. bool SelectProperty( wxPGPropArg id, bool focus = false ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) unsigned int flags = wxPG_SEL_DONT_SEND_EVENT; if ( focus ) flags |= wxPG_SEL_FOCUS; return p->GetParentState()->DoSelectProperty(p, flags); } #if wxUSE_HEADERCTRL // Sets a column title. Default title for column 0 is "Property", // and "Value" for column 1. // If header is not shown yet, then calling this // member function will make it visible. void SetColumnTitle( int idx, const wxString& title ); #endif // wxUSE_HEADERCTRL // Sets number of columns on given page (default is current page). // If you use header, then you should always use this // member function to set the column count, instead of // ones present in wxPropertyGrid or wxPropertyGridPage. void SetColumnCount( int colCount, int page = -1 ); // Sets label and text in description box. void SetDescription( const wxString& label, const wxString& content ); // Sets y coordinate of the description box splitter. void SetDescBoxHeight( int ht, bool refresh = true ); // Moves splitter as left as possible, while still allowing all // labels to be shown in full. // subProps - If false, will still allow sub-properties (ie. properties which // parent is not root or category) to be cropped. // allPages - If true, takes labels on all pages into account. void SetSplitterLeft( bool subProps = false, bool allPages = true ); // Moves splitter as left as possible on an individual page, while still allowing all // labels to be shown in full. void SetPageSplitterLeft(int page, bool subProps = false); // Sets splitter position on individual page. // If you use header, then you should always use this // member function to set the splitter position, instead of // ones present in wxPropertyGrid or wxPropertyGridPage. void SetPageSplitterPosition( int page, int pos, int column = 0 ); // Sets splitter position for all pages. // Splitter position cannot exceed grid size, and therefore // setting it during form creation may fail as initial grid // size is often smaller than desired splitter position, // especially when sizers are being used. // If you use header, then you should always use this // member function to set the splitter position, instead of // ones present in wxPropertyGrid or wxPropertyGridPage. void SetSplitterPosition( int pos, int column = 0 ); #if wxUSE_HEADERCTRL // Show or hide the property grid header control. It is hidden // by the default. // Grid may look better if you use wxPG_NO_INTERNAL_BORDER // window style when showing a header. void ShowHeader(bool show = true); #endif protected: // // Subclassing helpers // // Creates property grid for the manager. Reimplement in derived class to // use subclassed wxPropertyGrid. However, if you do this then you // must also use the two-step construction (i.e. default constructor and // Create() instead of constructor with arguments) when creating the // manager. virtual wxPropertyGrid* CreatePropertyGrid() const; public: virtual void RefreshProperty( wxPGProperty* p ) wxOVERRIDE; // // Overridden functions - no documentation required. // void SetId( wxWindowID winid ) wxOVERRIDE; virtual void SetExtraStyle ( long exStyle ) wxOVERRIDE; virtual bool SetFont ( const wxFont& font ) wxOVERRIDE; virtual void SetWindowStyleFlag ( long style ) wxOVERRIDE; virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE; protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual void DoFreeze() wxOVERRIDE; virtual void DoThaw() wxOVERRIDE; // // Event handlers // void OnMouseMove( wxMouseEvent &event ); void OnMouseClick( wxMouseEvent &event ); void OnMouseUp( wxMouseEvent &event ); void OnMouseEntry( wxMouseEvent &event ); void OnPaint( wxPaintEvent &event ); #if wxUSE_TOOLBAR void OnToolbarClick( wxCommandEvent &event ); #endif void OnResize( wxSizeEvent& event ); void OnPropertyGridSelect( wxPropertyGridEvent& event ); void OnPGColDrag( wxPropertyGridEvent& event ); wxPropertyGrid* m_pPropGrid; wxVector<wxPropertyGridPage*> m_arrPages; #if wxUSE_TOOLBAR wxToolBar* m_pToolbar; #endif #if wxUSE_HEADERCTRL wxPGHeaderCtrl* m_pHeaderCtrl; #endif wxStaticText* m_pTxtHelpCaption; wxStaticText* m_pTxtHelpContent; wxPropertyGridPage* m_emptyPage; wxArrayString m_columnLabels; long m_iFlags; // Selected page index. int m_selPage; int m_width; int m_height; int m_extraHeight; int m_splitterY; int m_splitterHeight; int m_dragOffset; wxCursor m_cursorSizeNS; int m_nextDescBoxSize; // Toolbar tool ids for categorized and alphabetic mode selectors. int m_categorizedModeToolId; int m_alphabeticModeToolId; unsigned char m_dragStatus; unsigned char m_onSplitter; bool m_showHeader; virtual wxPGProperty* DoGetPropertyByName( const wxString& name ) const wxOVERRIDE; // Select and displays a given page. virtual bool DoSelectPage( int index ) wxOVERRIDE; // Sets some members to defaults. void Init1(); // Initializes some members. void Init2( int style ); /*#ifdef __WXMSW__ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; #endif*/ virtual bool ProcessEvent( wxEvent& event ) wxOVERRIDE; // Recalculates new positions for components, according to the // given size. void RecalculatePositions( int width, int height ); // (Re)creates/destroys controls, according to the window style bits. void RecreateControls(); void UpdateDescriptionBox( int new_splittery, int new_width, int new_height ); void RepaintDescBoxDecorations( wxDC& dc, int newSplitterY, int newWidth, int newHeight ); void SetDescribedProperty( wxPGProperty* p ); // Reimplement these to handle "descboxheight" state item virtual bool SetEditableStateItem( const wxString& name, wxVariant value ) wxOVERRIDE; virtual wxVariant GetEditableStateItem( const wxString& name ) const wxOVERRIDE; // Reconnect propgrid event handlers. void ReconnectEventHandlers(wxWindowID oldId, wxWindowID newId); private: wxDECLARE_EVENT_TABLE(); }; // ----------------------------------------------------------------------- inline int wxPropertyGridPage::GetIndex() const { if ( !m_manager ) return wxNOT_FOUND; return m_manager->GetPageByState(this); } // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_MANAGER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/property.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/property.h // Purpose: wxPGProperty and related support classes // Author: Jaakko Salli // Modified by: // Created: 2008-08-23 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_PROPERTY_H_ #define _WX_PROPGRID_PROPERTY_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/propgrid/propgriddefs.h" // ----------------------------------------------------------------------- #define wxNullProperty ((wxPGProperty*)NULL) // Contains information relayed to property's OnCustomPaint. struct wxPGPaintData { // wxPropertyGrid const wxPropertyGrid* m_parent; // Normally -1, otherwise index to drop-down list item // that has to be drawn. int m_choiceItem; // Set to drawn width in OnCustomPaint (optional). int m_drawnWidth; // In a measure item call, set this to the height of item // at m_choiceItem index. int m_drawnHeight; }; // space between vertical sides of a custom image #define wxPG_CUSTOM_IMAGE_SPACINGY 1 // space between caption and selection rectangle, #define wxPG_CAPRECTXMARGIN 2 // horizontally and vertically #define wxPG_CAPRECTYMARGIN 1 // Base class for wxPropertyGrid cell renderers. class WXDLLIMPEXP_PROPGRID wxPGCellRenderer : public wxObjectRefData { public: wxPGCellRenderer() : wxObjectRefData() { } virtual ~wxPGCellRenderer() { } // Render flags enum { // We are painting selected item Selected = 0x00010000, // We are painting item in choice popup ChoicePopup = 0x00020000, // We are rendering wxOwnerDrawnComboBox control // (or other owner drawn control, but that is only // officially supported one ATM). Control = 0x00040000, // We are painting a disable property Disabled = 0x00080000, // We are painting selected, disabled, or similar // item that dictates fore- and background colours, // overriding any cell values. DontUseCellFgCol = 0x00100000, DontUseCellBgCol = 0x00200000, DontUseCellColours = DontUseCellFgCol | DontUseCellBgCol }; // Returns true if rendered something in the foreground // (text or bitmap). virtual bool Render( wxDC& dc, const wxRect& rect, const wxPropertyGrid* propertyGrid, wxPGProperty* property, int column, int item, int flags ) const = 0; // Returns size of the image in front of the editable area. // If property is NULL, then this call is for a custom value. // In that case the item is index to wxPropertyGrid's custom values. virtual wxSize GetImageSize( const wxPGProperty* property, int column, int item ) const; // Paints property category selection rectangle. #if WXWIN_COMPATIBILITY_3_0 virtual void DrawCaptionSelectionRect( wxDC& dc, int x, int y, int w, int h ) const; #else virtual void DrawCaptionSelectionRect(wxWindow *win, wxDC& dc, int x, int y, int w, int h) const; #endif // WXWIN_COMPATIBILITY_3_0 // Utility to draw vertically centered text. void DrawText( wxDC& dc, const wxRect& rect, int imageWidth, const wxString& text ) const; // Utility to draw editor's value, or vertically // aligned text if editor is NULL. void DrawEditorValue( wxDC& dc, const wxRect& rect, int xOffset, const wxString& text, wxPGProperty* property, const wxPGEditor* editor ) const; // Utility to render cell bitmap and set text // colour plus bg brush colour. // Returns image width, which, for instance, // can be passed to DrawText. int PreDrawCell( wxDC& dc, const wxRect& rect, const wxPGCell& cell, int flags ) const; // Utility to be called after drawing is done, to revert // whatever changes PreDrawCell() did. // Flags are the same as those passed to PreDrawCell(). void PostDrawCell( wxDC& dc, const wxPropertyGrid* propGrid, const wxPGCell& cell, int flags ) const; }; // Default cell renderer, that can handles the common // scenarios. class WXDLLIMPEXP_PROPGRID wxPGDefaultRenderer : public wxPGCellRenderer { public: virtual bool Render( wxDC& dc, const wxRect& rect, const wxPropertyGrid* propertyGrid, wxPGProperty* property, int column, int item, int flags ) const wxOVERRIDE; virtual wxSize GetImageSize( const wxPGProperty* property, int column, int item ) const wxOVERRIDE; protected: }; class WXDLLIMPEXP_PROPGRID wxPGCellData : public wxObjectRefData { friend class wxPGCell; public: wxPGCellData(); void SetText( const wxString& text ) { m_text = text; m_hasValidText = true; } void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; } void SetFgCol( const wxColour& col ) { m_fgCol = col; } void SetBgCol( const wxColour& col ) { m_bgCol = col; } void SetFont( const wxFont& font ) { m_font = font; } protected: virtual ~wxPGCellData() { } wxString m_text; wxBitmap m_bitmap; wxColour m_fgCol; wxColour m_bgCol; wxFont m_font; // True if m_text is valid and specified bool m_hasValidText; }; // Base class for wxPropertyGrid cell information. class WXDLLIMPEXP_PROPGRID wxPGCell : public wxObject { public: wxPGCell(); wxPGCell(const wxPGCell& other) : wxObject(other) { } wxPGCell( const wxString& text, const wxBitmap& bitmap = wxNullBitmap, const wxColour& fgCol = wxNullColour, const wxColour& bgCol = wxNullColour ); virtual ~wxPGCell() { } wxPGCellData* GetData() { return (wxPGCellData*) m_refData; } const wxPGCellData* GetData() const { return (const wxPGCellData*) m_refData; } bool HasText() const { return (m_refData && GetData()->m_hasValidText); } // Sets empty but valid data to this cell object. void SetEmptyData(); // Merges valid data from srcCell into this. void MergeFrom( const wxPGCell& srcCell ); void SetText( const wxString& text ); void SetBitmap( const wxBitmap& bitmap ); void SetFgCol( const wxColour& col ); // Sets font of the cell. // Because wxPropertyGrid does not support rows of // different height, it makes little sense to change // size of the font. Therefore it is recommended // to use return value of wxPropertyGrid::GetFont() // or wxPropertyGrid::GetCaptionFont() as a basis // for the font that, after modifications, is passed // to this member function. void SetFont( const wxFont& font ); void SetBgCol( const wxColour& col ); const wxString& GetText() const { return GetData()->m_text; } const wxBitmap& GetBitmap() const { return GetData()->m_bitmap; } const wxColour& GetFgCol() const { return GetData()->m_fgCol; } // Returns font of the cell. If no specific font is set for this // cell, then the font will be invalid. const wxFont& GetFont() const { return GetData()->m_font; } const wxColour& GetBgCol() const { return GetData()->m_bgCol; } wxPGCell& operator=( const wxPGCell& other ) { if ( this != &other ) { Ref(other); } return *this; } // Used mostly internally to figure out if this cell is supposed // to have default values when attached to a grid. bool IsInvalid() const { return ( m_refData == NULL ); } private: virtual wxObjectRefData *CreateRefData() const wxOVERRIDE { return new wxPGCellData(); } virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const wxOVERRIDE; }; // ----------------------------------------------------------------------- // wxPGAttributeStorage is somewhat optimized storage for // key=variant pairs (ie. a map). class WXDLLIMPEXP_PROPGRID wxPGAttributeStorage { public: wxPGAttributeStorage(); ~wxPGAttributeStorage(); void Set( const wxString& name, const wxVariant& value ); unsigned int GetCount() const { return (unsigned int) m_map.size(); } wxVariant FindValue( const wxString& name ) const { wxPGHashMapS2P::const_iterator it = m_map.find(name); if ( it != m_map.end() ) { wxVariantData* data = (wxVariantData*) it->second; data->IncRef(); return wxVariant(data, it->first); } return wxVariant(); } typedef wxPGHashMapS2P::const_iterator const_iterator; const_iterator StartIteration() const { return m_map.begin(); } bool GetNext( const_iterator& it, wxVariant& variant ) const { if ( it == m_map.end() ) return false; wxVariantData* data = (wxVariantData*) it->second; data->IncRef(); variant.SetData(data); variant.SetName(it->first); ++it; return true; } protected: wxPGHashMapS2P m_map; }; // ----------------------------------------------------------------------- enum wxPGPropertyFlags { // Indicates bold font. wxPG_PROP_MODIFIED = 0x0001, // Disables ('greyed' text and editor does not activate) property. wxPG_PROP_DISABLED = 0x0002, // Hider button will hide this property. wxPG_PROP_HIDDEN = 0x0004, // This property has custom paint image just in front of its value. // If property only draws custom images into a popup list, then this // flag should not be set. wxPG_PROP_CUSTOMIMAGE = 0x0008, // Do not create text based editor for this property (but button-triggered // dialog and choice are ok). wxPG_PROP_NOEDITOR = 0x0010, // Property is collapsed, ie. it's children are hidden. wxPG_PROP_COLLAPSED = 0x0020, // If property is selected, then indicates that validation failed for pending // value. // If property is not selected, that indicates that the actual property // value has failed validation (NB: this behaviour is not currently supported, // but may be used in future). wxPG_PROP_INVALID_VALUE = 0x0040, // 0x0080, // Switched via SetWasModified(). Temporary flag - only used when // setting/changing property value. wxPG_PROP_WAS_MODIFIED = 0x0200, // If set, then child properties (if any) are private, and should be // "invisible" to the application. wxPG_PROP_AGGREGATE = 0x0400, // If set, then child properties (if any) are copies and should not // be deleted in dtor. wxPG_PROP_CHILDREN_ARE_COPIES = 0x0800, // Classifies this item as a non-category. // Used for faster item type identification. wxPG_PROP_PROPERTY = 0x1000, // Classifies this item as a category. // Used for faster item type identification. wxPG_PROP_CATEGORY = 0x2000, // Classifies this item as a property that has children, //but is not aggregate (i.e. children are not private). wxPG_PROP_MISC_PARENT = 0x4000, // Property is read-only. Editor is still created for wxTextCtrl-based // property editors. For others, editor is not usually created because // they do implement wxTE_READONLY style or equivalent. wxPG_PROP_READONLY = 0x8000, // // NB: FLAGS ABOVE 0x8000 CANNOT BE USED WITH PROPERTY ITERATORS // // Property's value is composed from values of child properties. // This flag cannot be used with property iterators. wxPG_PROP_COMPOSED_VALUE = 0x00010000, // Common value of property is selectable in editor. // This flag cannot be used with property iterators. wxPG_PROP_USES_COMMON_VALUE = 0x00020000, // Property can be set to unspecified value via editor. // Currently, this applies to following properties: // - wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty: // Clear the text field // This flag cannot be used with property iterators. // See wxPGProperty::SetAutoUnspecified(). wxPG_PROP_AUTO_UNSPECIFIED = 0x00040000, // Indicates the bit useable by derived properties. wxPG_PROP_CLASS_SPECIFIC_1 = 0x00080000, // Indicates the bit useable by derived properties. wxPG_PROP_CLASS_SPECIFIC_2 = 0x00100000, // Indicates that the property is being deleted and should be ignored. wxPG_PROP_BEING_DELETED = 0x00200000, // Indicates the bit useable by derived properties. wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000 }; // Topmost flag. #define wxPG_PROP_MAX wxPG_PROP_AUTO_UNSPECIFIED // Property with children must have one of these set, otherwise iterators // will not work correctly. // Code should automatically take care of this, however. #define wxPG_PROP_PARENTAL_FLAGS \ ((wxPGPropertyFlags)(wxPG_PROP_AGGREGATE | \ wxPG_PROP_CATEGORY | \ wxPG_PROP_MISC_PARENT)) // Combination of flags that can be stored by GetFlagsAsString #define wxPG_STRING_STORED_FLAGS \ (wxPG_PROP_DISABLED|wxPG_PROP_HIDDEN|wxPG_PROP_NOEDITOR|wxPG_PROP_COLLAPSED) // ----------------------------------------------------------------------- // wxPGProperty::SetAttribute() and // wxPropertyGridInterface::SetPropertyAttribute() accept one of these as // attribute name argument. // You can use strings instead of constants. However, some of these // constants are redefined to use cached strings which may reduce // your binary size by some amount. // Set default value for property. #define wxPG_ATTR_DEFAULT_VALUE wxS("DefaultValue") // Universal, int or double. Minimum value for numeric properties. #define wxPG_ATTR_MIN wxS("Min") // Universal, int or double. Maximum value for numeric properties. #define wxPG_ATTR_MAX wxS("Max") // Universal, string. When set, will be shown as text after the displayed // text value. Alternatively, if third column is enabled, text will be shown // there (for any type of property). #define wxPG_ATTR_UNITS wxS("Units") // When set, will be shown as 'greyed' text in property's value cell when // the actual displayed value is blank. #define wxPG_ATTR_HINT wxS("Hint") #if wxPG_COMPATIBILITY_1_4 // Ddeprecated. Use "Hint" (wxPG_ATTR_HINT) instead. #define wxPG_ATTR_INLINE_HELP wxS("InlineHelp") #endif // Universal, wxArrayString. Set to enable auto-completion in any // wxTextCtrl-based property editor. #define wxPG_ATTR_AUTOCOMPLETE wxS("AutoComplete") // wxBoolProperty and wxFlagsProperty specific. Value type is bool. // Default value is False. // When set to True, bool property will use check box instead of a // combo box as its editor control. If you set this attribute // for a wxFlagsProperty, it is automatically applied to child // bool properties. #define wxPG_BOOL_USE_CHECKBOX wxS("UseCheckbox") // wxBoolProperty and wxFlagsProperty specific. Value type is bool. // Default value is False. // Set to True for the bool property to cycle value on double click // (instead of showing the popup listbox). If you set this attribute // for a wxFlagsProperty, it is automatically applied to child // bool properties. #define wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING wxS("UseDClickCycling") // wxFloatProperty (and similar) specific, int, default -1. // Sets the (max) precision used when floating point value is rendered as // text. The default -1 means infinite precision. #define wxPG_FLOAT_PRECISION wxS("Precision") // The text will be echoed as asterisks (wxTE_PASSWORD will be passed // to textctrl etc.). #define wxPG_STRING_PASSWORD wxS("Password") // Define base used by a wxUIntProperty. Valid constants are // wxPG_BASE_OCT, wxPG_BASE_DEC, wxPG_BASE_HEX and wxPG_BASE_HEXL // (lowercase characters). #define wxPG_UINT_BASE wxS("Base") // Define prefix rendered to wxUIntProperty. Accepted constants // wxPG_PREFIX_NONE, wxPG_PREFIX_0x, and wxPG_PREFIX_DOLLAR_SIGN. // Note: // Only wxPG_PREFIX_NONE works with Decimal and Octal numbers. #define wxPG_UINT_PREFIX wxS("Prefix") // wxFileProperty/wxImageFileProperty specific, wxChar*, default is // detected/varies. // Sets the wildcard used in the triggered wxFileDialog. Format is the same. #define wxPG_FILE_WILDCARD wxS("Wildcard") // wxFileProperty/wxImageFileProperty specific, int, default 1. // When 0, only the file name is shown (i.e. drive and directory are hidden). #define wxPG_FILE_SHOW_FULL_PATH wxS("ShowFullPath") // Specific to wxFileProperty and derived properties, wxString, default empty. // If set, then the filename is shown relative to the given path string. #define wxPG_FILE_SHOW_RELATIVE_PATH wxS("ShowRelativePath") // Specific to wxFileProperty and derived properties, wxString, // default is empty. // Sets the initial path of where to look for files. #define wxPG_FILE_INITIAL_PATH wxS("InitialPath") // Specific to wxFileProperty and derivatives, wxString, default is empty. // Sets a specific title for the dir dialog. #define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle") // Specific to wxFileProperty and derivatives, long, default is 0. // Sets a specific wxFileDialog style for the file dialog, e.g. ::wxFD_SAVE. #define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle") // Specific to wxDirProperty, wxString, default is empty. // Sets a specific message for the dir dialog. #define wxPG_DIR_DIALOG_MESSAGE wxS("DialogMessage") // wxArrayStringProperty's string delimiter character. If this is // a quotation mark or hyphen, then strings will be quoted instead // (with given character). // Default delimiter is quotation mark. #define wxPG_ARRAY_DELIMITER wxS("Delimiter") // Sets displayed date format for wxDateProperty. #define wxPG_DATE_FORMAT wxS("DateFormat") // Sets wxDatePickerCtrl window style used with wxDateProperty. Default // is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE will enable // better unspecified value support in the editor #define wxPG_DATE_PICKER_STYLE wxS("PickerStyle") #if wxUSE_SPINBTN // SpinCtrl editor, int or double. How much number changes when button is // pressed (or up/down on keyboard). #define wxPG_ATTR_SPINCTRL_STEP wxS("Step") // SpinCtrl editor, bool. If true, value wraps at Min/Max. #define wxPG_ATTR_SPINCTRL_WRAP wxS("Wrap") // SpinCtrl editor, bool. If true, moving mouse when one of the spin // buttons is depressed rapidly changing "spin" value. #define wxPG_ATTR_SPINCTRL_MOTION wxS("MotionSpin") #endif // wxUSE_SPINBTN // wxMultiChoiceProperty, int. // If 0, no user strings allowed. If 1, user strings appear before list // strings. If 2, user strings appear after list string. #define wxPG_ATTR_MULTICHOICE_USERSTRINGMODE wxS("UserStringMode") // wxColourProperty and its kind, int, default 1. // Setting this attribute to 0 hides custom colour from property's list of // choices. #define wxPG_COLOUR_ALLOW_CUSTOM wxS("AllowCustom") // wxColourProperty and its kind: Set to True in order to support editing // alpha colour component. #define wxPG_COLOUR_HAS_ALPHA wxS("HasAlpha") // Redefine attribute macros to use cached strings #undef wxPG_ATTR_DEFAULT_VALUE #define wxPG_ATTR_DEFAULT_VALUE wxPGGlobalVars->m_strDefaultValue #undef wxPG_ATTR_MIN #define wxPG_ATTR_MIN wxPGGlobalVars->m_strMin #undef wxPG_ATTR_MAX #define wxPG_ATTR_MAX wxPGGlobalVars->m_strMax #undef wxPG_ATTR_UNITS #define wxPG_ATTR_UNITS wxPGGlobalVars->m_strUnits #undef wxPG_ATTR_HINT #define wxPG_ATTR_HINT wxPGGlobalVars->m_strHint #if wxPG_COMPATIBILITY_1_4 #undef wxPG_ATTR_INLINE_HELP #define wxPG_ATTR_INLINE_HELP wxPGGlobalVars->m_strInlineHelp #endif // ----------------------------------------------------------------------- // Data of a single wxPGChoices choice. class WXDLLIMPEXP_PROPGRID wxPGChoiceEntry : public wxPGCell { public: wxPGChoiceEntry(); wxPGChoiceEntry(const wxPGChoiceEntry& other) : wxPGCell(other) { m_value = other.m_value; } wxPGChoiceEntry( const wxString& label, int value = wxPG_INVALID_VALUE ) : wxPGCell(), m_value(value) { SetText(label); } virtual ~wxPGChoiceEntry() { } void SetValue( int value ) { m_value = value; } int GetValue() const { return m_value; } wxPGChoiceEntry& operator=( const wxPGChoiceEntry& other ) { if ( this != &other ) { Ref(other); } m_value = other.m_value; return *this; } protected: int m_value; }; typedef void* wxPGChoicesId; class WXDLLIMPEXP_PROPGRID wxPGChoicesData : public wxObjectRefData { friend class wxPGChoices; public: // Constructor sets m_refCount to 1. wxPGChoicesData(); void CopyDataFrom( wxPGChoicesData* data ); wxPGChoiceEntry& Insert( int index, const wxPGChoiceEntry& item ); // Delete all entries void Clear(); unsigned int GetCount() const { return (unsigned int) m_items.size(); } const wxPGChoiceEntry& Item( unsigned int i ) const { wxASSERT_MSG( i < GetCount(), wxS("invalid index") ); return m_items[i]; } wxPGChoiceEntry& Item( unsigned int i ) { wxASSERT_MSG( i < GetCount(), wxS("invalid index") ); return m_items[i]; } private: wxVector<wxPGChoiceEntry> m_items; protected: virtual ~wxPGChoicesData(); }; #define wxPGChoicesEmptyData ((wxPGChoicesData*)NULL) // Helper class for managing choices of wxPropertyGrid properties. // Each entry can have label, value, bitmap, text colour, and background // colour. // wxPGChoices uses reference counting, similar to other wxWidgets classes. // This means that assignment operator and copy constructor only copy the // reference and not the actual data. Use Copy() member function to create // a real copy. // If you do not specify value for entry, index is used. class WXDLLIMPEXP_PROPGRID wxPGChoices { public: typedef long ValArrItem; // Default constructor. wxPGChoices() { Init(); } // Copy constructor, uses reference counting. To create a real copy, // use Copy() member function instead. wxPGChoices( const wxPGChoices& a ) { if ( a.m_data != wxPGChoicesEmptyData ) { m_data = a.m_data; m_data->IncRef(); } else { Init(); } } // Constructor. // count - Number of labels. // labels - Labels themselves. // values - Values for choices. If NULL, indexes are used. wxPGChoices(size_t count, const wxString* labels, const long* values = NULL) { Init(); Add(count, labels, values); } // Constructor overload taking wxChar strings, provided mostly for // compatibility. // labels - Labels for choices, NULL-terminated. // values - Values for choices. If NULL, indexes are used. wxPGChoices( const wxChar* const* labels, const long* values = NULL ) { Init(); Add(labels,values); } // Constructor. // labels - Labels for choices. // values - Values for choices. If empty, indexes are used. wxPGChoices( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() ) { Init(); Add(labels,values); } // Simple interface constructor. wxPGChoices( wxPGChoicesData* data ) { wxASSERT(data); m_data = data; data->IncRef(); } // Destructor. ~wxPGChoices() { Free(); } // Adds to current. // If did not have own copies, creates them now. If was empty, identical // to set except that creates copies. void Add(size_t count, const wxString* labels, const long* values = NULL); // Overload taking wxChar strings, provided mostly for compatibility. // labels - Labels for added choices, NULL-terminated. // values - Values for added choices. If empty, relevant entry indexes are used. void Add( const wxChar* const* labels, const ValArrItem* values = NULL ); // Version that works with wxArrayString and wxArrayInt. void Add( const wxArrayString& arr, const wxArrayInt& arrint = wxArrayInt() ); // Adds a single choice. // label - Label for added choice. // value - Value for added choice. If unspecified, index is used. wxPGChoiceEntry& Add( const wxString& label, int value = wxPG_INVALID_VALUE ); // Adds a single item, with bitmap. wxPGChoiceEntry& Add( const wxString& label, const wxBitmap& bitmap, int value = wxPG_INVALID_VALUE ); // Adds a single item with full entry information. wxPGChoiceEntry& Add( const wxPGChoiceEntry& entry ) { return Insert(entry, -1); } // Adds a single item, sorted. wxPGChoiceEntry& AddAsSorted( const wxString& label, int value = wxPG_INVALID_VALUE ); // Assigns choices data, using reference counting. To create a real copy, // use Copy() member function instead. void Assign( const wxPGChoices& a ) { AssignData(a.m_data); } // Assigns data from another set of choices. void AssignData( wxPGChoicesData* data ); // Delete all choices. void Clear(); // Returns a real copy of the choices. wxPGChoices Copy() const { wxPGChoices dst; dst.EnsureData(); dst.m_data->CopyDataFrom(m_data); return dst; } void EnsureData() { if ( m_data == wxPGChoicesEmptyData ) m_data = new wxPGChoicesData(); } // Gets a unsigned number identifying this list. wxPGChoicesId GetId() const { return (wxPGChoicesId) m_data; } // Returns label of item. const wxString& GetLabel( unsigned int ind ) const { return Item(ind).GetText(); } // Returns number of items. unsigned int GetCount () const { if ( !m_data ) return 0; return m_data->GetCount(); } // Returns value of item. int GetValue( unsigned int ind ) const { return Item(ind).GetValue(); } // Returns array of values matching the given strings. Unmatching strings // result in wxPG_INVALID_VALUE entry in array. wxArrayInt GetValuesForStrings( const wxArrayString& strings ) const; // Returns array of indices matching given strings. Unmatching strings // are added to 'unmatched', if not NULL. wxArrayInt GetIndicesForStrings( const wxArrayString& strings, wxArrayString* unmatched = NULL ) const; // Returns index of item with given label. int Index( const wxString& str ) const; // Returns index of item with given value. int Index( int val ) const; // Inserts a single item. wxPGChoiceEntry& Insert( const wxString& label, int index, int value = wxPG_INVALID_VALUE ); // Inserts a single item with full entry information. wxPGChoiceEntry& Insert( const wxPGChoiceEntry& entry, int index ); // Returns false if this is a constant empty set of choices, // which should not be modified. bool IsOk() const { return ( m_data != wxPGChoicesEmptyData ); } const wxPGChoiceEntry& Item( unsigned int i ) const { wxASSERT( IsOk() ); return m_data->Item(i); } // Returns item at given index. wxPGChoiceEntry& Item( unsigned int i ) { wxASSERT( IsOk() ); return m_data->Item(i); } // Removes count items starting at position nIndex. void RemoveAt(size_t nIndex, size_t count = 1); // Sets contents from lists of strings and values. // Does not create copies for itself. // TODO: Deprecate. void Set(size_t count, const wxString* labels, const long* values = NULL) { Free(); Add(count, labels, values); } void Set( const wxChar* const* labels, const long* values = NULL ) { Free(); Add(labels,values); } // Sets contents from lists of strings and values. // Version that works with wxArrayString and wxArrayInt. void Set( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() ) { Free(); Add(labels,values); } // Creates exclusive copy of current choices void AllocExclusive(); // Returns data, increases refcount. wxPGChoicesData* GetData() { wxASSERT( m_data->GetRefCount() != -1 ); m_data->IncRef(); return m_data; } // Returns plain data ptr - no refcounting stuff is done. wxPGChoicesData* GetDataPtr() const { return m_data; } // Changes ownership of data to you. wxPGChoicesData* ExtractData() { wxPGChoicesData* data = m_data; m_data = wxPGChoicesEmptyData; return data; } // Returns array of choice labels. wxArrayString GetLabels() const; void operator= (const wxPGChoices& a) { if (this != &a) AssignData(a.m_data); } wxPGChoiceEntry& operator[](unsigned int i) { return Item(i); } const wxPGChoiceEntry& operator[](unsigned int i) const { return Item(i); } protected: wxPGChoicesData* m_data; void Init(); void Free(); }; // ----------------------------------------------------------------------- // wxPGProperty is base class for all wxPropertyGrid properties. class WXDLLIMPEXP_PROPGRID wxPGProperty : public wxObject { friend class wxPropertyGrid; friend class wxPropertyGridInterface; friend class wxPropertyGridPageState; friend class wxPropertyGridPopulator; friend class wxStringProperty; // Proper "<composed>" support requires this wxDECLARE_ABSTRACT_CLASS(wxPGProperty); public: typedef wxUint32 FlagType; // Default constructor. wxPGProperty(); // Constructor. // All non-abstract property classes should have a constructor with // the same first two arguments as this one. wxPGProperty( const wxString& label, const wxString& name ); // Virtual destructor. // It is customary for derived properties to implement this. virtual ~wxPGProperty(); // This virtual function is called after m_value has been set. // Remarks: // - If m_value was set to Null variant (i.e. unspecified value), // OnSetValue() will not be called. // - m_value may be of any variant type. Typically properties internally // support only one variant type, and as such OnSetValue() provides a // good opportunity to convert // supported values into internal type. // - Default implementation does nothing. virtual void OnSetValue(); // Override this to return something else than m_value as the value. virtual wxVariant DoGetValue() const { return m_value; } // Implement this function in derived class to check the value. // Return true if it is ok. Returning false prevents property change // events from occurring. // Remark: Default implementation always returns true. virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; // Converts text into wxVariant value appropriate for this property. // Prameters: // variant - On function entry this is the old value (should not be // wxNullVariant in normal cases). Translated value must be assigned // back to it. // text - Text to be translated into variant. // argFlags - If wxPG_FULL_VALUE is set, returns complete, storable value instead // of displayable one (they may be different). // If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of // composite property string value (as generated by ValueToString() // called with this same flag). // Returns true if resulting wxVariant value was different. // Default implementation converts semicolon delimited tokens into // child values. Only works for properties with children. // You might want to take into account that m_value is Null variant // if property value is unspecified (which is usually only case if // you explicitly enabled that sort behaviour). virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; // Converts integer (possibly a choice selection) into wxVariant value // appropriate for this property. // Parameters: // variant - On function entry this is the old value (should not be wxNullVariant // in normal cases). Translated value must be assigned back to it. // number - Integer to be translated into variant. // argFlags - If wxPG_FULL_VALUE is set, returns complete, storable value // instead of displayable one. // Returns true if resulting wxVariant value was different. // Remarks // - If property is not supposed to use choice or spinctrl or other editor // with int-based value, it is not necessary to implement this method. // - Default implementation simply assign given int to m_value. // - If property uses choice control, and displays a dialog on some choice // items, then it is preferred to display that dialog in IntToValue // instead of OnEvent. // - You might want to take into account that m_value is Null variant // if property value is unspecified (which is usually only case if // you explicitly enabled that sort behaviour). virtual bool IntToValue( wxVariant& value, int number, int argFlags = 0 ) const; // Converts property value into a text representation. // Parameters: // value - Value to be converted. // argFlags - If 0 (default value), then displayed string is returned. // If wxPG_FULL_VALUE is set, returns complete, storable string value // instead of displayable. If wxPG_EDITABLE_VALUE is set, returns // string value that must be editable in textctrl. If // wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to // display as a part of string property's composite text // representation. // Default implementation calls GenerateComposedValue(). virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; // Converts string to a value, and if successful, calls SetValue() on it. // Default behaviour is to do nothing. // Returns true if value was changed. bool SetValueFromString( const wxString& text, int flags = wxPG_PROGRAMMATIC_VALUE ); // Converts integer to a value, and if successful, calls SetValue() on it. // Default behaviour is to do nothing. // Parameters: // value - Int to get the value from. // flags - If has wxPG_FULL_VALUE, then the value given is a actual value // and not an index. // Returns true if value was changed. bool SetValueFromInt( long value, int flags = 0 ); // Returns size of the custom painted image in front of property. // This method must be overridden to return non-default value if // OnCustomPaint is to be called. // item - Normally -1, but can be an index to the property's list of items. // Remarks: // - Default behaviour is to return wxSize(0,0), which means no image. // - Default image width or height is indicated with dimension -1. // - You can also return wxPG_DEFAULT_IMAGE_SIZE, i.e. wxDefaultSize. virtual wxSize OnMeasureImage( int item = -1 ) const; // Events received by editor widgets are processed here. // Note that editor class usually processes most events. Some, such as // button press events of TextCtrlAndButton class, can be handled here. // Also, if custom handling for regular events is desired, then that can // also be done (for example, wxSystemColourProperty custom handles // wxEVT_CHOICE to display colour picker dialog when // 'custom' selection is made). // If the event causes value to be changed, SetValueInEvent() // should be called to set the new value. // event - Associated wxEvent. // Should return true if any changes in value should be reported. // If property uses choice control, and displays a dialog on some choice // items, then it is preferred to display that dialog in IntToValue // instead of OnEvent. virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* wnd_primary, wxEvent& event ); // Called after value of a child property has been altered. Must return // new value of the whole property (after any alterations warranted by // child's new value). // Note that this function is usually called at the time that value of // this property, or given child property, is still pending for change, // and as such, result of GetValue() or m_value should not be relied // on. // Parameters: // thisValue - Value of this property. Changed value should be returned // (in previous versions of wxPropertyGrid it was only necessary to // write value back to this argument). // childIndex - Index of child changed (you can use Item(childIndex) // to get child property). // childValue - (Pending) value of the child property. // Returns modified value of the whole property. virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const; // Returns pointer to an instance of used editor. virtual const wxPGEditor* DoGetEditorClass() const; // Returns pointer to the wxValidator that should be used // with the editor of this property (NULL for no validator). // Setting validator explicitly via SetPropertyValidator // will override this. // You can get common filename validator by returning // wxFileProperty::GetClassValidator(). wxDirProperty, // for example, uses it. virtual wxValidator* DoGetValidator () const; // Override to paint an image in front of the property value text or // drop-down list item (but only if wxPGProperty::OnMeasureImage is // overridden as well). // If property's OnMeasureImage() returns size that has height != 0 but // less than row height ( < 0 has special meanings), wxPropertyGrid calls // this method to draw a custom image in a limited area in front of the // editor control or value text/graphics, and if control has drop-down // list, then the image is drawn there as well (even in the case // OnMeasureImage() returned higher height than row height). // NOTE: Following applies when OnMeasureImage() returns a "flexible" // height ( using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable // height items: If rect.x is < 0, then this is a measure item call, which // means that dc is invalid and only thing that should be done is to set // paintdata.m_drawnHeight to the height of the image of item at index // paintdata.m_choiceItem. This call may be done even as often as once // every drop-down popup show. // Parameters: // dc - wxDC to paint on. // rect - Box reserved for custom graphics. Includes surrounding rectangle, // if any. If x is < 0, then this is a measure item call (see above). // paintdata - wxPGPaintData structure with much useful data. // Remarks: // - You can actually exceed rect width, but if you do so then // paintdata.m_drawnWidth must be set to the full width drawn in // pixels. // - Due to technical reasons, rect's height will be default even if // custom height was reported during measure call. // - Brush is guaranteed to be default background colour. It has been // already used to clear the background of area being painted. It // can be modified. // - Pen is guaranteed to be 1-wide 'black' (or whatever is the proper // colour) pen for drawing framing rectangle. It can be changed as // well. // See ValueToString() virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ); // Returns used wxPGCellRenderer instance for given property column // (label=0, value=1). // Default implementation returns editor's renderer for all columns. virtual wxPGCellRenderer* GetCellRenderer( int column ) const; // Returns which choice is currently selected. Only applies to properties // which have choices. // Needs to be reimplemented in derived class if property value does not // map directly to a choice. Integer as index, bool, and string usually do. virtual int GetChoiceSelection() const; // Refresh values of child properties. // Automatically called after value is set. virtual void RefreshChildren(); // Reimplement this member function to add special handling for // attributes of this property. // Return false to have the attribute automatically stored in // m_attributes. Default implementation simply does that and // nothing else. // To actually set property attribute values from the // application, use wxPGProperty::SetAttribute() instead. virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); // Returns value of an attribute. // Override if custom handling of attributes is needed. // Default implementation simply return NULL variant. virtual wxVariant DoGetAttribute( const wxString& name ) const; // Returns instance of a new wxPGEditorDialogAdapter instance, which is // used when user presses the (optional) button next to the editor control; // Default implementation returns NULL (ie. no action is generated when // button is pressed). virtual wxPGEditorDialogAdapter* GetEditorDialog() const; // Called whenever validation has failed with given pending value. // If you implement this in your custom property class, please // remember to call the baser implementation as well, since they // may use it to revert property into pre-change state. virtual void OnValidationFailure( wxVariant& pendingValue ); // Append a new choice to property's list of choices. int AddChoice( const wxString& label, int value = wxPG_INVALID_VALUE ) { return InsertChoice(label, wxNOT_FOUND, value); } // Returns true if children of this property are component values (for // instance, points size, face name, and is_underlined are component // values of a font). bool AreChildrenComponents() const { return (m_flags & (wxPG_PROP_COMPOSED_VALUE|wxPG_PROP_AGGREGATE)) != 0; } // Deletes children of the property. void DeleteChildren(); // Removes entry from property's wxPGChoices and editor control (if it is // active). // If selected item is deleted, then the value is set to unspecified. void DeleteChoice( int index ); // Enables or disables the property. Disabled property usually appears // as having grey text. // See wxPropertyGridInterface::EnableProperty() void Enable( bool enable = true ); // Call to enable or disable usage of common value (integer value that can // be selected for properties instead of their normal values) for this // property. // Common values are disabled by the default for all properties. void EnableCommonValue( bool enable = true ) { if ( enable ) SetFlag( wxPG_PROP_USES_COMMON_VALUE ); else ClearFlag( wxPG_PROP_USES_COMMON_VALUE ); } // Composes text from values of child properties. wxString GenerateComposedValue() const { wxString s; DoGenerateComposedValue(s); return s; } // Returns property's label. const wxString& GetLabel() const { return m_label; } // Returns property's name with all (non-category, non-root) parents. wxString GetName() const; // Returns property's base name (i.e. parent's name is not added // in any case). const wxString& GetBaseName() const { return m_name; } // Returns read-only reference to property's list of choices. const wxPGChoices& GetChoices() const { return m_choices; } // Returns coordinate to the top y of the property. Note that the // position of scrollbars is not taken into account. int GetY() const; // Returns property's value. wxVariant GetValue() const { return DoGetValue(); } // Returns reference to the internal stored value. GetValue is preferred // way to get the actual value, since GetValueRef ignores DoGetValue, // which may override stored value. wxVariant& GetValueRef() { return m_value; } const wxVariant& GetValueRef() const { return m_value; } // Helper function (for wxPython bindings and such) for settings protected // m_value. wxVariant GetValuePlain() const { return m_value; } // Returns text representation of property's value. // argFlags - If 0 (default value), then displayed string is returned. // If wxPG_FULL_VALUE is set, returns complete, storable string value // instead of displayable. If wxPG_EDITABLE_VALUE is set, returns // string value that must be editable in textctrl. If // wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to // display as a part of string property's composite text // representation. // In older versions, this function used to be overridden to convert // property's value into a string representation. This function is // now handled by ValueToString(), and overriding this function now // will result in run-time assertion failure. virtual wxString GetValueAsString( int argFlags = 0 ) const; #if wxPG_COMPATIBILITY_1_4 // Synonymous to GetValueAsString(). wxDEPRECATED( wxString GetValueString( int argFlags = 0 ) const ); #endif // Returns wxPGCell of given column. // Const version of this member function returns 'default' // wxPGCell object if the property itself didn't hold // cell data. const wxPGCell& GetCell( unsigned int column ) const; // Returns wxPGCell of given column, creating one if necessary. wxPGCell& GetCell( unsigned int column ) { return GetOrCreateCell(column); } // Returns wxPGCell of given column, creating one if necessary. wxPGCell& GetOrCreateCell( unsigned int column ); // Return number of displayed common values for this property. int GetDisplayedCommonValueCount() const; // Returns property's displayed text. wxString GetDisplayedString() const { return GetValueAsString(0); } // Returns property's hint text (shown in empty value cell). inline wxString GetHintText() const; // Returns property grid where property lies. wxPropertyGrid* GetGrid() const; // Returns owner wxPropertyGrid, but only if one is currently // on a page displaying this property. wxPropertyGrid* GetGridIfDisplayed() const; // Returns highest level non-category, non-root parent. Useful when you // have nested properties with children. // Thus, if immediate parent is root or category, this will return the // property itself. wxPGProperty* GetMainParent() const; // Return parent of property. wxPGProperty* GetParent() const { return m_parent; } // Returns true if property has editable wxTextCtrl when selected. // Although disabled properties do not displayed editor, they still // Returns true here as being disabled is considered a temporary // condition (unlike being read-only or having limited editing enabled). bool IsTextEditable() const; // Returns true if property's value is considered unspecified. // This usually means that value is Null variant. bool IsValueUnspecified() const { return m_value.IsNull(); } #if WXWIN_COMPATIBILITY_3_0 // Returns non-zero if property has given flag set. FlagType HasFlag( wxPGPropertyFlags flag ) const { return ( m_flags & flag ); } #else // Returns true if property has given flag set. bool HasFlag(wxPGPropertyFlags flag) const { return (m_flags & flag) != 0; } #endif // Returns true if property has given flag set. bool HasFlag(FlagType flag) const { return (m_flags & flag) != 0; } // Returns true if property has all given flags set. bool HasFlagsExact(FlagType flags) const { return (m_flags & flags) == flags; } // Returns comma-delimited string of property attributes. const wxPGAttributeStorage& GetAttributes() const { return m_attributes; } // Returns m_attributes as list wxVariant. wxVariant GetAttributesAsList() const; #if WXWIN_COMPATIBILITY_3_0 // Returns property flags. wxDEPRECATED_MSG("Use HasFlag or HasFlagsExact functions instead.") FlagType GetFlags() const { return m_flags; } #endif // Returns wxPGEditor that will be used and created when // property becomes selected. Returns more accurate value // than DoGetEditorClass(). const wxPGEditor* GetEditorClass() const; // Returns value type used by this property. wxString GetValueType() const { return m_value.GetType(); } // Returns editor used for given column. NULL for no editor. const wxPGEditor* GetColumnEditor( int column ) const { if ( column == 1 ) return GetEditorClass(); return NULL; } // Returns common value selected for this property. -1 for none. int GetCommonValue() const { return m_commonValue; } // Returns true if property has even one visible child. bool HasVisibleChildren() const; // Use this member function to add independent (i.e. regular) children to // a property. // Returns inserted childProperty. // wxPropertyGrid is not automatically refreshed by this function. wxPGProperty* InsertChild( int index, wxPGProperty* childProperty ); // Inserts a new choice to property's list of choices. int InsertChoice( const wxString& label, int index, int value = wxPG_INVALID_VALUE ); // Returns true if this property is actually a wxPropertyCategory. bool IsCategory() const { return (m_flags & wxPG_PROP_CATEGORY) != 0; } // Returns true if this property is actually a wxRootProperty. bool IsRoot() const { return (m_parent == NULL); } // Returns true if this is a sub-property. bool IsSubProperty() const { wxPGProperty* parent = (wxPGProperty*)m_parent; if ( parent && !parent->IsCategory() ) return true; return false; } // Returns last visible sub-property, recursively. const wxPGProperty* GetLastVisibleSubItem() const; // Returns property's default value. If property's value type is not // a built-in one, and "DefaultValue" attribute is not defined, then // this function usually returns Null variant. wxVariant GetDefaultValue() const; // Returns maximum allowed length of property's text value. int GetMaxLength() const { return (int) m_maxLen; } // Determines, recursively, if all children are not unspecified. // pendingList - Assumes members in this wxVariant list as pending // replacement values. bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; // Updates composed values of parent non-category properties, recursively. // Returns topmost property updated. // Must not call SetValue() (as can be called in it). wxPGProperty* UpdateParentValues(); // Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES. bool UsesAutoUnspecified() const { return (m_flags & wxPG_PROP_AUTO_UNSPECIFIED) != 0; } // Returns bitmap that appears next to value text. Only returns non-@NULL // bitmap if one was set with SetValueImage(). wxBitmap* GetValueImage() const { return m_valueBitmap; } // Returns property attribute value, null variant if not found. wxVariant GetAttribute( const wxString& name ) const; // Returns named attribute, as string, if found. // Otherwise defVal is returned. wxString GetAttribute( const wxString& name, const wxString& defVal ) const; // Returns named attribute, as long, if found. // Otherwise defVal is returned. long GetAttributeAsLong( const wxString& name, long defVal ) const; // Returns named attribute, as double, if found. // Otherwise defVal is returned. double GetAttributeAsDouble( const wxString& name, double defVal ) const; unsigned int GetDepth() const { return (unsigned int)m_depth; } // Gets flags as a'|' delimited string. Note that flag names are not // prepended with 'wxPG_PROP_'. // flagmask - String will only be made to include flags combined by this parameter. wxString GetFlagsAsString( FlagType flagsMask ) const; // Returns position in parent's array. unsigned int GetIndexInParent() const { return (unsigned int)m_arrIndex; } // Hides or reveals the property. // hide - true for hide, false for reveal. // flags - By default changes are applied recursively. Set this // parameter to wxPG_DONT_RECURSE to prevent this. bool Hide( bool hide, int flags = wxPG_RECURSE ); // Returns true if property has visible children. bool IsExpanded() const { return (!(m_flags & wxPG_PROP_COLLAPSED) && GetChildCount()); } // Returns true if all parents expanded. bool IsVisible() const; // Returns true if property is enabled. bool IsEnabled() const { return !(m_flags & wxPG_PROP_DISABLED); } // If property's editor is created this forces its recreation. // Useful in SetAttribute etc. Returns true if actually did anything. bool RecreateEditor(); // If property's editor is active, then update it's value. void RefreshEditor(); // Sets an attribute for this property. // name - Text identifier of attribute. See @ref propgrid_property_attributes. // value - Value of attribute. // Setting attribute's value to Null variant will simply remove it // from property's set of attributes. void SetAttribute( const wxString& name, wxVariant value ); void SetAttributes( const wxPGAttributeStorage& attributes ); // Set if user can change the property's value to unspecified by // modifying the value of the editor control (usually by clearing // it). Currently, this can work with following properties: // wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty. // enable - Whether to enable or disable this behaviour (it is disabled // by default). void SetAutoUnspecified( bool enable = true ) { ChangeFlag(wxPG_PROP_AUTO_UNSPECIFIED, enable); } // Sets property's background colour. // colour - Background colour to use. // flags - Default is wxPG_RECURSE which causes colour to be set recursively. // Omit this flag to only set colour for the property in question // and not any of its children. void SetBackgroundColour( const wxColour& colour, int flags = wxPG_RECURSE ); // Sets property's text colour. // colour - Text colour to use. // flags - Default is wxPG_RECURSE which causes colour to be set recursively. // Omit this flag to only set colour for the property in question // and not any of its children. void SetTextColour( const wxColour& colour, int flags = wxPG_RECURSE ); // Sets property's default text and background colours. // flags - Default is wxPG_RECURSE which causes colours to be set recursively. // Omit this flag to only set colours for the property in question // and not any of its children. void SetDefaultColours(int flags = wxPG_RECURSE); // Set default value of a property. Synonymous to // SetAttribute("DefaultValue", value); void SetDefaultValue( wxVariant& value ); // Sets editor for a property. // editor - For builtin editors, use wxPGEditor_X, where X is builtin editor's // name (TextCtrl, Choice, etc. see wxPGEditor documentation for full // list). // For custom editors, use pointer you received from // wxPropertyGrid::RegisterEditorClass(). void SetEditor( const wxPGEditor* editor ) { m_customEditor = editor; } // Sets editor for a property, , by editor name. inline void SetEditor( const wxString& editorName ); // Sets cell information for given column. void SetCell( int column, const wxPGCell& cell ); // Sets common value selected for this property. -1 for none. void SetCommonValue( int commonValue ) { m_commonValue = commonValue; } // Sets flags from a '|' delimited string. Note that flag names are not // prepended with 'wxPG_PROP_'. void SetFlagsFromString( const wxString& str ); // Sets property's "is it modified?" flag. Affects children recursively. void SetModifiedStatus( bool modified ) { SetFlagRecursively(wxPG_PROP_MODIFIED, modified); } // Call in OnEvent(), OnButtonClick() etc. to change the property value // based on user input. // This method is const since it doesn't actually modify value, but posts // given variant as pending value, stored in wxPropertyGrid. void SetValueInEvent( wxVariant value ) const; // Call this to set value of the property. // Unlike methods in wxPropertyGrid, this does not automatically update // the display. // Use wxPropertyGrid::ChangePropertyValue() instead if you need to run // through validation process and send property change event. // If you need to change property value in event, based on user input, use // SetValueInEvent() instead. // pList - Pointer to list variant that contains child values. Used to // indicate which children should be marked as modified. // flags - Various flags (for instance, wxPG_SETVAL_REFRESH_EDITOR, which // is enabled by default). void SetValue( wxVariant value, wxVariant* pList = NULL, int flags = wxPG_SETVAL_REFRESH_EDITOR ); // Set wxBitmap in front of the value. This bitmap may be ignored // by custom cell renderers. void SetValueImage( wxBitmap& bmp ); // Sets selected choice and changes property value. // Tries to retain value type, although currently if it is not string, // then it is forced to integer. void SetChoiceSelection( int newValue ); void SetExpanded( bool expanded ) { if ( !expanded ) m_flags |= wxPG_PROP_COLLAPSED; else m_flags &= ~wxPG_PROP_COLLAPSED; } // Sets or clears given property flag. Mainly for internal use. // Setting a property flag never has any side-effect, and is // intended almost exclusively for internal use. So, for // example, if you want to disable a property, call // Enable(false) instead of setting wxPG_PROP_DISABLED flag. void ChangeFlag( wxPGPropertyFlags flag, bool set ) { if ( set ) m_flags |= flag; else m_flags &= ~flag; } // Sets or clears given property flag, recursively. This function is // primarily intended for internal use. void SetFlagRecursively( wxPGPropertyFlags flag, bool set ); // Sets property's help string, which is shown, for example, in // wxPropertyGridManager's description text box. void SetHelpString( const wxString& helpString ) { m_helpString = helpString; } // Sets property's label. // Properties under same parent may have same labels. However, // property names must still remain unique. void SetLabel( const wxString& label ); // Sets new (base) name for property. void SetName( const wxString& newName ); // Changes what sort of parent this property is for its children. // flag - Use one of the following values: wxPG_PROP_MISC_PARENT (for // generic parents), wxPG_PROP_CATEGORY (for categories), or // wxPG_PROP_AGGREGATE (for derived property classes with private // children). // You generally do not need to call this function. void SetParentalType( int flag ) { m_flags &= ~(wxPG_PROP_PROPERTY|wxPG_PROP_PARENTAL_FLAGS); m_flags |= flag; } // Sets property's value to unspecified (i.e. Null variant). void SetValueToUnspecified() { wxVariant val; // Create NULL variant SetValue(val, NULL, wxPG_SETVAL_REFRESH_EDITOR); } // Helper function (for wxPython bindings and such) for settings protected // m_value. void SetValuePlain( wxVariant value ) { m_value = value; } #if wxUSE_VALIDATORS // Sets wxValidator for a property. void SetValidator( const wxValidator& validator ) { m_validator = wxDynamicCast(validator.Clone(),wxValidator); } // Gets assignable version of property's validator. wxValidator* GetValidator() const { if ( m_validator ) return m_validator; return DoGetValidator(); } #endif // wxUSE_VALIDATORS // Returns client data (void*) of a property. void* GetClientData() const { return m_clientData; } // Sets client data (void*) of a property. // This untyped client data has to be deleted manually. void SetClientData( void* clientData ) { m_clientData = clientData; } // Sets client object of a property. void SetClientObject(wxClientData* clientObject) { delete m_clientObject; m_clientObject = clientObject; } // Gets managed client object of a property. wxClientData *GetClientObject() const { return m_clientObject; } // Sets new set of choices for the property. // This operation deselects the property and clears its // value. bool SetChoices( const wxPGChoices& choices ); // Set max length of text in text editor. inline bool SetMaxLength( int maxLen ); // Call with 'false' in OnSetValue to cancel value changes after all // (i.e. cancel 'true' returned by StringToValue() or IntToValue()). void SetWasModified( bool set = true ) { ChangeFlag(wxPG_PROP_WAS_MODIFIED, set); } // Returns property's help or description text. const wxString& GetHelpString() const { return m_helpString; } // Returns true if candidateParent is some parent of this property. // Use, for example, to detect if item is inside collapsed section. bool IsSomeParent( wxPGProperty* candidate_parent ) const; // Adapts list variant into proper value using consecutive // ChildChanged-calls. void AdaptListToValue( wxVariant& list, wxVariant* value ) const; #if wxPG_COMPATIBILITY_1_4 // Adds a private child property. // Use AddPrivateChild() instead. wxDEPRECATED( void AddChild( wxPGProperty* prop ) ); #endif // Adds a private child property. If you use this instead of // wxPropertyGridInterface::Insert() or // wxPropertyGridInterface::AppendIn(), then property's parental // type will automatically be set up to wxPG_PROP_AGGREGATE. In other // words, all properties of this property will become private. void AddPrivateChild( wxPGProperty* prop ); // Use this member function to add independent (i.e. regular) children to // a property. // wxPropertyGrid is not automatically refreshed by this function. wxPGProperty* AppendChild( wxPGProperty* prop ) { return InsertChild(-1, prop); } // Returns height of children, recursively, and // by taking expanded/collapsed status into account. // lh - Line height. Pass result of GetGrid()->GetRowHeight() here. // iMax - Only used (internally) when finding property y-positions. int GetChildrenHeight( int lh, int iMax = -1 ) const; // Returns number of child properties. unsigned int GetChildCount() const { return (unsigned int) m_children.size(); } // Returns sub-property at index i. wxPGProperty* Item( unsigned int i ) const { return m_children[i]; } // Returns last sub-property. wxPGProperty* Last() const { return m_children.back(); } // Returns index of given child property. wxNOT_FOUND if // given property is not child of this. int Index( const wxPGProperty* p ) const; // Puts correct indexes to children void FixIndicesOfChildren( unsigned int starthere = 0 ); // Converts image width into full image offset, with margins. int GetImageOffset( int imageWidth ) const; // Returns wxPropertyGridPageState in which this property resides. wxPropertyGridPageState* GetParentState() const { return m_parentState; } wxPGProperty* GetItemAtY( unsigned int y, unsigned int lh, unsigned int* nextItemY ) const; // Returns property at given virtual y coordinate. wxPGProperty* GetItemAtY( unsigned int y ) const; // Returns (direct) child property with given name (or NULL if not found). wxPGProperty* GetPropertyByName( const wxString& name ) const; // Returns various display-related information for given column #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED_MSG("don't use GetDisplayInfo function with argument of 'const wxPGCell**' type. Use 'wxPGCell*' argument instead") void GetDisplayInfo( unsigned int column, int choiceIndex, int flags, wxString* pString, const wxPGCell** pCell ); #endif // WXWIN_COMPATIBILITY_3_0 // This function can return modified (customized) cell object. void GetDisplayInfo( unsigned int column, int choiceIndex, int flags, wxString* pString, wxPGCell* pCell ); static wxString* sm_wxPG_LABEL; // This member is public so scripting language bindings // wrapper code can access it freely. void* m_clientData; protected: // Sets property cell in fashion that reduces number of exclusive // copies of cell data. Used when setting, for instance, same // background colour for a number of properties. // firstCol - First column to affect. // lastCol- Last column to affect. // preparedCell - Pre-prepared cell that is used for those which cell data // before this matched unmodCellData. // srcData - If unmodCellData did not match, valid cell data from this // is merged into cell (usually generating new exclusive copy // of cell's data). // unmodCellData - If cell's cell data matches this, its cell is now set to // preparedCell. // ignoreWithFlags - Properties with any one of these flags are skipped. // recursively - If true, apply this operation recursively in child properties. void AdaptiveSetCell( unsigned int firstCol, unsigned int lastCol, const wxPGCell& preparedCell, const wxPGCell& srcData, wxPGCellData* unmodCellData, FlagType ignoreWithFlags, bool recursively ); // Clear cells associated with property. // recursively - If true, apply this operation recursively in child properties. void ClearCells(FlagType ignoreWithFlags, bool recursively); // Makes sure m_cells has size of column+1 (or more). void EnsureCells( unsigned int column ); // Returns (direct) child property with given name (or NULL if not found), // with hint index. // hintIndex - Start looking for the child at this index. // Does not support scope (i.e. Parent.Child notation). wxPGProperty* GetPropertyByNameWH( const wxString& name, unsigned int hintIndex ) const; // This is used by Insert etc. void DoAddChild( wxPGProperty* prop, int index = -1, bool correct_mode = true ); void DoGenerateComposedValue( wxString& text, int argFlags = wxPG_VALUE_IS_CURRENT, const wxVariantList* valueOverrides = NULL, wxPGHashMapS2S* childResults = NULL ) const; bool DoHide( bool hide, int flags ); void DoSetName(const wxString& str) { m_name = str; } // Deletes all sub-properties. void Empty(); bool HasCell( unsigned int column ) const { return m_cells.size() > column; } void InitAfterAdded( wxPropertyGridPageState* pageState, wxPropertyGrid* propgrid ); // Returns true if child property is selected. bool IsChildSelected( bool recursive = false ) const; // Removes child property with given pointer. Does not delete it. void RemoveChild( wxPGProperty* p ); // Removes child property at given index. Does not delete it. void RemoveChild(unsigned int index); // Sorts children using specified comparison function. void SortChildren(int (*fCmp)(wxPGProperty**, wxPGProperty**)); void DoEnable( bool enable ); void DoPreAddChild( int index, wxPGProperty* prop ); void SetParentState( wxPropertyGridPageState* pstate ) { m_parentState = pstate; } void SetFlag( wxPGPropertyFlags flag ) { // // NB: While using wxPGPropertyFlags here makes it difficult to // combine different flags, it usefully prevents user from // using incorrect flags (say, wxWindow styles). m_flags |= flag; } void ClearFlag( FlagType flag ) { m_flags &= ~(flag); } // Called when the property is being removed from the grid and/or // page state (but *not* when it is also deleted). void OnDetached(wxPropertyGridPageState* state, wxPropertyGrid* propgrid); // Call after fixed sub-properties added/removed after creation. // if oldSelInd >= 0 and < new max items, then selection is // moved to it. void SubPropsChanged( int oldSelInd = -1 ); int GetY2( int lh ) const; wxString m_label; wxString m_name; wxPGProperty* m_parent; wxPropertyGridPageState* m_parentState; wxClientData* m_clientObject; // Overrides editor returned by property class const wxPGEditor* m_customEditor; #if wxUSE_VALIDATORS // Editor is going to get this validator wxValidator* m_validator; #endif // Show this in front of the value // // TODO: Can bitmap be implemented with wxPGCell? wxBitmap* m_valueBitmap; wxVariant m_value; wxPGAttributeStorage m_attributes; wxVector<wxPGProperty*> m_children; // Extended cell information wxVector<wxPGCell> m_cells; // Choices shown in drop-down list of editor control. wxPGChoices m_choices; // Help shown in statusbar or help box. wxString m_helpString; // Index in parent's property array. unsigned int m_arrIndex; // If not -1, then overrides m_value int m_commonValue; FlagType m_flags; // Maximum length (mainly for string properties). Could be in some sort of // wxBaseStringProperty, but currently, for maximum flexibility and // compatibility, we'll stick it here. Anyway, we had 3 excess bytes to use // so short int will fit in just fine. short m_maxLen; // Root has 0, categories etc. at that level 1, etc. unsigned char m_depth; // m_depthBgCol indicates width of background colour between margin and item // (essentially this is category's depth, if none then equals m_depth). unsigned char m_depthBgCol; private: // Called in constructors. void Init(); void Init( const wxString& label, const wxString& name ); }; // ----------------------------------------------------------------------- // // Property class declaration helper macros // (wxPGRootPropertyClass and wxPropertyCategory require this). // #define WX_PG_DECLARE_DOGETEDITORCLASS \ virtual const wxPGEditor* DoGetEditorClass() const wxOVERRIDE; #ifndef WX_PG_DECLARE_PROPERTY_CLASS #define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \ public: \ wxDECLARE_DYNAMIC_CLASS(CLASSNAME); \ WX_PG_DECLARE_DOGETEDITORCLASS \ private: #endif // Implements sans constructor function. Also, first arg is class name, not // property name. #define wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME, EDITOR) \ const wxPGEditor* PROPNAME::DoGetEditorClass() const \ { \ return wxPGEditor_##EDITOR; \ } #if WXWIN_COMPATIBILITY_3_0 // This macro is deprecated. Use wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN instead. #define WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME,T,EDITOR) \ wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME, EDITOR) #endif // WXWIN_COMPATIBILITY_3_0 // ----------------------------------------------------------------------- // Root parent property. class WXDLLIMPEXP_PROPGRID wxPGRootProperty : public wxPGProperty { public: WX_PG_DECLARE_PROPERTY_CLASS(wxPGRootProperty) public: // Constructor. wxPGRootProperty( const wxString& name = wxS("<Root>") ); virtual ~wxPGRootProperty(); virtual bool StringToValue( wxVariant&, const wxString&, int ) const wxOVERRIDE { return false; } protected: }; // ----------------------------------------------------------------------- // Category (caption) property. class WXDLLIMPEXP_PROPGRID wxPropertyCategory : public wxPGProperty { friend class wxPropertyGrid; friend class wxPropertyGridPageState; WX_PG_DECLARE_PROPERTY_CLASS(wxPropertyCategory) public: // Default constructor is only used in special cases. wxPropertyCategory(); wxPropertyCategory( const wxString& label, const wxString& name = wxPG_LABEL ); ~wxPropertyCategory(); int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const; virtual wxString ValueToString( wxVariant& value, int argFlags ) const wxOVERRIDE; virtual wxString GetValueAsString( int argFlags = 0 ) const wxOVERRIDE; protected: void SetTextColIndex( unsigned int colInd ) { m_capFgColIndex = (wxByte) colInd; } unsigned int GetTextColIndex() const { return (unsigned int) m_capFgColIndex; } void CalculateTextExtent(const wxWindow* wnd, const wxFont& font); int m_textExtent; // pre-calculated length of text wxByte m_capFgColIndex; // caption text colour index private: void Init(); }; // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_PROPERTY_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/propgriddefs.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/propgriddefs.h // Purpose: wxPropertyGrid miscellaneous definitions // Author: Jaakko Salli // Modified by: // Created: 2008-08-31 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_PROPGRIDDEFS_H_ #define _WX_PROPGRID_PROPGRIDDEFS_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/dynarray.h" #include "wx/vector.h" #include "wx/hashmap.h" #include "wx/hashset.h" #include "wx/variant.h" #include "wx/any.h" #include "wx/longlong.h" #include "wx/clntdata.h" // ----------------------------------------------------------------------- // // Here are some platform dependent defines // NOTE: More in propertygrid.cpp // // NB: Only define wxPG_TEXTCTRLXADJUST for platforms that do not // (yet) support wxTextEntry::SetMargins() for the left margin. #if defined(__WXMSW__) // space between vertical line and value text #define wxPG_XBEFORETEXT 4 // space between vertical line and value editor control #define wxPG_XBEFOREWIDGET 1 // left margin can be set with wxTextEntry::SetMargins() #undef wxPG_TEXTCTRLXADJUST // comment to use bitmap buttons #define wxPG_ICON_WIDTH 9 // 1 if wxRendererNative should be employed #define wxPG_USE_RENDERER_NATIVE 1 // Enable tooltips #define wxPG_SUPPORT_TOOLTIPS 1 // width of optional bitmap/image in front of property #define wxPG_CUSTOM_IMAGE_WIDTH 20 // 1 if splitter drag detect margin and control cannot overlap #define wxPG_NO_CHILD_EVT_MOTION 0 #define wxPG_NAT_BUTTON_BORDER_ANY 1 #define wxPG_NAT_BUTTON_BORDER_X 1 #define wxPG_NAT_BUTTON_BORDER_Y 1 // If 1 then controls are refreshed explicitly in a few places #define wxPG_REFRESH_CONTROLS 0 #elif defined(__WXGTK__) // space between vertical line and value text #define wxPG_XBEFORETEXT 5 // space between vertical line and value editor control #define wxPG_XBEFOREWIDGET 1 // x position adjustment for wxTextCtrl (and like) // left margin can be set with wxTextEntry::SetMargins() #undef wxPG_TEXTCTRLXADJUST // comment to use bitmap buttons #define wxPG_ICON_WIDTH 9 // 1 if wxRendererNative should be employed #define wxPG_USE_RENDERER_NATIVE 1 // Enable tooltips #define wxPG_SUPPORT_TOOLTIPS 1 // width of optional bitmap/image in front of property #define wxPG_CUSTOM_IMAGE_WIDTH 20 // 1 if splitter drag detect margin and control cannot overlap #define wxPG_NO_CHILD_EVT_MOTION 1 #define wxPG_NAT_BUTTON_BORDER_ANY 1 #define wxPG_NAT_BUTTON_BORDER_X 1 #define wxPG_NAT_BUTTON_BORDER_Y 1 // If 1 then controls are refreshed after selected was drawn. #define wxPG_REFRESH_CONTROLS 1 #elif defined(__WXMAC__) // space between vertical line and value text #define wxPG_XBEFORETEXT 4 // space between vertical line and value editor widget #define wxPG_XBEFOREWIDGET 1 // x position adjustment for wxTextCtrl (and like) // left margin cannot be set with wxTextEntry::SetMargins() #define wxPG_TEXTCTRLXADJUST 1 // comment to use bitmap buttons #define wxPG_ICON_WIDTH 11 // 1 if wxRendererNative should be employed #define wxPG_USE_RENDERER_NATIVE 1 // Enable tooltips #define wxPG_SUPPORT_TOOLTIPS 1 // width of optional bitmap/image in front of property #define wxPG_CUSTOM_IMAGE_WIDTH 20 // 1 if splitter drag detect margin and control cannot overlap #define wxPG_NO_CHILD_EVT_MOTION 0 #define wxPG_NAT_BUTTON_BORDER_ANY 0 #define wxPG_NAT_BUTTON_BORDER_X 0 #define wxPG_NAT_BUTTON_BORDER_Y 0 // If 1 then controls are refreshed after selected was drawn. #define wxPG_REFRESH_CONTROLS 0 #else // defaults // space between vertical line and value text #define wxPG_XBEFORETEXT 5 // space between vertical line and value editor widget #define wxPG_XBEFOREWIDGET 1 // x position adjustment for wxTextCtrl (and like) // left margin cannot be set with wxTextEntry::SetMargins() #define wxPG_TEXTCTRLXADJUST 3 // comment to use bitmap buttons #define wxPG_ICON_WIDTH 9 // 1 if wxRendererNative should be employed #define wxPG_USE_RENDERER_NATIVE 0 // Enable tooltips #define wxPG_SUPPORT_TOOLTIPS 0 // width of optional bitmap/image in front of property #define wxPG_CUSTOM_IMAGE_WIDTH 20 // 1 if splitter drag detect margin and control cannot overlap #define wxPG_NO_CHILD_EVT_MOTION 1 #define wxPG_NAT_BUTTON_BORDER_ANY 0 #define wxPG_NAT_BUTTON_BORDER_X 0 #define wxPG_NAT_BUTTON_BORDER_Y 0 // If 1 then controls are refreshed after selected was drawn. #define wxPG_REFRESH_CONTROLS 0 #endif // platform #define wxPG_CONTROL_MARGIN 0 // space between splitter and control #define wxCC_CUSTOM_IMAGE_MARGIN1 4 // before image #define wxCC_CUSTOM_IMAGE_MARGIN2 5 // after image #define DEFAULT_IMAGE_OFFSET_INCREMENT \ (wxCC_CUSTOM_IMAGE_MARGIN1 + wxCC_CUSTOM_IMAGE_MARGIN2) #define wxPG_DRAG_MARGIN 30 #if wxPG_NO_CHILD_EVT_MOTION #define wxPG_SPLITTERX_DETECTMARGIN1 3 // this much on left #define wxPG_SPLITTERX_DETECTMARGIN2 2 // this much on right #else #define wxPG_SPLITTERX_DETECTMARGIN1 3 // this much on left #define wxPG_SPLITTERX_DETECTMARGIN2 2 // this much on right #endif // Use this macro to generate standard custom image height from #define wxPG_STD_CUST_IMAGE_HEIGHT(LINEHEIGHT) ((LINEHEIGHT)-3) // Undefine wxPG_ICON_WIDTH to use supplied xpm bitmaps instead // (for tree buttons) //#undef wxPG_ICON_WIDTH #if WXWIN_COMPATIBILITY_2_8 #define wxPG_COMPATIBILITY_1_4 1 #else #define wxPG_COMPATIBILITY_1_4 0 #endif // Need to force disable tooltips? #if !wxUSE_TOOLTIPS #undef wxPG_SUPPORT_TOOLTIPS #define wxPG_SUPPORT_TOOLTIPS 0 #endif // Set 1 to include advanced properties (wxFontProperty, wxColourProperty, etc.) #ifndef wxPG_INCLUDE_ADVPROPS #define wxPG_INCLUDE_ADVPROPS 1 #endif // Set 1 to include checkbox editor class #define wxPG_INCLUDE_CHECKBOX 1 // ----------------------------------------------------------------------- class wxPGEditor; class wxPGProperty; class wxPropertyCategory; class wxPGChoices; class wxPropertyGridPageState; class wxPGCell; class wxPGCellRenderer; class wxPGChoiceEntry; class wxPGPropArgCls; class wxPropertyGridInterface; class wxPropertyGrid; class wxPropertyGridEvent; class wxPropertyGridManager; class wxPGOwnerDrawnComboBox; class wxPGEditorDialogAdapter; class wxPGValidationInfo; // ----------------------------------------------------------------------- // Some miscellaneous values, types and macros. // Used to tell wxPGProperty to use label as name as well #define wxPG_LABEL (*wxPGProperty::sm_wxPG_LABEL) // This is the value placed in wxPGProperty::sm_wxPG_LABEL #define wxPG_LABEL_STRING wxS("@!") #if WXWIN_COMPATIBILITY_3_0 #define wxPG_NULL_BITMAP wxNullBitmap #endif // WXWIN_COMPATIBILITY_3_0 #define wxPG_COLOUR_BLACK (*wxBLACK) // Convert Red, Green and Blue to a single 32-bit value. #define wxPG_COLOUR(R,G,B) ((wxUint32)((R)+((G)<<8)+((B)<<16))) // If property is supposed to have custom-painted image, then returning // this in OnMeasureImage() will usually be enough. #define wxPG_DEFAULT_IMAGE_SIZE wxDefaultSize // This callback function is used for sorting properties. // Call wxPropertyGrid::SetSortFunction() to set it. // Sort function should return a value greater than 0 if position of p1 is // after p2. So, for instance, when comparing property names, you can use // following implementation: // int MyPropertySortFunction(wxPropertyGrid* propGrid, // wxPGProperty* p1, // wxPGProperty* p2) // { // return p1->GetBaseName().compare( p2->GetBaseName() ); // } typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid, wxPGProperty* p1, wxPGProperty* p2); #if WXWIN_COMPATIBILITY_3_0 typedef wxString wxPGCachedString; #endif // ----------------------------------------------------------------------- // Used to indicate wxPGChoices::Add etc. that the value is actually not given // by the caller. #define wxPG_INVALID_VALUE INT_MAX // ----------------------------------------------------------------------- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxPGProperty*, wxArrayPGProperty, wxBaseArrayPtrVoid, class WXDLLIMPEXP_PROPGRID); WX_DECLARE_STRING_HASH_MAP_WITH_DECL(void*, wxPGHashMapS2P, class WXDLLIMPEXP_PROPGRID); WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxString, wxPGHashMapS2S, class WXDLLIMPEXP_PROPGRID); WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(void*, wxPGHashMapP2P, class WXDLLIMPEXP_PROPGRID); WX_DECLARE_HASH_MAP_WITH_DECL(wxInt32, wxInt32, wxIntegerHash, wxIntegerEqual, wxPGHashMapI2I, class WXDLLIMPEXP_PROPGRID); WX_DECLARE_HASH_SET_WITH_DECL(int, wxIntegerHash, wxIntegerEqual, wxPGHashSetInt, class WXDLLIMPEXP_PROPGRID); WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxObject*, wxArrayPGObject, wxBaseArrayPtrVoid, class WXDLLIMPEXP_PROPGRID); // ----------------------------------------------------------------------- enum wxPG_PROPERTYVALUES_FLAGS { // Flag for wxPropertyGridInterface::SetProperty* functions, // wxPropertyGridInterface::HideProperty(), etc. // Apply changes only for the property in question. wxPG_DONT_RECURSE = 0x00000000, // Flag for wxPropertyGridInterface::GetPropertyValues(). // Use this flag to retain category structure; each sub-category // will be its own wxVariantList of wxVariant. wxPG_KEEP_STRUCTURE = 0x00000010, // Flag for wxPropertyGridInterface::SetProperty* functions, // wxPropertyGridInterface::HideProperty(), etc. // Apply changes recursively for the property and all its children. wxPG_RECURSE = 0x00000020, // Flag for wxPropertyGridInterface::GetPropertyValues(). // Use this flag to include property attributes as well. wxPG_INC_ATTRIBUTES = 0x00000040, // Used when first starting recursion. wxPG_RECURSE_STARTS = 0x00000080, // Force value change. wxPG_FORCE = 0x00000100, // Only sort categories and their immediate children. // Sorting done by wxPG_AUTO_SORT option uses this. wxPG_SORT_TOP_LEVEL_ONLY = 0x00000200 }; // ----------------------------------------------------------------------- // Misc. argument flags. enum wxPG_MISC_ARG_FLAGS { // Get/Store full value instead of displayed value. wxPG_FULL_VALUE = 0x00000001, // Perform special action in case of unsuccessful conversion. wxPG_REPORT_ERROR = 0x00000002, wxPG_PROPERTY_SPECIFIC = 0x00000004, // Get/Store editable value instead of displayed one (should only be // different in the case of common values) wxPG_EDITABLE_VALUE = 0x00000008, // Used when dealing with fragments of composite string value wxPG_COMPOSITE_FRAGMENT = 0x00000010, // Means property for which final string value is for cannot really be // edited. wxPG_UNEDITABLE_COMPOSITE_FRAGMENT = 0x00000020, // ValueToString() called from GetValueAsString() // (guarantees that input wxVariant value is current own value) wxPG_VALUE_IS_CURRENT = 0x00000040, // Value is being set programmatically (i.e. not by user) wxPG_PROGRAMMATIC_VALUE = 0x00000080 }; // ----------------------------------------------------------------------- // wxPGProperty::SetValue() flags enum wxPG_SETVALUE_FLAGS { wxPG_SETVAL_REFRESH_EDITOR = 0x0001, wxPG_SETVAL_AGGREGATED = 0x0002, wxPG_SETVAL_FROM_PARENT = 0x0004, wxPG_SETVAL_BY_USER = 0x0008 // Set if value changed by user }; // ----------------------------------------------------------------------- // // Valid constants for wxPG_UINT_BASE attribute // (long because of wxVariant constructor) #define wxPG_BASE_OCT (long)8 #define wxPG_BASE_DEC (long)10 #define wxPG_BASE_HEX (long)16 #define wxPG_BASE_HEXL (long)32 // // Valid constants for wxPG_UINT_PREFIX attribute #define wxPG_PREFIX_NONE (long)0 #define wxPG_PREFIX_0x (long)1 #define wxPG_PREFIX_DOLLAR_SIGN (long)2 // ----------------------------------------------------------------------- // Editor class. // Editor accessor (for backwards compatibility use only). #define wxPG_EDITOR(T) wxPGEditor_##T // Macro for declaring editor class, with optional impexpdecl part. #ifndef WX_PG_DECLARE_EDITOR_WITH_DECL #define WX_PG_DECLARE_EDITOR_WITH_DECL(EDITOR,DECL) \ extern DECL wxPGEditor* wxPGEditor_##EDITOR; \ extern DECL wxPGEditor* wxPGConstruct##EDITOR##EditorClass(); #endif // Declare editor class. #define WX_PG_DECLARE_EDITOR(EDITOR) \ extern wxPGEditor* wxPGEditor_##EDITOR; \ extern wxPGEditor* wxPGConstruct##EDITOR##EditorClass(); // Declare built-in editor classes. WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrl,WXDLLIMPEXP_PROPGRID) WX_PG_DECLARE_EDITOR_WITH_DECL(Choice,WXDLLIMPEXP_PROPGRID) WX_PG_DECLARE_EDITOR_WITH_DECL(ComboBox,WXDLLIMPEXP_PROPGRID) WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrlAndButton,WXDLLIMPEXP_PROPGRID) #if wxPG_INCLUDE_CHECKBOX WX_PG_DECLARE_EDITOR_WITH_DECL(CheckBox,WXDLLIMPEXP_PROPGRID) #endif WX_PG_DECLARE_EDITOR_WITH_DECL(ChoiceAndButton,WXDLLIMPEXP_PROPGRID) // ----------------------------------------------------------------------- #ifndef SWIG // // Macro WXVARIANT allows creation of wxVariant from any type supported by // wxWidgets internally, and of all types created using // WX_PG_DECLARE_VARIANT_DATA. template<class T> wxVariant WXVARIANT( const T& WXUNUSED(value) ) { wxFAIL_MSG(wxS("Code should always call specializations of this template")); return wxVariant(); } template<> inline wxVariant WXVARIANT( const int& value ) { return wxVariant((long)value); } template<> inline wxVariant WXVARIANT( const long& value ) { return wxVariant(value); } template<> inline wxVariant WXVARIANT( const bool& value ) { return wxVariant(value); } template<> inline wxVariant WXVARIANT( const double& value ) { return wxVariant(value); } template<> inline wxVariant WXVARIANT( const wxArrayString& value ) { return wxVariant(value); } template<> inline wxVariant WXVARIANT( const wxString& value ) { return wxVariant(value); } #if wxUSE_LONGLONG template<> inline wxVariant WXVARIANT( const wxLongLong& value ) { return wxVariant(value); } template<> inline wxVariant WXVARIANT( const wxULongLong& value ) { return wxVariant(value); } #endif #if wxUSE_DATETIME template<> inline wxVariant WXVARIANT( const wxDateTime& value ) { return wxVariant(value); } #endif // // These are modified versions of DECLARE/WX_PG_IMPLEMENT_VARIANT_DATA // macros found in variant.h. Differences are as follows: // * These support non-wxObject data // * These implement classname##RefFromVariant function which returns // reference to data within. // * const char* classname##_VariantType which equals classname. // * WXVARIANT // #define WX_PG_DECLARE_VARIANT_DATA(classname) \ WX_PG_DECLARE_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) #define WX_PG_DECLARE_VARIANT_DATA_EXPORTED(classname,expdecl) \ expdecl classname& operator << ( classname &object, const wxVariant &variant ); \ expdecl wxVariant& operator << ( wxVariant &variant, const classname &object ); \ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ); \ expdecl classname& classname##RefFromVariant( wxVariant& variant ); \ template<> inline wxVariant WXVARIANT( const classname& value ) \ { \ wxVariant variant; \ variant << value; \ return variant; \ } \ extern expdecl const char* classname##_VariantType; #define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \ WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) // Add getter (i.e. classname << variant) separately to allow // custom implementations. #define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,expdecl) \ const char* classname##_VariantType = #classname; \ class classname##VariantData: public wxVariantData \ { \ public:\ classname##VariantData() {} \ classname##VariantData( const classname &value ) { m_value = value; } \ \ classname &GetValue() { return m_value; } \ \ const classname &GetValue() const { return m_value; } \ \ virtual bool Eq(wxVariantData& data) const wxOVERRIDE; \ \ virtual wxString GetType() const wxOVERRIDE; \ \ virtual wxVariantData* Clone() const wxOVERRIDE { return new classname##VariantData(m_value); } \ \ DECLARE_WXANY_CONVERSION() \ protected:\ classname m_value; \ };\ \ IMPLEMENT_TRIVIAL_WXANY_CONVERSION(classname, classname##VariantData) \ \ wxString classname##VariantData::GetType() const\ {\ return wxS(#classname);\ }\ \ expdecl wxVariant& operator << ( wxVariant &variant, const classname &value )\ {\ classname##VariantData *data = new classname##VariantData( value );\ variant.SetData( data );\ return variant;\ } \ expdecl classname& classname##RefFromVariant( wxVariant& variant ) \ { \ wxASSERT_MSG( variant.GetType() == wxS(#classname), \ wxString::Format(wxS("Variant type should have been '%s'") \ wxS("instead of '%s'"), \ wxS(#classname), \ variant.GetType())); \ classname##VariantData *data = \ (classname##VariantData*) variant.GetData(); \ return data->GetValue();\ } \ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \ { \ wxASSERT_MSG( variant.GetType() == wxS(#classname), \ wxString::Format(wxS("Variant type should have been '%s'") \ wxS("instead of '%s'"), \ wxS(#classname), \ variant.GetType())); \ classname##VariantData *data = \ (classname##VariantData*) variant.GetData(); \ return data->GetValue();\ } #define WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname, expdecl) \ expdecl classname& operator << ( classname &value, const wxVariant &variant )\ {\ wxASSERT( variant.GetType() == #classname );\ \ classname##VariantData *data = (classname##VariantData*) variant.GetData();\ value = data->GetValue();\ return value;\ } #define WX_PG_IMPLEMENT_VARIANT_DATA_EQ(classname, expdecl) \ bool classname##VariantData::Eq(wxVariantData& data) const \ {\ wxASSERT( GetType() == data.GetType() );\ \ classname##VariantData & otherData = (classname##VariantData &) data;\ \ return otherData.m_value == m_value;\ } // implements a wxVariantData-derived class using for the Eq() method the // operator== which must have been provided by "classname" #define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname,expdecl) \ WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ WX_PG_IMPLEMENT_VARIANT_DATA_EQ(classname,wxEMPTY_PARAMETER_VALUE expdecl) #define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \ WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) // with Eq() implementation that always returns false #define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_DUMMY_EQ(classname,expdecl) \ WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ \ bool classname##VariantData::Eq(wxVariantData& WXUNUSED(data)) const \ {\ return false; \ } #define WX_PG_IMPLEMENT_VARIANT_DATA_DUMMY_EQ(classname) \ WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_DUMMY_EQ(classname, wxEMPTY_PARAMETER_VALUE) WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxPoint, WXDLLIMPEXP_PROPGRID) WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxSize, WXDLLIMPEXP_PROPGRID) WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxArrayInt, WXDLLIMPEXP_PROPGRID) DECLARE_VARIANT_OBJECT_EXPORTED(wxFont, WXDLLIMPEXP_PROPGRID) template<> inline wxVariant WXVARIANT( const wxFont& value ) { wxVariant variant; variant << value; return variant; } template<> inline wxVariant WXVARIANT( const wxColour& value ) { wxVariant variant; variant << value; return variant; } // Define constants for common wxVariant type strings #define wxPG_VARIANT_TYPE_STRING wxPGGlobalVars->m_strstring #define wxPG_VARIANT_TYPE_LONG wxPGGlobalVars->m_strlong #define wxPG_VARIANT_TYPE_BOOL wxPGGlobalVars->m_strbool #define wxPG_VARIANT_TYPE_LIST wxPGGlobalVars->m_strlist #define wxPG_VARIANT_TYPE_DOUBLE wxS("double") #define wxPG_VARIANT_TYPE_ARRSTRING wxS("arrstring") #if wxUSE_DATETIME #define wxPG_VARIANT_TYPE_DATETIME wxS("datetime") #endif #if wxUSE_LONGLONG #define wxPG_VARIANT_TYPE_LONGLONG wxS("longlong") #define wxPG_VARIANT_TYPE_ULONGLONG wxS("ulonglong") #endif #endif // !SWIG // ----------------------------------------------------------------------- // // Tokenizer macros. // NOTE: I have made two versions - worse ones (performance and consistency // wise) use wxStringTokenizer and better ones (may have unfound bugs) // use custom code. // #include "wx/tokenzr.h" // TOKENIZER1 can be done with wxStringTokenizer #define WX_PG_TOKENIZER1_BEGIN(WXSTRING,DELIMITER) \ wxStringTokenizer tkz(WXSTRING,DELIMITER,wxTOKEN_RET_EMPTY); \ while ( tkz.HasMoreTokens() ) \ { \ wxString token = tkz.GetNextToken(); \ token.Trim(true); \ token.Trim(false); #define WX_PG_TOKENIZER1_END() \ } // // 2nd version: tokens are surrounded by DELIMITERs (for example, C-style // strings). TOKENIZER2 must use custom code (a class) for full compliance with // " surrounded strings with \" inside. // // class implementation is in propgrid.cpp // class WXDLLIMPEXP_PROPGRID wxPGStringTokenizer { public: wxPGStringTokenizer( const wxString& str, wxChar delimiter ); ~wxPGStringTokenizer(); bool HasMoreTokens(); // not const so we can do some stuff in it wxString GetNextToken(); protected: const wxString* m_str; wxString::const_iterator m_curPos; wxString m_readyToken; wxUniChar m_delimiter; }; #define WX_PG_TOKENIZER2_BEGIN(WXSTRING,DELIMITER) \ wxPGStringTokenizer tkz(WXSTRING,DELIMITER); \ while ( tkz.HasMoreTokens() ) \ { \ wxString token = tkz.GetNextToken(); #define WX_PG_TOKENIZER2_END() \ } // ----------------------------------------------------------------------- // wxVector utilities // Utility to check if specific item is in a vector. template<typename T> inline bool wxPGItemExistsInVector(const wxVector<T>& vector, const T& item) { #if wxUSE_STL return std::find(vector.begin(), vector.end(), item) != vector.end(); #else for (typename wxVector<T>::const_iterator it = vector.begin(); it != vector.end(); ++it) { if ( *it == item ) return true; } return false; #endif // wxUSE_STL/!wxUSE_STL } // Utility to determine the index of the item in the vector. template<typename T> inline int wxPGItemIndexInVector(const wxVector<T>& vector, const T& item) { #if wxUSE_STL typename wxVector<T>::const_iterator it = std::find(vector.begin(), vector.end(), item); if ( it != vector.end() ) return (int)(it - vector.begin()); return wxNOT_FOUND; #else for (typename wxVector<T>::const_iterator it = vector.begin(); it != vector.end(); ++it) { if ( *it == item ) return (int)(it - vector.begin()); } return wxNOT_FOUND; #endif // wxUSE_STL/!wxUSE_STL } // Utility to remove given item from the vector. template<typename T> inline void wxPGRemoveItemFromVector(wxVector<T>& vector, const T& item) { #if wxUSE_STL typename wxVector<T>::iterator it = std::find(vector.begin(), vector.end(), item); if ( it != vector.end() ) { vector.erase(it); } #else for (typename wxVector<T>::iterator it = vector.begin(); it != vector.end(); ++it) { if ( *it == item ) { vector.erase(it); return; } } #endif // wxUSE_STL/!wxUSE_STL } // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_PROPGRIDDEFS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/propgridpagestate.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/propgridpagestate.h // Purpose: wxPropertyGridPageState class // Author: Jaakko Salli // Modified by: // Created: 2008-08-24 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_PROPGRIDPAGESTATE_H_ #define _WX_PROPGRID_PROPGRIDPAGESTATE_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/propgrid/property.h" // ----------------------------------------------------------------------- // A return value from wxPropertyGrid::HitTest(), // contains all you need to know about an arbitrary location on the grid. class WXDLLIMPEXP_PROPGRID wxPropertyGridHitTestResult { friend class wxPropertyGridPageState; public: wxPropertyGridHitTestResult() { m_property = NULL; m_column = -1; m_splitter = -1; m_splitterHitOffset = 0; } ~wxPropertyGridHitTestResult() { } // Returns column hit. -1 for margin. int GetColumn() const { return m_column; } // Returns property hit. NULL if empty space below // properties was hit instead. wxPGProperty* GetProperty() const { return m_property; } // Returns index of splitter hit, -1 for none. int GetSplitter() const { return m_splitter; } // If splitter hit, then this member function // returns offset to the exact splitter position. int GetSplitterHitOffset() const { return m_splitterHitOffset; } private: // Property. NULL if empty space below properties was hit. wxPGProperty* m_property; // Column. -1 for margin. int m_column; // Index of splitter hit, -1 for none. int m_splitter; // If splitter hit, offset to that. int m_splitterHitOffset; }; // ----------------------------------------------------------------------- #define wxPG_IT_CHILDREN(A) ((A)<<16) // NOTES: At lower 16-bits, there are flags to check if item will be included. // At higher 16-bits, there are same flags, but to instead check if children // will be included. enum wxPG_ITERATOR_FLAGS { // Iterate through 'normal' property items (does not include children of // aggregate or hidden items by default). wxPG_ITERATE_PROPERTIES = wxPG_PROP_PROPERTY | wxPG_PROP_MISC_PARENT | wxPG_PROP_AGGREGATE | wxPG_PROP_COLLAPSED | wxPG_IT_CHILDREN(wxPG_PROP_MISC_PARENT) | wxPG_IT_CHILDREN(wxPG_PROP_CATEGORY), // Iterate children of collapsed parents, and individual items that are hidden. wxPG_ITERATE_HIDDEN = wxPG_PROP_HIDDEN | wxPG_IT_CHILDREN(wxPG_PROP_COLLAPSED), // Iterate children of parent that is an aggregate property (ie has fixed // children). wxPG_ITERATE_FIXED_CHILDREN = wxPG_IT_CHILDREN(wxPG_PROP_AGGREGATE) | wxPG_ITERATE_PROPERTIES, // Iterate categories. // Note that even without this flag, children of categories are still iterated // through. wxPG_ITERATE_CATEGORIES = wxPG_PROP_CATEGORY | wxPG_IT_CHILDREN(wxPG_PROP_CATEGORY) | wxPG_PROP_COLLAPSED, wxPG_ITERATE_ALL_PARENTS = wxPG_PROP_MISC_PARENT | wxPG_PROP_AGGREGATE | wxPG_PROP_CATEGORY, wxPG_ITERATE_ALL_PARENTS_RECURSIVELY = wxPG_ITERATE_ALL_PARENTS | wxPG_IT_CHILDREN( wxPG_ITERATE_ALL_PARENTS), wxPG_ITERATOR_FLAGS_ALL = wxPG_PROP_PROPERTY | wxPG_PROP_MISC_PARENT | wxPG_PROP_AGGREGATE | wxPG_PROP_HIDDEN | wxPG_PROP_CATEGORY | wxPG_PROP_COLLAPSED, wxPG_ITERATOR_MASK_OP_ITEM = wxPG_ITERATOR_FLAGS_ALL, // (wxPG_PROP_MISC_PARENT|wxPG_PROP_AGGREGATE|wxPG_PROP_CATEGORY) wxPG_ITERATOR_MASK_OP_PARENT = wxPG_ITERATOR_FLAGS_ALL, // Combines all flags needed to iterate through visible properties // (ie. hidden properties and children of collapsed parents are skipped). wxPG_ITERATE_VISIBLE = wxPG_ITERATE_PROPERTIES | wxPG_PROP_CATEGORY | wxPG_IT_CHILDREN(wxPG_PROP_AGGREGATE), // Iterate all items. wxPG_ITERATE_ALL = wxPG_ITERATE_VISIBLE | wxPG_ITERATE_HIDDEN, // Iterate through individual properties (ie categories and children of // aggregate properties are skipped). wxPG_ITERATE_NORMAL = wxPG_ITERATE_PROPERTIES | wxPG_ITERATE_HIDDEN, // Default iterator flags. wxPG_ITERATE_DEFAULT = wxPG_ITERATE_NORMAL }; #define wxPG_ITERATOR_CREATE_MASKS(FLAGS, A, B) \ A = (FLAGS ^ wxPG_ITERATOR_MASK_OP_ITEM) & \ wxPG_ITERATOR_MASK_OP_ITEM & 0xFFFF; \ B = ((FLAGS>>16) ^ wxPG_ITERATOR_MASK_OP_PARENT) & \ wxPG_ITERATOR_MASK_OP_PARENT & 0xFFFF; // Macro to test if children of PWC should be iterated through #define wxPG_ITERATOR_PARENTEXMASK_TEST(PWC, PARENTMASK) \ ( \ !PWC->HasFlag(PARENTMASK) && \ PWC->GetChildCount() \ ) // Base for wxPropertyGridIterator classes. class WXDLLIMPEXP_PROPGRID wxPropertyGridIteratorBase { public: wxPropertyGridIteratorBase() { } void Assign( const wxPropertyGridIteratorBase& it ); bool AtEnd() const { return m_property == NULL; } // Get current property. wxPGProperty* GetProperty() const { return m_property; } void Init( wxPropertyGridPageState* state, int flags, wxPGProperty* property, int dir = 1 ); void Init( wxPropertyGridPageState* state, int flags, int startPos = wxTOP, int dir = 0 ); // Iterate to the next property. void Next( bool iterateChildren = true ); // Iterate to the previous property. void Prev(); // Set base parent, i.e. a property when, in which iteration returns, it // ends. // Default base parent is the root of the used wxPropertyGridPageState. void SetBaseParent( wxPGProperty* baseParent ) { m_baseParent = baseParent; } protected: wxPGProperty* m_property; private: wxPropertyGridPageState* m_state; wxPGProperty* m_baseParent; // Masks are used to quickly exclude items wxPGProperty::FlagType m_itemExMask; wxPGProperty::FlagType m_parentExMask; }; #define wxPG_IMPLEMENT_ITERATOR(CLASS, PROPERTY, STATE) \ CLASS( STATE* state, int flags = wxPG_ITERATE_DEFAULT, \ PROPERTY* property = NULL, int dir = 1 ) \ : wxPropertyGridIteratorBase() \ { Init( (wxPropertyGridPageState*)state, flags, \ (wxPGProperty*)property, dir ); } \ CLASS( STATE* state, int flags, int startPos, int dir = 0 ) \ : wxPropertyGridIteratorBase() \ { Init( (wxPropertyGridPageState*)state, flags, startPos, dir ); } \ CLASS() \ : wxPropertyGridIteratorBase() \ { \ m_property = NULL; \ } \ CLASS( const CLASS& it ) \ : wxPropertyGridIteratorBase( ) \ { \ Assign(it); \ } \ ~CLASS() \ { \ } \ const CLASS& operator=( const CLASS& it ) \ { \ if (this != &it) \ Assign(it); \ return *this; \ } \ CLASS& operator++() { Next(); return *this; } \ CLASS operator++(int) { CLASS it=*this;Next();return it; } \ CLASS& operator--() { Prev(); return *this; } \ CLASS operator--(int) { CLASS it=*this;Prev();return it; } \ PROPERTY* operator *() const { return (PROPERTY*)m_property; } \ static PROPERTY* OneStep( STATE* state, \ int flags = wxPG_ITERATE_DEFAULT, \ PROPERTY* property = NULL, \ int dir = 1 ) \ { \ CLASS it( state, flags, property, dir ); \ if ( property ) \ { \ if ( dir == 1 ) it.Next(); \ else it.Prev(); \ } \ return *it; \ } // Preferable way to iterate through contents of wxPropertyGrid, // wxPropertyGridManager, and wxPropertyGridPage. // See wxPropertyGridInterface::GetIterator() for more information about usage. class WXDLLIMPEXP_PROPGRID wxPropertyGridIterator : public wxPropertyGridIteratorBase { public: wxPG_IMPLEMENT_ITERATOR(wxPropertyGridIterator, wxPGProperty, wxPropertyGridPageState) protected: }; // Const version of wxPropertyGridIterator. class WXDLLIMPEXP_PROPGRID wxPropertyGridConstIterator : public wxPropertyGridIteratorBase { public: wxPG_IMPLEMENT_ITERATOR(wxPropertyGridConstIterator, const wxPGProperty, const wxPropertyGridPageState) // Additional copy constructor. wxPropertyGridConstIterator( const wxPropertyGridIterator& other ) { Assign(other); } // Additional assignment operator. const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it ) { Assign(it); return *this; } protected: }; // ----------------------------------------------------------------------- // Base class to derive new viterators. class WXDLLIMPEXP_PROPGRID wxPGVIteratorBase : public wxObjectRefData { friend class wxPGVIterator; public: wxPGVIteratorBase() { } virtual void Next() = 0; protected: virtual ~wxPGVIteratorBase() { } wxPropertyGridIterator m_it; }; // Abstract implementation of a simple iterator. Can only be used // to iterate in forward order, and only through the entire container. // Used to have functions dealing with all properties work with both // wxPropertyGrid and wxPropertyGridManager. class WXDLLIMPEXP_PROPGRID wxPGVIterator { public: wxPGVIterator() { m_pIt = NULL; } wxPGVIterator( wxPGVIteratorBase* obj ) { m_pIt = obj; } ~wxPGVIterator() { UnRef(); } void UnRef() { if (m_pIt) m_pIt->DecRef(); } wxPGVIterator( const wxPGVIterator& it ) { m_pIt = it.m_pIt; m_pIt->IncRef(); } const wxPGVIterator& operator=( const wxPGVIterator& it ) { if (this != &it) { UnRef(); m_pIt = it.m_pIt; m_pIt->IncRef(); } return *this; } void Next() { m_pIt->Next(); } bool AtEnd() const { return m_pIt->m_it.AtEnd(); } wxPGProperty* GetProperty() const { return m_pIt->m_it.GetProperty(); } protected: wxPGVIteratorBase* m_pIt; }; // ----------------------------------------------------------------------- // Contains low-level property page information (properties, column widths, // etc.) of a single wxPropertyGrid or single wxPropertyGridPage. Generally you // should not use this class directly, but instead member functions in // wxPropertyGridInterface, wxPropertyGrid, wxPropertyGridPage, and // wxPropertyGridManager. // - In separate wxPropertyGrid component this class was known as // wxPropertyGridState. // - Currently this class is not implemented in wxPython. class WXDLLIMPEXP_PROPGRID wxPropertyGridPageState { friend class wxPGProperty; friend class wxPropertyGrid; friend class wxPGCanvas; friend class wxPropertyGridInterface; friend class wxPropertyGridPage; friend class wxPropertyGridManager; public: // Default constructor. wxPropertyGridPageState(); // Destructor. virtual ~wxPropertyGridPageState(); // Makes sure all columns have minimum width. void CheckColumnWidths( int widthChange = 0 ); // Override this member function to add custom behaviour on property // deletion. virtual void DoDelete( wxPGProperty* item, bool doDelete = true ); wxSize DoFitColumns( bool allowGridResize = false ); wxPGProperty* DoGetItemAtY( int y ) const; // Override this member function to add custom behaviour on property // insertion. virtual wxPGProperty* DoInsert( wxPGProperty* parent, int index, wxPGProperty* property ); // This needs to be overridden in grid used the manager so that splitter // changes can be propagated to other pages. virtual void DoSetSplitterPosition( int pos, int splitterColumn = 0, int flags = 0 ); bool EnableCategories( bool enable ); // Make sure virtual height is up-to-date. void EnsureVirtualHeight() { if ( m_vhCalcPending ) { RecalculateVirtualHeight(); m_vhCalcPending = false; } } // Returns (precalculated) height of contained visible properties. unsigned int GetVirtualHeight() const { wxASSERT( !m_vhCalcPending ); return m_virtualHeight; } // Returns (precalculated) height of contained visible properties. unsigned int GetVirtualHeight() { EnsureVirtualHeight(); return m_virtualHeight; } // Returns actual height of contained visible properties. // Mostly used for internal diagnostic purposes. inline unsigned int GetActualVirtualHeight() const; unsigned int GetColumnCount() const { return (unsigned int) m_colWidths.size(); } int GetColumnMinWidth( int column ) const; int GetColumnWidth( unsigned int column ) const { return m_colWidths[column]; } wxPropertyGrid* GetGrid() const { return m_pPropGrid; } // Returns last item which could be iterated using given flags. wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ); const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const { return ((wxPropertyGridPageState*)this)->GetLastItem(flags); } // Returns currently selected property. wxPGProperty* GetSelection() const { return m_selection.empty()? NULL: m_selection[0]; } void DoSetSelection( wxPGProperty* prop ) { m_selection.clear(); if ( prop ) m_selection.push_back(prop); } bool DoClearSelection() { return DoSelectProperty(NULL); } void DoRemoveFromSelection( wxPGProperty* prop ); void DoSetColumnProportion( unsigned int column, int proportion ); int DoGetColumnProportion( unsigned int column ) const { return m_columnProportions[column]; } void ResetColumnSizes( int setSplitterFlags ); wxPropertyCategory* GetPropertyCategory( const wxPGProperty* p ) const; #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED_MSG("don't refer directly to wxPropertyGridPageState::GetPropertyByLabel") wxPGProperty* GetPropertyByLabel( const wxString& name, wxPGProperty* parent = NULL ) const; #endif // WXWIN_COMPATIBILITY_3_0 wxVariant DoGetPropertyValues( const wxString& listname, wxPGProperty* baseparent, long flags ) const; wxPGProperty* DoGetRoot() const { return m_properties; } void DoSetPropertyName( wxPGProperty* p, const wxString& newName ); // Returns combined width of margin and all the columns int GetVirtualWidth() const { return m_width; } // Returns minimal width for given column so that all images and texts // will fit entirely. // Used by SetSplitterLeft() and DoFitColumns(). int GetColumnFitWidth(wxClientDC& dc, wxPGProperty* pwc, unsigned int col, bool subProps) const; int GetColumnFullWidth(wxClientDC &dc, wxPGProperty *p, unsigned int col); // Returns information about arbitrary position in the grid. // pt - Logical coordinates in the virtual grid space. Use // wxScrolled<T>::CalcUnscrolledPosition() if you need to // translate a scrolled position into a logical one. wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; // Returns true if page is visibly displayed. inline bool IsDisplayed() const; bool IsInNonCatMode() const { return (bool)(m_properties == m_abcArray); } void DoLimitPropertyEditing( wxPGProperty* p, bool limit = true ) { p->SetFlagRecursively(wxPG_PROP_NOEDITOR, limit); } bool DoSelectProperty( wxPGProperty* p, unsigned int flags = 0 ); // widthChange is non-client. void OnClientWidthChange( int newWidth, int widthChange, bool fromOnResize = false ); // Recalculates m_virtualHeight. void RecalculateVirtualHeight() { m_virtualHeight = GetActualVirtualHeight(); } void SetColumnCount( int colCount ); void PropagateColSizeDec( int column, int decrease, int dir ); bool DoHideProperty( wxPGProperty* p, bool hide, int flags = wxPG_RECURSE ); bool DoSetPropertyValueString( wxPGProperty* p, const wxString& value ); bool DoSetPropertyValue( wxPGProperty* p, wxVariant& value ); bool DoSetPropertyValueWxObjectPtr( wxPGProperty* p, wxObject* value ); void DoSetPropertyValues( const wxVariantList& list, wxPGProperty* default_category ); void SetSplitterLeft( bool subProps = false ); // Set virtual width for this particular page. void SetVirtualWidth( int width ); void DoSortChildren( wxPGProperty* p, int flags = 0 ); void DoSort( int flags = 0 ); bool PrepareAfterItemsAdded(); // Called after virtual height needs to be recalculated. void VirtualHeightChanged() { m_vhCalcPending = true; } // Base append. wxPGProperty* DoAppend( wxPGProperty* property ); // Returns property by its name. wxPGProperty* BaseGetPropertyByName( const wxString& name ) const; // Called in, for example, wxPropertyGrid::Clear. void DoClear(); bool DoIsPropertySelected( wxPGProperty* prop ) const; bool DoCollapse( wxPGProperty* p ); bool DoExpand( wxPGProperty* p ); void CalculateFontAndBitmapStuff( int vspacing ); protected: // Utility to check if two properties are visibly next to each other bool ArePropertiesAdjacent( wxPGProperty* prop1, wxPGProperty* prop2, int iterFlags = wxPG_ITERATE_VISIBLE ) const; int DoGetSplitterPosition( int splitterIndex = 0 ) const; // Returns column at x coordinate (in GetGrid()->GetPanel()). // pSplitterHit - Give pointer to int that receives index to splitter that is at x. // pSplitterHitOffset - Distance from said splitter. int HitTestH( int x, int* pSplitterHit, int* pSplitterHitOffset ) const; bool PrepareToAddItem( wxPGProperty* property, wxPGProperty* scheduledParent ); // Returns property by its label. wxPGProperty* BaseGetPropertyByLabel( const wxString& label, wxPGProperty* parent = NULL ) const; // Unselect sub-properties. void DoRemoveChildrenFromSelection(wxPGProperty* p, bool recursive, int selFlags); // Mark sub-properties as being deleted. void DoMarkChildrenAsDeleted(wxPGProperty* p, bool recursive); // Rename the property // so it won't remain in the way of the user code. void DoInvalidatePropertyName(wxPGProperty* p); // Rename sub-properties // so it won't remain in the way of the user code. void DoInvalidateChildrenNames(wxPGProperty* p, bool recursive); // Check if property contains given sub-category. bool IsChildCategory(wxPGProperty* p, wxPropertyCategory* cat, bool recursive); // If visible, then this is pointer to wxPropertyGrid. // This shall *never* be NULL to indicate that this state is not visible. wxPropertyGrid* m_pPropGrid; // Pointer to currently used array. wxPGProperty* m_properties; // Array for categoric mode. wxPGRootProperty m_regularArray; // Array for root of non-categoric mode. wxPGRootProperty* m_abcArray; // Dictionary for name-based access. wxPGHashMapS2P m_dictName; // List of column widths (first column does not include margin). wxVector<int> m_colWidths; // List of indices of columns the user can edit by clicking it. wxVector<int> m_editableColumns; // Column proportions. wxVector<int> m_columnProportions; double m_fSplitterX; // Most recently added category. wxPropertyCategory* m_currentCategory; // Array of selected property. wxArrayPGProperty m_selection; // Virtual width. int m_width; // Indicates total virtual height of visible properties. unsigned int m_virtualHeight; #if WXWIN_COMPATIBILITY_3_0 // 1 if m_lastCaption is also the bottommost caption. unsigned char m_lastCaptionBottomnest; // 1 items appended/inserted, so stuff needs to be done before drawing; // If m_virtualHeight == 0, then calcylatey's must be done. // Otherwise just sort. unsigned char m_itemsAdded; // 1 if any value is modified. unsigned char m_anyModified; unsigned char m_vhCalcPending; #else // True if m_lastCaption is also the bottommost caption. bool m_lastCaptionBottomnest; // True: items appended/inserted, so stuff needs to be done before drawing; // If m_virtualHeight == 0, then calcylatey's must be done. // Otherwise just sort. bool m_itemsAdded; // True if any value is modified. bool m_anyModified; bool m_vhCalcPending; #endif // WXWIN_COMPATIBILITY_3_0 // True if splitter has been pre-set by the application. bool m_isSplitterPreSet; // Used to (temporarily) disable splitter centering. bool m_dontCenterSplitter; private: // Only inits arrays, doesn't migrate things or such. void InitNonCatMode(); }; // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_PROPGRIDPAGESTATE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/editors.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/editors.h // Purpose: wxPropertyGrid editors // Author: Jaakko Salli // Modified by: // Created: 2007-04-14 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_EDITORS_H_ #define _WX_PROPGRID_EDITORS_H_ #include "wx/defs.h" #if wxUSE_PROPGRID class WXDLLIMPEXP_FWD_PROPGRID wxPGCell; class WXDLLIMPEXP_FWD_PROPGRID wxPGProperty; class WXDLLIMPEXP_FWD_PROPGRID wxPropertyGrid; // ----------------------------------------------------------------------- // wxPGWindowList contains list of editor windows returned by CreateControls. class wxPGWindowList { public: wxPGWindowList() { m_primary = m_secondary = NULL; } void SetSecondary( wxWindow* secondary ) { m_secondary = secondary; } wxWindow* m_primary; wxWindow* m_secondary; wxPGWindowList( wxWindow* a ) { m_primary = a; m_secondary = NULL; } wxPGWindowList( wxWindow* a, wxWindow* b ) { m_primary = a; m_secondary = b; } }; // ----------------------------------------------------------------------- // Base class for custom wxPropertyGrid editors. // - Names of builtin property editors are: TextCtrl, Choice, // ComboBox, CheckBox, TextCtrlAndButton, and ChoiceAndButton. Additional // editors include SpinCtrl and DatePickerCtrl, but using them requires // calling wxPropertyGrid::RegisterAdditionalEditors() prior use. // - Pointer to builtin editor is available as wxPGEditor_EditorName // (e.g. wxPGEditor_TextCtrl). // - To add new editor you need to register it first using static function // wxPropertyGrid::RegisterEditorClass(), with code like this: // wxPGEditor *editorPointer = wxPropertyGrid::RegisterEditorClass( // new MyEditorClass(), "MyEditor"); // After that, wxPropertyGrid will take ownership of the given object, but // you should still store editorPointer somewhere, so you can pass it to // wxPGProperty::SetEditor(), or return it from // wxPGEditor::DoGetEditorClass(). class WXDLLIMPEXP_PROPGRID wxPGEditor : public wxObject { wxDECLARE_ABSTRACT_CLASS(wxPGEditor); public: // Constructor. wxPGEditor() : wxObject() { m_clientData = NULL; } // Destructor. virtual ~wxPGEditor(); // Returns pointer to the name of the editor. For example, // wxPGEditor_TextCtrl has name "TextCtrl". If you don't need to access // your custom editor by string name, then you do not need to implement // this function. virtual wxString GetName() const; // Instantiates editor controls. // propgrid- wxPropertyGrid to which the property belongs // (use as parent for control). // property - Property for which this method is called. // pos - Position, inside wxPropertyGrid, to create control(s) to. // size - Initial size for control(s). // Unlike in previous version of wxPropertyGrid, it is no longer // necessary to call wxEvtHandler::Connect() for interesting editor // events. Instead, all events from control are now automatically // forwarded to wxPGEditor::OnEvent() and wxPGProperty::OnEvent(). virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const = 0; // Loads value from property to the control. virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const = 0; // Used to get the renderer to draw the value with when the control is // hidden. // Default implementation returns g_wxPGDefaultRenderer. //virtual wxPGCellRenderer* GetCellRenderer() const; // Draws value for given property. virtual void DrawValue( wxDC& dc, const wxRect& rect, wxPGProperty* property, const wxString& text ) const; // Handles events. Returns true if value in control was modified // (see wxPGProperty::OnEvent for more information). // wxPropertyGrid will automatically unfocus the editor when // wxEVT_TEXT_ENTER is received and when it results in // property value being modified. This happens regardless of // editor type (i.e. behaviour is same for any wxTextCtrl and // wxComboBox based editor). virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd_primary, wxEvent& event ) const = 0; // Returns value from control, via parameter 'variant'. // Usually ends up calling property's StringToValue or IntToValue. // Returns true if value was different. virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const; // Sets new appearance for the control. Default implementation // sets foreground colour, background colour, font, plus text // for wxTextCtrl and wxComboCtrl. // appearance - New appearance to be applied. // oldAppearance - Previously applied appearance. Used to detect // which control attributes need to be changed (e.g. so we only // change background colour if really needed). // unspecified - true if the new appearance represents an unspecified // property value. virtual void SetControlAppearance( wxPropertyGrid* pg, wxPGProperty* property, wxWindow* ctrl, const wxPGCell& appearance, const wxPGCell& oldAppearance, bool unspecified ) const; // Sets value in control to unspecified. virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const; // Sets control's value specifically from string. virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ) const; // Sets control's value specifically from int (applies to choice etc.). virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const; // Inserts item to existing control. Index -1 means appending. // Default implementation does nothing. Returns index of item added. virtual int InsertItem( wxWindow* ctrl, const wxString& label, int index ) const; // Deletes item from existing control. // Default implementation does nothing. virtual void DeleteItem( wxWindow* ctrl, int index ) const; // Extra processing when control gains focus. For example, wxTextCtrl // based controls should select all text. virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; // Returns true if control itself can contain the custom image. Default is // to return false. virtual bool CanContainCustomImage() const; // // This member is public so scripting language bindings // wrapper code can access it freely. void* m_clientData; }; #define WX_PG_IMPLEMENT_INTERNAL_EDITOR_CLASS(EDITOR,CLASSNAME,BASECLASS) \ wxIMPLEMENT_DYNAMIC_CLASS(CLASSNAME, BASECLASS); \ wxString CLASSNAME::GetName() const \ { \ return wxS(#EDITOR); \ } \ wxPGEditor* wxPGEditor_##EDITOR = NULL; // // Following are the built-in editor classes. // class WXDLLIMPEXP_PROPGRID wxPGTextCtrlEditor : public wxPGEditor { wxDECLARE_DYNAMIC_CLASS(wxPGTextCtrlEditor); public: wxPGTextCtrlEditor() {} virtual ~wxPGTextCtrlEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const wxOVERRIDE; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual wxString GetName() const wxOVERRIDE; //virtual wxPGCellRenderer* GetCellRenderer() const; virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ) const wxOVERRIDE; virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const wxOVERRIDE; // Provided so that, for example, ComboBox editor can use the same code // (multiple inheritance would get way too messy). static bool OnTextCtrlEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ); static bool GetTextCtrlValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ); }; class WXDLLIMPEXP_PROPGRID wxPGChoiceEditor : public wxPGEditor { wxDECLARE_DYNAMIC_CLASS(wxPGChoiceEditor); public: wxPGChoiceEditor() {} virtual ~wxPGChoiceEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const wxOVERRIDE; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual wxString GetName() const wxOVERRIDE; virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const wxOVERRIDE; virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ) const wxOVERRIDE; virtual int InsertItem( wxWindow* ctrl, const wxString& label, int index ) const wxOVERRIDE; virtual void DeleteItem( wxWindow* ctrl, int index ) const wxOVERRIDE; virtual bool CanContainCustomImage() const wxOVERRIDE; // CreateControls calls this with CB_READONLY in extraStyle wxWindow* CreateControlsBase( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& sz, long extraStyle ) const; }; class WXDLLIMPEXP_PROPGRID wxPGComboBoxEditor : public wxPGChoiceEditor { wxDECLARE_DYNAMIC_CLASS(wxPGComboBoxEditor); public: wxPGComboBoxEditor() {} virtual ~wxPGComboBoxEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; virtual wxString GetName() const wxOVERRIDE; virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ) const wxOVERRIDE; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const wxOVERRIDE; }; class WXDLLIMPEXP_PROPGRID wxPGChoiceAndButtonEditor : public wxPGChoiceEditor { public: wxPGChoiceAndButtonEditor() {} virtual ~wxPGChoiceAndButtonEditor(); virtual wxString GetName() const wxOVERRIDE; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; wxDECLARE_DYNAMIC_CLASS(wxPGChoiceAndButtonEditor); }; class WXDLLIMPEXP_PROPGRID wxPGTextCtrlAndButtonEditor : public wxPGTextCtrlEditor { public: wxPGTextCtrlAndButtonEditor() {} virtual ~wxPGTextCtrlAndButtonEditor(); virtual wxString GetName() const wxOVERRIDE; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; wxDECLARE_DYNAMIC_CLASS(wxPGTextCtrlAndButtonEditor); }; #if wxPG_INCLUDE_CHECKBOX // // Use custom check box code instead of native control // for cleaner (i.e. more integrated) look. // class WXDLLIMPEXP_PROPGRID wxPGCheckBoxEditor : public wxPGEditor { wxDECLARE_DYNAMIC_CLASS(wxPGCheckBoxEditor); public: wxPGCheckBoxEditor() {} virtual ~wxPGCheckBoxEditor(); virtual wxString GetName() const wxOVERRIDE; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const wxOVERRIDE; virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const wxOVERRIDE; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const wxOVERRIDE; virtual void DrawValue( wxDC& dc, const wxRect& rect, wxPGProperty* property, const wxString& text ) const wxOVERRIDE; //virtual wxPGCellRenderer* GetCellRenderer() const; virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const wxOVERRIDE; }; #endif // ----------------------------------------------------------------------- // Editor class registration macro (mostly for internal use) #define wxPGRegisterEditorClass(EDITOR) \ if ( wxPGEditor_##EDITOR == NULL ) \ { \ wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \ new wxPG##EDITOR##Editor ); \ } // ----------------------------------------------------------------------- // Derive a class from this to adapt an existing editor dialog or function to // be used when editor button of a property is pushed. // You only need to derive class and implement DoShowDialog() to create and // show the dialog, and finally submit the value returned by the dialog // via SetValue(). class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject { wxDECLARE_ABSTRACT_CLASS(wxPGEditorDialogAdapter); public: wxPGEditorDialogAdapter() : wxObject() { m_clientData = NULL; } virtual ~wxPGEditorDialogAdapter() { } bool ShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ) = 0; void SetValue( wxVariant value ) { m_value = value; } // This method is typically only used if deriving class from existing // adapter with value conversion purposes. wxVariant& GetValue() { return m_value; } // This member is public so scripting language bindings // wrapper code can access it freely. void* m_clientData; private: wxVariant m_value; }; // ----------------------------------------------------------------------- // This class can be used to have multiple buttons in a property editor. // You will need to create a new property editor class, override // CreateControls, and have it return wxPGMultiButton instance in // wxPGWindowList::SetSecondary(). class WXDLLIMPEXP_PROPGRID wxPGMultiButton : public wxWindow { public: wxPGMultiButton( wxPropertyGrid* pg, const wxSize& sz ); virtual ~wxPGMultiButton() {} wxWindow* GetButton( unsigned int i ) { return (wxWindow*) m_buttons[i]; } const wxWindow* GetButton( unsigned int i ) const { return (const wxWindow*) m_buttons[i]; } // Utility function to be used in event handlers. int GetButtonId( unsigned int i ) const { return GetButton(i)->GetId(); } // Returns number of buttons. unsigned int GetCount() const { return (unsigned int) m_buttons.size(); } void Add( const wxString& label, int id = -2 ); #if wxUSE_BMPBUTTON void Add( const wxBitmap& bitmap, int id = -2 ); #endif wxSize GetPrimarySize() const { return wxSize(m_fullEditorSize.x - m_buttonsWidth, m_fullEditorSize.y); } void Finalize( wxPropertyGrid* propGrid, const wxPoint& pos ); protected: void DoAddButton( wxWindow* button, const wxSize& sz ); int GenId( int id ) const; wxArrayPtrVoid m_buttons; wxSize m_fullEditorSize; int m_buttonsWidth; }; // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_EDITORS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/props.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/props.h // Purpose: wxPropertyGrid Property Classes // Author: Jaakko Salli // Modified by: // Created: 2007-03-28 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_PROPS_H_ #define _WX_PROPGRID_PROPS_H_ #include "wx/defs.h" #if wxUSE_PROPGRID // ----------------------------------------------------------------------- class wxPGArrayEditorDialog; #include "wx/propgrid/editors.h" #include "wx/filename.h" #include "wx/dialog.h" #include "wx/textctrl.h" #include "wx/button.h" #include "wx/listbox.h" #include "wx/valtext.h" // ----------------------------------------------------------------------- // // Property class implementation helper macros. // #define wxPG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, EDITOR) \ wxIMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS); \ wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, EDITOR) #if WXWIN_COMPATIBILITY_3_0 // This macro is deprecated. Use wxPG_IMPLEMENT_PROPERTY_CLASS instead. #define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, T, T_AS_ARG, EDITOR) \ wxIMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS); \ WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR) #endif // WXWIN_COMPATIBILITY_3_0 // ----------------------------------------------------------------------- // // These macros help creating DoGetValidator #define WX_PG_DOGETVALIDATOR_ENTRY() \ static wxValidator* s_ptr = NULL; \ if ( s_ptr ) return s_ptr; // Common function exit #define WX_PG_DOGETVALIDATOR_EXIT(VALIDATOR) \ s_ptr = VALIDATOR; \ wxPGGlobalVars->m_arrValidators.push_back( VALIDATOR ); \ return VALIDATOR; // ----------------------------------------------------------------------- // Creates and manages a temporary wxTextCtrl for validation purposes. // Uses wxPropertyGrid's current editor, if available. class WXDLLIMPEXP_PROPGRID wxPGInDialogValidator { public: wxPGInDialogValidator() { m_textCtrl = NULL; } ~wxPGInDialogValidator() { if ( m_textCtrl ) m_textCtrl->Destroy(); } bool DoValidate( wxPropertyGrid* propGrid, wxValidator* validator, const wxString& value ); private: wxTextCtrl* m_textCtrl; }; // ----------------------------------------------------------------------- // Property classes // ----------------------------------------------------------------------- #define wxPG_PROP_PASSWORD wxPG_PROP_CLASS_SPECIFIC_2 // Basic property with string value. // If value "<composed>" is set, then actual value is formed (or composed) // from values of child properties. class WXDLLIMPEXP_PROPGRID wxStringProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxStringProperty) public: wxStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual ~wxStringProperty(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; // This is updated so "<composed>" special value can be handled. virtual void OnSetValue() wxOVERRIDE; protected: }; // ----------------------------------------------------------------------- // Constants used with NumericValidation<>(). enum wxPGNumericValidationConstants { // Instead of modifying the value, show an error message. wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE = 0, // Modify value, but stick with the limitations. wxPG_PROPERTY_VALIDATION_SATURATE = 1, // Modify value, wrap around on overflow. wxPG_PROPERTY_VALIDATION_WRAP = 2 }; // ----------------------------------------------------------------------- #if wxUSE_VALIDATORS // A more comprehensive numeric validator class. class WXDLLIMPEXP_PROPGRID wxNumericPropertyValidator : public wxTextValidator { public: enum NumericType { Signed = 0, Unsigned, Float }; wxNumericPropertyValidator( NumericType numericType, int base = 10 ); virtual ~wxNumericPropertyValidator() { } virtual bool Validate(wxWindow* parent) wxOVERRIDE; }; #endif // wxUSE_VALIDATORS // Basic property with integer value. // Seamlessly supports 64-bit integer (wxLongLong) on overflow. class WXDLLIMPEXP_PROPGRID wxIntProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxIntProperty) public: wxIntProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, long value = 0 ); virtual ~wxIntProperty(); #if wxUSE_LONGLONG wxIntProperty( const wxString& label, const wxString& name, const wxLongLong& value ); #endif virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const wxOVERRIDE; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const wxOVERRIDE; static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator() const wxOVERRIDE; // Validation helpers. #if wxUSE_LONGLONG static bool DoValidation( const wxPGProperty* property, wxLongLong& value, wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); #if defined(wxLongLong_t) static bool DoValidation( const wxPGProperty* property, wxLongLong_t& value, wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); #endif // wxLongLong_t #endif // wxUSE_LONGLONG static bool DoValidation(const wxPGProperty* property, long& value, wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE); protected: }; // ----------------------------------------------------------------------- // Basic property with unsigned integer value. // Seamlessly supports 64-bit integer (wxULongLong) on overflow. class WXDLLIMPEXP_PROPGRID wxUIntProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxUIntProperty) public: wxUIntProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, unsigned long value = 0 ); virtual ~wxUIntProperty(); #if wxUSE_LONGLONG wxUIntProperty( const wxString& label, const wxString& name, const wxULongLong& value ); #endif virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const wxOVERRIDE; virtual wxValidator* DoGetValidator () const wxOVERRIDE; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const wxOVERRIDE; protected: wxByte m_base; wxByte m_realBase; // translated to 8,16,etc. wxByte m_prefix; private: void Init(); // Validation helpers. #if wxUSE_LONGLONG static bool DoValidation(const wxPGProperty* property, wxULongLong& value, wxPGValidationInfo* pValidationInfo, int mode =wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE); #if defined(wxULongLong_t) static bool DoValidation(const wxPGProperty* property, wxULongLong_t& value, wxPGValidationInfo* pValidationInfo, int mode =wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE); #endif // wxULongLong_t #endif // wxUSE_LONGLONG static bool DoValidation(const wxPGProperty* property, long& value, wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE); }; // ----------------------------------------------------------------------- // Basic property with double-precision floating point value. class WXDLLIMPEXP_PROPGRID wxFloatProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxFloatProperty) public: wxFloatProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, double value = 0.0 ); virtual ~wxFloatProperty(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; virtual wxVariant DoGetAttribute( const wxString& name ) const wxOVERRIDE; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const wxOVERRIDE; // Validation helper. static bool DoValidation( const wxPGProperty* property, double& value, wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator () const wxOVERRIDE; protected: int m_precision; }; // ----------------------------------------------------------------------- // Basic property with boolean value. class WXDLLIMPEXP_PROPGRID wxBoolProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxBoolProperty) public: wxBoolProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, bool value = false ); virtual ~wxBoolProperty(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; virtual wxVariant DoGetAttribute( const wxString& name ) const wxOVERRIDE; }; // ----------------------------------------------------------------------- // If set, then selection of choices is static and should not be // changed (i.e. returns NULL in GetPropertyChoices). #define wxPG_PROP_STATIC_CHOICES wxPG_PROP_CLASS_SPECIFIC_1 // Represents a single selection from a list of choices // You can derive custom properties with choices from this class. // Updating private index is important. You can do this either by calling // SetIndex() in IntToValue, and then letting wxBaseEnumProperty::OnSetValue // be called (by not implementing it, or by calling super class function in // it) -OR- you can just call SetIndex in OnSetValue. class WXDLLIMPEXP_PROPGRID wxEnumProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxEnumProperty) public: #ifndef SWIG wxEnumProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxChar* const* labels = NULL, const long* values = NULL, int value = 0 ); wxEnumProperty( const wxString& label, const wxString& name, wxPGChoices& choices, int value = 0 ); // Special constructor for caching choices (used by derived class) wxEnumProperty( const wxString& label, const wxString& name, const char* const* untranslatedLabels, const long* values, wxPGChoices* choicesCache, int value = 0 ); wxEnumProperty( const wxString& label, const wxString& name, const wxArrayString& labels, const wxArrayInt& values = wxArrayInt(), int value = 0 ); #else wxEnumProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& labels = wxArrayString(), const wxArrayInt& values = wxArrayInt(), int value = 0 ); #endif virtual ~wxEnumProperty(); size_t GetItemCount() const { return m_choices.GetCount(); } virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const wxOVERRIDE; // If wxPG_FULL_VALUE is not set in flags, then the value is interpreted // as index to choices list. Otherwise, it is actual value. virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const wxOVERRIDE; // // Additional virtuals // This must be overridden to have non-index based value virtual int GetIndexForValue( int value ) const; // GetChoiceSelection needs to overridden since m_index is // the true index, and various property classes derived from // this take advantage of it. virtual int GetChoiceSelection() const wxOVERRIDE { return m_index; } virtual void OnValidationFailure( wxVariant& pendingValue ) wxOVERRIDE; protected: int GetIndex() const; void SetIndex( int index ); #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED_MSG("use ValueFromString_(wxVariant&, int*, const wxString&, int) function instead") bool ValueFromString_( wxVariant& value, const wxString& text, int argFlags ) const { return ValueFromString_(value, NULL, text, argFlags); } wxDEPRECATED_MSG("use ValueFromInt_(wxVariant&, int*, int, int) function instead") bool ValueFromInt_( wxVariant& value, int intVal, int argFlags ) const { return ValueFromInt_(value, NULL, intVal, argFlags); } wxDEPRECATED_MSG("don't use ResetNextIndex() function") static void ResetNextIndex() { } #endif // Converts text to value and returns corresponding index in the collection bool ValueFromString_(wxVariant& value, int* pIndex, const wxString& text, int argFlags) const; // Converts number to value and returns corresponding index in the collection bool ValueFromInt_(wxVariant& value, int* pIndex, int intVal, int argFlags) const; private: // This is private so that classes are guaranteed to use GetIndex // for up-to-date index value. int m_index; }; // ----------------------------------------------------------------------- // wxEnumProperty with wxString value and writable combo box editor. // Uses int value, similar to wxEnumProperty, unless text entered by user is // is not in choices (in which case string value is used). class WXDLLIMPEXP_PROPGRID wxEditEnumProperty : public wxEnumProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxEditEnumProperty) public: wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels, const long* values, const wxString& value ); wxEditEnumProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& labels = wxArrayString(), const wxArrayInt& values = wxArrayInt(), const wxString& value = wxEmptyString ); wxEditEnumProperty( const wxString& label, const wxString& name, wxPGChoices& choices, const wxString& value = wxEmptyString ); // Special constructor for caching choices (used by derived class) wxEditEnumProperty( const wxString& label, const wxString& name, const char* const* untranslatedLabels, const long* values, wxPGChoices* choicesCache, const wxString& value ); virtual ~wxEditEnumProperty(); void OnSetValue() wxOVERRIDE; bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const wxOVERRIDE; bool ValidateValue(wxVariant& value, wxPGValidationInfo& validationInfo) const wxOVERRIDE; protected: }; // ----------------------------------------------------------------------- // Represents a bit set that fits in a long integer. wxBoolProperty // sub-properties are created for editing individual bits. Textctrl is created // to manually edit the flags as a text; a continuous sequence of spaces, // commas and semicolons is considered as a flag id separator. // Note: When changing "choices" (ie. flag labels) of wxFlagsProperty, // you will need to use SetPropertyChoices - otherwise they will not get // updated properly. class WXDLLIMPEXP_PROPGRID wxFlagsProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxFlagsProperty) public: #ifndef SWIG wxFlagsProperty( const wxString& label, const wxString& name, const wxChar* const* labels, const long* values = NULL, long value = 0 ); wxFlagsProperty( const wxString& label, const wxString& name, wxPGChoices& choices, long value = 0 ); #endif wxFlagsProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& labels = wxArrayString(), const wxArrayInt& values = wxArrayInt(), int value = 0 ); virtual ~wxFlagsProperty (); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int flags ) const wxOVERRIDE; virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const wxOVERRIDE; virtual void RefreshChildren() wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; // GetChoiceSelection needs to overridden since m_choices is // used and value is integer, but it is not index. virtual int GetChoiceSelection() const wxOVERRIDE { return wxNOT_FOUND; } // helpers size_t GetItemCount() const { return m_choices.GetCount(); } const wxString& GetLabel( size_t ind ) const { return m_choices.GetLabel(static_cast<unsigned int>(ind)); } protected: // Used to detect if choices have been changed wxPGChoicesData* m_oldChoicesData; // Needed to properly mark changed sub-properties long m_oldValue; // Converts string id to a relevant bit. long IdToBit( const wxString& id ) const; // Creates children and sets value. void Init(); }; // ----------------------------------------------------------------------- class WXDLLIMPEXP_PROPGRID wxPGFileDialogAdapter : public wxPGEditorDialogAdapter { public: virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ) wxOVERRIDE; }; // ----------------------------------------------------------------------- // Indicates first bit useable by derived properties. #define wxPG_PROP_SHOW_FULL_FILENAME wxPG_PROP_CLASS_SPECIFIC_1 // Like wxLongStringProperty, but the button triggers file selector instead. class WXDLLIMPEXP_PROPGRID wxFileProperty : public wxPGProperty { friend class wxPGFileDialogAdapter; WX_PG_DECLARE_PROPERTY_CLASS(wxFileProperty) public: wxFileProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual ~wxFileProperty (); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual wxPGEditorDialogAdapter* GetEditorDialog() const wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator() const wxOVERRIDE; // Returns filename to file represented by current value. wxFileName GetFileName() const; protected: wxString m_wildcard; wxString m_basePath; // If set, then show path relative to it wxString m_initialPath; // If set, start the file dialog here wxString m_dlgTitle; // If set, used as title for file dialog int m_indFilter; // index to the selected filter }; // ----------------------------------------------------------------------- #define wxPG_PROP_NO_ESCAPE wxPG_PROP_CLASS_SPECIFIC_1 // Flag used in wxLongStringProperty to mark that edit button // should be enabled even in the read-only mode. #define wxPG_PROP_ACTIVE_BTN wxPG_PROP_CLASS_SPECIFIC_3 class WXDLLIMPEXP_PROPGRID wxPGLongStringDialogAdapter : public wxPGEditorDialogAdapter { public: virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ) wxOVERRIDE; }; // Like wxStringProperty, but has a button that triggers a small text // editor dialog. class WXDLLIMPEXP_PROPGRID wxLongStringProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxLongStringProperty) public: wxLongStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual ~wxLongStringProperty(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ) wxOVERRIDE; // Shows string editor dialog. Value to be edited should be read from // value, and if dialog is not cancelled, it should be stored back and true // should be returned if that was the case. virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); static bool DisplayEditorDialog( wxPGProperty* prop, wxPropertyGrid* propGrid, wxString& value ); protected: }; // ----------------------------------------------------------------------- // Like wxLongStringProperty, but the button triggers dir selector instead. class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty { wxDECLARE_DYNAMIC_CLASS(wxDirProperty); public: wxDirProperty( const wxString& name = wxPG_LABEL, const wxString& label = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual ~wxDirProperty(); virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; virtual wxValidator* DoGetValidator() const wxOVERRIDE; virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value ) wxOVERRIDE; protected: wxString m_dlgMessage; }; // ----------------------------------------------------------------------- // wxBoolProperty specific flags #define wxPG_PROP_USE_CHECKBOX wxPG_PROP_CLASS_SPECIFIC_1 // DCC = Double Click Cycles #define wxPG_PROP_USE_DCC wxPG_PROP_CLASS_SPECIFIC_2 // ----------------------------------------------------------------------- // Property that manages a list of strings. class WXDLLIMPEXP_PROPGRID wxArrayStringProperty : public wxPGProperty { WX_PG_DECLARE_PROPERTY_CLASS(wxArrayStringProperty) public: wxArrayStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& value = wxArrayString() ); virtual ~wxArrayStringProperty(); virtual void OnSetValue() wxOVERRIDE; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const wxOVERRIDE; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const wxOVERRIDE; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ) wxOVERRIDE; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) wxOVERRIDE; // Implement in derived class for custom array-to-string conversion. virtual void ConvertArrayToString(const wxArrayString& arr, wxString* pString, const wxUniChar& delimiter) const; // Shows string editor dialog. Value to be edited should be read from // value, and if dialog is not cancelled, it should be stored back and true // should be returned if that was the case. virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); // Helper. virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxWindow* primary, const wxChar* cbt ); // Creates wxPGArrayEditorDialog for string editing. Called in OnButtonClick. virtual wxPGArrayEditorDialog* CreateEditorDialog(); enum ConversionFlags { Escape = 0x01, QuoteStrings = 0x02 }; // Generates contents for string dst based on the contents of // wxArrayString src. static void ArrayStringToString( wxString& dst, const wxArrayString& src, wxUniChar delimiter, int flags ); protected: // Previously this was to be implemented in derived class for array-to- // string conversion. Now you should implement ConvertValueToString() // instead. virtual void GenerateValueAsString(); wxString m_display; // Cache for displayed text. wxUniChar m_delimiter; }; // ----------------------------------------------------------------------- #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, \ DECL) \ DECL PROPNAME : public wxArrayStringProperty \ { \ WX_PG_DECLARE_PROPERTY_CLASS(PROPNAME) \ public: \ PROPNAME( const wxString& label = wxPG_LABEL, \ const wxString& name = wxPG_LABEL, \ const wxArrayString& value = wxArrayString() ); \ ~PROPNAME(); \ virtual bool OnEvent( wxPropertyGrid* propgrid, \ wxWindow* primary, wxEvent& event ) wxOVERRIDE; \ virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ) wxOVERRIDE; \ virtual wxValidator* DoGetValidator() const wxOVERRIDE; \ }; #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM) \ WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM, class) #define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \ DELIMCHAR, \ CUSTBUTTXT) \ wxPG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \ TextCtrlAndButton) \ PROPNAME::PROPNAME( const wxString& label, \ const wxString& name, \ const wxArrayString& value ) \ : wxArrayStringProperty(label,name,value) \ { \ PROPNAME::GenerateValueAsString(); \ m_delimiter = DELIMCHAR; \ } \ PROPNAME::~PROPNAME() { } \ bool PROPNAME::OnEvent( wxPropertyGrid* propgrid, \ wxWindow* primary, wxEvent& event ) \ { \ if ( event.GetEventType() == wxEVT_BUTTON ) \ return OnButtonClick(propgrid,primary,(const wxChar*) CUSTBUTTXT); \ return false; \ } #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY(PROPNAME) \ WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME) #define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_DECL(PROPNAME, DECL) \ WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, DECL) #define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY(PROPNAME,DELIMCHAR,CUSTBUTTXT) \ WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \ DELIMCHAR, \ CUSTBUTTXT) \ wxValidator* PROPNAME::DoGetValidator () const \ { return NULL; } // ----------------------------------------------------------------------- // wxPGArrayEditorDialog // ----------------------------------------------------------------------- #if wxUSE_EDITABLELISTBOX class WXDLLIMPEXP_FWD_CORE wxEditableListBox; class WXDLLIMPEXP_FWD_CORE wxListEvent; #define wxAEDIALOG_STYLE \ (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE) class WXDLLIMPEXP_PROPGRID wxPGArrayEditorDialog : public wxDialog { public: wxPGArrayEditorDialog(); virtual ~wxPGArrayEditorDialog() { } void Init(); wxPGArrayEditorDialog( wxWindow *parent, const wxString& message, const wxString& caption, long style = wxAEDIALOG_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize ); bool Create( wxWindow *parent, const wxString& message, const wxString& caption, long style = wxAEDIALOG_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize ); void EnableCustomNewAction() { m_hasCustomNewAction = true; } // Set value modified by dialog. virtual void SetDialogValue( const wxVariant& WXUNUSED(value) ) { wxFAIL_MSG(wxS("re-implement this member function in derived class")); } // Return value modified by dialog. virtual wxVariant GetDialogValue() const { wxFAIL_MSG(wxS("re-implement this member function in derived class")); return wxVariant(); } // Override to return wxValidator to be used with the wxTextCtrl // in dialog. Note that the validator is used in the standard // wx way, i.e. it immediately prevents user from entering invalid // input. // Note: Dialog frees the validator. virtual wxValidator* GetTextCtrlValidator() const { return NULL; } // Returns true if array was actually modified bool IsModified() const { return m_modified; } // wxEditableListBox utilities int GetSelection() const; // implementation from now on void OnAddClick(wxCommandEvent& event); void OnDeleteClick(wxCommandEvent& event); void OnUpClick(wxCommandEvent& event); void OnDownClick(wxCommandEvent& event); void OnEndLabelEdit(wxListEvent& event); void OnBeginLabelEdit(wxListEvent& evt); void OnIdle(wxIdleEvent& event); protected: wxEditableListBox* m_elb; // These are used for focus repair wxWindow* m_elbSubPanel; wxWindow* m_lastFocused; // A new item, edited by user, is pending at this index. // It will be committed once list ctrl item editing is done. int m_itemPendingAtIndex; bool m_modified; bool m_hasCustomNewAction; // These must be overridden - must return true on success. virtual wxString ArrayGet( size_t index ) = 0; virtual size_t ArrayGetCount() = 0; virtual bool ArrayInsert( const wxString& str, int index ) = 0; virtual bool ArraySet( size_t index, const wxString& str ) = 0; virtual void ArrayRemoveAt( int index ) = 0; virtual void ArraySwap( size_t first, size_t second ) = 0; virtual bool OnCustomNewAction(wxString* WXUNUSED(resString)) { return false; } private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayEditorDialog); wxDECLARE_EVENT_TABLE(); }; #endif // wxUSE_EDITABLELISTBOX // ----------------------------------------------------------------------- // wxPGArrayStringEditorDialog // ----------------------------------------------------------------------- class WXDLLIMPEXP_PROPGRID wxPGArrayStringEditorDialog : public wxPGArrayEditorDialog { public: wxPGArrayStringEditorDialog(); virtual ~wxPGArrayStringEditorDialog() { } void Init(); virtual void SetDialogValue( const wxVariant& value ) wxOVERRIDE { m_array = value.GetArrayString(); } virtual wxVariant GetDialogValue() const wxOVERRIDE { return m_array; } void SetCustomButton( const wxString& custBtText, wxArrayStringProperty* pcc ) { if ( !custBtText.empty() ) { EnableCustomNewAction(); m_pCallingClass = pcc; } } virtual bool OnCustomNewAction(wxString* resString) wxOVERRIDE; protected: wxArrayString m_array; wxArrayStringProperty* m_pCallingClass; virtual wxString ArrayGet( size_t index ) wxOVERRIDE; virtual size_t ArrayGetCount() wxOVERRIDE; virtual bool ArrayInsert( const wxString& str, int index ) wxOVERRIDE; virtual bool ArraySet( size_t index, const wxString& str ) wxOVERRIDE; virtual void ArrayRemoveAt( int index ) wxOVERRIDE; virtual void ArraySwap( size_t first, size_t second ) wxOVERRIDE; private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog); wxDECLARE_EVENT_TABLE(); }; // ----------------------------------------------------------------------- #endif // wxUSE_PROPGRID #endif // _WX_PROPGRID_PROPS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/propgrid/propgrid.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/propgrid/propgrid.h // Purpose: wxPropertyGrid // Author: Jaakko Salli // Modified by: // Created: 2004-09-25 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_PROPGRID_H_ #define _WX_PROPGRID_PROPGRID_H_ #include "wx/defs.h" #if wxUSE_PROPGRID #include "wx/thread.h" #include "wx/dcclient.h" #include "wx/control.h" #include "wx/scrolwin.h" #include "wx/tooltip.h" #include "wx/datetime.h" #include "wx/recguard.h" #include "wx/time.h" // needed for wxMilliClock_t #include "wx/propgrid/property.h" #include "wx/propgrid/propgridiface.h" #ifndef SWIG extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridNameStr[]; #endif class wxPGComboBox; #if wxUSE_STATUSBAR class WXDLLIMPEXP_FWD_CORE wxStatusBar; #endif // ----------------------------------------------------------------------- // Global variables // ----------------------------------------------------------------------- // This is required for sharing common global variables. class WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass { public: wxPGGlobalVarsClass(); ~wxPGGlobalVarsClass(); #if wxUSE_THREADS // Critical section for handling the globals. Generally it is not needed // since GUI code is supposed to be in single thread. However, // we do want the user to be able to convey wxPropertyGridEvents to other // threads. wxCriticalSection m_critSect; #endif // Used by advprops, but here to make things easier. wxString m_pDefaultImageWildcard; // Map of editor class instances (keys are name string). wxPGHashMapS2P m_mapEditorClasses; #if wxUSE_VALIDATORS wxVector<wxValidator*> m_arrValidators; // These wxValidators need to be freed #endif wxPGHashMapS2P m_dictPropertyClassInfo; // PropertyName -> ClassInfo wxPGChoices* m_fontFamilyChoices; // Replace with your own to affect all properties using default renderer. wxPGCellRenderer* m_defaultRenderer; wxPGChoices m_boolChoices; // Some shared variants #if WXWIN_COMPATIBILITY_3_0 wxVariant m_vEmptyString; wxVariant m_vZero; wxVariant m_vMinusOne; wxVariant m_vTrue; wxVariant m_vFalse; #else const wxVariant m_vEmptyString; const wxVariant m_vZero; const wxVariant m_vMinusOne; const wxVariant m_vTrue; const wxVariant m_vFalse; #endif // WXWIN_COMPATIBILITY_3_0 // Cached constant strings #if WXWIN_COMPATIBILITY_3_0 wxPGCachedString m_strstring; wxPGCachedString m_strlong; wxPGCachedString m_strbool; wxPGCachedString m_strlist; wxPGCachedString m_strDefaultValue; wxPGCachedString m_strMin; wxPGCachedString m_strMax; wxPGCachedString m_strUnits; wxPGCachedString m_strHint; #else const wxString m_strstring; const wxString m_strlong; const wxString m_strbool; const wxString m_strlist; const wxString m_strDefaultValue; const wxString m_strMin; const wxString m_strMax; const wxString m_strUnits; const wxString m_strHint; #endif // WXWIN_COMPATIBILITY_3_0 #if wxPG_COMPATIBILITY_1_4 wxPGCachedString m_strInlineHelp; #endif // If true then some things are automatically translated bool m_autoGetTranslation; // > 0 if errors cannot or should not be shown in statusbar etc. int m_offline; int m_extraStyle; // global extra style int m_warnings; int HasExtraStyle( int style ) const { return (m_extraStyle & style); } }; extern WXDLLIMPEXP_DATA_PROPGRID(wxPGGlobalVarsClass*) wxPGGlobalVars; #define wxPGVariant_EmptyString (wxPGGlobalVars->m_vEmptyString) #define wxPGVariant_Zero (wxPGGlobalVars->m_vZero) #define wxPGVariant_MinusOne (wxPGGlobalVars->m_vMinusOne) #define wxPGVariant_True (wxPGGlobalVars->m_vTrue) #define wxPGVariant_False (wxPGGlobalVars->m_vFalse) #define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False) // When wxPG is loaded dynamically after the application is already running // then the built-in module system won't pick this one up. Add it manually. WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule(); // ----------------------------------------------------------------------- // SetWindowStyleFlag method can be used to modify some of these at run-time. enum wxPG_WINDOW_STYLES { // This will cause Sort() automatically after an item is added. // When inserting a lot of items in this mode, it may make sense to // use Freeze() before operations and Thaw() afterwards to increase // performance. wxPG_AUTO_SORT = 0x00000010, // Categories are not initially shown (even if added). // IMPORTANT NOTE: If you do not plan to use categories, then this // style will waste resources. // This flag can also be changed using wxPropertyGrid::EnableCategories method. wxPG_HIDE_CATEGORIES = 0x00000020, // This style combines non-categoric mode and automatic sorting. wxPG_ALPHABETIC_MODE = (wxPG_HIDE_CATEGORIES|wxPG_AUTO_SORT), // Modified values are shown in bold font. Changing this requires Refresh() // to show changes. wxPG_BOLD_MODIFIED = 0x00000040, // When wxPropertyGrid is resized, splitter moves to the center. This // behaviour stops once the user manually moves the splitter. wxPG_SPLITTER_AUTO_CENTER = 0x00000080, // Display tooltips for cell text that cannot be shown completely. If // wxUSE_TOOLTIPS is 0, then this doesn't have any effect. wxPG_TOOLTIPS = 0x00000100, // Disables margin and hides all expand/collapse buttons that would appear // outside the margin (for sub-properties). Toggling this style automatically // expands all collapsed items. wxPG_HIDE_MARGIN = 0x00000200, // This style prevents user from moving the splitter. wxPG_STATIC_SPLITTER = 0x00000400, // Combination of other styles that make it impossible for user to modify // the layout. wxPG_STATIC_LAYOUT = (wxPG_HIDE_MARGIN|wxPG_STATIC_SPLITTER), // Disables wxTextCtrl based editors for properties which // can be edited in another way. // Equals calling wxPropertyGrid::LimitPropertyEditing for all added // properties. wxPG_LIMITED_EDITING = 0x00000800, // wxPropertyGridManager only: Show toolbar for mode and page selection. wxPG_TOOLBAR = 0x00001000, // wxPropertyGridManager only: Show adjustable text box showing description // or help text, if available, for currently selected property. wxPG_DESCRIPTION = 0x00002000, // wxPropertyGridManager only: don't show an internal border around the // property grid. Recommended if you use a header. wxPG_NO_INTERNAL_BORDER = 0x00004000, // A mask which can be used to filter (out) all styles. wxPG_WINDOW_STYLE_MASK = wxPG_AUTO_SORT|wxPG_HIDE_CATEGORIES|wxPG_BOLD_MODIFIED| wxPG_SPLITTER_AUTO_CENTER|wxPG_TOOLTIPS|wxPG_HIDE_MARGIN| wxPG_STATIC_SPLITTER|wxPG_LIMITED_EDITING|wxPG_TOOLBAR| wxPG_DESCRIPTION|wxPG_NO_INTERNAL_BORDER }; #if wxPG_COMPATIBILITY_1_4 // In wxPG 1.4 this was used to enable now-default theme border support // in wxPropertyGridManager. #define wxPG_THEME_BORDER 0x00000000 #endif // NOTE: wxPG_EX_xxx are extra window styles and must be set using // SetExtraStyle() member function. enum wxPG_EX_WINDOW_STYLES { // Speeds up switching to wxPG_HIDE_CATEGORIES mode. Initially, if // wxPG_HIDE_CATEGORIES is not defined, the non-categorized data storage is // not activated, and switching the mode first time becomes somewhat slower. // wxPG_EX_INIT_NOCAT activates the non-categorized data storage right away. // NOTE: If you do plan not switching to non-categoric mode, or if // you don't plan to use categories at all, then using this style will result // in waste of resources. wxPG_EX_INIT_NOCAT = 0x00001000, // Extended window style that sets wxPropertyGridManager toolbar to not // use flat style. wxPG_EX_NO_FLAT_TOOLBAR = 0x00002000, // Shows alphabetic/categoric mode buttons from toolbar. wxPG_EX_MODE_BUTTONS = 0x00008000, // Show property help strings as tool tips instead as text on the status bar. // You can set the help strings using SetPropertyHelpString member function. wxPG_EX_HELP_AS_TOOLTIPS = 0x00010000, // Prevent TAB from focusing to wxButtons. This behaviour was default // in version 1.2.0 and earlier. // NOTE! Tabbing to button doesn't work yet. Problem seems to be that on wxMSW // at least the button doesn't properly propagate key events (yes, I'm using // wxWANTS_CHARS). //wxPG_EX_NO_TAB_TO_BUTTON = 0x00020000, // Allows relying on native double-buffering. wxPG_EX_NATIVE_DOUBLE_BUFFERING = 0x00080000, // Set this style to let user have ability to set values of properties to // unspecified state. Same as setting wxPG_PROP_AUTO_UNSPECIFIED for // all properties. wxPG_EX_AUTO_UNSPECIFIED_VALUES = 0x00200000, // If this style is used, built-in attributes (such as wxPG_FLOAT_PRECISION // and wxPG_STRING_PASSWORD) are not stored into property's attribute storage // (thus they are not readable). // Note that this option is global, and applies to all wxPG property // containers. wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES = 0x00400000, // Hides page selection buttons from toolbar. wxPG_EX_HIDE_PAGE_BUTTONS = 0x01000000, // Allows multiple properties to be selected by user (by pressing SHIFT // when clicking on a property, or by dragging with left mouse button // down). // You can get array of selected properties with // wxPropertyGridInterface::GetSelectedProperties(). In multiple selection // mode wxPropertyGridInterface::GetSelection() returns // property which has editor active (usually the first one // selected). Other useful member functions are ClearSelection(), // AddToSelection() and RemoveFromSelection(). wxPG_EX_MULTIPLE_SELECTION = 0x02000000, // This enables top-level window tracking which allows wxPropertyGrid to // notify the application of last-minute property value changes by user. // This style is not enabled by default because it may cause crashes when // wxPropertyGrid is used in with wxAUI or similar system. // Note: If you are not in fact using any system that may change // wxPropertyGrid's top-level parent window on its own, then you // are recommended to enable this style. wxPG_EX_ENABLE_TLP_TRACKING = 0x04000000, // Don't show divider above toolbar, on Windows. wxPG_EX_NO_TOOLBAR_DIVIDER = 0x08000000, // Show a separator below the toolbar. wxPG_EX_TOOLBAR_SEPARATOR = 0x10000000, // Allows to take focus on the entire area (on canvas) // even if wxPropertyGrid is not a standalone control. wxPG_EX_ALWAYS_ALLOW_FOCUS = 0x00100000, // A mask which can be used to filter (out) all extra styles applicable to wxPropertyGrid. wxPG_EX_WINDOW_PG_STYLE_MASK = wxPG_EX_INIT_NOCAT|wxPG_EX_HELP_AS_TOOLTIPS|wxPG_EX_NATIVE_DOUBLE_BUFFERING| wxPG_EX_AUTO_UNSPECIFIED_VALUES|wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES| wxPG_EX_MULTIPLE_SELECTION|wxPG_EX_ENABLE_TLP_TRACKING|wxPG_EX_ALWAYS_ALLOW_FOCUS, // A mask which can be used to filter (out) all extra styles applicable to wxPropertyGridManager. wxPG_EX_WINDOW_PGMAN_STYLE_MASK = wxPG_EX_NO_FLAT_TOOLBAR|wxPG_EX_MODE_BUTTONS|wxPG_EX_HIDE_PAGE_BUTTONS| wxPG_EX_NO_TOOLBAR_DIVIDER|wxPG_EX_TOOLBAR_SEPARATOR, // A mask which can be used to filter (out) all extra styles. wxPG_EX_WINDOW_STYLE_MASK = wxPG_EX_WINDOW_PG_STYLE_MASK|wxPG_EX_WINDOW_PGMAN_STYLE_MASK }; #if wxPG_COMPATIBILITY_1_4 #define wxPG_EX_DISABLE_TLP_TRACKING 0x00000000 #endif // Combines various styles. #define wxPG_DEFAULT_STYLE (0) // Combines various styles. #define wxPGMAN_DEFAULT_STYLE (0) // ----------------------------------------------------------------------- // wxPropertyGrid stores information about common values in these // records. // NB: Common value feature is not complete, and thus not mentioned in // documentation. class WXDLLIMPEXP_PROPGRID wxPGCommonValue { public: wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer ) { m_label = label; m_renderer = renderer; renderer->IncRef(); } virtual ~wxPGCommonValue() { m_renderer->DecRef(); } virtual wxString GetEditableText() const { return m_label; } const wxString& GetLabel() const { return m_label; } wxPGCellRenderer* GetRenderer() const { return m_renderer; } protected: wxString m_label; wxPGCellRenderer* m_renderer; }; // ----------------------------------------------------------------------- // wxPropertyGrid Validation Failure behaviour Flags enum wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS { // Prevents user from leaving property unless value is valid. If this // behaviour flag is not used, then value change is instead cancelled. wxPG_VFB_STAY_IN_PROPERTY = 0x01, // Calls wxBell() on validation failure. wxPG_VFB_BEEP = 0x02, // Cell with invalid value will be marked (with red colour). wxPG_VFB_MARK_CELL = 0x04, // Display a text message explaining the situation. // To customize the way the message is displayed, you need to // reimplement wxPropertyGrid::DoShowPropertyError() in a // derived class. Default behaviour is to display the text on // the top-level frame's status bar, if present, and otherwise // using wxMessageBox. wxPG_VFB_SHOW_MESSAGE = 0x08, // Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the // message using wxMessageBox. wxPG_VFB_SHOW_MESSAGEBOX = 0x10, // Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the // message on the status bar (when present - you can reimplement // wxPropertyGrid::GetStatusBar() in a derived class to specify // this yourself). wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR = 0x20, // Defaults. wxPG_VFB_DEFAULT = wxPG_VFB_MARK_CELL | wxPG_VFB_SHOW_MESSAGEBOX, // Only used internally. wxPG_VFB_UNDEFINED = 0x80 }; // Having this as define instead of wxByte typedef makes things easier for // wxPython bindings (ignoring and redefining it in SWIG interface file // seemed rather tricky) #define wxPGVFBFlags unsigned char // Used to convey validation information to and from functions that // actually perform validation. Mostly used in custom property // classes. class WXDLLIMPEXP_PROPGRID wxPGValidationInfo { friend class wxPropertyGrid; public: wxPGValidationInfo() { m_failureBehavior = 0; m_isFailing = false; } ~wxPGValidationInfo() { } // Returns failure behaviour which is a combination of // wxPG_VFB_XXX flags. wxPGVFBFlags GetFailureBehavior() const { return m_failureBehavior; } // Returns current failure message. const wxString& GetFailureMessage() const { return m_failureMessage; } // Returns reference to pending value. wxVariant& GetValue() { wxASSERT(m_pValue); return *m_pValue; } // Set validation failure behaviour // failureBehavior - Mixture of wxPG_VFB_XXX flags. void SetFailureBehavior(wxPGVFBFlags failureBehavior) { m_failureBehavior = failureBehavior; } // Set current failure message. void SetFailureMessage(const wxString& message) { m_failureMessage = message; } private: // Value to be validated. wxVariant* m_pValue; // Message displayed on validation failure. wxString m_failureMessage; // Validation failure behaviour. Use wxPG_VFB_XXX flags. wxPGVFBFlags m_failureBehavior; // True when validation is currently failing. bool m_isFailing; }; // ----------------------------------------------------------------------- // These are used with wxPropertyGrid::AddActionTrigger() and // wxPropertyGrid::ClearActionTriggers(). enum wxPG_KEYBOARD_ACTIONS { wxPG_ACTION_INVALID = 0, // Select the next property. wxPG_ACTION_NEXT_PROPERTY, // Select the previous property. wxPG_ACTION_PREV_PROPERTY, // Expand the selected property, if it has child items. wxPG_ACTION_EXPAND_PROPERTY, // Collapse the selected property, if it has child items. wxPG_ACTION_COLLAPSE_PROPERTY, // Cancel and undo any editing done in the currently active property // editor. wxPG_ACTION_CANCEL_EDIT, // Move focus to the editor control of the currently selected // property. wxPG_ACTION_EDIT, // Causes editor's button (if any) to be pressed. wxPG_ACTION_PRESS_BUTTON, wxPG_ACTION_MAX }; // ----------------------------------------------------------------------- // wxPropertyGrid::DoSelectProperty flags (selFlags) enum wxPG_SELECT_PROPERTY_FLAGS { // Focuses to created editor wxPG_SEL_FOCUS = 0x0001, // Forces deletion and recreation of editor wxPG_SEL_FORCE = 0x0002, // For example, doesn't cause EnsureVisible wxPG_SEL_NONVISIBLE = 0x0004, // Do not validate editor's value before selecting wxPG_SEL_NOVALIDATE = 0x0008, // Property being deselected is about to be deleted wxPG_SEL_DELETING = 0x0010, // Property's values was set to unspecified by the user wxPG_SEL_SETUNSPEC = 0x0020, // Property's event handler changed the value wxPG_SEL_DIALOGVAL = 0x0040, // Set to disable sending of wxEVT_PG_SELECTED event wxPG_SEL_DONT_SEND_EVENT = 0x0080, // Don't make any graphics updates wxPG_SEL_NO_REFRESH = 0x0100 }; // ----------------------------------------------------------------------- // DoSetSplitterPosition() flags enum wxPG_SET_SPLITTER_POSITION_SPLITTER_FLAGS { wxPG_SPLITTER_REFRESH = 0x0001, wxPG_SPLITTER_ALL_PAGES = 0x0002, wxPG_SPLITTER_FROM_EVENT = 0x0004, wxPG_SPLITTER_FROM_AUTO_CENTER = 0x0008 }; // ----------------------------------------------------------------------- // Internal flags enum wxPG_INTERNAL_FLAGS { wxPG_FL_INITIALIZED = 0x0001, // Set when creating editor controls if it was clicked on. wxPG_FL_ACTIVATION_BY_CLICK = 0x0002, wxPG_FL_DONT_CENTER_SPLITTER = 0x0004, wxPG_FL_FOCUSED = 0x0008, wxPG_FL_MOUSE_CAPTURED = 0x0010, wxPG_FL_MOUSE_INSIDE = 0x0020, wxPG_FL_VALUE_MODIFIED = 0x0040, // don't clear background of m_wndEditor wxPG_FL_PRIMARY_FILLS_ENTIRE = 0x0080, // currently active editor uses custom image wxPG_FL_CUR_USES_CUSTOM_IMAGE = 0x0100, // cell colours override selection colours for selected cell wxPG_FL_CELL_OVERRIDES_SEL = 0x0200, wxPG_FL_SCROLLED = 0x0400, // set when all added/inserted properties get hideable flag wxPG_FL_ADDING_HIDEABLES = 0x0800, // Disables showing help strings on statusbar. wxPG_FL_NOSTATUSBARHELP = 0x1000, // Marks that we created the state, so we have to destroy it too. wxPG_FL_CREATEDSTATE = 0x2000, // Set if scrollbar's existence was detected in last onresize. wxPG_FL_SCROLLBAR_DETECTED = 0x4000, // Set if wxPGMan requires redrawing of description text box. wxPG_FL_DESC_REFRESH_REQUIRED = 0x8000, // Set if contained in wxPropertyGridManager wxPG_FL_IN_MANAGER = 0x00020000, // Set after wxPropertyGrid is shown in its initial good size wxPG_FL_GOOD_SIZE_SET = 0x00040000, // Set when in SelectProperty. wxPG_FL_IN_SELECT_PROPERTY = 0x00100000, // Set when help string is shown in status bar wxPG_FL_STRING_IN_STATUSBAR = 0x00200000, // Auto sort is enabled (for categorized mode) wxPG_FL_CATMODE_AUTO_SORT = 0x01000000, // Set after page has been inserted to manager wxPG_MAN_FL_PAGE_INSERTED = 0x02000000, // Active editor control is abnormally large wxPG_FL_ABNORMAL_EDITOR = 0x04000000, // Recursion guard for HandleCustomEditorEvent wxPG_FL_IN_HANDLECUSTOMEDITOREVENT = 0x08000000, wxPG_FL_VALUE_CHANGE_IN_EVENT = 0x10000000, // Editor control width should not change on resize wxPG_FL_FIXED_WIDTH_EDITOR = 0x20000000, // Width of panel can be different from width of grid wxPG_FL_HAS_VIRTUAL_WIDTH = 0x40000000, // Prevents RecalculateVirtualSize re-entrancy wxPG_FL_RECALCULATING_VIRTUAL_SIZE = 0x80000000 }; #if !defined(__wxPG_SOURCE_FILE__) // Reduce compile time, but still include in user app #include "wx/propgrid/props.h" #endif // ----------------------------------------------------------------------- // wxPropertyGrid is a specialized grid for editing properties // such as strings, numbers, flagsets, fonts, and colours. wxPropertySheet // used to do the very same thing, but it hasn't been updated for a while // and it is currently deprecated. // Please note that most member functions are inherited and as such not // documented heree. This means you will probably also want to read // wxPropertyGridInterface class reference. // To process input from a propertygrid control, use these event handler // macros to direct input to member functions that take a wxPropertyGridEvent // argument. // EVT_PG_SELECTED (id, func) // Respond to wxEVT_PG_SELECTED event, generated when a property selection // has been changed, either by user action or by indirect program // function. For instance, collapsing a parent property programmatically // causes any selected child property to become unselected, and may // therefore cause this event to be generated. // EVT_PG_CHANGING(id, func) // Respond to wxEVT_PG_CHANGING event, generated when property value // is about to be changed by user. Use wxPropertyGridEvent::GetValue() // to take a peek at the pending value, and wxPropertyGridEvent::Veto() // to prevent change from taking place, if necessary. // EVT_PG_HIGHLIGHTED(id, func) // Respond to wxEVT_PG_HIGHLIGHTED event, which occurs when mouse // moves over a property. Event's property is NULL if hovered area does // not belong to any property. // EVT_PG_RIGHT_CLICK(id, func) // Respond to wxEVT_PG_RIGHT_CLICK event, which occurs when property is // clicked on with right mouse button. // EVT_PG_DOUBLE_CLICK(id, func) // Respond to wxEVT_PG_DOUBLE_CLICK event, which occurs when property is // double-clicked onwith left mouse button. // EVT_PG_ITEM_COLLAPSED(id, func) // Respond to wxEVT_PG_ITEM_COLLAPSED event, generated when user collapses // a property or category.. // EVT_PG_ITEM_EXPANDED(id, func) // Respond to wxEVT_PG_ITEM_EXPANDED event, generated when user expands // a property or category.. // EVT_PG_LABEL_EDIT_BEGIN(id, func) // Respond to wxEVT_PG_LABEL_EDIT_BEGIN event, generated when is about to // begin editing a property label. You can veto this event to prevent the // action. // EVT_PG_LABEL_EDIT_ENDING(id, func) // Respond to wxEVT_PG_LABEL_EDIT_ENDING event, generated when is about to // end editing of a property label. You can veto this event to prevent the // action. // EVT_PG_COL_BEGIN_DRAG(id, func) // Respond to wxEVT_PG_COL_BEGIN_DRAG event, generated when user // starts resizing a column - can be vetoed. // EVT_PG_COL_DRAGGING,(id, func) // Respond to wxEVT_PG_COL_DRAGGING, event, generated when a // column resize by user is in progress. This event is also generated // when user double-clicks the splitter in order to recenter // it. // EVT_PG_COL_END_DRAG(id, func) // Respond to wxEVT_PG_COL_END_DRAG event, generated after column // resize by user has finished. // Use Freeze() and Thaw() respectively to disable and enable drawing. This // will also delay sorting etc. miscellaneous calculations to the last // possible moment. class WXDLLIMPEXP_PROPGRID wxPropertyGrid : public wxControl, public wxScrollHelper, public wxPropertyGridInterface { friend class wxPropertyGridEvent; friend class wxPropertyGridPageState; friend class wxPropertyGridInterface; friend class wxPropertyGridManager; friend class wxPGHeaderCtrl; wxDECLARE_DYNAMIC_CLASS(wxPropertyGrid); public: #ifndef SWIG // Two step constructor. // Call Create when this constructor is called to build up the // wxPropertyGrid wxPropertyGrid(); #endif // The default constructor. The styles to be used are styles valid for // the wxWindow. wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, const wxString& name = wxPropertyGridNameStr ); // Destructor virtual ~wxPropertyGrid(); // Adds given key combination to trigger given action. // Here is a sample code to make Enter key press move focus to // the next property. // propGrid->AddActionTrigger(wxPG_ACTION_NEXT_PROPERTY, WXK_RETURN); // propGrid->DedicateKey(WXK_RETURN); // action - Which action to trigger. See @ref propgrid_keyboard_actions. // keycode - Which keycode triggers the action. // modifiers - Which key event modifiers, in addition to keycode, are needed to // trigger the action. void AddActionTrigger( int action, int keycode, int modifiers = 0 ); // Dedicates a specific keycode to wxPropertyGrid. This means that such // key presses will not be redirected to editor controls. // Using this function allows, for example, navigation between // properties using arrow keys even when the focus is in the editor // control. void DedicateKey( int keycode ) { #if WXWIN_COMPATIBILITY_3_0 // Deprecated: use a hash set instead. m_dedicatedKeys.push_back(keycode); #else m_dedicatedKeys.insert(keycode); #endif } // This static function enables or disables automatic use of // wxGetTranslation for following strings: wxEnumProperty list labels, // wxFlagsProperty child property labels. // Default is false. static void AutoGetTranslation( bool enable ); // Changes value of a property, as if from an editor. // Use this instead of SetPropertyValue() if you need the value to run // through validation process, and also send the property change event. // Returns true if value was successfully changed. bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); // Centers the splitter. // enableAutoResizing - If true, automatic column resizing is enabled // (only applicable if window style wxPG_SPLITTER_AUTO_CENTER is used). void CenterSplitter( bool enableAutoResizing = false ); // Deletes all properties. virtual void Clear() wxOVERRIDE; // Clears action triggers for given action. // action - Which action to trigger. void ClearActionTriggers( int action ); // Forces updating the value of property from the editor control. // Note that wxEVT_PG_CHANGING and wxEVT_PG_CHANGED are dispatched using // ProcessEvent, meaning your event handlers will be called immediately. // Returns true if anything was changed. virtual bool CommitChangesFromEditor( wxUint32 flags = 0 ); // Two step creation. // Whenever the control is created without any parameters, use Create to // actually create it. Don't access the control's public methods before // this is called @see @link wndflags Additional Window Styles@endlink bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, const wxString& name = wxPropertyGridNameStr ); // Call when editor widget's contents is modified. // For example, this is called when changes text in wxTextCtrl (used in // wxStringProperty and wxIntProperty). // This function should only be called by custom properties. void EditorsValueWasModified() { m_iFlags |= wxPG_FL_VALUE_MODIFIED; } // Reverse of EditorsValueWasModified(). // This function should only be called by custom properties. void EditorsValueWasNotModified() { m_iFlags &= ~(wxPG_FL_VALUE_MODIFIED); } // Enables or disables (shows/hides) categories according to parameter // enable. bool EnableCategories( bool enable ); // Scrolls and/or expands items to ensure that the given item is visible. // Returns true if something was actually done. bool EnsureVisible( wxPGPropArg id ); // Reduces column sizes to minimum possible that contents are still // visibly (naturally some margin space will be applied as well). // Returns minimum size for the grid to still display everything. // Does not work well with wxPG_SPLITTER_AUTO_CENTER window style. // This function only works properly if grid size prior to call was already // fairly large. // Note that you can also get calculated column widths by calling // GetState->GetColumnWidth() immediately after this function returns. wxSize FitColumns() { wxSize sz = m_pState->DoFitColumns(); return sz; } // Returns wxWindow that the properties are painted on, and which should // be used as the parent for editor controls. wxWindow* GetPanel() { return this; } // Returns current category caption background colour. wxColour GetCaptionBackgroundColour() const { return m_colCapBack; } wxFont& GetCaptionFont() { return m_captionFont; } // Returns current category caption font. const wxFont& GetCaptionFont() const { return m_captionFont; } // Returns current category caption text colour. wxColour GetCaptionForegroundColour() const { return m_colCapFore; } // Returns current cell background colour. wxColour GetCellBackgroundColour() const { return m_colPropBack; } // Returns current cell text colour when disabled. wxColour GetCellDisabledTextColour() const { return m_colDisPropFore; } // Returns current cell text colour. wxColour GetCellTextColour() const { return m_colPropFore; } // Returns number of columns currently on grid. unsigned int GetColumnCount() const { return m_pState->GetColumnCount(); } // Returns colour of empty space below properties. wxColour GetEmptySpaceColour() const { return m_colEmptySpace; } // Returns height of highest characters of used font. int GetFontHeight() const { return m_fontHeight; } // Returns pointer to itself. Dummy function that enables same kind // of code to use wxPropertyGrid and wxPropertyGridManager. wxPropertyGrid* GetGrid() { return this; } // Returns rectangle of custom paint image. wxRect GetImageRect( wxPGProperty* p, int item ) const; // Returns size of the custom paint image in front of property. // If no argument is given (p is NULL), returns preferred size. wxSize GetImageSize( wxPGProperty* p = NULL, int item = -1 ) const; // Returns last item which could be iterated using given flags. wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) { return m_pState->GetLastItem(flags); } const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const { return m_pState->GetLastItem(flags); } // Returns colour of lines between cells. wxColour GetLineColour() const { return m_colLine; } // Returns background colour of margin. wxColour GetMarginColour() const { return m_colMargin; } // Returns margin width. int GetMarginWidth() const { return m_marginWidth; } // Returns most up-to-date value of selected property. This will return // value different from GetSelectedProperty()->GetValue() only when text // editor is activate and string edited by user represents valid, // uncommitted property value. wxVariant GetUncommittedPropertyValue(); // Returns "root property". It does not have name, etc. and it is not // visible. It is only useful for accessing its children. wxPGProperty* GetRoot() const { return m_pState->m_properties; } // Returns height of a single grid row (in pixels). int GetRowHeight() const { return m_lineHeight; } // Returns currently selected property. wxPGProperty* GetSelectedProperty() const { return GetSelection(); } // Returns current selection background colour. wxColour GetSelectionBackgroundColour() const { return m_colSelBack; } // Returns current selection text colour. wxColour GetSelectionForegroundColour() const { return m_colSelFore; } // Returns current splitter x position. int GetSplitterPosition( unsigned int splitterIndex = 0 ) const { return m_pState->DoGetSplitterPosition(splitterIndex); } // Returns wxTextCtrl active in currently selected property, if any. Takes // into account wxOwnerDrawnComboBox. wxTextCtrl* GetEditorTextCtrl() const; wxPGValidationInfo& GetValidationInfo() { return m_validationInfo; } // Returns current vertical spacing. int GetVerticalSpacing() const { return (int)m_vspacing; } // Returns true if a property editor control has focus. bool IsEditorFocused() const; // Returns true if editor's value was marked modified. bool IsEditorsValueModified() const { return ( m_iFlags & wxPG_FL_VALUE_MODIFIED ) ? true : false; } // Returns information about arbitrary position in the grid. // pt - Coordinates in the virtual grid space. You may need to use // wxScrolled<T>::CalcScrolledPosition() for translating // wxPropertyGrid client coordinates into something this member // function can use. wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; // Returns true if any property has been modified by the user. bool IsAnyModified() const #if WXWIN_COMPATIBILITY_3_0 { return m_pState->m_anyModified != (unsigned char)false; } #else { return m_pState->m_anyModified; } #endif // It is recommended that you call this function any time your code causes // wxPropertyGrid's top-level parent to change. wxPropertyGrid's OnIdle() // handler should be able to detect most changes, but it is not perfect. // newTLP - New top-level parent that is about to be set. Old top-level parent // window should still exist as the current one. // This function is automatically called from wxPropertyGrid:: // Reparent() and wxPropertyGridManager::Reparent(). You only // need to use it if you reparent wxPropertyGrid indirectly. void OnTLPChanging( wxWindow* newTLP ); // Redraws given property. virtual void RefreshProperty( wxPGProperty* p ) wxOVERRIDE; // Registers a new editor class. // Returns pointer to the editor class instance that should be used. static wxPGEditor* RegisterEditorClass( wxPGEditor* editor, bool noDefCheck = false ) { return DoRegisterEditorClass(editor, wxEmptyString, noDefCheck); } static wxPGEditor* DoRegisterEditorClass( wxPGEditor* editorClass, const wxString& editorName, bool noDefCheck = false ); // Resets all colours to the original system values. void ResetColours(); // Resets column sizes and splitter positions, based on proportions. // enableAutoResizing - If true, automatic column resizing is enabled // (only applicable if window style wxPG_SPLITTER_AUTO_CENTER is used). void ResetColumnSizes( bool enableAutoResizing = false ); // Selects a property. // Editor widget is automatically created, but not focused unless focus is // true. // id - Property to select. // Returns true if selection finished successfully. Usually only fails if // current value in editor is not valid. // This function clears any previous selection. // In wxPropertyGrid 1.4, this member function used to generate // wxEVT_PG_SELECTED. In wxWidgets 2.9 and later, it no longer // does that. bool SelectProperty( wxPGPropArg id, bool focus = false ); // Set entire new selection from given list of properties. void SetSelection( const wxArrayPGProperty& newSelection ) { DoSetSelection( newSelection, wxPG_SEL_DONT_SEND_EVENT ); } // Adds given property into selection. If wxPG_EX_MULTIPLE_SELECTION // extra style is not used, then this has same effect as // calling SelectProperty(). // Multiple selection is not supported for categories. This // means that if you have properties selected, you cannot // add category to selection, and also if you have category // selected, you cannot add other properties to selection. // This member function will fail silently in these cases, // even returning true. bool AddToSelection( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return DoAddToSelection(p, wxPG_SEL_DONT_SEND_EVENT); } // Removes given property from selection. If property is not selected, // an assertion failure will occur. bool RemoveFromSelection( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) return DoRemoveFromSelection(p, wxPG_SEL_DONT_SEND_EVENT); } // Makes given column editable by user. // editable - Using false here will disable column from being editable. void MakeColumnEditable( unsigned int column, bool editable = true ); // Creates label editor wxTextCtrl for given column, for property // that is currently selected. When multiple selection is // enabled, this applies to whatever property GetSelection() // returns. // colIndex - Which column's label to edit. Note that you should not // use value 1, which is reserved for property value // column. void BeginLabelEdit( unsigned int column = 0 ) { DoBeginLabelEdit(column, wxPG_SEL_DONT_SEND_EVENT); } // Destroys label editor wxTextCtrl, if any. // commit - Use true (default) to store edited label text in // property cell data. void EndLabelEdit( bool commit = true ) { DoEndLabelEdit(commit, wxPG_SEL_DONT_SEND_EVENT); } // Returns currently active label editor, NULL if none. wxTextCtrl* GetLabelEditor() const { return m_labelEditor; } // Sets category caption background colour. void SetCaptionBackgroundColour(const wxColour& col); // Sets category caption text colour. void SetCaptionTextColour(const wxColour& col); // Sets default cell background colour - applies to property cells. // Note that appearance of editor widgets may not be affected. void SetCellBackgroundColour(const wxColour& col); // Sets cell text colour for disabled properties. void SetCellDisabledTextColour(const wxColour& col); // Sets default cell text colour - applies to property name and value text. // Note that appearance of editor widgets may not be affected. void SetCellTextColour(const wxColour& col); // Set number of columns (2 or more). void SetColumnCount( int colCount ) { m_pState->SetColumnCount(colCount); Refresh(); } // Sets the 'current' category - Append will add non-category properties // under it. void SetCurrentCategory( wxPGPropArg id ) { wxPG_PROP_ARG_CALL_PROLOG() wxPropertyCategory* pc = wxDynamicCast(p, wxPropertyCategory); wxASSERT(pc); m_pState->m_currentCategory = pc; } // Sets colour of empty space below properties. void SetEmptySpaceColour(const wxColour& col); // Sets colour of lines between cells. void SetLineColour(const wxColour& col); // Sets background colour of margin. void SetMarginColour(const wxColour& col); // Sets selection background colour - applies to selected property name // background. void SetSelectionBackgroundColour(const wxColour& col); // Sets selection foreground colour - applies to selected property name // text. void SetSelectionTextColour(const wxColour& col); // Sets x coordinate of the splitter. // Splitter position cannot exceed grid size, and therefore setting it // during form creation may fail as initial grid size is often smaller // than desired splitter position, especially when sizers are being used. void SetSplitterPosition( int newXPos, int col = 0 ) { DoSetSplitterPosition(newXPos, col, wxPG_SPLITTER_REFRESH); } // Sets the property sorting function. // sortFunction - The sorting function to be used. It should return a value greater // than 0 if position of p1 is after p2. So, for instance, when // comparing property names, you can use following implementation: // int MyPropertySortFunction(wxPropertyGrid* propGrid, // wxPGProperty* p1, // wxPGProperty* p2) // { // return p1->GetBaseName().compare( p2->GetBaseName() ); // } // Default property sort function sorts properties by their labels // (case-insensitively). void SetSortFunction( wxPGSortCallback sortFunction ) { m_sortFunction = sortFunction; } // Returns the property sort function (default is NULL). wxPGSortCallback GetSortFunction() const { return m_sortFunction; } // Sets appearance of value cells representing an unspecified property // value. Default appearance is blank. // If you set the unspecified value to have any // textual representation, then that will override // "InlineHelp" attribute. void SetUnspecifiedValueAppearance( const wxPGCell& cell ) { m_unspecifiedAppearance = m_propertyDefaultCell; m_unspecifiedAppearance.MergeFrom(cell); } // Returns current appearance of unspecified value cells. const wxPGCell& GetUnspecifiedValueAppearance() const { return m_unspecifiedAppearance; } // Returns (visual) text representation of the unspecified // property value. // argFlags - For internal use only. wxString GetUnspecifiedValueText( int argFlags = 0 ) const; // Set virtual width for this particular page. Width -1 indicates that the // virtual width should be disabled. void SetVirtualWidth( int width ); // Moves splitter as left as possible, while still allowing all // labels to be shown in full. // privateChildrenToo - If false, will still allow private children to be cropped. void SetSplitterLeft( bool privateChildrenToo = false ) { m_pState->SetSplitterLeft(privateChildrenToo); } // Sets vertical spacing. Can be 1, 2, or 3 - a value relative to font // height. Value of 2 should be default on most platforms. void SetVerticalSpacing( int vspacing ) { m_vspacing = (unsigned char)vspacing; CalculateFontAndBitmapStuff( vspacing ); if ( !m_pState->m_itemsAdded ) Refresh(); } // Shows an brief error message that is related to a property. void ShowPropertyError( wxPGPropArg id, const wxString& msg ) { wxPG_PROP_ARG_CALL_PROLOG() DoShowPropertyError(p, msg); } ///////////////////////////////////////////////////////////////// // // Following methods do not need to be (currently) documented // ///////////////////////////////////////////////////////////////// bool HasVirtualWidth() const { return (m_iFlags & wxPG_FL_HAS_VIRTUAL_WIDTH) ? true : false; } const wxPGCommonValue* GetCommonValue( unsigned int i ) const { return (wxPGCommonValue*) m_commonValues[i]; } // Returns number of common values. unsigned int GetCommonValueCount() const { return (unsigned int) m_commonValues.size(); } // Returns label of given common value. wxString GetCommonValueLabel( unsigned int i ) const { wxASSERT( GetCommonValue(i) ); return GetCommonValue(i)->GetLabel(); } // Returns index of common value that will truly change value to // unspecified. int GetUnspecifiedCommonValue() const { return m_cvUnspecified; } // Set index of common value that will truly change value to unspecified. // Using -1 will set none to have such effect. // Default is 0. void SetUnspecifiedCommonValue( int index ) { m_cvUnspecified = index; } // Shortcut for creating dialog-caller button. Used, for example, by // wxFontProperty. // This should only be called by properties. wxWindow* GenerateEditorButton( const wxPoint& pos, const wxSize& sz ); // Fixes position of wxTextCtrl-like control (wxSpinCtrl usually // fits as one). Call after control has been created (but before // shown). void FixPosForTextCtrl( wxWindow* ctrl, unsigned int forColumn = 1, const wxPoint& offset = wxPoint(0, 0) ); // Shortcut for creating text editor widget. // pos - Same as pos given for CreateEditor. // sz - Same as sz given for CreateEditor. // value - Initial text for wxTextCtrl. // secondary - If right-side control, such as button, also created, // then create it first and pass it as this parameter. // extraStyle - Extra style flags to pass for wxTextCtrl. // Note that this should generally be called only by new classes derived // from wxPGProperty. wxWindow* GenerateEditorTextCtrl( const wxPoint& pos, const wxSize& sz, const wxString& value, wxWindow* secondary, int extraStyle = 0, int maxLen = 0, unsigned int forColumn = 1 ); // Generates both textctrl and button. wxWindow* GenerateEditorTextCtrlAndButton( const wxPoint& pos, const wxSize& sz, wxWindow** psecondary, int limited_editing, wxPGProperty* property ); // Generates position for a widget editor dialog box. // p - Property for which dialog is positioned. // sz - Known or over-approximated size of the dialog. // Returns position for dialog. wxPoint GetGoodEditorDialogPosition( wxPGProperty* p, const wxSize& sz ); // Converts escape sequences in src_str to newlines, // tabs, etc. and copies result to dst_str. static wxString& ExpandEscapeSequences( wxString& dst_str, const wxString& src_str ); // Converts newlines, tabs, etc. in src_str to escape // sequences, and copies result to dst_str. static wxString& CreateEscapeSequences( wxString& dst_str, const wxString& src_str ); // Checks system screen design used for laying out various dialogs. static bool IsSmallScreen(); // Returns rectangle that fully contains properties between and including // p1 and p2. Rectangle is in virtual scrolled window coordinates. wxRect GetPropertyRect( const wxPGProperty* p1, const wxPGProperty* p2 ) const; // Returns pointer to current active primary editor control (NULL if none). wxWindow* GetEditorControl() const; wxWindow* GetPrimaryEditor() const { return GetEditorControl(); } // Returns pointer to current active secondary editor control (NULL if // none). wxWindow* GetEditorControlSecondary() const { return m_wndEditor2; } // Refreshes any active editor control. void RefreshEditor(); // Events from editor controls are forward to this function bool HandleCustomEditorEvent( wxEvent &event ); // Mostly useful for page switching. void SwitchState( wxPropertyGridPageState* pNewState ); long GetInternalFlags() const { return m_iFlags; } bool HasInternalFlag( long flag ) const { return (m_iFlags & flag) ? true : false; } void SetInternalFlag( long flag ) { m_iFlags |= flag; } void ClearInternalFlag( long flag ) { m_iFlags &= ~(flag); } void OnComboItemPaint( const wxPGComboBox* pCb, int item, wxDC* pDc, wxRect& rect, int flags ); #if WXWIN_COMPATIBILITY_3_0 // Standardized double-to-string conversion. static const wxString& DoubleToString( wxString& target, double value, int precision, bool removeZeroes, wxString* precTemplate = NULL ); #endif // WXWIN_COMPATIBILITY_3_0 // Call this from wxPGProperty::OnEvent() to cause property value to be // changed after the function returns (with true as return value). // ValueChangeInEvent() must be used if you wish the application to be // able to use wxEVT_PG_CHANGING to potentially veto the given value. void ValueChangeInEvent( wxVariant variant ) { m_changeInEventValue = variant; m_iFlags |= wxPG_FL_VALUE_CHANGE_IN_EVENT; } // You can use this member function, for instance, to detect in // wxPGProperty::OnEvent() if wxPGProperty::SetValueInEvent() was // already called in wxPGEditor::OnEvent(). It really only detects // if was value was changed using wxPGProperty::SetValueInEvent(), which // is usually used when a 'picker' dialog is displayed. If value was // written by "normal means" in wxPGProperty::StringToValue() or // IntToValue(), then this function will return false (on the other hand, // wxPGProperty::OnEvent() is not even called in those cases). bool WasValueChangedInEvent() const { return (m_iFlags & wxPG_FL_VALUE_CHANGE_IN_EVENT) ? true : false; } // Returns true if given event is from first of an array of buttons // (as can be in case when wxPGMultiButton is used). bool IsMainButtonEvent( const wxEvent& event ) { return (event.GetEventType() == wxEVT_BUTTON) && (m_wndSecId == event.GetId()); } // Pending value is expected to be passed in PerformValidation(). virtual bool DoPropertyChanged( wxPGProperty* p, unsigned int selFlags = 0 ); // Called when validation for given property fails. // invalidValue - Value which failed in validation. // Returns true if user is allowed to change to another property even // if current has invalid value. // To add your own validation failure behaviour, override // wxPropertyGrid::DoOnValidationFailure(). bool OnValidationFailure( wxPGProperty* property, wxVariant& invalidValue ); // Called to indicate property and editor has valid value now. void OnValidationFailureReset( wxPGProperty* property ) { if ( property && property->HasFlag(wxPG_PROP_INVALID_VALUE) ) { DoOnValidationFailureReset(property); property->ClearFlag(wxPG_PROP_INVALID_VALUE); } m_validationInfo.m_failureMessage.clear(); } // Override in derived class to display error messages in custom manner // (these message usually only result from validation failure). // If you implement this, then you also need to implement // DoHidePropertyError() - possibly to do nothing, if error // does not need hiding (e.g. it was logged or shown in a // message box). virtual void DoShowPropertyError( wxPGProperty* property, const wxString& msg ); // Override in derived class to hide an error displayed by // DoShowPropertyError(). virtual void DoHidePropertyError( wxPGProperty* property ); #if wxUSE_STATUSBAR // Return wxStatusBar that is used by this wxPropertyGrid. You can // reimplement this member function in derived class to override // the default behaviour of using the top-level wxFrame's status // bar, if any. virtual wxStatusBar* GetStatusBar(); #endif // Override to customize property validation failure behaviour. // invalidValue - Value which failed in validation. // Returns true if user is allowed to change to another property even // if current has invalid value. virtual bool DoOnValidationFailure( wxPGProperty* property, wxVariant& invalidValue ); // Override to customize resetting of property validation failure status. // Property is guaranteed to have flag wxPG_PROP_INVALID_VALUE set. virtual void DoOnValidationFailureReset( wxPGProperty* property ); int GetSpacingY() const { return m_spacingy; } // Must be called in wxPGEditor::CreateControls() if primary editor window // is wxTextCtrl, just before textctrl is created. // text - Initial text value of created wxTextCtrl. void SetupTextCtrlValue( const wxString& text ) { m_prevTcValue = text; } // Unfocuses or closes editor if one was open, but does not deselect // property. bool UnfocusEditor(); virtual void SetWindowStyleFlag( long style ) wxOVERRIDE; void DrawItems( const wxPGProperty* p1, const wxPGProperty* p2 ); void DrawItem( wxPGProperty* p ) { DrawItems(p,p); } virtual void DrawItemAndChildren( wxPGProperty* p ); // Draws item, children, and consecutive parents as long as category is // not met. void DrawItemAndValueRelated( wxPGProperty* p ); protected: // wxPropertyGridPageState used by the grid is created here. // If grid is used in wxPropertyGridManager, there is no point overriding // this - instead, set custom wxPropertyGridPage classes. virtual wxPropertyGridPageState* CreateState() const; enum PerformValidationFlags { SendEvtChanging = 0x0001, IsStandaloneValidation = 0x0002 // Not called in response to event }; // Runs all validation functionality (includes sending wxEVT_PG_CHANGING). // Returns true if all tests passed. Implement in derived class to // add additional validation behaviour. virtual bool PerformValidation( wxPGProperty* p, wxVariant& pendingValue, int flags = SendEvtChanging ); public: // Control font changer helper. void SetCurControlBoldFont(); wxPGCell& GetPropertyDefaultCell() { return m_propertyDefaultCell; } wxPGCell& GetCategoryDefaultCell() { return m_categoryDefaultCell; } // Public methods for semi-public use bool DoSelectProperty( wxPGProperty* p, unsigned int flags = 0 ); // Overridden functions. virtual bool Destroy() wxOVERRIDE; // Returns property at given y coordinate (relative to grid's top left). wxPGProperty* GetItemAtY( int y ) const { return DoGetItemAtY(y); } virtual void Refresh( bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL ) wxOVERRIDE; virtual bool SetFont( const wxFont& font ) wxOVERRIDE; virtual void SetExtraStyle( long exStyle ) wxOVERRIDE; virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE; protected: virtual void DoThaw() wxOVERRIDE; virtual wxSize DoGetBestSize() const wxOVERRIDE; #ifndef wxPG_ICON_WIDTH wxBitmap *m_expandbmp, *m_collbmp; #endif wxCursor *m_cursorSizeWE; // wxWindow pointers to editor control(s). wxWindow *m_wndEditor; wxWindow *m_wndEditor2; // Actual positions of the editors within the cell. wxPoint m_wndEditorPosRel; wxPoint m_wndEditor2PosRel; wxBitmap *m_doubleBuffer; // Local time ms when control was created. wxMilliClock_t m_timeCreated; // wxPGProperty::OnEvent can change value by setting this. wxVariant m_changeInEventValue; // Id of m_wndEditor2, or its first child, if any. int m_wndSecId; // Extra Y spacing between the items. int m_spacingy; // Control client area width; updated on resize. int m_width; // Control client area height; updated on resize. int m_height; // Current non-client width (needed when auto-centering). int m_ncWidth; // Non-client width (auto-centering helper). //int m_fWidth; // Previously recorded scroll start position. int m_prevVY; // The gutter spacing in front and back of the image. // This determines the amount of spacing in front of each item int m_gutterWidth; // Includes separator line. int m_lineHeight; // Gutter*2 + image width. int m_marginWidth; // y spacing for expand/collapse button. int m_buttonSpacingY; // Extra margin for expanded sub-group items. int m_subgroup_extramargin; // The image width of the [+] icon. // This is also calculated in the gutter int m_iconWidth; #ifndef wxPG_ICON_WIDTH // The image height of the [+] icon. // This is calculated as minimal size and to align int m_iconHeight; #endif // Current cursor id. int m_curcursor; // Caption font. Same as normal font plus bold style. wxFont m_captionFont; int m_fontHeight; // Height of the font. // m_splitterx when drag began. int m_startingSplitterX; // Index to splitter currently being dragged (0=one after the first // column). int m_draggedSplitter; // Changed property, calculated in PerformValidation(). wxPGProperty* m_chgInfo_changedProperty; // Lowest property for which editing happened, but which does not have // aggregate parent wxPGProperty* m_chgInfo_baseChangedProperty; // Changed property value, calculated in PerformValidation(). wxVariant m_chgInfo_pendingValue; // Passed to SetValue. wxVariant m_chgInfo_valueList; // Validation information. wxPGValidationInfo m_validationInfo; // Actions and keys that trigger them. wxPGHashMapI2I m_actionTriggers; // Appearance of currently active editor. wxPGCell m_editorAppearance; // Appearance of a unspecified value cell. wxPGCell m_unspecifiedAppearance; // List of properties to be deleted/removed in idle event handler. wxVector<wxPGProperty*> m_deletedProperties; wxVector<wxPGProperty*> m_removedProperties; #if !WXWIN_COMPATIBILITY_3_0 // List of editors and their event handlers to be deleted in idle event handler. wxArrayPGObject m_deletedEditorObjects; #endif // List of key codes that will not be handed over to editor controls. #if WXWIN_COMPATIBILITY_3_0 // Deprecated: use a hash set instead. wxVector<int> m_dedicatedKeys; #else wxPGHashSetInt m_dedicatedKeys; #endif // // Temporary values // // Bits are used to indicate which colours are customized. unsigned short m_coloursCustomized; // x - m_splitterx. signed char m_dragOffset; // 0 = not dragging, 1 = drag just started, 2 = drag in progress unsigned char m_dragStatus; // 0 = margin, 1 = label, 2 = value. unsigned char m_mouseSide; // True when editor control is focused. #if WXWIN_COMPATIBILITY_3_0 unsigned char m_editorFocused; #else bool m_editorFocused; #endif // 1 if m_latsCaption is also the bottommost caption. //unsigned char m_lastCaptionBottomnest; unsigned char m_vspacing; #if WXWIN_COMPATIBILITY_3_0 // Unused variable. // Used to track when Alt/Ctrl+Key was consumed. unsigned char m_keyComboConsumed; #endif // 1 if in DoPropertyChanged() bool m_inDoPropertyChanged; // 1 if in CommitChangesFromEditor() bool m_inCommitChangesFromEditor; // 1 if in DoSelectProperty() bool m_inDoSelectProperty; bool m_inOnValidationFailure; wxPGVFBFlags m_permanentValidationFailureBehavior; // Set by app // DoEditorValidate() recursion guard wxRecursionGuardFlag m_validatingEditor; // Internal flags - see wxPG_FL_XXX constants. wxUint32 m_iFlags; #if WXWIN_COMPATIBILITY_3_0 // Unused variable. // When drawing next time, clear this many item slots at the end. int m_clearThisMany; #endif // Mouse is hovering over this column (index) unsigned int m_colHover; // pointer to property that has mouse hovering wxPGProperty* m_propHover; // Active label editor and its actual position within the cell wxTextCtrl* m_labelEditor; wxPoint m_labelEditorPosRel; // For which property the label editor is active wxPGProperty* m_labelEditorProperty; // EventObject for wxPropertyGridEvents wxWindow* m_eventObject; // What (global) window is currently focused (needed to resolve event // handling mess). wxWindow* m_curFocused; // Event currently being sent - NULL if none at the moment wxPropertyGridEvent* m_processedEvent; // Last known top-level parent wxWindow* m_tlp; // Last closed top-level parent wxWindow* m_tlpClosed; // Local time ms when tlp was closed. wxMilliClock_t m_tlpClosedTime; // Sort function wxPGSortCallback m_sortFunction; // y coordinate of property that mouse hovering int m_propHoverY; // Which column's editor is selected (usually 1)? unsigned int m_selColumn; // x relative to splitter (needed for resize). int m_ctrlXAdjust; // lines between cells wxColour m_colLine; // property labels and values are written in this colour wxColour m_colPropFore; // or with this colour when disabled wxColour m_colDisPropFore; // background for m_colPropFore wxColour m_colPropBack; // text color for captions wxColour m_colCapFore; // background color for captions wxColour m_colCapBack; // foreground for selected property wxColour m_colSelFore; // background for selected property (actually use background color when // control out-of-focus) wxColour m_colSelBack; // background colour for margin wxColour m_colMargin; // background colour for empty space below the grid wxColour m_colEmptySpace; // Default property colours wxPGCell m_propertyDefaultCell; // Default property category wxPGCell m_categoryDefaultCell; // Backup of selected property's cells wxVector<wxPGCell> m_propCellsBackup; // NB: These *cannot* be moved to globals. // labels when properties use common values wxVector<wxPGCommonValue*> m_commonValues; // array of live events wxVector<wxPropertyGridEvent*> m_liveEvents; // Which cv selection really sets value to unspecified? int m_cvUnspecified; // Used to skip excess text editor events wxString m_prevTcValue; protected: // Sets some members to defaults (called constructors). void Init1(); // Initializes some members (called by Create and complex constructor). void Init2(); void OnPaint(wxPaintEvent &event ); // main event receivers void OnMouseMove( wxMouseEvent &event ); void OnMouseClick( wxMouseEvent &event ); void OnMouseRightClick( wxMouseEvent &event ); void OnMouseDoubleClick( wxMouseEvent &event ); void OnMouseUp( wxMouseEvent &event ); void OnKey( wxKeyEvent &event ); void OnResize( wxSizeEvent &event ); // event handlers bool HandleMouseMove( int x, unsigned int y, wxMouseEvent &event ); bool HandleMouseClick( int x, unsigned int y, wxMouseEvent &event ); bool HandleMouseRightClick( int x, unsigned int y, wxMouseEvent &event ); bool HandleMouseDoubleClick( int x, unsigned int y, wxMouseEvent &event ); bool HandleMouseUp( int x, unsigned int y, wxMouseEvent &event ); void HandleKeyEvent( wxKeyEvent &event, bool fromChild ); void OnMouseEntry( wxMouseEvent &event ); void OnIdle( wxIdleEvent &event ); void OnFocusEvent( wxFocusEvent &event ); void OnChildFocusEvent( wxChildFocusEvent& event ); bool OnMouseCommon( wxMouseEvent &event, int* px, int *py ); bool OnMouseChildCommon( wxMouseEvent &event, int* px, int *py ); // sub-control event handlers void OnMouseClickChild( wxMouseEvent &event ); void OnMouseRightClickChild( wxMouseEvent &event ); void OnMouseMoveChild( wxMouseEvent &event ); void OnMouseUpChild( wxMouseEvent &event ); void OnChildKeyDown( wxKeyEvent &event ); void OnCaptureChange( wxMouseCaptureChangedEvent &event ); void OnScrollEvent( wxScrollWinEvent &event ); void OnSysColourChanged( wxSysColourChangedEvent &event ); void OnTLPClose( wxCloseEvent& event ); protected: bool AddToSelectionFromInputEvent( wxPGProperty* prop, unsigned int colIndex, wxMouseEvent* event = NULL, int selFlags = 0 ); // Adjust the centering of the bitmap icons (collapse / expand) when the // caption font changes. // They need to be centered in the middle of the font, so a bit of deltaY // adjustment is needed. On entry, m_captionFont must be set to window // font. It will be modified properly. void CalculateFontAndBitmapStuff( int vspacing ); wxRect GetEditorWidgetRect( wxPGProperty* p, int column ) const; void CorrectEditorWidgetSizeX(); // Called in RecalculateVirtualSize() to reposition control // on virtual height changes. void CorrectEditorWidgetPosY(); #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED_MSG("use two-argument function DoDrawItems(dc,rect)") int DoDrawItems( wxDC& dc, const wxRect* itemsRect, bool isBuffered ) const { return DoDrawItemsBase(dc, itemsRect, isBuffered); } int DoDrawItems( wxDC& dc, const wxRect* itemsRect ) const { return DoDrawItemsBase(dc, itemsRect, true); } int DoDrawItemsBase( wxDC& dc, const wxRect* itemsRect, bool isBuffered ) const; #else int DoDrawItems( wxDC& dc, const wxRect* itemsRect ) const; #endif // Draws an expand/collapse (ie. +/-) button. virtual void DrawExpanderButton( wxDC& dc, const wxRect& rect, wxPGProperty* property ) const; // Draws items from topItemY to bottomItemY void DrawItems( wxDC& dc, unsigned int topItemY, unsigned int bottomItemY, const wxRect* itemsRect = NULL ); // Translate wxKeyEvent to wxPG_ACTION_XXX int KeyEventToActions(wxKeyEvent &event, int* pSecond) const; int KeyEventToAction(wxKeyEvent &event) const { return KeyEventToActions(event, NULL); } void ImprovedClientToScreen( int* px, int* py ); // Called by focus event handlers. newFocused is the window that becomes // focused. void HandleFocusChange( wxWindow* newFocused ); // Reloads all non-customized colours from system settings. void RegainColours(); virtual bool DoEditorValidate(); // Similar to DoSelectProperty() but also works on columns // other than 1. Does not active editor if column is not // editable. bool DoSelectAndEdit( wxPGProperty* prop, unsigned int colIndex, unsigned int selFlags ); void DoSetSelection( const wxArrayPGProperty& newSelection, int selFlags = 0 ); void DoSetSplitterPosition( int newxpos, int splitterIndex = 0, int flags = wxPG_SPLITTER_REFRESH ); bool DoAddToSelection( wxPGProperty* prop, int selFlags = 0 ); bool DoRemoveFromSelection( wxPGProperty* prop, int selFlags = 0 ); void DoBeginLabelEdit( unsigned int colIndex, int selFlags = 0 ); void DoEndLabelEdit( bool commit, int selFlags = 0 ); void OnLabelEditorEnterPress( wxCommandEvent& event ); void OnLabelEditorKeyPress( wxKeyEvent& event ); wxPGProperty* DoGetItemAtY( int y ) const; void DestroyEditorWnd( wxWindow* wnd ); void FreeEditors(); virtual bool DoExpand( wxPGProperty* p, bool sendEvent = false ); virtual bool DoCollapse( wxPGProperty* p, bool sendEvent = false ); // Returns nearest paint visible property (such that will be painted unless // window is scrolled or resized). If given property is paint visible, then // it itself will be returned. wxPGProperty* GetNearestPaintVisible( wxPGProperty* p ) const; static void RegisterDefaultEditors(); // Sets up basic event handling for child control void SetupChildEventHandling( wxWindow* wnd ); void CustomSetCursor( int type, bool override = false ); // Repositions scrollbar and underlying panel according // to changed virtual size. void RecalculateVirtualSize( int forceXPos = -1 ); void SetEditorAppearance( const wxPGCell& cell, bool unspecified = false ); void ResetEditorAppearance() { wxPGCell cell; cell.SetEmptyData(); SetEditorAppearance(cell, false); } void PrepareAfterItemsAdded(); // Send event from the property grid. // Omit the wxPG_SEL_NOVALIDATE flag to allow vetoing the event bool SendEvent( int eventType, wxPGProperty* p, wxVariant* pValue = NULL, unsigned int selFlags = wxPG_SEL_NOVALIDATE, unsigned int column = 1 ); // This function only moves focus to the wxPropertyGrid if it already // was on one of its child controls. void SetFocusOnCanvas(); bool DoHideProperty( wxPGProperty* p, bool hide, int flags ); void DeletePendingObjects(); private: bool ButtonTriggerKeyTest( int action, wxKeyEvent& event ); wxDECLARE_EVENT_TABLE(); }; // ----------------------------------------------------------------------- // // Bunch of inlines that need to resolved after all classes have been defined. // inline bool wxPropertyGridPageState::IsDisplayed() const { return ( this == m_pPropGrid->GetState() ); } inline unsigned int wxPropertyGridPageState::GetActualVirtualHeight() const { return DoGetRoot()->GetChildrenHeight(GetGrid()->GetRowHeight()); } inline wxString wxPGProperty::GetHintText() const { wxVariant vHintText = GetAttribute(wxPG_ATTR_HINT); #if wxPG_COMPATIBILITY_1_4 // Try the old, deprecated "InlineHelp" if ( vHintText.IsNull() ) vHintText = GetAttribute(wxPG_ATTR_INLINE_HELP); #endif if ( !vHintText.IsNull() ) return vHintText.GetString(); return wxEmptyString; } inline int wxPGProperty::GetDisplayedCommonValueCount() const { if ( HasFlag(wxPG_PROP_USES_COMMON_VALUE) ) { wxPropertyGrid* pg = GetGrid(); if ( pg ) return (int) pg->GetCommonValueCount(); } return 0; } inline void wxPGProperty::SetDefaultValue( wxVariant& value ) { SetAttribute(wxPG_ATTR_DEFAULT_VALUE, value); } inline void wxPGProperty::SetEditor( const wxString& editorName ) { m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName); } inline bool wxPGProperty::SetMaxLength( int maxLen ) { return GetGrid()->SetPropertyMaxLength(this,maxLen); } // ----------------------------------------------------------------------- #define wxPG_BASE_EVT_PRE_ID 1775 #ifndef SWIG wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_SELECTED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_CHANGING, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_CHANGED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_HIGHLIGHTED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_RIGHT_CLICK, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_PAGE_CHANGED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_ITEM_COLLAPSED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_ITEM_EXPANDED, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_DOUBLE_CLICK, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_LABEL_EDIT_BEGIN, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_LABEL_EDIT_ENDING, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_COL_BEGIN_DRAG, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_COL_DRAGGING, wxPropertyGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_COL_END_DRAG, wxPropertyGridEvent ); #else enum { wxEVT_PG_SELECTED = wxPG_BASE_EVT_PRE_ID, wxEVT_PG_CHANGING, wxEVT_PG_CHANGED, wxEVT_PG_HIGHLIGHTED, wxEVT_PG_RIGHT_CLICK, wxEVT_PG_PAGE_CHANGED, wxEVT_PG_ITEM_COLLAPSED, wxEVT_PG_ITEM_EXPANDED, wxEVT_PG_DOUBLE_CLICK, wxEVT_PG_LABEL_EDIT_BEGIN, wxEVT_PG_LABEL_EDIT_ENDING, wxEVT_PG_COL_BEGIN_DRAG, wxEVT_PG_COL_DRAGGING, wxEVT_PG_COL_END_DRAG }; #endif #define wxPG_BASE_EVT_TYPE wxEVT_PG_SELECTED #define wxPG_MAX_EVT_TYPE (wxPG_BASE_EVT_TYPE+30) #ifndef SWIG typedef void (wxEvtHandler::*wxPropertyGridEventFunction)(wxPropertyGridEvent&); #define EVT_PG_SELECTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_HIGHLIGHTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_DOUBLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_PAGE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_ITEM_COLLAPSED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_ITEM_EXPANDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_LABEL_EDIT_BEGIN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_BEGIN, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_LABEL_EDIT_ENDING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_ENDING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_COL_BEGIN_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_BEGIN_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_COL_DRAGGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_DRAGGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define EVT_PG_COL_END_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_END_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), #define wxPropertyGridEventHandler(fn) \ wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ) #endif // A propertygrid event holds information about events associated with // wxPropertyGrid objects. class WXDLLIMPEXP_PROPGRID wxPropertyGridEvent : public wxCommandEvent { public: // Constructor. wxPropertyGridEvent(wxEventType commandType=0, int id=0); // Copy constructor. wxPropertyGridEvent(const wxPropertyGridEvent& event); // Destructor. ~wxPropertyGridEvent(); // Copyer. virtual wxEvent* Clone() const wxOVERRIDE; // Returns the column index associated with this event. // For the column dragging events, it is the column to the left // of the splitter being dragged unsigned int GetColumn() const { return m_column; } wxPGProperty* GetMainParent() const { wxASSERT(m_property); return m_property->GetMainParent(); } // Returns property associated with this event. wxPGProperty* GetProperty() const { return m_property; } wxPGValidationInfo& GetValidationInfo() { wxASSERT(m_validationInfo); return *m_validationInfo; } // Returns true if you can veto the action that the event is signaling. bool CanVeto() const { return m_canVeto; } // Call this from your event handler to veto action that the event is // signaling. // You can only veto a shutdown if wxPropertyGridEvent::CanVeto returns // true. // Currently only wxEVT_PG_CHANGING supports vetoing. void Veto( bool veto = true ) { m_wasVetoed = veto; } // Returns name of the associated property. // Property name is stored in event, so it remains // accessible even after the associated property or // the property grid has been deleted. wxString GetPropertyName() const { return m_propertyName; } // Returns value of the associated property. Works for all event // types, but for wxEVT_PG_CHANGING this member function returns // the value that is pending, so you can call Veto() if the // value is not satisfactory. // Property value is stored in event, so it remains // accessible even after the associated property or // the property grid has been deleted. wxVariant GetPropertyValue() const { if ( m_validationInfo ) return m_validationInfo->GetValue(); return m_value; } // Returns value of the associated property. // See GetPropertyValue() wxVariant GetValue() const { return GetPropertyValue(); } // Set override validation failure behaviour. // Only effective if Veto was also called, and only allowed if event type // is wxEVT_PG_CHANGING. void SetValidationFailureBehavior( wxPGVFBFlags flags ) { wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); m_validationInfo->SetFailureBehavior( flags ); } // Sets custom failure message for this time only. Only applies if // wxPG_VFB_SHOW_MESSAGE is set in validation failure flags. void SetValidationFailureMessage( const wxString& message ) { wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); m_validationInfo->SetFailureMessage( message ); } wxPGVFBFlags GetValidationFailureBehavior() const { wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); return m_validationInfo->GetFailureBehavior(); } void SetColumn( unsigned int column ) { m_column = column; } void SetCanVeto( bool canVeto ) { m_canVeto = canVeto; } bool WasVetoed() const { return m_wasVetoed; } // Changes the property associated with this event. void SetProperty( wxPGProperty* p ) { m_property = p; if ( p ) m_propertyName = p->GetName(); } void SetPropertyValue( wxVariant value ) { m_value = value; } void SetPropertyGrid( wxPropertyGrid* pg ) { m_pg = pg; OnPropertyGridSet(); } void SetupValidationInfo() { wxASSERT(m_pg); wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); m_validationInfo = &m_pg->GetValidationInfo(); m_value = m_validationInfo->GetValue(); } private: void Init(); void OnPropertyGridSet(); wxDECLARE_DYNAMIC_CLASS(wxPropertyGridEvent); wxPGProperty* m_property; wxPropertyGrid* m_pg; wxPGValidationInfo* m_validationInfo; wxString m_propertyName; wxVariant m_value; unsigned int m_column; bool m_canVeto; bool m_wasVetoed; }; // ----------------------------------------------------------------------- // Allows populating wxPropertyGrid from arbitrary text source. class WXDLLIMPEXP_PROPGRID wxPropertyGridPopulator { public: // Default constructor. wxPropertyGridPopulator(); // Destructor. virtual ~wxPropertyGridPopulator(); void SetState( wxPropertyGridPageState* state ); void SetGrid( wxPropertyGrid* pg ); // Appends a new property under bottommost parent. // propClass - Property class as string. wxPGProperty* Add( const wxString& propClass, const wxString& propLabel, const wxString& propName, const wxString* propValue, wxPGChoices* pChoices = NULL ); // Pushes property to the back of parent array (ie it becomes bottommost // parent), and starts scanning/adding children for it. // When finished, parent array is returned to the original state. void AddChildren( wxPGProperty* property ); // Adds attribute to the bottommost property. // type - Allowed values: "string", (same as string), "int", "bool". // Empty string mean autodetect. bool AddAttribute( const wxString& name, const wxString& type, const wxString& value ); // Called once in AddChildren. virtual void DoScanForChildren() = 0; // Returns id of parent property for which children can currently be // added. wxPGProperty* GetCurParent() const { return m_propHierarchy.back(); } wxPropertyGridPageState* GetState() { return m_state; } const wxPropertyGridPageState* GetState() const { return m_state; } // Like wxString::ToLong, except allows N% in addition of N. static bool ToLongPCT( const wxString& s, long* pval, long max ); // Parses strings of format "choice1"[=value1] ... "choiceN"[=valueN] into // wxPGChoices. Registers parsed result using idString (if not empty). // Also, if choices with given id already registered, then don't parse but // return those choices instead. wxPGChoices ParseChoices( const wxString& choicesString, const wxString& idString ); // Implement in derived class to do custom process when an error occurs. // Default implementation uses wxLogError. virtual void ProcessError( const wxString& msg ); protected: // Used property grid. wxPropertyGrid* m_pg; // Used property grid state. wxPropertyGridPageState* m_state; // Tree-hierarchy of added properties (that can have children). wxVector<wxPGProperty*> m_propHierarchy; // Hashmap for string-id to wxPGChoicesData mapping. wxPGHashMapS2P m_dictIdChoices; }; // ----------------------------------------------------------------------- // // Undefine macros that are not needed outside propertygrid sources // #ifndef __wxPG_SOURCE_FILE__ #undef wxPG_FL_DESC_REFRESH_REQUIRED #undef wxPG_FL_SCROLLBAR_DETECTED #undef wxPG_FL_CREATEDSTATE #undef wxPG_FL_NOSTATUSBARHELP #undef wxPG_FL_SCROLLED #undef wxPG_FL_FOCUS_INSIDE_CHILD #undef wxPG_FL_FOCUS_INSIDE #undef wxPG_FL_MOUSE_INSIDE_CHILD #undef wxPG_FL_CUR_USES_CUSTOM_IMAGE #undef wxPG_FL_PRIMARY_FILLS_ENTIRE #undef wxPG_FL_VALUE_MODIFIED #undef wxPG_FL_MOUSE_INSIDE #undef wxPG_FL_FOCUSED #undef wxPG_FL_MOUSE_CAPTURED #undef wxPG_FL_INITIALIZED #undef wxPG_FL_ACTIVATION_BY_CLICK #undef wxPG_SUPPORT_TOOLTIPS #undef wxPG_ICON_WIDTH #undef wxPG_USE_RENDERER_NATIVE // Following are needed by the manager headers // #undef const wxString& #endif // ----------------------------------------------------------------------- #endif #endif // _WX_PROPGRID_PROPGRID_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dcclient.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dcclient.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DCCLIENT_H_ #define _WX_QT_DCCLIENT_H_ #include "wx/qt/dc.h" class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxQtDCImpl { public: wxWindowDCImpl( wxDC *owner ); wxWindowDCImpl( wxDC *owner, wxWindow *win ); ~wxWindowDCImpl(); protected: wxWindow *m_window; }; class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl { public: wxClientDCImpl( wxDC *owner ); wxClientDCImpl( wxDC *owner, wxWindow *win ); ~wxClientDCImpl(); }; class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxWindowDCImpl { public: wxPaintDCImpl( wxDC *owner ); wxPaintDCImpl( wxDC *owner, wxWindow *win ); }; #endif // _WX_QT_DCCLIENT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/listctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/listctrl.h // Author: Mariano Reingart, Peter Most // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_LISTCTRL_H_ #define _WX_QT_LISTCTRL_H_ #include "wx/textctrl.h" class QTreeWidget; class QTreeWidgetItem; class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase { public: wxListCtrl(); wxListCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListCtrlNameStr); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListCtrlNameStr); virtual ~wxListCtrl(); // Attributes //////////////////////////////////////////////////////////////////////////// // Set the control colours bool SetForegroundColour(const wxColour& col); bool SetBackgroundColour(const wxColour& col); // Gets information about this column bool GetColumn(int col, wxListItem& info) const; // Sets information about this column bool SetColumn(int col, const wxListItem& info); // Gets the column width int GetColumnWidth(int col) const; // Sets the column width bool SetColumnWidth(int col, int width); // Gets the column order from its index or index from its order int GetColumnOrder(int col) const; int GetColumnIndexFromOrder(int order) const; // Gets the column order for all columns wxArrayInt GetColumnsOrder() const; // Sets the column order for all columns bool SetColumnsOrder(const wxArrayInt& orders); // Gets the number of items that can fit vertically in the // visible area of the list control (list or report view) // or the total number of items in the list control (icon // or small icon view) int GetCountPerPage() const; // return the total area occupied by all the items (icon/small icon only) wxRect GetViewRect() const; // Gets the edit control for editing labels. wxTextCtrl* GetEditControl() const; // Gets information about the item bool GetItem(wxListItem& info) const; // Sets information about the item bool SetItem(wxListItem& info); // Sets a string field at a particular column long SetItem(long index, int col, const wxString& label, int imageId = -1); // Gets the item state int GetItemState(long item, long stateMask) const; // Sets the item state bool SetItemState(long item, long state, long stateMask); // Sets the item image bool SetItemImage(long item, int image, int selImage = -1); bool SetItemColumnImage(long item, long column, int image); // Gets the item text wxString GetItemText(long item, int col = 0) const; // Sets the item text void SetItemText(long item, const wxString& str); // Gets the item data wxUIntPtr GetItemData(long item) const; // Sets the item data bool SetItemPtrData(long item, wxUIntPtr data); bool SetItemData(long item, long data); // Gets the item rectangle bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const; // Gets the subitem rectangle in report mode bool GetSubItemRect(long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const; // Gets the item position bool GetItemPosition(long item, wxPoint& pos) const; // Sets the item position bool SetItemPosition(long item, const wxPoint& pos); // Gets the number of items in the list control int GetItemCount() const; // Gets the number of columns in the list control int GetColumnCount() const; // get the horizontal and vertical components of the item spacing wxSize GetItemSpacing() const; // Foreground colour of an item. void SetItemTextColour( long item, const wxColour& col); wxColour GetItemTextColour( long item ) const; // Background colour of an item. void SetItemBackgroundColour( long item, const wxColour &col); wxColour GetItemBackgroundColour( long item ) const; // Font of an item. void SetItemFont( long item, const wxFont &f); wxFont GetItemFont( long item ) const; // Gets the number of selected items in the list control int GetSelectedItemCount() const; // Gets the text colour of the listview wxColour GetTextColour() const; // Sets the text colour of the listview void SetTextColour(const wxColour& col); // Gets the index of the topmost visible item when in // list or report view long GetTopItem() const; // Add or remove a single window style void SetSingleStyle(long style, bool add = true); // Set the whole window style void SetWindowStyleFlag(long style); // Searches for an item, starting from 'item'. // item can be -1 to find the first item that matches the // specified flags. // Returns the item or -1 if unsuccessful. long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const; // Gets one of the three image lists wxImageList *GetImageList(int which) const; // Sets the image list void SetImageList(wxImageList *imageList, int which); void AssignImageList(wxImageList *imageList, int which); // refresh items selectively (only useful for virtual list controls) void RefreshItem(long item); void RefreshItems(long itemFrom, long itemTo); // Operations //////////////////////////////////////////////////////////////////////////// // Arranges the items bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); // Deletes an item bool DeleteItem(long item); // Deletes all items bool DeleteAllItems(); // Deletes a column bool DeleteColumn(int col); // Deletes all columns bool DeleteAllColumns(); // Clears items, and columns if there are any. void ClearAll(); // Edit the label wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); // End label editing, optionally cancelling the edit bool EndEditLabel(bool cancel); // Ensures this item is visible bool EnsureVisible(long item); // Find an item whose label matches this string, starting from the item after 'start' // or the beginning if 'start' is -1. long FindItem(long start, const wxString& str, bool partial = false); // Find an item whose data matches this data, starting from the item after 'start' // or the beginning if 'start' is -1. long FindItem(long start, wxUIntPtr data); // Find an item nearest this position in the specified direction, starting from // the item after 'start' or the beginning if 'start' is -1. long FindItem(long start, const wxPoint& pt, int direction); // Determines which item (if any) is at the specified point, // giving details in 'flags' (see wxLIST_HITTEST_... flags above) // Request the subitem number as well at the given coordinate. long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const; // Inserts an item, returning the index of the new item if successful, // -1 otherwise. long InsertItem(const wxListItem& info); // Insert a string item long InsertItem(long index, const wxString& label); // Insert an image item long InsertItem(long index, int imageIndex); // Insert an image/string item long InsertItem(long index, const wxString& label, int imageIndex); // set the number of items in a virtual list control void SetItemCount(long count); // Scrolls the list control. If in icon, small icon or report view mode, // x specifies the number of pixels to scroll. If in list view mode, x // specifies the number of columns to scroll. // If in icon, small icon or list view mode, y specifies the number of pixels // to scroll. If in report view mode, y specifies the number of lines to scroll. bool ScrollList(int dx, int dy); // Sort items. // fn is a function which takes 3 long arguments: item1, item2, data. // item1 is the long data associated with a first item (NOT the index). // item2 is the long data associated with a second item (NOT the index). // data is the same value as passed to SortItems. // The return value is a negative number if the first item should precede the second // item, a positive number of the second item should precede the first, // or zero if the two items are equivalent. // data is arbitrary data to be passed to the sort function. bool SortItems(wxListCtrlCompare fn, wxIntPtr data); // these functions are only used for virtual list view controls, i.e. the // ones with wxLC_VIRTUAL style (not currently implemented in wxQT) // return the text for the given column of the given item virtual wxString OnGetItemText(long item, long column) const; // return the icon for the given item. In report view, OnGetItemImage will // only be called for the first column. See OnGetItemColumnImage for // details. virtual int OnGetItemImage(long item) const; // return the icon for the given item and column. virtual int OnGetItemColumnImage(long item, long column) const; // return the attribute for the given item and column (may return NULL if none) virtual wxItemAttr *OnGetItemColumnAttr(long item, long WXUNUSED(column)) const { return OnGetItemAttr(item); } virtual QWidget *GetHandle() const; protected: void Init(); // Implement base class pure virtual methods. long DoInsertColumn(long col, const wxListItem& info); QTreeWidgetItem *QtGetItem(int id) const; wxImageList * m_imageListNormal; // The image list for normal icons wxImageList * m_imageListSmall; // The image list for small icons wxImageList * m_imageListState; // The image list state icons (not implemented yet) bool m_ownsImageListNormal, m_ownsImageListSmall, m_ownsImageListState; private: QTreeWidget *m_qtTreeWidget; wxDECLARE_DYNAMIC_CLASS( wxListCtrl ); }; #endif
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/font.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/font.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_FONT_H_ #define _WX_QT_FONT_H_ class QFont; class WXDLLIMPEXP_CORE wxFont : public wxFontBase { public: wxFont(); wxFont(const wxFontInfo& info); wxFont(const wxString& nativeFontInfoString); wxFont(const wxNativeFontInfo& info); wxFont(const QFont& font); wxFont(int size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underlined = false, const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underlined = false, const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxDEPRECATED_MSG("use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants") wxFont(int size, int family, int style, int weight, bool underlined = false, const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); bool Create(wxSize size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underlined = false, const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // accessors: get the font characteristics virtual float GetFractionalPointSize() const wxOVERRIDE; virtual wxFontStyle GetStyle() const; virtual int GetNumericWeight() const wxOVERRIDE; virtual bool GetUnderlined() const; virtual wxString GetFaceName() const; virtual wxFontEncoding GetEncoding() const; virtual const wxNativeFontInfo *GetNativeFontInfo() const; // change the font characteristics virtual void SetFractionalPointSize(float pointSize) wxOVERRIDE; virtual void SetFamily( wxFontFamily family ); virtual void SetStyle( wxFontStyle style ); virtual void SetNumericWeight(int weight) wxOVERRIDE; virtual bool SetFaceName(const wxString& facename); virtual void SetUnderlined( bool underlined ); virtual void SetEncoding(wxFontEncoding encoding); wxDECLARE_COMMON_FONT_METHODS(); virtual QFont GetHandle() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; virtual wxFontFamily DoGetFamily() const; wxDECLARE_DYNAMIC_CLASS(wxFont); }; #endif // _WX_QT_FONT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/nonownedwnd.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/nonownedwnd.h // Author: Sean D'Epagnier // Copyright: (c) 2016 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_NONOWNEDWND_H_ #define _WX_QT_NONOWNEDWND_H_ // ---------------------------------------------------------------------------- // wxNonOwnedWindow contains code common to wx{Popup,TopLevel}Window in wxQT. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase { public: wxNonOwnedWindow(); protected: virtual bool DoClearShape() wxOVERRIDE; virtual bool DoSetRegionShape(const wxRegion& region) wxOVERRIDE; #if wxUSE_GRAPHICS_CONTEXT virtual bool DoSetPathShape(const wxGraphicsPath& path) wxOVERRIDE; #endif // wxUSE_GRAPHICS_CONTEXT wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow); }; #endif // _WX_QT_NONOWNEDWND_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/app.h
///////////////////////////////////////////////////////////////////////////// // Name: app.h // Purpose: wxApp class // Author: Peter Most, Mariano Reingart // Copyright: (c) 2009 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_APP_H_ #define _WX_QT_APP_H_ class QApplication; class WXDLLIMPEXP_CORE wxApp : public wxAppBase { public: wxApp(); ~wxApp(); virtual bool Initialize(int& argc, wxChar **argv); private: QApplication *m_qtApplication; int m_qtArgc; char **m_qtArgv; wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp ); }; #endif // _WX_QT_APP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dcmemory.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dcmemory.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DCMEMORY_H_ #define _WX_QT_DCMEMORY_H_ #include "wx/qt/dcclient.h" class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxQtDCImpl { public: wxMemoryDCImpl( wxMemoryDC *owner ); wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); ~wxMemoryDCImpl(); virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; virtual void DoSelect(const wxBitmap& bitmap); virtual const wxBitmap& GetSelectedBitmap() const; virtual wxBitmap& GetSelectedBitmap(); private: wxBitmap m_selected; }; #endif // _WX_QT_DCMEMORY_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/anybutton.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/anybutton.h // Purpose: wxQT wxAnyButton class declaration // Author: Mariano Reingart // Copyright: (c) 2014 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_ANYBUTTON_H_ #define _WX_QT_ANYBUTTON_H_ class QPushButton; //----------------------------------------------------------------------------- // wxAnyButton //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase { public: wxAnyButton() { } // implementation // -------------- virtual void SetLabel( const wxString &label ); virtual QWidget *GetHandle() const; protected: virtual wxBitmap DoGetBitmap(State state) const wxOVERRIDE; virtual void DoSetBitmap(const wxBitmap& bitmap, State which) wxOVERRIDE; QPushButton *m_qtPushButton; void QtCreate(wxWindow *parent); void QtSetBitmap( const wxBitmap &bitmap ); private: typedef wxAnyButtonBase base_type; wxBitmap m_bitmap; wxDECLARE_NO_COPY_CLASS(wxAnyButton); }; #endif // _WX_QT_ANYBUTTON_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/toplevel.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/toplevel.h // Purpose: declares wxTopLevelWindowNative class // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2009 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TOPLEVEL_H_ #define _WX_QT_TOPLEVEL_H_ class WXDLLIMPEXP_CORE wxTopLevelWindowQt : public wxTopLevelWindowBase { public: wxTopLevelWindowQt(); wxTopLevelWindowQt(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); virtual void Maximize(bool maximize = true); virtual void Restore(); virtual void Iconize(bool iconize = true); virtual bool IsMaximized() const; virtual bool IsIconized() const; virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool IsFullScreen() const; virtual void SetTitle(const wxString& title); virtual wxString GetTitle() const; virtual void SetIcons(const wxIconBundle& icons); // Styles virtual void SetWindowStyleFlag( long style ); virtual long GetWindowStyleFlag() const; }; #endif // _WX_QT_TOPLEVEL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/tooltip.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/tooltip.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TOOLTIP_H_ #define _WX_QT_TOOLTIP_H_ #include "wx/object.h" class wxWindow; class WXDLLIMPEXP_CORE wxToolTip : public wxObject { public: // controlling tooltip behaviour: globally change tooltip parameters // enable or disable the tooltips globally static void Enable(bool flag); // set the delay after which the tooltip appears static void SetDelay(long milliseconds); // set the delay after which the tooltip disappears or how long the // tooltip remains visible static void SetAutoPop(long milliseconds); // set the delay between subsequent tooltips to appear static void SetReshow(long milliseconds); wxToolTip(const wxString &tip); void SetTip(const wxString& tip); const wxString& GetTip() const; // the window we're associated with void SetWindow(wxWindow *win); wxWindow *GetWindow() const { return m_window; } private: wxString m_text; wxWindow* m_window; // main window we're associated with }; #endif // _WX_QT_TOOLTIP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/stattext.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/stattext.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_STATTEXT_H_ #define _WX_QT_STATTEXT_H_ class QLabel; class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase { public: wxStaticText(); wxStaticText(wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxString &name = wxStaticTextNameStr ); bool Create(wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxString &name = wxStaticTextNameStr ); virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual wxString GetLabel() const wxOVERRIDE; virtual QWidget *GetHandle() const; private: QLabel *m_qtLabel; wxDECLARE_DYNAMIC_CLASS( wxStaticText ); }; #endif // _WX_QT_STATTEXT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/radiobut.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/radiobut.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_RADIOBUT_H_ #define _WX_QT_RADIOBUT_H_ class QRadioButton; class WXDLLIMPEXP_CORE wxRadioButton : public wxControl { public: wxRadioButton(); wxRadioButton( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioButtonNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioButtonNameStr ); virtual void SetValue(bool value); virtual bool GetValue() const; virtual QWidget *GetHandle() const; protected: private: QRadioButton *m_qtRadioButton; wxDECLARE_DYNAMIC_CLASS( wxRadioButton ); }; #endif // _WX_QT_RADIOBUT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/radiobox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/radiobox.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_RADIOBOX_H_ #define _WX_QT_RADIOBOX_H_ class QGroupBox; class QButtonGroup; class QBoxLayout; class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, public wxRadioBoxBase { public: wxRadioBox(); wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); using wxWindowBase::Show; using wxWindowBase::Enable; using wxRadioBoxBase::GetDefaultBorder; virtual bool Enable(unsigned int n, bool enable = true); virtual bool Show(unsigned int n, bool show = true); virtual bool IsItemEnabled(unsigned int n) const; virtual bool IsItemShown(unsigned int n) const; virtual unsigned int GetCount() const; virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& s); virtual void SetSelection(int n); virtual int GetSelection() const; virtual QWidget *GetHandle() const; private: // The 'visual' group box: QGroupBox *m_qtGroupBox; // Handles the mutual exclusion of buttons: QButtonGroup *m_qtButtonGroup; // Autofit layout for buttons (either vert. or horiz.): QBoxLayout *m_qtBoxLayout; wxDECLARE_DYNAMIC_CLASS(wxRadioBox); }; #endif // _WX_QT_RADIOBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/defs.h
/* * Name: wx/qt/defs.h * Author: Peter Most * Copyright: (c) Peter Most * Licence: wxWindows licence */ #ifndef _WX_QT_DEFS_H_ #define _WX_QT_DEFS_H_ #ifdef __cplusplus typedef class QWidget *WXWidget; #endif #endif /* _WX_QT_DEFS_H_ */
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/checklst.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/checklst.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CHECKLST_H_ #define _WX_QT_CHECKLST_H_ class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase { public: wxCheckListBox(); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int nStrings = 0, const wxString *choices = (const wxString *)NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); virtual ~wxCheckListBox(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); virtual bool IsChecked(unsigned int item) const; virtual void Check(unsigned int item, bool check = true); private: virtual void Init(); //common construction wxDECLARE_DYNAMIC_CLASS(wxCheckListBox); }; #endif // _WX_QT_CHECKLST_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/listbox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/listbox.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_LISTBOX_H_ #define _WX_QT_LISTBOX_H_ class QListWidget; class QModelIndex; class QScrollArea; class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase { public: wxListBox(); wxListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); wxListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); virtual ~wxListBox(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); virtual bool IsSelected(int n) const; virtual int GetSelections(wxArrayInt& aSelections) const; virtual unsigned int GetCount() const; virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& s); virtual int GetSelection() const; virtual QWidget *GetHandle() const; void QtSendEvent(wxEventType evtType, const QModelIndex &index, bool selected); protected: virtual void DoSetFirstItem(int n); virtual void DoSetSelection(int n, bool select); virtual int DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, void **clientData, wxClientDataType type); virtual int DoInsertOneItem(const wxString& item, unsigned int pos); virtual void DoSetItemClientData(unsigned int n, void *clientData); virtual void *DoGetItemClientData(unsigned int n) const; virtual void DoClear(); virtual void DoDeleteOneItem(unsigned int pos); virtual QScrollArea *QtGetScrollBarsContainer() const; #if wxUSE_CHECKLISTBOX bool m_hasCheckBoxes; #endif // wxUSE_CHECKLISTBOX QListWidget *m_qtListWidget; private: virtual void Init(); //common construction void UnSelectAll(); wxDECLARE_DYNAMIC_CLASS(wxListBox); }; #endif // _WX_QT_LISTBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/textentry.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/textentry.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TEXTENTRY_H_ #define _WX_QT_TEXTENTRY_H_ class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase { public: wxTextEntry(); virtual void WriteText(const wxString& text); virtual void Remove(long from, long to); virtual void Copy(); virtual void Cut(); virtual void Paste(); virtual void Undo(); virtual void Redo(); virtual bool CanUndo() const; virtual bool CanRedo() const; virtual void SetInsertionPoint(long pos); virtual long GetInsertionPoint() const; virtual long GetLastPosition() const; virtual void SetSelection(long from, long to); virtual void GetSelection(long *from, long *to) const; virtual bool IsEditable() const; virtual void SetEditable(bool editable); protected: virtual wxString DoGetValue() const; virtual void DoSetValue(const wxString& value, int flags=0); virtual wxWindow *GetEditableWindow(); private: }; #endif // _WX_QT_TEXTENTRY_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/fontdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/fontdlg.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_FONTDLG_H_ #define _WX_QT_FONTDLG_H_ class QFontDialog; class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase { public: wxFontDialog() { } wxFontDialog(wxWindow *parent) { Create(parent); } wxFontDialog(wxWindow *parent, const wxFontData& data) { Create(parent, data); } protected: bool DoCreate(wxWindow *parent); private: wxFontData m_data; wxDECLARE_DYNAMIC_CLASS(wxFontDialog); }; #endif // _WX_QT_FONTDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/filedlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/filedlg.h // Author: Sean D'Epagnier // Copyright: (c) 2014 Sean D'Epagnier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_FILEDLG_H_ #define _WX_QT_FILEDLG_H_ class QFileDialog; class WXDLLIMPEXP_CORE wxFileDialog : public wxFileDialogBase { public: wxFileDialog() { } wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = wxFileDialogNameStr); bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = wxFileDialogNameStr); virtual wxString GetPath() const wxOVERRIDE; virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE; virtual wxString GetFilename() const wxOVERRIDE; virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE; virtual int GetFilterIndex() const wxOVERRIDE; virtual void SetMessage(const wxString& message) wxOVERRIDE; virtual void SetPath(const wxString& path) wxOVERRIDE; virtual void SetDirectory(const wxString& dir) wxOVERRIDE; virtual void SetFilename(const wxString& name) wxOVERRIDE; virtual void SetWildcard(const wxString& wildCard) wxOVERRIDE; virtual void SetFilterIndex(int filterIndex) wxOVERRIDE; virtual bool SupportsExtraControl() const wxOVERRIDE { return true; } virtual QFileDialog *GetQFileDialog() const; private: wxDECLARE_DYNAMIC_CLASS(wxFileDialog); }; #endif // _WX_QT_FILEDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/spinbutt.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/spinbutt.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_SPINBUTT_H_ #define _WX_QT_SPINBUTT_H_ #include "wx/spinbutt.h" class QSpinBox; class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase { public: wxSpinButton(); wxSpinButton(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL, const wxString& name = wxSPIN_BUTTON_NAME); bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL, const wxString& name = wxSPIN_BUTTON_NAME); virtual int GetValue() const; virtual void SetValue(int val); virtual QWidget *GetHandle() const; private: QSpinBox *m_qtSpinBox; wxDECLARE_DYNAMIC_CLASS( wxSpinButton ); }; #endif // _WX_QT_SPINBUTT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/statbmp.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/statbmp.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_STATBMP_H_ #define _WX_QT_STATBMP_H_ class QLabel; class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase { public: wxStaticBitmap(); wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBitmapNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBitmapNameStr); virtual void SetIcon(const wxIcon& icon); virtual void SetBitmap(const wxBitmap& bitmap); virtual wxBitmap GetBitmap() const; virtual wxIcon GetIcon() const; virtual QWidget *GetHandle() const; protected: private: QLabel *m_qtLabel; wxDECLARE_DYNAMIC_CLASS(wxStaticBitmap); }; #endif // _WX_QT_STATBMP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/slider.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/slider.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_SLIDER_H_ #define _WX_QT_SLIDER_H_ class QSlider; class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase { public: wxSlider(); wxSlider(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr); bool Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr); virtual int GetValue() const; virtual void SetValue(int value); virtual void SetRange(int minValue, int maxValue); virtual int GetMin() const; virtual int GetMax() const; virtual void DoSetTickFreq(int freq); virtual int GetTickFreq() const; virtual void SetLineSize(int lineSize); virtual void SetPageSize(int pageSize); virtual int GetLineSize() const; virtual int GetPageSize() const; virtual void SetThumbLength(int lenPixels); virtual int GetThumbLength() const; virtual QWidget *GetHandle() const; private: QSlider *m_qtSlider; wxDECLARE_DYNAMIC_CLASS( wxSlider ); }; #endif // _WX_QT_SLIDER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/menuitem.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/menuitem.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_MENUITEM_H_ #define _WX_QT_MENUITEM_H_ #include "wx/menuitem.h" #include "wx/bitmap.h" class QAction; class WXDLLIMPEXP_FWD_CORE wxBitmap; class WXDLLIMPEXP_FWD_CORE wxMenu; class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = NULL); virtual void SetItemLabel(const wxString& str); virtual void SetCheckable(bool checkable); virtual void Enable(bool enable = true); virtual bool IsEnabled() const; virtual void Check(bool check = true); virtual bool IsChecked() const; virtual void SetBitmap(const wxBitmap& bitmap); virtual const wxBitmap& GetBitmap() const { return m_bitmap; }; virtual QAction *GetHandle() const; private: // Qt is using an action instead of a menu item. QAction *m_qtAction; wxBitmap m_bitmap; wxDECLARE_DYNAMIC_CLASS( wxMenuItem ); }; #endif // _WX_QT_MENUITEM_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/calctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/calctrl.h // Purpose: wxCalendarCtrl control implementation for wxQt // Author: Kolya Kosenko // Created: 2010-05-12 // Copyright: (c) 2010 Kolya Kosenko // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CALCTRL_H_ #define _WX_QT_CALCTRL_H_ #include "wx/calctrl.h" class QCalendarWidget; class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxCalendarCtrlBase { public: wxCalendarCtrl() { Init(); } wxCalendarCtrl(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = wxCalendarNameStr) { Init(); Create(parent, id, date, pos, size, style, name); } virtual ~wxCalendarCtrl(); bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = wxCalendarNameStr); virtual bool SetDate(const wxDateTime& date); virtual wxDateTime GetDate() const; virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, const wxDateTime& upperdate = wxDefaultDateTime); virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; virtual bool EnableMonthChange(bool enable = true); virtual void Mark(size_t day, bool mark); // holidays colours virtual void SetHoliday(size_t day); virtual void SetHolidayColours(const wxColour& colFg, const wxColour& colBg); virtual const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; } virtual const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; } // header colours virtual void SetHeaderColours(const wxColour& colFg, const wxColour& colBg); virtual const wxColour& GetHeaderColourFg() const { return m_colHeaderFg; } virtual const wxColour& GetHeaderColourBg() const { return m_colHeaderBg; } // day attributes virtual wxCalendarDateAttr *GetAttr(size_t day) const; virtual void SetAttr(size_t day, wxCalendarDateAttr *attr); virtual void ResetAttr(size_t day) { SetAttr(day, NULL); } virtual void SetWindowStyleFlag(long style); using wxCalendarCtrlBase::GenerateAllChangeEvents; virtual QWidget *GetHandle() const; protected: virtual void RefreshHolidays(); private: void Init(); void UpdateStyle(); QCalendarWidget *m_qtCalendar; wxColour m_colHeaderFg, m_colHeaderBg, m_colHolidayFg, m_colHolidayBg; wxCalendarDateAttr *m_attrs[31]; wxDECLARE_DYNAMIC_CLASS(wxCalendarCtrl); }; #endif // _WX_QT_CALCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/toolbar.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/toolbar.h // Author: Sean D'Epagnier, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// class QToolBar; #ifndef _WX_QT_TOOLBAR_H_ #define _WX_QT_TOOLBAR_H_ class QActionGroup; class wxQtToolBar; class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase { public: wxToolBar() { Init(); } wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE | wxNO_BORDER, const wxString& name = wxToolBarNameStr) { Init(); Create(parent, id, pos, size, style, name); } virtual ~wxToolBar(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE | wxNO_BORDER, const wxString& name = wxToolBarNameStr); virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE; virtual QToolBar *GetQToolBar() const { return m_qtToolBar; } virtual void SetWindowStyleFlag( long style ) wxOVERRIDE; virtual void SetToolShortHelp(int id, const wxString& helpString) wxOVERRIDE; virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap) wxOVERRIDE; virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap) wxOVERRIDE; virtual bool Realize() wxOVERRIDE; virtual wxToolBarToolBase *CreateTool(int toolid, const wxString& label, const wxBitmap& bmpNormal, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, wxObject *clientData = NULL, const wxString& shortHelp = wxEmptyString, const wxString& longHelp = wxEmptyString) wxOVERRIDE; virtual wxToolBarToolBase *CreateTool(wxControl *control, const wxString& label) wxOVERRIDE; QWidget *GetHandle() const wxOVERRIDE; protected: QActionGroup* GetActionGroup(size_t pos); virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE; virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE; virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) wxOVERRIDE; virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE; virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE; private: void Init(); long GetButtonStyle(); QToolBar *m_qtToolBar; wxDECLARE_DYNAMIC_CLASS(wxToolBar); }; #endif // _WX_QT_TOOLBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/gauge.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/gauge.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_GAUGE_H_ #define _WX_QT_GAUGE_H_ class QProgressBar; class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase { public: wxGauge(); wxGauge(wxWindow *parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr); bool Create(wxWindow *parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr); virtual QWidget *GetHandle() const; // set/get the control range virtual void SetRange(int range); virtual int GetRange() const; virtual void SetValue(int pos); virtual int GetValue() const; private: QProgressBar *m_qtProgressBar; wxDECLARE_DYNAMIC_CLASS(wxGauge); }; #endif // _WX_QT_GAUGE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/spinctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/spinctrl.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_SPINCTRL_H_ #define _WX_QT_SPINCTRL_H_ class QSpinBox; class QDoubleSpinBox; // Take advantage of the Qt compile time polymorphy and use a template to avoid // copy&paste code for the usage of QSpinBox/QDoubleSpinBox. template < typename T, typename Widget > class WXDLLIMPEXP_CORE wxSpinCtrlQt : public wxSpinCtrlBase { public: wxSpinCtrlQt(); wxSpinCtrlQt( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, T min, T max, T initial, T inc, const wxString& name ); bool Create( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, T min, T max, T initial, T inc, const wxString& name ); virtual void SetValue(const wxString&) {} virtual void SetSnapToTicks(bool snap_to_ticks); virtual bool GetSnapToTicks() const; virtual void SetSelection(long from, long to); virtual void SetValue(T val); void SetRange(T minVal, T maxVal); void SetIncrement(T inc); T GetValue() const; T GetMin() const; T GetMax() const; T GetIncrement() const; virtual QWidget *GetHandle() const; protected: Widget *m_qtSpinBox; }; class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlQt< int, QSpinBox > { public: wxSpinCtrl(); wxSpinCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const wxString& name = wxT("wxSpinCtrl")); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const wxString& name = wxT("wxSpinCtrl")); virtual int GetBase() const wxOVERRIDE { return m_base; } virtual bool SetBase(int base) wxOVERRIDE; virtual void SetValue(const wxString & val); virtual void SetValue(int val) { wxSpinCtrlQt<int,QSpinBox>::SetValue(val); } private: // Common part of all ctors. void Init() { m_base = 10; } int m_base; wxDECLARE_DYNAMIC_CLASS(wxSpinCtrl); }; class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlQt< double, QDoubleSpinBox > { public: wxSpinCtrlDouble(); wxSpinCtrlDouble(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, double min = 0, double max = 100, double initial = 0, double inc = 1, const wxString& name = wxT("wxSpinCtrlDouble")); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, double min = 0, double max = 100, double initial = 0, double inc = 1, const wxString& name = wxT("wxSpinCtrlDouble")); void SetDigits(unsigned digits); unsigned GetDigits() const; virtual int GetBase() const wxOVERRIDE { return 10; } virtual bool SetBase(int WXUNUSED(base)) wxOVERRIDE { return false; } virtual void SetValue(const wxString & val); virtual void SetValue(double val) { wxSpinCtrlQt<double,QDoubleSpinBox>::SetValue(val); } private: wxDECLARE_DYNAMIC_CLASS( wxSpinCtrlDouble ); }; #endif // _WX_QT_SPINCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/region.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/region.h // Purpose: header for wxRegion // Author: Peter Most, Javier Torres // Copyright: (c) Peter Most, Javier Torres // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_REGION_H_ #define _WX_QT_REGION_H_ class QRegion; class QRect; template<class T> class QVector; class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase { public: wxRegion(); wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h); wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); wxRegion(const wxRect& rect); wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); wxRegion(const wxBitmap& bmp); wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0); virtual bool IsEmpty() const; virtual void Clear(); virtual const QRegion &GetHandle() const; virtual void QtSetRegion(QRegion region); // Hangs on to this region protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; virtual bool DoIsEqual(const wxRegion& region) const; virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; virtual wxRegionContain DoContainsRect(const wxRect& rect) const; virtual bool DoOffset(wxCoord x, wxCoord y); virtual bool DoUnionWithRect(const wxRect& rect); virtual bool DoUnionWithRegion(const wxRegion& region); virtual bool DoIntersect(const wxRegion& region); virtual bool DoSubtract(const wxRegion& region); virtual bool DoXor(const wxRegion& region); }; class WXDLLIMPEXP_CORE wxRegionIterator: public wxObject { public: wxRegionIterator(); wxRegionIterator(const wxRegion& region); wxRegionIterator(const wxRegionIterator& ri); ~wxRegionIterator(); wxRegionIterator& operator=(const wxRegionIterator& ri); void Reset(); void Reset(const wxRegion& region); bool HaveRects() const; operator bool () const; wxRegionIterator& operator ++ (); wxRegionIterator operator ++ (int); wxCoord GetX() const; wxCoord GetY() const; wxCoord GetW() const; wxCoord GetWidth() const; wxCoord GetH() const; wxCoord GetHeight() const; wxRect GetRect() const; private: QVector < QRect > *m_qtRects; int m_pos; }; #endif // _WX_QT_REGION_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/evtloop.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/evtloop.h // Author: Peter Most, Javier Torres, Mariano Reingart, Sean D'Epagnier // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_EVTLOOP_H_ #define _WX_QT_EVTLOOP_H_ class QTimer; class WXDLLIMPEXP_CORE wxQtEventLoopBase : public wxEventLoopBase { public: wxQtEventLoopBase(); ~wxQtEventLoopBase(); virtual int DoRun(); virtual void ScheduleExit(int rc = 0); virtual bool Pending() const; virtual bool Dispatch(); virtual int DispatchTimeout(unsigned long timeout); virtual void WakeUp(); virtual void DoYieldFor(long eventsToProcess); #if wxUSE_EVENTLOOP_SOURCE virtual wxEventLoopSource *AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); #endif // wxUSE_EVENTLOOP_SOURCE protected: private: QTimer *m_qtIdleTimer; wxDECLARE_NO_COPY_CLASS(wxQtEventLoopBase); }; #if wxUSE_GUI class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxQtEventLoopBase { public: wxGUIEventLoop(); }; #endif // wxUSE_GUI #endif // _WX_QT_EVTLOOP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/palette.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/palette.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_PALETTE_H_ #define _WX_QT_PALETTE_H_ class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase { public: wxPalette(); wxPalette(int n, unsigned char *red, unsigned char *green, unsigned char *blue); bool Create(int n, unsigned char *red, unsigned char *green, unsigned char *blue); bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; }; #endif // _WX_QT_PALETTE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/menu.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/menu.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_MENU_H_ #define _WX_QT_MENU_H_ class QMenu; class QMenuBar; class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase { public: wxMenu(long style = 0); wxMenu(const wxString& title, long style = 0); virtual QMenu *GetHandle() const; protected: virtual wxMenuItem *DoAppend(wxMenuItem *item); virtual wxMenuItem *DoInsert(size_t pos, wxMenuItem *item); virtual wxMenuItem *DoRemove(wxMenuItem *item); private: QMenu *m_qtMenu; wxDECLARE_DYNAMIC_CLASS(wxMenu); }; class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase { public: wxMenuBar(); wxMenuBar(long style); wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); virtual bool Append(wxMenu *menu, const wxString& title); virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); virtual wxMenu *Remove(size_t pos); virtual void EnableTop(size_t pos, bool enable); virtual bool IsEnabledTop(size_t pos) const wxOVERRIDE; virtual void SetMenuLabel(size_t pos, const wxString& label); virtual wxString GetMenuLabel(size_t pos) const; QMenuBar *GetQMenuBar() const { return m_qtMenuBar; } virtual QWidget *GetHandle() const; virtual void Attach(wxFrame *frame); virtual void Detach(); private: QMenuBar *m_qtMenuBar; wxDECLARE_DYNAMIC_CLASS(wxMenuBar); }; #endif // _WX_QT_MENU_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/colour.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/colour.h // Purpose: wxColour class implementation for wxQt // Author: Kolya Kosenko // Created: 2010-05-12 // Copyright: (c) 2010 Kolya Kosenko // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_COLOUR_H_ #define _WX_QT_COLOUR_H_ class QColor; class WXDLLIMPEXP_CORE wxColour : public wxColourBase { public: DEFINE_STD_WXCOLOUR_CONSTRUCTORS wxColour(const QColor& color); virtual bool IsOk() const { return m_valid; } ChannelType Red() const { return m_red; } ChannelType Green() const { return m_green; } ChannelType Blue() const { return m_blue; } ChannelType Alpha() const { return m_alpha; } bool operator==(const wxColour& color) const; bool operator!=(const wxColour& color) const; int GetPixel() const; QColor GetQColor() const; protected: void Init(); virtual void InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a); private: ChannelType m_red, m_green, m_blue, m_alpha; bool m_valid; wxDECLARE_DYNAMIC_CLASS(wxColour); }; #endif // _WX_QT_COLOUR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/checkbox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/checkbox.h // Author: Peter Most, Sean D'Epagnier, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CHECKBOX_H_ #define _WX_QT_CHECKBOX_H_ class QCheckBox; class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase { public: wxCheckBox(); wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr ); virtual void SetValue(bool value); virtual bool GetValue() const; virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual wxString GetLabel() const wxOVERRIDE; virtual QWidget *GetHandle() const; protected: virtual void DoSet3StateValue(wxCheckBoxState state); virtual wxCheckBoxState DoGet3StateValue() const; private: QCheckBox *m_qtCheckBox; wxDECLARE_DYNAMIC_CLASS(wxCheckBox); }; #endif // _WX_QT_CHECKBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/bmpbuttn.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/bmpbuttn.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_BMPBUTTN_H_ #define _WX_QT_BMPBUTTN_H_ class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase { public: wxBitmapButton(); wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); protected: wxDECLARE_DYNAMIC_CLASS(wxBitmapButton); private: // We re-use wxButton }; #endif // _WX_QT_BMPBUTTN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/mdi.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/mdi.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_MDI_H_ #define _WX_QT_MDI_H_ class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase { public: wxMDIParentFrame(); wxMDIParentFrame(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr); // override/implement base class [pure] virtual methods // ---------------------------------------------------- static bool IsTDI() { return false; } virtual void ActivateNext(); virtual void ActivatePrevious(); protected: private: wxDECLARE_DYNAMIC_CLASS(wxMDIParentFrame); }; class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxMDIChildFrameBase { public: wxMDIChildFrame(); wxMDIChildFrame(wxMDIParentFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); bool Create(wxMDIParentFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); virtual void Activate(); }; class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase { public: wxMDIClientWindow(); virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); }; #endif // _WX_QT_MDI_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dataview.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dataview.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DATAVIEW_H_ #define _WX_QT_DATAVIEW_H_ class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase { public: wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTER, int flags = wxDATAVIEW_COL_RESIZABLE ); wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTER, int flags = wxDATAVIEW_COL_RESIZABLE ); // setters: virtual void SetTitle( const wxString &title ); virtual void SetBitmap( const wxBitmap &bitmap ); virtual void SetOwner( wxDataViewCtrl *owner ); virtual void SetAlignment( wxAlignment align ); virtual void SetSortable( bool sortable ); virtual void SetSortOrder( bool ascending ); virtual void SetAsSortKey(bool sort = true); virtual void SetResizeable( bool resizeable ); virtual void SetHidden( bool hidden ); virtual void SetMinWidth( int minWidth ); virtual void SetWidth( int width ); virtual void SetReorderable( bool reorderable ); virtual void SetFlags(int flags); // getters: virtual wxString GetTitle() const; virtual wxAlignment GetAlignment() const; virtual bool IsSortable() const; virtual bool IsSortOrderAscending() const; virtual bool IsSortKey() const; virtual bool IsResizeable() const; virtual bool IsHidden() const; virtual int GetWidth() const; virtual int GetMinWidth() const; virtual bool IsReorderable() const; virtual int GetFlags() const; }; class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase { public: wxDataViewCtrl(); wxDataViewCtrl( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator ); virtual ~wxDataViewCtrl(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator ); virtual bool AssociateModel( wxDataViewModel *model ); virtual bool PrependColumn( wxDataViewColumn *col ); virtual bool AppendColumn( wxDataViewColumn *col ); virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); virtual unsigned int GetColumnCount() const; virtual wxDataViewColumn* GetColumn( unsigned int pos ) const; virtual bool DeleteColumn( wxDataViewColumn *column ); virtual bool ClearColumns(); virtual int GetColumnPosition( const wxDataViewColumn *column ) const; virtual wxDataViewColumn *GetSortingColumn() const; virtual wxDataViewItem GetSelection() const; virtual int GetSelections( wxDataViewItemArray & sel ) const; virtual void SetSelections( const wxDataViewItemArray & sel ); virtual void Select( const wxDataViewItem & item ); virtual void Unselect( const wxDataViewItem & item ); virtual bool IsSelected( const wxDataViewItem & item ) const; virtual void SelectAll(); virtual void UnselectAll(); virtual void EnsureVisible( const wxDataViewItem& item, const wxDataViewColumn *column = NULL ); virtual void HitTest( const wxPoint &point, wxDataViewItem &item, wxDataViewColumn *&column ) const; virtual wxRect GetItemRect( const wxDataViewItem &item, const wxDataViewColumn *column = NULL ) const; virtual void Expand( const wxDataViewItem & item ); virtual void Collapse( const wxDataViewItem & item ); virtual bool IsExpanded( const wxDataViewItem & item ) const; virtual bool EnableDragSource( const wxDataFormat &format ); virtual bool EnableDropTarget( const wxDataFormat &format ); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); wxWindow *GetMainWindow() { return (wxWindow*) this; } virtual void OnInternalIdle(); protected: virtual void DoSetExpanderColumn(); virtual void DoSetIndent(); private: virtual wxDataViewItem DoGetCurrentItem() const; virtual void DoSetCurrentItem(const wxDataViewItem& item); }; #endif // _WX_QT_DATAVIEW_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/accel.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/accel.h // Purpose: wxAcceleratorTable class // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2009 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_ACCEL_H_ #define _WX_QT_ACCEL_H_ /* wxQt accelerators implementation: * * Storing: * QShortcuts are stored in wxWindow (m_qtShortcuts) to allow to delete them * when the accelerator table is changed, and also because we need to specify * a not-null parent from them, which is unknown at the moment of creating the * accelerator table. So, the accelerator table only contains a list of * wxAcceleratorEntries, which are converted to a list of QShortcuts when * the table is fixed to a wxWindow. * * Passing keypresses to accelerators: * The accelerators are implemented using QShortcut's. As there is no easy way * to call them, we must pass all keypress events through the QApplication * notify() function (which is the one that checks if the keypress match any * shortcut. * * Executing commands when a QShortcut is triggered: * Each QShortcut has a property ("wxQt_Command") set with the number of the * wx command it is associated to. Then, its activated() signal is connected to * a small handler (wxQtShortcutHandler in window_qt.h) which calls the main * handler (wxWindow::QtHandleShortcut) passing the command extracted from the * QShortcut. This handler will finally create and send the appropriate wx * event to the window. */ class QShortcut; template < class T > class QList; class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject { public: wxAcceleratorTable(); wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Implementation QList < QShortcut* > *ConvertShortcutTable( QWidget *parent ) const; bool Ok() const { return IsOk(); } bool IsOk() const; protected: // ref counting code virtual wxObjectRefData *CreateRefData() const; virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; private: wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable); }; #endif // _WX_QT_ACCEL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dvrenderer.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dvrenderer.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DVRENDERER_H_ #define _WX_QT_DVRENDERER_H_ // ---------------------------------------------------------------------------- // wxDataViewRenderer // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewRendererBase { public: wxDataViewRenderer( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); virtual void SetMode( wxDataViewCellMode mode ); virtual wxDataViewCellMode GetMode() const; virtual void SetAlignment( int align ); virtual int GetAlignment() const; virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE); virtual wxEllipsizeMode GetEllipsizeMode() const; }; #endif // _WX_QT_DVRENDERER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/scrolbar.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/scrolbar.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_SCROLBAR_H_ #define _WX_QT_SCROLBAR_H_ #include "wx/scrolbar.h" class QScrollBar; class WXDLLIMPEXP_FWD_CORE wxQtScrollBar; class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase { public: wxScrollBar(); wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxScrollBarNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxScrollBarNameStr ); virtual int GetThumbPosition() const; virtual int GetThumbSize() const; virtual int GetPageSize() const; virtual int GetRange() const; virtual void SetThumbPosition(int viewStart); virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh = true); QScrollBar *GetQScrollBar() const { return m_qtScrollBar; } QWidget *GetHandle() const; private: QScrollBar *m_qtScrollBar; wxDECLARE_DYNAMIC_CLASS(wxScrollBar); }; #endif // _WX_QT_SCROLBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dirdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dirdlg.h // Author: Sean D'Epagnier // Copyright: (c) 2014 Sean D'Epagnier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DIRDLG_H_ #define _WX_QT_DIRDLG_H_ class QFileDialog; class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase { public: wxDirDialog() { } wxDirDialog(wxWindow *parent, const wxString& message = wxDirSelectorPromptStr, const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxDirDialogNameStr); bool Create(wxWindow *parent, const wxString& message = wxDirSelectorPromptStr, const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxDirDialogNameStr); public: // overrides from wxGenericDirDialog wxString GetPath() const wxOVERRIDE; void SetPath(const wxString& path) wxOVERRIDE; private: virtual QFileDialog *GetQFileDialog() const; wxDECLARE_DYNAMIC_CLASS(wxDirDialog); }; #endif // _WX_QT_DIRDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/choice.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/choice.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CHOICE_H_ #define _WX_QT_CHOICE_H_ class QComboBox; class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase { public: wxChoice(); wxChoice( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); wxChoice( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); virtual wxSize DoGetBestSize() const; virtual unsigned int GetCount() const; virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& s); virtual void SetSelection(int n); virtual int GetSelection() const; virtual QWidget *GetHandle() const; protected: virtual int DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, void **clientData, wxClientDataType type); virtual int DoInsertOneItem(const wxString& item, unsigned int pos); virtual void DoSetItemClientData(unsigned int n, void *clientData); virtual void *DoGetItemClientData(unsigned int n) const; virtual void DoClear(); virtual void DoDeleteOneItem(unsigned int pos); QComboBox *m_qtComboBox; private: wxDECLARE_DYNAMIC_CLASS(wxChoice); }; #endif // _WX_QT_CHOICE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/bitmap.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/bitmap.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_BITMAP_H_ #define _WX_QT_BITMAP_H_ class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; class WXDLLIMPEXP_FWD_CORE wxImage; class WXDLLIMPEXP_FWD_CORE wxCursor; class QImage; class QPixmap; class QBitmap; class WXDLLIMPEXP_CORE wxBitmap : public wxBitmapBase { public: wxBitmap(); wxBitmap(QPixmap pix); wxBitmap(const wxBitmap& bmp); wxBitmap(const char bits[], int width, int height, int depth = 1); wxBitmap(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); wxBitmap(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH); wxBitmap(const char* const* bits); wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM); wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH, double scale = 1.0); // Convert from wxIcon / wxCursor wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); } explicit wxBitmap(const wxCursor& cursor); static void InitStandardHandlers(); virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH); virtual bool Create(int width, int height, const wxDC& WXUNUSED(dc)); virtual int GetHeight() const; virtual int GetWidth() const; virtual int GetDepth() const; #if wxUSE_IMAGE virtual wxImage ConvertToImage() const; #endif // wxUSE_IMAGE virtual wxMask *GetMask() const; virtual void SetMask(wxMask *mask); virtual wxBitmap GetSubBitmap(const wxRect& rect) const; virtual bool SaveFile(const wxString &name, wxBitmapType type, const wxPalette *palette = NULL) const; virtual bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); #if wxUSE_PALETTE virtual wxPalette *GetPalette() const; virtual void SetPalette(const wxPalette& palette); #endif // wxUSE_PALETTE // copies the contents and mask of the given (colour) icon to the bitmap virtual bool CopyFromIcon(const wxIcon& icon); // implementation: #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED(virtual void SetHeight(int height)); wxDEPRECATED(virtual void SetWidth(int width)); wxDEPRECATED(virtual void SetDepth(int depth)); #endif void *GetRawData(wxPixelDataBase& data, int bpp); void UngetRawData(wxPixelDataBase& data); // these functions are internal and shouldn't be used, they risk to // disappear in the future bool HasAlpha() const; QPixmap *GetHandle() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; wxDECLARE_DYNAMIC_CLASS(wxBitmap); }; class WXDLLIMPEXP_CORE wxMask : public wxMaskBase { public: wxMask(); // Copy constructor wxMask(const wxMask &mask); wxMask& operator=(const wxMask &mask); // Construct a mask from a bitmap and a colour indicating the transparent // area wxMask(const wxBitmap& bitmap, const wxColour& colour); // Construct a mask from a bitmap and a palette index indicating the // transparent area wxMask(const wxBitmap& bitmap, int paletteIndex); // Construct a mask from a mono bitmap (copies the bitmap). wxMask(const wxBitmap& bitmap); virtual ~wxMask(); // Implementation QBitmap *GetHandle() const; protected: // this function is called from Create() to free the existing mask data void FreeData(); // by the public wrappers bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour); bool InitFromMonoBitmap(const wxBitmap& bitmap); wxBitmap GetBitmap() const; protected: wxDECLARE_DYNAMIC_CLASS(wxMask); private: QBitmap *m_qtBitmap; }; #endif // _WX_QT_BITMAP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/printqt.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/printqt.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_PRINTQT_H_ #define _WX_QT_PRINTQT_H_ #include "wx/prntbase.h" class WXDLLIMPEXP_CORE wxQtPrinter : public wxPrinterBase { public: wxQtPrinter( wxPrintDialogData *data = NULL ); virtual bool Setup(wxWindow *parent); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); virtual wxDC* PrintDialog(wxWindow *parent); private: }; class WXDLLIMPEXP_CORE wxQtPrintPreview : public wxPrintPreviewBase { public: wxQtPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintDialogData *data = NULL); wxQtPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); virtual bool Print(bool interactive); virtual void DetermineScaling(); protected: }; #endif // _WX_QT_PRINTQT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/ctrlsub.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/ctrlsub.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CTRLSUB_H_ #define _WX_QT_CTRLSUB_H_ class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsBase { public: wxControlWithItems(); protected: private: wxDECLARE_ABSTRACT_CLASS(wxControlWithItems); }; #endif // _WX_QT_CTRLSUB_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/taskbar.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/taskbar.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TASKBAR_H_ #define _WX_QT_TASKBAR_H_ class QSystemTrayIcon; class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase { public: wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); virtual ~wxTaskBarIcon(); // Accessors bool IsOk() const { return false; } bool IsIconInstalled() const { return false; } // Operations virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); virtual bool RemoveIcon(); virtual bool PopupMenu(wxMenu *menu); private: QSystemTrayIcon *m_qtSystemTrayIcon; wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon); }; #endif // _WX_QT_TASKBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/minifram.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/minifram.h // Purpose: wxMiniFrame class // Author: Mariano Reingart // Copyright: (c) 2014 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_MINIFRAM_H_ #define _WX_MINIFRAM_H_ #include "wx/frame.h" class WXDLLIMPEXP_CORE wxMiniFrame : public wxFrame { public: wxMiniFrame() { } bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, const wxString& name = wxFrameNameStr) { return wxFrame::Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR, name); } wxMiniFrame(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); } protected: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMiniFrame); }; #endif // _WX_MINIFRAM_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/pen.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/pen.h // Author: Peter Most, Javier Torres // Copyright: (c) Peter Most, Javier Torres // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_PEN_H_ #define _WX_QT_PEN_H_ class QPen; class WXDLLIMPEXP_CORE wxPen : public wxPenBase { public: wxPen(); wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants") wxPen(const wxColour& col, int width, int style); bool operator==(const wxPen& pen) const; bool operator!=(const wxPen& pen) const; virtual void SetColour(const wxColour& col); virtual void SetColour(unsigned char r, unsigned char g, unsigned char b); virtual void SetWidth(int width); virtual void SetStyle(wxPenStyle style); virtual void SetStipple(const wxBitmap& stipple); virtual void SetDashes(int nb_dashes, const wxDash *dash); virtual void SetJoin(wxPenJoin join); virtual void SetCap(wxPenCap cap); virtual wxColour GetColour() const; virtual wxBitmap *GetStipple() const; virtual wxPenStyle GetStyle() const; virtual wxPenJoin GetJoin() const; virtual wxPenCap GetCap() const; virtual int GetWidth() const; virtual int GetDashes(wxDash **ptr) const; wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants") void SetStyle(int style) { SetStyle((wxPenStyle)style); } QPen GetHandle() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; }; #endif // _WX_QT_PEN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dialog.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dialog.h // Author: Peter Most, Javier Torres, Mariano Reingart, Sean D'Epagnier // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DIALOG_H_ #define _WX_QT_DIALOG_H_ #include "wx/dialog.h" class QDialog; class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase { public: wxDialog(); wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); virtual ~wxDialog(); bool Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); virtual int ShowModal(); virtual void EndModal(int retCode); virtual bool IsModal() const; QDialog *GetDialogHandle() const; private: wxDECLARE_DYNAMIC_CLASS( wxDialog ); }; #endif // _WX_QT_DIALOG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dataobj2.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dataobj2.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DATAOBJ2_H_ #define _WX_QT_DATAOBJ2_H_ class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase { public: wxBitmapDataObject(); wxBitmapDataObject(const wxBitmap& bitmap); protected: private: }; class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase { public: wxFileDataObject(); void AddFile( const wxString &filename ); }; #endif // _WX_QT_DATAOBJ2_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/cursor.h
///////////////////////////////////////////////////////////////////////////// // Name: cursor.h // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier 2014 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CURSOR_H_ #define _WX_QT_CURSOR_H_ #include "wx/image.h" class QCursor; class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase { public: wxCursor() { } wxCursor(wxStockCursor id) { InitFromStock(id); } #if WXWIN_COMPATIBILITY_2_8 wxCursor(int id) { InitFromStock((wxStockCursor)id); } #endif #if wxUSE_IMAGE wxCursor( const wxImage & image ); wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); #endif virtual wxPoint GetHotSpot() const; QCursor &GetHandle() const; protected: void InitFromStock( wxStockCursor cursorId ); #if wxUSE_IMAGE void InitFromImage( const wxImage & image ); #endif private: void Init(); virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; wxDECLARE_DYNAMIC_CLASS(wxCursor); }; #endif // _WX_QT_CURSOR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dnd.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dnd.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DND_H_ #define _WX_QT_DND_H_ #define wxDROP_ICON(name) wxICON(name) class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase { public: wxDropTarget(wxDataObject *dataObject = NULL ); virtual bool OnDrop(wxCoord x, wxCoord y); virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); virtual bool GetData(); wxDataFormat GetMatchingPair(); protected: private: }; class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase { public: wxDropSource( wxWindow *win = NULL, const wxIcon &copy = wxNullIcon, const wxIcon &move = wxNullIcon, const wxIcon &none = wxNullIcon); wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &copy = wxNullIcon, const wxIcon &move = wxNullIcon, const wxIcon &none = wxNullIcon); virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); }; #endif // _WX_QT_DND_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/popupwin.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/popupwin.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_POPUPWIN_H_ #define _WX_QT_POPUPWIN_H_ class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase { public: wxPopupWindow(); wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE); protected: private: wxDECLARE_DYNAMIC_CLASS(wxPopupWindow); }; #endif // _WX_QT_POPUPWIN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dataform.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/toolbar.h // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier 2014 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DATAFORM_H_ #define _WX_QT_DATAFORM_H_ class QString; class WXDLLIMPEXP_CORE wxDataFormat { public: wxDataFormat(); wxDataFormat( wxDataFormatId formatId ); wxDataFormat(const wxString &id); wxDataFormat(const QString &id); wxDataFormat(const wxChar *id); void SetId( const wxChar *id ); bool operator==(wxDataFormatId format) const; bool operator!=(wxDataFormatId format) const; bool operator==(const wxDataFormat& format) const; bool operator!=(const wxDataFormat& format) const; // string ids are used for custom types - this SetId() must be used for // application-specific formats wxString GetId() const; void SetId( const wxString& id ); // implementation wxDataFormatId GetType() const; void SetType( wxDataFormatId type ); wxString m_MimeType; }; #endif // _WX_QT_DATAFORM_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/brush.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/brush.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_BRUSH_H_ #define _WX_QT_BRUSH_H_ class QBrush; class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase { public: wxBrush(); wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID); wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants") wxBrush(const wxColour& col, int style); wxBrush(const wxBitmap& stipple); virtual void SetColour(const wxColour& col); virtual void SetColour(unsigned char r, unsigned char g, unsigned char b); virtual void SetStyle(wxBrushStyle style); virtual void SetStipple(const wxBitmap& stipple); bool operator==(const wxBrush& brush) const; bool operator!=(const wxBrush& brush) const { return !(*this == brush); } virtual wxColour GetColour() const; virtual wxBrushStyle GetStyle() const; virtual wxBitmap *GetStipple() const; wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants") void SetStyle(int style) { SetStyle((wxBrushStyle)style); } QBrush GetHandle() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; }; #endif // _WX_QT_BRUSH_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/clipbrd.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/toolbar.h // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier 2014 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CLIPBRD_H_ #define _WX_QT_CLIPBRD_H_ #include "wx/weakref.h" class QtClipBoardSignalHandler; class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase { public: wxClipboard(); ~wxClipboard(); virtual bool Open(); virtual void Close(); virtual bool IsOpened() const; virtual bool AddData( wxDataObject *data ); virtual bool SetData( wxDataObject *data ); virtual bool GetData( wxDataObject& data ); virtual void Clear(); virtual bool IsSupported( const wxDataFormat& format ); virtual bool IsSupportedAsync(wxEvtHandler *sink); private: friend class QtClipBoardSignalHandler; int Mode(); QtClipBoardSignalHandler *m_SignalHandler; wxEvtHandlerRef m_sink; bool m_open; wxDECLARE_DYNAMIC_CLASS(wxClipboard); }; #endif // _WX_QT_CLIPBRD_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/tglbtn.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/tglbtn.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TGLBTN_H_ #define _WX_QT_TGLBTN_H_ #include "wx/tglbtn.h" extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase { public: wxBitmapToggleButton(); wxBitmapToggleButton(wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); virtual void SetValue(bool state); virtual bool GetValue() const; virtual QWidget *GetHandle() const; private: wxDECLARE_DYNAMIC_CLASS(wxBitmapToggleButton); }; class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase { public: wxToggleButton(); wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); virtual void SetValue(bool state); virtual bool GetValue() const; virtual QWidget *GetHandle() const; private: }; #endif // _WX_QT_TGLBTN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dcscreen.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dcscreen.h // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DCSCREEN_H_ #define _WX_QT_DCSCREEN_H_ #include "wx/qt/dcclient.h" class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl { public: wxScreenDCImpl( wxScreenDC *owner ); ~wxScreenDCImpl(); protected: virtual void DoGetSize(int *width, int *height) const wxOVERRIDE; virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; virtual QImage *GetQImage(); wxDECLARE_ABSTRACT_CLASS(wxScreenDCImpl); }; #endif // _WX_QT_DCSCREEN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/combobox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/combobox.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_COMBOBOX_H_ #define _WX_QT_COMBOBOX_H_ #include "wx/choice.h" class QComboBox; class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, public wxTextEntry { public: wxComboBox(); wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); virtual void SetSelection(int n) wxOVERRIDE { wxChoice::SetSelection(n); } virtual void SetSelection(long from, long to) wxOVERRIDE; virtual int GetSelection() const wxOVERRIDE { return wxChoice::GetSelection(); } virtual void GetSelection(long *from, long *to) const wxOVERRIDE; virtual wxString GetStringSelection() const wxOVERRIDE { return wxItemContainer::GetStringSelection(); } virtual void Clear() wxOVERRIDE; // See wxComboBoxBase discussion of IsEmpty(). bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } virtual void SetValue(const wxString& value) wxOVERRIDE; virtual void Popup(); virtual void Dismiss(); protected: // From wxTextEntry: virtual wxString DoGetValue() const wxOVERRIDE; private: // From wxTextEntry: virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; } wxDECLARE_DYNAMIC_CLASS(wxComboBox); }; #endif // _WX_QT_COMBOBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/glcanvas.h
///////////////////////////////////////////////////////////////////////////// // Name: include/wx/qt/glcanvas.cpp // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier 2014 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GLCANVAS_H_ #define _WX_GLCANVAS_H_ #include <GL/gl.h> class QGLWidget; class QGLContext; class QGLFormat; class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase { public: wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL, const wxGLContextAttrs *ctxAttrs = NULL); /// virtual ~wxGLContext(); virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE; private: QGLContext *m_glContext; wxDECLARE_CLASS(wxGLContext); }; // ---------------------------------------------------------------------------- // wxGLCanvas: OpenGL output window // ---------------------------------------------------------------------------- class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase { public: explicit // avoid implicitly converting a wxWindow* to wxGLCanvas wxGLCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxGLCanvasName, const wxPalette& palette = wxNullPalette); explicit wxGLCanvas(wxWindow *parent, wxWindowID id = wxID_ANY, const int *attribList = NULL, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxGLCanvasName, const wxPalette& palette = wxNullPalette); bool Create(wxWindow *parent, const wxGLAttributes& dispAttrs, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxGLCanvasName, const wxPalette& palette = wxNullPalette); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxGLCanvasName, const int *attribList = NULL, const wxPalette& palette = wxNullPalette); virtual bool SwapBuffers(); static bool ConvertWXAttrsToQtGL(const int *wxattrs, QGLFormat &format); private: // wxDECLARE_EVENT_TABLE(); wxDECLARE_CLASS(wxGLCanvas); }; #endif // _WX_GLCANVAS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/window.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/window.h // Purpose: wxWindow class // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2009 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_WINDOW_H_ #define _WX_QT_WINDOW_H_ #include <list> class QShortcut; template < class T > class QList; class QWidget; class QScrollWindow; class QAbstractScrollArea; class QScrollArea; class QPicture; class QPainter; class QPaintEvent; class QResizeEvent; class QWheelEvent; class QKeyEvent; class QMouseEvent; class QEvent; class QMoveEvent; class QEvent; class QEvent; class QCloseEvent; class QContextMenuEvent; class QFocusEvent; class WXDLLIMPEXP_FWD_CORE wxScrollBar; class WXDLLIMPEXP_FWD_CORE wxQtShortcutHandler; /* wxQt specific notes: * * Remember to implement the Qt object getters on all subclasses: * - GetHandle() returns the Qt object * - QtGetScrollBarsContainer() returns the widget where scrollbars are placed * For example, for wxFrame, GetHandle() is the QMainWindow, * QtGetScrollBarsContainer() is the central widget and QtGetContainer() is a widget * in a layout inside the central widget that also contains the scrollbars. * Return 0 from QtGetScrollBarsContainer() to disable SetScrollBar() and friends * for wxWindow subclasses. * * * Event handling is achieved by using the template class wxQtEventForwarder * found in winevent_qt.(h|cpp) to send all Qt events here to QtHandleXXXEvent() * methods. All these methods receive the Qt event and the handler. This is * done because events of the containers (the scrolled part of the window) are * sent to the same wxWindow instance, that must be able to differenciate them * as some events need different handling (paintEvent) depending on that. * We pass the QWidget pointer to all event handlers for consistency. */ class WXDLLIMPEXP_CORE wxWindowQt : public wxWindowBase { public: wxWindowQt(); ~wxWindowQt(); wxWindowQt(wxWindowQt *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); bool Create(wxWindowQt *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); // Used by all window classes in the widget creation process. void PostCreation( bool generic = true ); void AddChild( wxWindowBase *child ) wxOVERRIDE; virtual bool Show( bool show = true ) wxOVERRIDE; virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual wxString GetLabel() const wxOVERRIDE; virtual void DoEnable( bool enable ) wxOVERRIDE; virtual void SetFocus() wxOVERRIDE; // Parent/Child: static void QtReparent( QWidget *child, QWidget *parent ); virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE; // Z-order virtual void Raise() wxOVERRIDE; virtual void Lower() wxOVERRIDE; // move the mouse to the specified position virtual void WarpPointer(int x, int y) wxOVERRIDE; virtual void Update() wxOVERRIDE; virtual void Refresh( bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL ) wxOVERRIDE; virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE; virtual bool SetFont(const wxFont& font) wxOVERRIDE; // get the (average) character size for the current font virtual int GetCharHeight() const wxOVERRIDE; virtual int GetCharWidth() const wxOVERRIDE; virtual void SetScrollbar( int orient, int pos, int thumbvisible, int range, bool refresh = true ) wxOVERRIDE; virtual void SetScrollPos( int orient, int pos, bool refresh = true ) wxOVERRIDE; virtual int GetScrollPos( int orient ) const wxOVERRIDE; virtual int GetScrollThumb( int orient ) const wxOVERRIDE; virtual int GetScrollRange( int orient ) const wxOVERRIDE; // scroll window to the specified position virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ) wxOVERRIDE; // Styles virtual void SetWindowStyleFlag( long style ) wxOVERRIDE; virtual void SetExtraStyle( long exStyle ) wxOVERRIDE; virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE; virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE; virtual bool SetTransparent(wxByte alpha) wxOVERRIDE; virtual bool CanSetTransparent() wxOVERRIDE { return true; } QWidget *GetHandle() const wxOVERRIDE; #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE; #endif #if wxUSE_ACCEL // accelerators // ------------ virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ) wxOVERRIDE; #endif // wxUSE_ACCEL // wxQt implementation internals: virtual QPicture *QtGetPicture() const; QPainter *QtGetPainter(); virtual bool QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event ); virtual bool QtHandleResizeEvent ( QWidget *handler, QResizeEvent *event ); virtual bool QtHandleWheelEvent ( QWidget *handler, QWheelEvent *event ); virtual bool QtHandleKeyEvent ( QWidget *handler, QKeyEvent *event ); virtual bool QtHandleMouseEvent ( QWidget *handler, QMouseEvent *event ); virtual bool QtHandleEnterEvent ( QWidget *handler, QEvent *event ); virtual bool QtHandleMoveEvent ( QWidget *handler, QMoveEvent *event ); virtual bool QtHandleShowEvent ( QWidget *handler, QEvent *event ); virtual bool QtHandleChangeEvent ( QWidget *handler, QEvent *event ); virtual bool QtHandleCloseEvent ( QWidget *handler, QCloseEvent *event ); virtual bool QtHandleContextMenuEvent ( QWidget *handler, QContextMenuEvent *event ); virtual bool QtHandleFocusEvent ( QWidget *handler, QFocusEvent *event ); static void QtStoreWindowPointer( QWidget *widget, const wxWindowQt *window ); static wxWindowQt *QtRetrieveWindowPointer( const QWidget *widget ); #if wxUSE_ACCEL virtual void QtHandleShortcut ( int command ); #endif // wxUSE_ACCEL virtual QScrollArea *QtGetScrollBarsContainer() const; protected: virtual void DoGetTextExtent(const wxString& string, int *x, int *y, int *descent = NULL, int *externalLeading = NULL, const wxFont *font = NULL) const wxOVERRIDE; // coordinates translation virtual void DoClientToScreen( int *x, int *y ) const wxOVERRIDE; virtual void DoScreenToClient( int *x, int *y ) const wxOVERRIDE; // capture/release the mouse, used by Capture/ReleaseMouse() virtual void DoCaptureMouse() wxOVERRIDE; virtual void DoReleaseMouse() wxOVERRIDE; // retrieve the position/size of the window virtual void DoGetPosition(int *x, int *y) const wxOVERRIDE; virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO) wxOVERRIDE; virtual void DoGetSize(int *width, int *height) const wxOVERRIDE; // same as DoSetSize() for the client size virtual void DoSetClientSize(int width, int height) wxOVERRIDE; virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE; virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; #if wxUSE_TOOLTIPS virtual void DoSetToolTip( wxToolTip *tip ) wxOVERRIDE; #endif // wxUSE_TOOLTIPS #if wxUSE_MENUS virtual bool DoPopupMenu(wxMenu *menu, int x, int y) wxOVERRIDE; #endif // wxUSE_MENUS QWidget *m_qtWindow; private: void Init(); QScrollArea *m_qtContainer; wxScrollBar *m_horzScrollBar; wxScrollBar *m_vertScrollBar; void QtOnScrollBarEvent( wxScrollEvent& event ); wxScrollBar *QtGetScrollBar( int orientation ) const; wxScrollBar *QtSetScrollBar( int orientation, wxScrollBar *scrollBar=NULL ); bool QtSetBackgroundStyle(); QPicture *m_qtPicture; QPainter *m_qtPainter; bool m_mouseInside; #if wxUSE_ACCEL QList< QShortcut* > *m_qtShortcuts; wxQtShortcutHandler *m_qtShortcutHandler; bool m_processingShortcut; #endif // wxUSE_ACCEL wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxWindowQt ); }; #endif // _WX_QT_WINDOW_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dc.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dc.h // Author: Peter Most, Javier Torres, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DC_H_ #define _WX_QT_DC_H_ class QPainter; class QImage; class WXDLLIMPEXP_FWD_CORE wxRegion; class WXDLLIMPEXP_CORE wxQtDCImpl : public wxDCImpl { public: wxQtDCImpl( wxDC *owner ); ~wxQtDCImpl(); virtual bool CanDrawBitmap() const; virtual bool CanGetTextExtent() const; virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSizeMM(int* width, int* height) const; virtual int GetDepth() const; virtual wxSize GetPPI() const; virtual void SetFont(const wxFont& font); virtual void SetPen(const wxPen& pen); virtual void SetBrush(const wxBrush& brush); virtual void SetBackground(const wxBrush& brush); virtual void SetBackgroundMode(int mode); #if wxUSE_PALETTE virtual void SetPalette(const wxPalette& palette); #endif // wxUSE_PALETTE virtual void SetLogicalFunction(wxRasterOperationMode function); virtual wxCoord GetCharHeight() const; virtual wxCoord GetCharWidth() const; virtual void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, const wxFont *theFont = NULL) const; virtual void Clear(); virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoSetDeviceClippingRegion(const wxRegion& region); virtual void DestroyClippingRegion(); virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE); virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; virtual void DoDrawPoint(wxCoord x, wxCoord y); virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); virtual void DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc); virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea); virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius); virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoCrossHair(wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset ); virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); // Use Qt transformations, as they automatically scale pen widths, text... virtual void ComputeScaleAndOrigin(); void QtPreparePainter(); virtual void* GetHandle() const { return (void*) m_qtPainter; } protected: virtual QImage *GetQImage() { return m_qtImage; } QPainter *m_qtPainter; QImage *m_qtImage; wxRegion *m_clippingRegion; private: enum wxQtRasterColourOp { wxQtNONE, wxQtWHITE, wxQtBLACK, wxQtINVERT }; wxQtRasterColourOp m_rasterColourOp; QColor *m_qtPenColor; QColor *m_qtBrushColor; void ApplyRasterColourOp(); }; #endif // _WX_QT_DC_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/msgdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/msgdlg.h // Author: Peter Most, Javier Torres // Copyright: (c) Peter Most, Javier Torres // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_MSGDLG_H_ #define _WX_QT_MSGDLG_H_ #include "wx/msgdlg.h" class QMessageBox; class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase { public: wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); virtual ~wxMessageDialog(); // Reimplemented to translate return codes from Qt to wx virtual int ShowModal(); }; #endif // _WX_QT_MSGDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/clrpicker.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/clrpicker.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CLRPICKER_H_ #define _WX_QT_CLRPICKER_H_ #include "wx/generic/clrpickerg.h" // TODO: A QtColorPicker is available from // http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Widgets/qtcolorpicker/ // How to integrate into wxWidgets: // // class WXDLLIMPEXP_CORE wxColourPickerWidget : public wxButton, public wxColourPickerWidgetBase // TODO: For now we reuse the existing wxGenericColourButton but this should be // changed to use the above mentioned color picker. class WXDLLIMPEXP_CORE wxColourPickerWidget : public wxGenericColourButton { public: wxColourPickerWidget(); wxColourPickerWidget(wxWindow *parent, wxWindowID id, const wxColour& initial = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxColourPickerWidgetNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxColour& initial = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxColourPickerWidgetNameStr); protected: virtual void UpdateColour(); private: }; #endif // _WX_QT_CLRPICKER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/notebook.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/notebook.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_NOTEBOOK_H_ #define _WX_QT_NOTEBOOK_H_ class QTabWidget; class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase { public: wxNotebook(); wxNotebook(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxNotebookNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxNotebookNameStr); virtual void SetPadding(const wxSize& padding); virtual void SetTabSize(const wxSize& sz); virtual bool SetPageText(size_t n, const wxString& strText); virtual wxString GetPageText(size_t n) const; virtual int GetPageImage(size_t n) const; virtual bool SetPageImage(size_t n, int imageId); virtual bool InsertPage(size_t n, wxWindow *page, const wxString& text, bool bSelect = false, int imageId = -1); virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } virtual QWidget *GetHandle() const; protected: virtual wxWindow *DoRemovePage(size_t page); int DoSetSelection(size_t nPage, int flags = 0); private: QTabWidget *m_qtTabWidget; // internal array to store imageId for each page: wxVector<int> m_images; wxDECLARE_DYNAMIC_CLASS( wxNotebook ); }; #endif // _WX_QT_NOTEBOOK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/statline.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/statline.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_STATLINE_H_ #define _WX_QT_STATLINE_H_ class QFrame; class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase { public: wxStaticLine(); wxStaticLine( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticLineNameStr ); bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticLineNameStr ); virtual QWidget *GetHandle() const; private: QFrame *m_qtFrame; wxDECLARE_DYNAMIC_CLASS( wxStaticLine ); }; #endif // _WX_QT_STATLINE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dvrenderers.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dvrenderers.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DVRENDERERS_H_ #define _WX_QT_DVRENDERERS_H_ // --------------------------------------------------------- // wxDataViewTextRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer { public: static wxString GetDefaultType() { return wxS("string"); } wxDataViewTextRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; void SetAlignment( int align ); }; // --------------------------------------------------------- // wxDataViewBitmapRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer { public: static wxString GetDefaultType() { return wxS("wxBitmap"); } wxDataViewBitmapRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; }; // --------------------------------------------------------- // wxDataViewToggleRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer { public: static wxString GetDefaultType() { return wxS("bool"); } wxDataViewToggleRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; }; // --------------------------------------------------------- // wxDataViewCustomRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewCustomRenderer: public wxDataViewRenderer { public: static wxString GetDefaultType() { return wxS("string"); } wxDataViewCustomRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT, bool no_init = false ); virtual ~wxDataViewCustomRenderer(); virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0; void RenderText( const wxString &text, int xoffset, wxRect cell, wxDC *dc, int state ); virtual wxSize GetSize() const = 0; virtual bool Activate( wxRect WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) ) { return false; } virtual bool LeftClick( wxPoint WXUNUSED(cursor), wxRect WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) ) { return false; } virtual bool StartDrag( wxPoint WXUNUSED(cursor), wxRect WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) ) { return false; } // Create DC on request virtual wxDC *GetDC(); }; // --------------------------------------------------------- // wxDataViewProgressRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewCustomRenderer { public: static wxString GetDefaultType() { return wxS("long"); } wxDataViewProgressRenderer( const wxString &label = wxEmptyString, const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); virtual ~wxDataViewProgressRenderer(); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; virtual bool Render( wxRect cell, wxDC *dc, int state ); virtual wxSize GetSize() const; }; // --------------------------------------------------------- // wxDataViewIconTextRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewCustomRenderer { public: static wxString GetDefaultType() { return wxS("wxDataViewIconText"); } wxDataViewIconTextRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); virtual ~wxDataViewIconTextRenderer(); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; virtual bool Render( wxRect cell, wxDC *dc, int state ); virtual wxSize GetSize() const; virtual bool HasEditorCtrl() const { return true; } virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); }; // --------------------------------------------------------- // wxDataViewDateRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer { public: static wxString GetDefaultType() { return wxS("datetime"); } wxDataViewDateRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int align = wxDVR_DEFAULT_ALIGNMENT ); bool SetValue( const wxVariant &value ); bool GetValue( wxVariant &value ) const; virtual bool Render( wxRect cell, wxDC *dc, int state ); virtual wxSize GetSize() const; virtual bool Activate( wxRect cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned int col ); }; // ------------------------------------- // wxDataViewChoiceRenderer // ------------------------------------- class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer { public: wxDataViewChoiceRenderer( const wxArrayString &choices, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, int alignment = wxDVR_DEFAULT_ALIGNMENT ); virtual bool Render( wxRect rect, wxDC *dc, int state ); virtual wxSize GetSize() const; virtual bool SetValue( const wxVariant &value ); virtual bool GetValue( wxVariant &value ) const; void SetAlignment( int align ); }; #endif // _WX_QT_DVRENDERERS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/frame.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/frame.h // Purpose: wxFrame class interface // Author: Peter Most // Modified by: // Created: 09.08.09 // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_FRAME_H_ #define _WX_QT_FRAME_H_ #include "wx/frame.h" class QMainWindow; class QScrollArea; class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase { public: wxFrame(); wxFrame(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); virtual ~wxFrame(); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); virtual void SetMenuBar(wxMenuBar *menubar); virtual void SetStatusBar(wxStatusBar *statusBar ); virtual void SetToolBar(wxToolBar *toolbar); virtual void SetWindowStyleFlag( long style ); virtual void AddChild( wxWindowBase *child ); virtual void RemoveChild( wxWindowBase *child ); QMainWindow *GetQMainWindow() const; virtual QScrollArea *QtGetScrollBarsContainer() const; protected: virtual void DoGetClientSize(int *width, int *height) const; private: wxDECLARE_DYNAMIC_CLASS( wxFrame ); }; #endif // _WX_QT_FRAME_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/statusbar.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/statusbar.h // Author: Peter Most, Javier Torres, Mariano Reingart, Sean D'Epagnier // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_STATUSBAR_H_ #define _WX_QT_STATUSBAR_H_ #include "wx/statusbr.h" class QLabel; class QStatusBar; template < class T > class QList; class WXDLLIMPEXP_CORE wxStatusBar : public wxStatusBarBase { public: wxStatusBar(); wxStatusBar(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, const wxString& name = wxStatusBarNameStr); bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, const wxString& name = wxStatusBarNameStr); virtual bool GetFieldRect(int i, wxRect& rect) const; virtual void SetMinHeight(int height); virtual int GetBorderX() const; virtual int GetBorderY() const; virtual void Refresh( bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL ); QStatusBar *GetQStatusBar() const { return m_qtStatusBar; } QWidget *GetHandle() const; protected: virtual void DoUpdateStatusText(int number); private: void Init(); void UpdateFields(); QStatusBar *m_qtStatusBar; QList< QLabel* > *m_qtPanes; wxDECLARE_DYNAMIC_CLASS(wxStatusBar); }; #endif // _WX_QT_STATUSBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dataobj.h
///////////////////////////////////////////////////////////////////////////// // Name: src/qt/dataobj.cpp // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DATAOBJ_H_ #define _WX_QT_DATAOBJ_H_ class QMimeData; class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase { public: wxDataObject(); ~wxDataObject(); virtual bool IsSupportedFormat(const wxDataFormat& format, Direction dir) const; virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const; virtual size_t GetFormatCount(Direction dir = Get) const; virtual void GetAllFormats(wxDataFormat *formats, Direction dir = Get) const; virtual size_t GetDataSize(const wxDataFormat& format) const; virtual bool GetDataHere(const wxDataFormat& format, void *buf) const; virtual bool SetData(const wxDataFormat& format, size_t len, const void * buf); private: QMimeData *m_qtMimeData; // to handle formats that have no helper classes }; #endif // _WX_QT_DATAOBJ_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/statbox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/statbox.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_STATBOX_H_ #define _WX_QT_STATBOX_H_ class QGroupBox; class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase { public: wxStaticBox(); wxStaticBox(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBoxNameStr); virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; virtual QWidget *GetHandle() const; protected: private: QGroupBox *m_qtGroupBox; wxDECLARE_DYNAMIC_CLASS( wxStaticBox ); }; #endif // _WX_QT_STATBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/control.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/control.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CONTROL_H_ #define _WX_QT_CONTROL_H_ class WXDLLIMPEXP_CORE wxControl : public wxControlBase { public: wxControl(); wxControl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxControlNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxControlNameStr); virtual wxSize DoGetBestSize() const; protected: bool QtCreateControl( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxValidator &validator, const wxString &name ); private: wxDECLARE_DYNAMIC_CLASS(wxControl); }; #endif // _WX_QT_CONTROL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/dcprint.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/dcprint.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_DCPRINT_H_ #define _WX_QT_DCPRINT_H_ #include "wx/dc.h" class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxDCImpl { public: wxPrinterDCImpl( wxPrinterDC *, const wxPrintData & ); virtual bool CanDrawBitmap() const; virtual bool CanGetTextExtent() const; virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSizeMM(int* width, int* height) const; virtual int GetDepth() const; virtual wxSize GetPPI() const; virtual void SetFont(const wxFont& font); virtual void SetPen(const wxPen& pen); virtual void SetBrush(const wxBrush& brush); virtual void SetBackground(const wxBrush& brush); virtual void SetBackgroundMode(int mode); #if wxUSE_PALETTE virtual void SetPalette(const wxPalette& palette); #endif // wxUSE_PALETTE virtual void SetLogicalFunction(wxRasterOperationMode function); virtual wxCoord GetCharHeight() const; virtual wxCoord GetCharWidth() const; virtual void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, const wxFont *theFont = NULL) const; virtual void Clear(); virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoSetDeviceClippingRegion(const wxRegion& region); virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE); virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; virtual void DoDrawPoint(wxCoord x, wxCoord y); virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); virtual void DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc); virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea); virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius); virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoCrossHair(wxCoord x, wxCoord y); virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false); virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset ); virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); protected: private: }; #endif // _WX_QT_DCPRINT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/printdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/printdlg.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_PRINTDLG_H_ #define _WX_QT_PRINTDLG_H_ #include "wx/prntbase.h" #include "wx/printdlg.h" class WXDLLIMPEXP_CORE wxQtPrintNativeData: public wxPrintNativeDataBase { public: wxQtPrintNativeData(); virtual bool TransferTo( wxPrintData &data ); virtual bool TransferFrom( const wxPrintData &data ); virtual bool IsOk() const; }; class WXDLLIMPEXP_CORE wxQtPrintDialog : public wxPrintDialogBase { public: wxQtPrintDialog(wxWindow *parent, wxPrintDialogData *data); wxQtPrintDialog(wxWindow *parent, wxPrintData *data); virtual wxPrintDialogData& GetPrintDialogData(); virtual wxPrintData& GetPrintData(); virtual wxDC *GetPrintDC(); protected: private: }; class WXDLLIMPEXP_CORE wxQtPageSetupDialog: public wxPageSetupDialogBase { public: wxQtPageSetupDialog(); wxQtPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL); bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL); virtual wxPageSetupDialogData& GetPageSetupDialogData(); private: }; #endif // _WX_QT_PRINTDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/colordlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/colordlg.h // Author: Sean D'Epagnier // Copyright: (c) Sean D'Epagnier 2014 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_COLORDLG_H_ #define _WX_QT_COLORDLG_H_ #include "wx/dialog.h" class QColorDialog; class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog { public: wxColourDialog() { } wxColourDialog(wxWindow *parent, wxColourData *data = NULL) { Create(parent, data); } bool Create(wxWindow *parent, wxColourData *data = NULL); wxColourData &GetColourData(); private: QColorDialog *GetQColorDialog() const; wxColourData m_data; }; #endif // _WX_QT_COLORDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/button.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/button.h // Author: Peter Most, Mariano Reingart // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_BUTTON_H_ #define _WX_QT_BUTTON_H_ #include "wx/control.h" #include "wx/button.h" class WXDLLIMPEXP_CORE wxButton : public wxButtonBase { public: wxButton(); wxButton(wxWindow *parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); virtual wxWindow *SetDefault(); private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton); }; #endif // _WX_QT_BUTTON_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/treectrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/treectrl.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TREECTRL_H_ #define _WX_QT_TREECTRL_H_ class QTreeWidget; class WXDLLIMPEXP_CORE wxTreeCtrl : public wxTreeCtrlBase { public: wxTreeCtrl(); wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr); virtual unsigned int GetCount() const; virtual unsigned int GetIndent() const; virtual void SetIndent(unsigned int indent); virtual void SetImageList(wxImageList *imageList); virtual void SetStateImageList(wxImageList *imageList); virtual wxString GetItemText(const wxTreeItemId& item) const; virtual int GetItemImage(const wxTreeItemId& item, wxTreeItemIcon which = wxTreeItemIcon_Normal) const; virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const; virtual wxColour GetItemTextColour(const wxTreeItemId& item) const; virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const; virtual wxFont GetItemFont(const wxTreeItemId& item) const; virtual void SetItemText(const wxTreeItemId& item, const wxString& text); virtual void SetItemImage(const wxTreeItemId& item, int image, wxTreeItemIcon which = wxTreeItemIcon_Normal); virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data); virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true); virtual void SetItemBold(const wxTreeItemId& item, bool bold = true); virtual void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true); virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col); virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col); virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font); virtual bool IsVisible(const wxTreeItemId& item) const; virtual bool ItemHasChildren(const wxTreeItemId& item) const; virtual bool IsExpanded(const wxTreeItemId& item) const; virtual bool IsSelected(const wxTreeItemId& item) const; virtual bool IsBold(const wxTreeItemId& item) const; virtual size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true) const; virtual wxTreeItemId GetRootItem() const; virtual wxTreeItemId GetSelection() const; virtual size_t GetSelections(wxArrayTreeItemIds& selections) const; virtual void SetFocusedItem(const wxTreeItemId& item); virtual void ClearFocusedItem(); virtual wxTreeItemId GetFocusedItem() const; virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const; virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const; virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const; virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const; virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; virtual wxTreeItemId GetFirstVisibleItem() const; virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const; virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const; virtual wxTreeItemId AddRoot(const wxString& text, int image = -1, int selImage = -1, wxTreeItemData *data = NULL); virtual void Delete(const wxTreeItemId& item); virtual void DeleteChildren(const wxTreeItemId& item); virtual void DeleteAllItems(); virtual void Expand(const wxTreeItemId& item); virtual void Collapse(const wxTreeItemId& item); virtual void CollapseAndReset(const wxTreeItemId& item); virtual void Toggle(const wxTreeItemId& item); virtual void Unselect(); virtual void UnselectAll(); virtual void SelectItem(const wxTreeItemId& item, bool select = true); virtual void SelectChildren(const wxTreeItemId& parent); virtual void EnsureVisible(const wxTreeItemId& item); virtual void ScrollTo(const wxTreeItemId& item); virtual wxTextCtrl *EditLabel(const wxTreeItemId& item, wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl)); virtual wxTextCtrl *GetEditControl() const; virtual void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false); virtual void SortChildren(const wxTreeItemId& item); virtual bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, bool textOnly = false) const; virtual QWidget *GetHandle() const; protected: virtual int DoGetItemState(const wxTreeItemId& item) const; virtual void DoSetItemState(const wxTreeItemId& item, int state); virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, size_t pos, const wxString& text, int image, int selImage, wxTreeItemData *data); virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent, const wxTreeItemId& idPrevious, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData *data = NULL); virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const; private: QTreeWidget *m_qtTreeWidget; wxDECLARE_DYNAMIC_CLASS(wxTreeCtrl); }; #endif // _WX_QT_TREECTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/textctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/textctrl.h // Author: Mariano Reingart, Peter Most // Copyright: (c) 2010 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TEXTCTRL_H_ #define _WX_QT_TEXTCTRL_H_ class QLineEdit; class QTextEdit; class QScrollArea; class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase { public: wxTextCtrl(); wxTextCtrl(wxWindow *parent, wxWindowID id, const wxString &value = wxEmptyString, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString &name = wxTextCtrlNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString &value = wxEmptyString, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString &name = wxTextCtrlNameStr); virtual int GetLineLength(long lineNo) const; virtual wxString GetLineText(long lineNo) const; virtual int GetNumberOfLines() const; virtual bool IsModified() const; virtual void MarkDirty(); virtual void DiscardEdits(); virtual bool SetStyle(long start, long end, const wxTextAttr& style); virtual bool GetStyle(long position, wxTextAttr& style); virtual bool SetDefaultStyle(const wxTextAttr& style); virtual long XYToPosition(long x, long y) const; virtual bool PositionToXY(long pos, long *x, long *y) const; virtual void ShowPosition(long pos); virtual void SetInsertionPoint(long pos); virtual long GetInsertionPoint() const; virtual void SetSelection( long from, long to ); virtual void GetSelection(long *from, long *to) const; virtual wxString DoGetValue() const; virtual void DoSetValue(const wxString &text, int flags = 0); virtual void WriteText(const wxString& text); virtual QWidget *GetHandle() const; protected: virtual wxSize DoGetBestSize() const; virtual bool DoLoadFile(const wxString& file, int fileType); virtual bool DoSaveFile(const wxString& file, int fileType); virtual QScrollArea *QtGetScrollBarsContainer() const; private: QLineEdit *m_qtLineEdit; QTextEdit *m_qtTextEdit; wxDECLARE_DYNAMIC_CLASS( wxTextCtrl ); }; #endif // _WX_QT_TEXTCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/private/pointer.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/private/pointer.h // Author: Peter Most // Copyright: (c) Peter Most // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_POINTER_H_ #define _WX_QT_POINTER_H_ #include <QtCore/QPointer> // Extend QPointer with the ability to delete the object in its destructor. The // normal behaviour of the QPointer makes sure that this is safe, because if somebody // has deleted the object, then data() returns NULL and delete does nothing. template < typename T > class wxQtPointer : public QPointer< T > { public: inline wxQtPointer() : QPointer< T >() { } inline wxQtPointer( T *p ) : QPointer< T >( p ) { } inline wxQtPointer< T > &operator = ( T *p ) { QPointer< T >::operator = ( p ); return *this; } inline ~wxQtPointer() { delete QPointer< T >::data(); } }; #endif // _WX_QT_POINTER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/private/timer.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/timer.h // Author: Javier Torres // Copyright: (c) Javier Torres // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_TIMER_H_ #define _WX_QT_TIMER_H_ #if wxUSE_TIMER #include <QtCore/QObject> #include "wx/private/timer.h" //----------------------------------------------------------------------------- // wxTimer //----------------------------------------------------------------------------- class QTimerEvent; class WXDLLIMPEXP_CORE wxQtTimerImpl : public wxTimerImpl, QObject { public: wxQtTimerImpl( wxTimer* timer ); virtual bool Start( int millisecs = -1, bool oneShot = false ); virtual void Stop(); virtual bool IsRunning() const; protected: virtual void timerEvent( QTimerEvent * event ); private: int m_timerId; }; #endif // wxUSE_TIMER #endif // _WX_QT_TIMER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/private/converter.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/converter.h // Purpose: Converter utility classes and functions // Author: Peter Most, Kolya Kosenko // Created: 02/28/10 // Copyright: (c) Peter Most // (c) 2010 Kolya Kosenko // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_CONVERTER_H_ #define _WX_QT_CONVERTER_H_ #include "wx/defs.h" #include <QtCore/Qt> #include "wx/kbdstate.h" // Rely on overloading and let the compiler pick the correct version, which makes // them easier to use then to write wxQtConvertQtRectToWxRect() or wxQtConvertWxRectToQtRect() class WXDLLIMPEXP_FWD_CORE wxPoint; class QPoint; wxPoint wxQtConvertPoint( const QPoint &point ); QPoint wxQtConvertPoint( const wxPoint &point ); class WXDLLIMPEXP_FWD_CORE wxRect; class QRect; wxRect wxQtConvertRect( const QRect &rect ); QRect wxQtConvertRect( const wxRect &rect ); class WXDLLIMPEXP_FWD_BASE wxString; class QString; wxString wxQtConvertString( const QString &str ); QString wxQtConvertString( const wxString &str ); #if wxUSE_DATETIME class WXDLLIMPEXP_FWD_BASE wxDateTime; class QDate; wxDateTime wxQtConvertDate(const QDate& date); QDate wxQtConvertDate(const wxDateTime& date); #endif // wxUSE_DATETIME class WXDLLIMPEXP_FWD_BASE wxSize; class QSize; wxSize wxQtConvertSize( const QSize &size ); QSize wxQtConvertSize( const wxSize &size ); Qt::Orientation wxQtConvertOrientation( long style, wxOrientation defaultOrientation ); wxOrientation wxQtConvertOrientation( Qt::Orientation ); wxKeyCode wxQtConvertKeyCode( int key, Qt::KeyboardModifiers modifiers ); void wxQtFillKeyboardModifiers( Qt::KeyboardModifiers modifiers, wxKeyboardState *state ); int wxQtConvertKeyCode( int keyCode, int modifiers, Qt::KeyboardModifiers &qtmodifiers ); #endif // _WX_QT_CONVERTER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/private/winevent.h
///////////////////////////////////////////////////////////////////////////// // Name: include/wx/qt/winevent_qt.h // Purpose: QWidget to wxWindow event handler // Author: Javier Torres, Peter Most // Modified by: // Created: 21.06.10 // Copyright: (c) Javier Torres // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_EVENTSIGNALFORWARDER_H_ #define _WX_QT_EVENTSIGNALFORWARDER_H_ #include <QtCore/QEvent> #include <QtGui/QCloseEvent> #include "wx/log.h" #include "wx/window.h" #include "wx/qt/private/converter.h" #include "wx/qt/private/utils.h" class QPaintEvent; template< typename Handler > class wxQtSignalHandler { protected: wxQtSignalHandler( Handler *handler ) { m_handler = handler; } void EmitEvent( wxEvent &event ) const { wxWindow *handler = GetHandler(); event.SetEventObject( handler ); handler->HandleWindowEvent( event ); } virtual Handler *GetHandler() const { return m_handler; } private: Handler *m_handler; }; template < typename Widget, typename Handler > class wxQtEventSignalHandler : public Widget, public wxQtSignalHandler< Handler > { public: wxQtEventSignalHandler( wxWindow *parent, Handler *handler ) : Widget( parent != NULL ? parent->GetHandle() : NULL ) , wxQtSignalHandler< Handler >( handler ) { // Set immediatelly as it is used to check if wxWindow is alive wxWindow::QtStoreWindowPointer( this, handler ); // Handle QWidget destruction signal AFTER it gets deleted QObject::connect( this, &QObject::destroyed, this, &wxQtEventSignalHandler::HandleDestroyedSignal ); } void HandleDestroyedSignal() { } virtual Handler *GetHandler() const { // Only process the signal / event if the wxWindow is not destroyed if ( !wxWindow::QtRetrieveWindowPointer( this ) ) { return NULL; } else return wxQtSignalHandler< Handler >::GetHandler(); } protected: /* Not implemented here: wxHelpEvent, wxIdleEvent wxJoystickEvent, * wxMouseCaptureLostEvent, wxMouseCaptureChangedEvent, * wxPowerEvent, wxScrollWinEvent, wxSysColourChangedEvent */ //wxActivateEvent virtual void changeEvent ( QEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleChangeEvent(this, event) ) Widget::changeEvent(event); else event->accept(); } //wxCloseEvent virtual void closeEvent ( QCloseEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleCloseEvent(this, event) ) Widget::closeEvent(event); else event->accept(); } //wxContextMenuEvent virtual void contextMenuEvent ( QContextMenuEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleContextMenuEvent(this, event) ) Widget::contextMenuEvent(event); else event->accept(); } //wxDropFilesEvent //virtual void dropEvent ( QDropEvent * event ) { } //wxMouseEvent virtual void enterEvent ( QEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleEnterEvent(this, event) ) Widget::enterEvent(event); else event->accept(); } //wxFocusEvent. virtual void focusInEvent ( QFocusEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleFocusEvent(this, event) ) Widget::focusInEvent(event); else event->accept(); } //wxFocusEvent. virtual void focusOutEvent ( QFocusEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleFocusEvent(this, event) ) Widget::focusOutEvent(event); else event->accept(); } //wxShowEvent virtual void hideEvent ( QHideEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleShowEvent(this, event) ) Widget::hideEvent(event); else event->accept(); } //wxKeyEvent virtual void keyPressEvent ( QKeyEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleKeyEvent(this, event) ) Widget::keyPressEvent(event); else event->accept(); } //wxKeyEvent virtual void keyReleaseEvent ( QKeyEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleKeyEvent(this, event) ) Widget::keyReleaseEvent(event); else event->accept(); } //wxMouseEvent virtual void leaveEvent ( QEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleEnterEvent(this, event) ) Widget::leaveEvent(event); else event->accept(); } //wxMouseEvent virtual void mouseDoubleClickEvent ( QMouseEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleMouseEvent(this, event) ) Widget::mouseDoubleClickEvent(event); else event->accept(); } //wxMouseEvent virtual void mouseMoveEvent ( QMouseEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleMouseEvent(this, event) ) Widget::mouseMoveEvent(event); else event->accept(); } //wxMouseEvent virtual void mousePressEvent ( QMouseEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleMouseEvent(this, event) ) Widget::mousePressEvent(event); else event->accept(); } //wxMouseEvent virtual void mouseReleaseEvent ( QMouseEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleMouseEvent(this, event) ) Widget::mouseReleaseEvent(event); else event->accept(); } //wxMoveEvent virtual void moveEvent ( QMoveEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleMoveEvent(this, event) ) Widget::moveEvent(event); else event->accept(); } //wxEraseEvent then wxPaintEvent virtual void paintEvent ( QPaintEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandlePaintEvent(this, event) ) Widget::paintEvent(event); else event->accept(); } //wxSizeEvent virtual void resizeEvent ( QResizeEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleResizeEvent(this, event) ) Widget::resizeEvent(event); else event->accept(); } //wxShowEvent virtual void showEvent ( QShowEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleShowEvent(this, event) ) Widget::showEvent(event); else event->accept(); } //wxMouseEvent virtual void wheelEvent ( QWheelEvent * event ) { if ( !this->GetHandler() ) return; if ( !this->GetHandler()->QtHandleWheelEvent(this, event) ) Widget::wheelEvent(event); else event->accept(); } /* Unused Qt events virtual void actionEvent ( QActionEvent * event ) { } virtual void dragEnterEvent ( QDragEnterEvent * event ) { } virtual void dragLeaveEvent ( QDragLeaveEvent * event ) { } virtual void dragMoveEvent ( QDragMoveEvent * event ) { } virtual void inputMethodEvent ( QInputMethodEvent * event ) { } virtual bool macEvent ( EventHandlerCallRef caller, EventRef event ) { } virtual bool qwsEvent ( QWSEvent * event ) { } virtual void tabletEvent ( QTabletEvent * event ) { } virtual bool winEvent ( MSG * message, long * result ) { } virtual bool x11Event ( XEvent * event ) { } */ }; #endif
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/qt/private/utils.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/qt/utils.h // Purpose: utility classes and/or functions // Author: Peter Most, Javier Torres // Created: 15/05/10 // Copyright: (c) Peter Most, Javier Torres // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_UTILS_H_ #define _WX_QT_UTILS_H_ #include "wx/mousestate.h" #include <QtCore/Qt> void wxQtFillMouseButtons( Qt::MouseButtons buttons, wxMouseState *state ); void wxMissingImplementation( const char fileName[], unsigned lineNumber, const char feature[] ); #define wxMISSING_IMPLEMENTATION( feature )\ wxMissingImplementation( __FILE__, __LINE__, feature ) #define wxMISSING_FUNCTION() \ wxMISSING_IMPLEMENTATION( __WXFUNCTION__ ) #endif // _WX_QT_UTILS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/icondir.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/private/icondir.h // Purpose: Declarations of structs used for loading MS icons // Author: wxWidgets team // Created: 2017-05-19 // Copyright: (c) 2017 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_ICONDIR_H_ #define _WX_PRIVATE_ICONDIR_H_ #include "wx/defs.h" // wxUint* declarations // Structs declared here are used for loading group icons from // .ICO files or MS Windows resources. // Icon entry and directory structs for .ICO files and // MS Windows resources are very similar but not identical. #if wxUSE_ICO_CUR #if wxUSE_STREAMS // icon entry in .ICO files struct ICONDIRENTRY { wxUint8 bWidth; // Width of the image wxUint8 bHeight; // Height of the image (times 2) wxUint8 bColorCount; // Number of colors in image (0 if >=8bpp) wxUint8 bReserved; // Reserved // these two are different in icons and cursors: // icon or cursor wxUint16 wPlanes; // Color Planes or XHotSpot wxUint16 wBitCount; // Bits per pixel or YHotSpot wxUint32 dwBytesInRes; // how many bytes in this resource? wxUint32 dwImageOffset; // where in the file is this image }; // icon directory in .ICO files struct ICONDIR { wxUint16 idReserved; // Reserved wxUint16 idType; // resource type (1 for icons, 2 for cursors) wxUint16 idCount; // how many images? }; #endif // wxUSE_STREAMS #ifdef __WINDOWS__ #pragma pack(push) #pragma pack(2) // icon entry in MS Windows resources struct GRPICONDIRENTRY { wxUint8 bWidth; // Width of the image wxUint8 bHeight; // Height of the image (times 2) wxUint8 bColorCount; // Number of colors in image (0 if >=8bpp) wxUint8 bReserved; // Reserved // these two are different in icons and cursors: // icon or cursor wxUint16 wPlanes; // Color Planes or XHotSpot wxUint16 wBitCount; // Bits per pixel or YHotSpot wxUint32 dwBytesInRes; // how many bytes in this resource? wxUint16 nID; // actual icon resource ID }; // icon directory in MS Windows resources struct GRPICONDIR { wxUint16 idReserved; // Reserved wxUint16 idType; // resource type (1 for icons, 2 for cursors) wxUint16 idCount; // how many images? GRPICONDIRENTRY idEntries[1]; // The entries for each image }; #pragma pack(pop) #endif // __WINDOWS__ #endif // wxUSE_ICO_CUR #endif // _WX_PRIVATE_ICONDIR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/graphics.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/private/graphics.h // Purpose: private graphics context header // Author: Stefan Csomor // Modified by: // Created: // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GRAPHICS_PRIVATE_H_ #define _WX_GRAPHICS_PRIVATE_H_ #if wxUSE_GRAPHICS_CONTEXT #include "wx/graphics.h" class WXDLLIMPEXP_CORE wxGraphicsObjectRefData : public wxObjectRefData { public : wxGraphicsObjectRefData( wxGraphicsRenderer* renderer ); wxGraphicsObjectRefData( const wxGraphicsObjectRefData* data ); wxGraphicsRenderer* GetRenderer() const ; virtual wxGraphicsObjectRefData* Clone() const ; protected : wxGraphicsRenderer* m_renderer; } ; class WXDLLIMPEXP_CORE wxGraphicsBitmapData : public wxGraphicsObjectRefData { public : wxGraphicsBitmapData( wxGraphicsRenderer* renderer) : wxGraphicsObjectRefData(renderer) {} virtual ~wxGraphicsBitmapData() {} // returns the native representation virtual void * GetNativeBitmap() const = 0; } ; class WXDLLIMPEXP_CORE wxGraphicsMatrixData : public wxGraphicsObjectRefData { public : wxGraphicsMatrixData( wxGraphicsRenderer* renderer) : wxGraphicsObjectRefData(renderer) {} virtual ~wxGraphicsMatrixData() {} // concatenates the matrix virtual void Concat( const wxGraphicsMatrixData *t ) = 0; // sets the matrix to the respective values virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0) = 0; // gets the component valuess of the matrix virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const = 0; // makes this the inverse matrix virtual void Invert() = 0; // returns true if the elements of the transformation matrix are equal ? virtual bool IsEqual( const wxGraphicsMatrixData* t) const = 0; // return true if this is the identity matrix virtual bool IsIdentity() const = 0; // // transformation // // add the translation to this matrix virtual void Translate( wxDouble dx , wxDouble dy ) = 0; // add the scale to this matrix virtual void Scale( wxDouble xScale , wxDouble yScale ) = 0; // add the rotation to this matrix (radians) virtual void Rotate( wxDouble angle ) = 0; // // apply the transforms // // applies that matrix to the point virtual void TransformPoint( wxDouble *x, wxDouble *y ) const = 0; // applies the matrix except for translations virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const =0; // returns the native representation virtual void * GetNativeMatrix() const = 0; } ; class WXDLLIMPEXP_CORE wxGraphicsPathData : public wxGraphicsObjectRefData { public : wxGraphicsPathData(wxGraphicsRenderer* renderer) : wxGraphicsObjectRefData(renderer) {} virtual ~wxGraphicsPathData() {} // // These are the path primitives from which everything else can be constructed // // begins a new subpath at (x,y) virtual void MoveToPoint( wxDouble x, wxDouble y ) = 0; // adds a straight line from the current point to (x,y) virtual void AddLineToPoint( wxDouble x, wxDouble y ) = 0; // adds a cubic Bezier curve from the current point, using two control points and an end point virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) = 0; // adds another path virtual void AddPath( const wxGraphicsPathData* path ) =0; // closes the current sub-path virtual void CloseSubpath() = 0; // gets the last point of the current path, (0,0) if not yet set virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const = 0; // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) = 0; // // These are convenience functions which - if not available natively will be assembled // using the primitives from above // // adds a quadratic Bezier curve from the current point, using a control point and an end point virtual void AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y ); // appends a rectangle as a new closed subpath virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); // appends an ellipsis as a new closed subpath fitting the passed rectangle virtual void AddCircle( wxDouble x, wxDouble y, wxDouble r ); // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ; // appends an ellipse virtual void AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h); // appends a rounded rectangle virtual void AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius); // returns the native path virtual void * GetNativePath() const = 0; // give the native path returned by GetNativePath() back (there might be some deallocations necessary) virtual void UnGetNativePath(void *p) const= 0; // transforms each point of this path by the matrix virtual void Transform( const wxGraphicsMatrixData* matrix ) =0; // gets the bounding box enclosing all points (possibly including control points) virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const=0; virtual bool Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) const=0; }; #endif #endif // _WX_GRAPHICS_PRIVATE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/jsscriptwrapper.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/private/jsscriptwrapper.h // Purpose: JS Script Wrapper for wxWebView // Author: Jose Lorenzo // Created: 2017-08-12 // Copyright: (c) 2017 Jose Lorenzo <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_JSSCRIPTWRAPPER_H_ #define _WX_PRIVATE_JSSCRIPTWRAPPER_H_ #include "wx/regex.h" // ---------------------------------------------------------------------------- // Helper for wxWebView::RunScript() // ---------------------------------------------------------------------------- // This class provides GetWrappedCode(), GetOutputCode() and GetCleanUpCode() // functions that should be executed in the backend-appropriate way by each // wxWebView implementation in order to actually execute the user-provided // JavaScript code, retrieve its result (if it executed successfully) and // perform the cleanup at the end. class wxJSScriptWrapper { public: wxJSScriptWrapper(const wxString& js, int* runScriptCount) : m_escapedCode(js) { // We assign the return value of JavaScript snippet we execute to the // variable with this name in order to be able to access it later if // needed. // // Note that we use a different name for it for each call to // RunScript() (which creates a new wxJSScriptWrapper every time) to // avoid any possible conflict between different calls. m_outputVarName = wxString::Format("__wxOut%i", (*runScriptCount)++); // Adds one escape level if there is a single quote, double quotes or // escape characters wxRegEx escapeDoubleQuotes("(\\\\*)([\\'\"\n\r\v\t\b\f])"); escapeDoubleQuotes.Replace(&m_escapedCode,"\\1\\1\\\\\\2"); } // Get the code to execute, its returned value will be either boolean true, // if it executed successfully, or the exception message if an error // occurred. // // Execute GetOutputCode() later to get the real output after successful // execution of this code. wxString GetWrappedCode() const { return wxString::Format ( "try { var %s = eval(\"%s\"); true; } " "catch (e) { e.name + \": \" + e.message; }", m_outputVarName, m_escapedCode ); } // Get code returning the result of the last successful execution of the // code returned by GetWrappedCode(). wxString GetOutputCode() const { #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__) return wxString::Format ( "if (typeof %s == 'object') JSON.stringify(%s);" "else if (typeof %s == 'undefined') 'undefined';" "else %s;", m_outputVarName, m_outputVarName, m_outputVarName, m_outputVarName ); #elif wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE return wxString::Format ( "try {" "(%s == null || typeof %s != 'object') ? String(%s)" ": JSON.stringify(%s);" "}" "catch (e) {" "try {" "function __wx$stringifyJSON(obj) {" "if (!(obj instanceof Object))" "return typeof obj === \"string\"" "? \'\"\' + obj + \'\"\'" ": \'\' + obj;" "else if (obj instanceof Array) {" "if (obj[0] === undefined)" "return \'[]\';" "else {" "var arr = [];" "for (var i = 0; i < obj.length; i++)" "arr.push(__wx$stringifyJSON(obj[i]));" "return \'[\' + arr + \']\';" "}" "}" "else if (typeof obj === \"object\") {" "if (obj instanceof Date) {" "if (!Date.prototype.toISOString) {" "(function() {" "function pad(number) {" "return number < 10" "? '0' + number" ": number;" "}" "Date.prototype.toISOString = function() {" "return this.getUTCFullYear() +" "'-' + pad(this.getUTCMonth() + 1) +" "'-' + pad(this.getUTCDate()) +" "'T' + pad(this.getUTCHours()) +" "':' + pad(this.getUTCMinutes()) +" "':' + pad(this.getUTCSeconds()) +" "'.' + (this.getUTCMilliseconds() / 1000)" ".toFixed(3).slice(2, 5) + 'Z\"';" "};" "}());" "}" "return '\"' + obj.toISOString(); + '\"'" "}" "var objElements = [];" "for (var key in obj)" "{" "if (typeof obj[key] === \"function\")" "return \'{}\';" "else {" "objElements.push(\'\"\'" "+ key + \'\":\' +" "__wx$stringifyJSON(obj[key]));" "}" "}" "return \'{\' + objElements + \'}\';" "}" "}" "__wx$stringifyJSON(%s);" "}" "catch (e) { e.name + \": \" + e.message; }" "}", m_outputVarName, m_outputVarName, m_outputVarName, m_outputVarName, m_outputVarName ); #else return m_outputVarName; #endif } // Execute the code returned by this function to let the output of the code // we executed be garbage-collected. wxString GetCleanUpCode() const { return wxString::Format("%s = undefined;", m_outputVarName); } private: wxString m_escapedCode; wxString m_outputVarName; wxDECLARE_NO_COPY_CLASS(wxJSScriptWrapper); }; #endif // _WX_PRIVATE_JSSCRIPTWRAPPER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/fontmgr.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/private/fontmgr.h // Purpose: font management for ports that don't have their own // Author: Vaclav Slavik // Created: 2006-11-18 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) // (c) 2006 REA Elektronik GmbH // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_FONTMGR_H_ #define _WX_PRIVATE_FONTMGR_H_ #include "wx/list.h" #include "wx/fontutil.h" class wxFontsManager; class wxFontInstance; class wxFontInstanceList; class wxFontFace; class wxFontBundle; class wxFontBundleHash; class wxFontMgrFontRefData; WX_DECLARE_LIST(wxFontBundle, wxFontBundleList); /** This class represents single font face with set parameters (point size, antialiasing). */ class wxFontInstanceBase { protected: wxFontInstanceBase(float ptSize, bool aa) : m_ptSize(ptSize), m_aa(aa) {} virtual ~wxFontInstanceBase() {} public: float GetPointSize() const { return m_ptSize; } bool IsAntiAliased() const { return m_aa; } protected: float m_ptSize; bool m_aa; }; /// This class represents loaded font face (bundle+weight+italics). class wxFontFaceBase { protected: /// Ctor. Creates object with reference count = 0, Acquire() must be /// called after the object is created. wxFontFaceBase(); virtual ~wxFontFaceBase(); public: /// Increases reference count of the face virtual void Acquire(); /** Decreases reference count of the face. Call this when you no longer use the object returned by wxFontBundle. Note that this doesn't destroy the object, but only optionally shuts it down, so it's possible to call Acquire() and Release() more than once. */ virtual void Release(); /** Returns instance of the font at given size. @param ptSize point size of the font to create; note that this is a float and not integer, it should be wxFont's point size multiplied by wxDC's scale factor @param aa should the font be antialiased? */ virtual wxFontInstance *GetFontInstance(float ptSize, bool aa); protected: /// Called to create a new instance of the font by GetFontInstance() if /// it wasn't found it cache. virtual wxFontInstance *CreateFontInstance(float ptSize, bool aa) = 0; protected: unsigned m_refCnt; wxFontInstanceList *m_instances; }; /** This class represents font bundle. Font bundle is set of faces that have the same name, but differ in weight and italics. */ class wxFontBundleBase { public: wxFontBundleBase(); virtual ~wxFontBundleBase(); /// Returns name of the bundle virtual wxString GetName() const = 0; /// Returns true if the font is fixed-width virtual bool IsFixed() const = 0; /// Type of faces in the bundle enum FaceType { // NB: values of these constants are set so that it's possible to // make OR-combinations of them and still get valid enum element FaceType_Regular = 0, FaceType_Italic = 1, FaceType_Bold = 2, FaceType_BoldItalic = FaceType_Italic | FaceType_Bold, FaceType_Max }; /// Returns true if the given face is available bool HasFace(FaceType type) const { return m_faces[type] != NULL; } /** Returns font face object that can be used to render font of given type. Note that this method can only be called if HasFace(type) returns true. Acquire() was called on the returned object, you must call Release() when you stop using it. */ wxFontFace *GetFace(FaceType type) const; /** Returns font face object that can be used to render given font. Acquire() was called on the returned object, you must call Release() when you stop using it. */ wxFontFace *GetFaceForFont(const wxFontMgrFontRefData& font) const; protected: wxFontFace *m_faces[FaceType_Max]; }; /** Base class for wxFontsManager class, which manages the list of all available fonts and their loaded instances. */ class wxFontsManagerBase { protected: wxFontsManagerBase(); virtual ~wxFontsManagerBase(); public: /// Returns the font manager singleton, creating it if it doesn't exist static wxFontsManager *Get(); /// Called by wxApp to shut down the manager static void CleanUp(); /// Returns list of all available font bundles const wxFontBundleList& GetBundles() const { return *m_list; } /** Returns object representing font bundle with the given name. The returned object is owned by wxFontsManager, you must not delete it. */ wxFontBundle *GetBundle(const wxString& name) const; /** Returns object representing font bundle that can be used to render given font. The returned object is owned by wxFontsManager, you must not delete it. */ wxFontBundle *GetBundleForFont(const wxFontMgrFontRefData& font) const; /// This method must be called by derived void AddBundle(wxFontBundle *bundle); /// Returns default facename for given wxFont family virtual wxString GetDefaultFacename(wxFontFamily family) const = 0; private: wxFontBundleHash *m_hash; wxFontBundleList *m_list; protected: static wxFontsManager *ms_instance; }; #if defined(__WXDFB__) #include "wx/dfb/private/fontmgr.h" #endif /// wxFontMgrFontRefData implementation using wxFontsManager classes class wxFontMgrFontRefData : public wxGDIRefData { public: wxFontMgrFontRefData(int size = wxDEFAULT, wxFontFamily family = wxFONTFAMILY_DEFAULT, wxFontStyle style = wxFONTSTYLE_NORMAL, int weight = wxFONTWEIGHT_NORMAL, bool underlined = false, const wxString& faceName = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontMgrFontRefData(const wxFontMgrFontRefData& data); ~wxFontMgrFontRefData(); wxFontBundle *GetFontBundle() const; wxFontInstance *GetFontInstance(float scale, bool antialiased) const; bool IsFixedWidth() const { return GetFontBundle()->IsFixed(); } const wxNativeFontInfo *GetNativeFontInfo() const { return &m_info; } float GetFractionalPointSize() const { return m_info.pointSize; } wxString GetFaceName() const { return m_info.faceName; } wxFontFamily GetFamily() const { return m_info.family; } wxFontStyle GetStyle() const { return m_info.style; } int GetNumericWeight() const { return m_info.weight; } bool GetUnderlined() const { return m_info.underlined; } wxFontEncoding GetEncoding() const { return m_info.encoding; } void SetFractionalPointSize(float pointSize); void SetFamily(wxFontFamily family); void SetStyle(wxFontStyle style); void SetNumericWeight(int weight); void SetFaceName(const wxString& faceName); void SetUnderlined(bool underlined); void SetEncoding(wxFontEncoding encoding); private: void EnsureValidFont(); wxNativeFontInfo m_info; wxFontFace *m_fontFace; wxFontBundle *m_fontBundle; bool m_fontValid; }; #endif // _WX_PRIVATE_FONTMGR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/selectdispatcher.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/private/selectdispatcher.h // Purpose: wxSelectDispatcher class // Authors: Lukasz Michalski and Vadim Zeitlin // Created: December 2006 // Copyright: (c) Lukasz Michalski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_SELECTDISPATCHER_H_ #define _WX_PRIVATE_SELECTDISPATCHER_H_ #include "wx/defs.h" #if wxUSE_SELECT_DISPATCHER #if defined(HAVE_SYS_SELECT_H) #include <sys/time.h> #include <sys/select.h> #endif #include <sys/types.h> #include "wx/thread.h" #include "wx/private/fdiodispatcher.h" // helper class storing all the select() fd sets class WXDLLIMPEXP_BASE wxSelectSets { public: // ctor zeroes out all fd_sets wxSelectSets(); // default copy ctor, assignment operator and dtor are ok // return true if fd appears in any of the sets bool HasFD(int fd) const; // add or remove FD to our sets depending on whether flags contains // wxFDIO_INPUT/OUTPUT/EXCEPTION bits bool SetFD(int fd, int flags); // same as SetFD() except it unsets the bits set in the flags for the given // fd bool ClearFD(int fd) { return SetFD(fd, 0); } // call select() with our sets: the other parameters are the same as for // select() itself int Select(int nfds, struct timeval *tv); // call the handler methods corresponding to the sets having this fd if it // is present in any set and return true if it is bool Handle(int fd, wxFDIOHandler& handler) const; private: typedef void (wxFDIOHandler::*Callback)(); // the FD sets indices enum { Read, Write, Except, Max }; // the sets used with select() fd_set m_fds[Max]; // the wxFDIO_XXX flags, functions and names (used for debug messages only) // corresponding to the FD sets above static int ms_flags[Max]; static const char *ms_names[Max]; static Callback ms_handlers[Max]; }; class WXDLLIMPEXP_BASE wxSelectDispatcher : public wxMappedFDIODispatcher { public: // default ctor wxSelectDispatcher() { m_maxFD = -1; } // implement pure virtual methods of the base class virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL) wxOVERRIDE; virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL) wxOVERRIDE; virtual bool UnregisterFD(int fd) wxOVERRIDE; virtual bool HasPending() const wxOVERRIDE; virtual int Dispatch(int timeout = TIMEOUT_INFINITE) wxOVERRIDE; private: // common part of RegisterFD() and ModifyFD() bool DoUpdateFDAndHandler(int fd, wxFDIOHandler *handler, int flags); // call the handlers for the fds present in the given sets, return the // number of handlers we called int ProcessSets(const wxSelectSets& sets); // helper of ProcessSets(): call the handler if its fd is in the set void DoProcessFD(int fd, const fd_set& fds, wxFDIOHandler *handler, const char *name); // common part of HasPending() and Dispatch(): calls select() with the // specified timeout int DoSelect(wxSelectSets& sets, int timeout) const; #if wxUSE_THREADS wxCriticalSection m_cs; #endif // wxUSE_THREADS // the select sets containing all the registered fds wxSelectSets m_sets; // the highest registered fd value or -1 if none int m_maxFD; }; #endif // wxUSE_SELECT_DISPATCHER #endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win64/include/wx/private/eventloopsourcesmanager.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/private/eventloopsourcesmanager.h // Purpose: declares wxEventLoopSourcesManagerBase class // Author: Rob Bresalier // Created: 2013-06-19 // Copyright: (c) 2013 Rob Bresalier // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ #define _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ // For pulling in the value of wxUSE_EVENTLOOP_SOURCE #include "wx/evtloop.h" #if wxUSE_EVENTLOOP_SOURCE class WXDLLIMPEXP_BASE wxEventLoopSourcesManagerBase { public: virtual wxEventLoopSource* AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags) = 0; virtual ~wxEventLoopSourcesManagerBase() { } }; #endif // wxUSE_EVENTLOOP_SOURCE #endif // _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_
h