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/Win32/include/wx/xrc/xh_toolbk.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_toolbk.h // Purpose: XML resource handler for wxToolbook // Author: Andrea Zanellato // Created: 2009/12/12 // Copyright: (c) 2010 wxWidgets development team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_TOOLBK_H_ #define _WX_XH_TOOLBK_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_TOOLBOOK class WXDLLIMPEXP_FWD_CORE wxToolbook; class WXDLLIMPEXP_XRC wxToolbookXmlHandler : public wxXmlResourceHandler { public: wxToolbookXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxToolbook *m_toolbook; wxDECLARE_DYNAMIC_CLASS(wxToolbookXmlHandler); }; #endif // wxUSE_XRC && wxUSE_TOOLBOOK #endif // _WX_XH_TOOLBK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_hyperlink.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_hyperlink.h // Purpose: Hyperlink control (wxAdv) // Author: David Norris <[email protected]> // Modified by: Ryan Norton, Francesco Montorsi // Created: 04/02/2005 // Copyright: (c) 2005 David Norris // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_HYPERLINKH__ #define _WX_XH_HYPERLINKH__ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_HYPERLINKCTRL class WXDLLIMPEXP_XRC wxHyperlinkCtrlXmlHandler : public wxXmlResourceHandler { // Register with wxWindows' dynamic class subsystem. wxDECLARE_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler); public: // Constructor. wxHyperlinkCtrlXmlHandler(); // Creates the control and returns a pointer to it. virtual wxObject *DoCreateResource() wxOVERRIDE; // Returns true if we know how to create a control for the given node. virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_HYPERLINKCTRL #endif // _WX_XH_HYPERLINKH__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_listbk.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_listbk.h // Purpose: XML resource handler for wxListbook // Author: Vaclav Slavik // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_LISTBK_H_ #define _WX_XH_LISTBK_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_LISTBOOK class WXDLLIMPEXP_FWD_CORE wxListbook; class WXDLLIMPEXP_XRC wxListbookXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxListbookXmlHandler); public: wxListbookXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxListbook *m_listbook; }; #endif // wxUSE_XRC && wxUSE_LISTBOOK #endif // _WX_XH_LISTBK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_radbx.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_radbx.h // Purpose: XML resource handler for wxRadioBox // Author: Bob Mitchell // Created: 2000/03/21 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_RADBX_H_ #define _WX_XH_RADBX_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_RADIOBOX class WXDLLIMPEXP_XRC wxRadioBoxXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxRadioBoxXmlHandler); public: wxRadioBoxXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_insideBox; // the items labels wxArrayString m_labels; #if wxUSE_TOOLTIPS // the items tooltips wxArrayString m_tooltips; #endif // wxUSE_TOOLTIPS // the item help text wxArrayString m_helptexts; wxArrayInt m_helptextSpecified; // if the corresponding array element is 1, the radiobox item is // disabled/hidden wxArrayInt m_isEnabled, m_isShown; }; #endif // wxUSE_XRC && wxUSE_RADIOBOX #endif // _WX_XH_RADBX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_richtext.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_richtext.h // Purpose: XML resource handler for wxRichTextCtrl // Author: Julian Smart // Created: 2006-11-08 // Copyright: (c) 2006 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_RICHTEXT_H_ #define _WX_XH_RICHTEXT_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_RICHTEXT class WXDLLIMPEXP_RICHTEXT wxRichTextCtrlXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxRichTextCtrlXmlHandler); public: wxRichTextCtrlXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_RICHTEXT #endif // _WX_XH_RICHTEXT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_fontpicker.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_fontpicker.h // Purpose: XML resource handler for wxFontPickerCtrl // Author: Francesco Montorsi // Created: 2006-04-17 // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_FONTPICKERCTRL_H_ #define _WX_XH_FONTPICKERCTRL_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_FONTPICKERCTRL class WXDLLIMPEXP_XRC wxFontPickerCtrlXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxFontPickerCtrlXmlHandler); public: wxFontPickerCtrlXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_FONTPICKERCTRL #endif // _WX_XH_FONTPICKERCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_stbox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_stbox.h // Purpose: XML resource handler for wxStaticBox // Author: Brian Gavin // Created: 2000/09/00 // Copyright: (c) 2000 Brian Gavin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_STBOX_H_ #define _WX_XH_STBOX_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_STATBOX class WXDLLIMPEXP_XRC wxStaticBoxXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxStaticBoxXmlHandler); public: wxStaticBoxXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_STATBOX #endif // _WX_XH_STBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_wizrd.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_wizrd.h // Purpose: XML resource handler for wxWizard // Author: Vaclav Slavik // Created: 2003/03/02 // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_WIZRD_H_ #define _WX_XH_WIZRD_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_WIZARDDLG class WXDLLIMPEXP_FWD_CORE wxWizard; class WXDLLIMPEXP_FWD_CORE wxWizardPageSimple; class WXDLLIMPEXP_XRC wxWizardXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxWizardXmlHandler); public: wxWizardXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: wxWizard *m_wizard; wxWizardPageSimple *m_lastSimplePage; }; #endif // wxUSE_XRC && wxUSE_WIZARDDLG #endif // _WX_XH_WIZRD_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_choic.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_choic.h // Purpose: XML resource handler for wxChoice // Author: Bob Mitchell // Created: 2000/03/21 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_CHOIC_H_ #define _WX_XH_CHOIC_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHOICE class WXDLLIMPEXP_XRC wxChoiceXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxChoiceXmlHandler); public: wxChoiceXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_insideBox; wxArrayString strList; }; #endif // wxUSE_XRC && wxUSE_CHOICE #endif // _WX_XH_CHOIC_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_html.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_html.h // Purpose: XML resource handler for wxHtmlWindow // Author: Bob Mitchell // Created: 2000/03/21 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_HTML_H_ #define _WX_XH_HTML_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_HTML class WXDLLIMPEXP_XRC wxHtmlWindowXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxHtmlWindowXmlHandler); public: wxHtmlWindowXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_HTML #endif // _WX_XH_HTML_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_choicbk.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_choicbk.h // Purpose: XML resource handler for wxChoicebook // Author: Vaclav Slavik // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_CHOICEBK_H_ #define _WX_XH_CHOICEBK_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHOICEBOOK class WXDLLIMPEXP_FWD_CORE wxChoicebook; class WXDLLIMPEXP_XRC wxChoicebookXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxChoicebookXmlHandler); public: wxChoicebookXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxChoicebook *m_choicebook; }; #endif // wxUSE_XRC && wxUSE_CHOICEBOOK #endif // _WX_XH_CHOICEBK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_bttn.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_bttn.h // Purpose: XML resource handler for buttons // Author: Vaclav Slavik // Created: 2000/03/05 // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_BTTN_H_ #define _WX_XH_BTTN_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_BUTTON class WXDLLIMPEXP_XRC wxButtonXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxButtonXmlHandler); public: wxButtonXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_BUTTON #endif // _WX_XH_BTTN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_auitoolb.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_toolb.h // Purpose: XML resource handler for wxAuiToolBar // Author: Rodolphe Suescun // Created: 2013-11-23 // Copyright: (c) 2013 Rodolphe Suescun // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_AUITOOLB_H_ #define _WX_XH_AUITOOLB_H_ #include "wx/aui/auibar.h" #include "wx/menu.h" #include "wx/vector.h" #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_AUI class WXDLLIMPEXP_FWD_AUI wxAuiToolBar; class WXDLLIMPEXP_AUI wxAuiToolBarXmlHandler : public wxXmlResourceHandler { public: wxAuiToolBarXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxAuiToolBar *m_toolbar; wxSize m_toolSize; class MenuHandler : public wxEvtHandler { public: void OnDropDown(wxAuiToolBarEvent& event); unsigned RegisterMenu(wxAuiToolBar *toobar, int id, wxMenu *menu); private: wxVector<wxMenu*> m_menus; }; MenuHandler m_menuHandler; wxDECLARE_DYNAMIC_CLASS(wxAuiToolBarXmlHandler); }; #endif // wxUSE_XRC && wxUSE_AUI #endif // _WX_XH_AUITOOLB_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_menu.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_menu.h // Purpose: XML resource handler for menus/menubars // Author: Vaclav Slavik // Created: 2000/03/05 // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_MENU_H_ #define _WX_XH_MENU_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_MENUS class WXDLLIMPEXP_XRC wxMenuXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxMenuXmlHandler); public: wxMenuXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_insideMenu; }; class WXDLLIMPEXP_XRC wxMenuBarXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler); public: wxMenuBarXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC && wxUSE_MENUS #endif // _WX_XH_MENU_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_propdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_propdlg.h // Purpose: XML resource handler for wxPropertySheetDialog // Author: Sander Berents // Created: 2007/07/12 // Copyright: (c) 2007 Sander Berents // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_PROPDLG_H_ #define _WX_XH_PROPDLG_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC class WXDLLIMPEXP_FWD_CORE wxPropertySheetDialog; class WXDLLIMPEXP_XRC wxPropertySheetDialogXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxPropertySheetDialogXmlHandler); public: wxPropertySheetDialogXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxPropertySheetDialog *m_dialog; }; #endif // wxUSE_XRC #endif // _WX_XH_PROPDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_srchctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_srchctl.h // Purpose: XRC resource handler for wxSearchCtrl // Author: Sander Berents // Created: 2007/07/12 // Copyright: (c) 2007 Sander Berents // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_SRCH_H_ #define _WX_XH_SRCH_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_SEARCHCTRL class WXDLLIMPEXP_XRC wxSearchCtrlXmlHandler : public wxXmlResourceHandler { public: wxSearchCtrlXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; wxDECLARE_DYNAMIC_CLASS(wxSearchCtrlXmlHandler); }; #endif // wxUSE_XRC && wxUSE_SEARCHCTRL #endif // _WX_XH_SRCH_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_bmp.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_bmp.h // Purpose: XML resource handler for wxBitmap and wxIcon // Author: Vaclav Slavik // Created: 2000/09/00 // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_BMP_H_ #define _WX_XH_BMP_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC class WXDLLIMPEXP_XRC wxBitmapXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxBitmapXmlHandler); public: wxBitmapXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; class WXDLLIMPEXP_XRC wxIconXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxIconXmlHandler); public: wxIconXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; }; #endif // wxUSE_XRC #endif // _WX_XH_BMP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/toplevel.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/toplevel.h // Purpose: persistence support for wxTLW // Author: Vadim Zeitlin // Created: 2009-01-19 // Copyright: (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_TOPLEVEL_H_ #define _WX_PERSIST_TOPLEVEL_H_ #include "wx/persist/window.h" #include "wx/toplevel.h" // ---------------------------------------------------------------------------- // string constants used by wxPersistentTLW // ---------------------------------------------------------------------------- // we use just "Window" to keep configuration files and such short, there // should be no confusion with wxWindow itself as we don't have persistent // windows, just persistent controls which have their own specific kind strings #define wxPERSIST_TLW_KIND "Window" // ---------------------------------------------------------------------------- // wxPersistentTLW: supports saving/restoring window position and size as well // as maximized/iconized/restore state // ---------------------------------------------------------------------------- class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow>, private wxTopLevelWindow::GeometrySerializer { public: wxPersistentTLW(wxTopLevelWindow *tlw) : wxPersistentWindow<wxTopLevelWindow>(tlw) { } virtual void Save() const wxOVERRIDE { const wxTopLevelWindow * const tlw = Get(); tlw->SaveGeometry(*this); } virtual bool Restore() wxOVERRIDE { wxTopLevelWindow * const tlw = Get(); return tlw->RestoreToGeometry(*this); } virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_TLW_KIND; } private: virtual bool SaveField(const wxString& name, int value) const wxOVERRIDE { return SaveValue(name, value); } virtual bool RestoreField(const wxString& name, int* value) wxOVERRIDE { return RestoreValue(name, value); } }; inline wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *tlw) { return new wxPersistentTLW(tlw); } #endif // _WX_PERSIST_TOPLEVEL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/treebook.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/treebook.h // Purpose: persistence support for wxBookCtrl // Author: Vadim Zeitlin // Created: 2009-01-19 // Copyright: (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_TREEBOOK_H_ #define _WX_PERSIST_TREEBOOK_H_ #include "wx/persist/bookctrl.h" #include "wx/arrstr.h" #include "wx/treebook.h" // ---------------------------------------------------------------------------- // string constants used by wxPersistentTreeBookCtrl // ---------------------------------------------------------------------------- #define wxPERSIST_TREEBOOK_KIND "TreeBook" // this key contains the indices of all expanded nodes in the tree book // separated by wxPERSIST_TREEBOOK_EXPANDED_SEP #define wxPERSIST_TREEBOOK_EXPANDED_BRANCHES "Expanded" #define wxPERSIST_TREEBOOK_EXPANDED_SEP ',' // ---------------------------------------------------------------------------- // wxPersistentTreeBookCtrl: supports saving/restoring open tree branches // ---------------------------------------------------------------------------- class wxPersistentTreeBookCtrl : public wxPersistentBookCtrl { public: wxPersistentTreeBookCtrl(wxTreebook *book) : wxPersistentBookCtrl(book) { } virtual void Save() const wxOVERRIDE { const wxTreebook * const book = GetTreeBook(); wxString expanded; const size_t count = book->GetPageCount(); for ( size_t n = 0; n < count; n++ ) { if ( book->IsNodeExpanded(n) ) { if ( !expanded.empty() ) expanded += wxPERSIST_TREEBOOK_EXPANDED_SEP; expanded += wxString::Format("%u", static_cast<unsigned>(n)); } } SaveValue(wxPERSIST_TREEBOOK_EXPANDED_BRANCHES, expanded); wxPersistentBookCtrl::Save(); } virtual bool Restore() wxOVERRIDE { wxTreebook * const book = GetTreeBook(); wxString expanded; if ( RestoreValue(wxPERSIST_TREEBOOK_EXPANDED_BRANCHES, &expanded) ) { const wxArrayString indices(wxSplit(expanded, wxPERSIST_TREEBOOK_EXPANDED_SEP)); const size_t pageCount = book->GetPageCount(); const size_t count = indices.size(); for ( size_t n = 0; n < count; n++ ) { unsigned long idx; if ( indices[n].ToULong(&idx) && idx < pageCount ) book->ExpandNode(idx); } } return wxPersistentBookCtrl::Restore(); } virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_TREEBOOK_KIND; } wxTreebook *GetTreeBook() const { return static_cast<wxTreebook *>(Get()); } }; inline wxPersistentObject *wxCreatePersistentObject(wxTreebook *book) { return new wxPersistentTreeBookCtrl(book); } #endif // _WX_PERSIST_TREEBOOK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/bookctrl.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/bookctrl.h // Purpose: persistence support for wxBookCtrl // Author: Vadim Zeitlin // Created: 2009-01-19 // Copyright: (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_BOOKCTRL_H_ #define _WX_PERSIST_BOOKCTRL_H_ #include "wx/persist/window.h" #include "wx/bookctrl.h" // ---------------------------------------------------------------------------- // string constants used by wxPersistentBookCtrl // ---------------------------------------------------------------------------- #define wxPERSIST_BOOK_KIND "Book" #define wxPERSIST_BOOK_SELECTION "Selection" // ---------------------------------------------------------------------------- // wxPersistentBookCtrl: supports saving/restoring book control selection // ---------------------------------------------------------------------------- class wxPersistentBookCtrl : public wxPersistentWindow<wxBookCtrlBase> { public: wxPersistentBookCtrl(wxBookCtrlBase *book) : wxPersistentWindow<wxBookCtrlBase>(book) { } virtual void Save() const wxOVERRIDE { SaveValue(wxPERSIST_BOOK_SELECTION, Get()->GetSelection()); } virtual bool Restore() wxOVERRIDE { long sel; if ( RestoreValue(wxPERSIST_BOOK_SELECTION, &sel) ) { wxBookCtrlBase * const book = Get(); if ( sel >= 0 && (unsigned)sel < book->GetPageCount() ) { book->SetSelection(sel); return true; } } return false; } virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_BOOK_KIND; } }; inline wxPersistentObject *wxCreatePersistentObject(wxBookCtrlBase *book) { return new wxPersistentBookCtrl(book); } #endif // _WX_PERSIST_BOOKCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/dataview.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/dataview.h // Purpose: Persistence support for wxDataViewCtrl and its derivatives // Author: wxWidgets Team // Created: 2017-08-21 // Copyright: (c) 2017 wxWidgets.org // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_DATAVIEW_H_ #define _WX_PERSIST_DATAVIEW_H_ #include "wx/persist/window.h" #include "wx/dataview.h" // ---------------------------------------------------------------------------- // String constants used by wxPersistentDataViewCtrl. // ---------------------------------------------------------------------------- #define wxPERSIST_DVC_KIND "DataView" #define wxPERSIST_DVC_HIDDEN "Hidden" #define wxPERSIST_DVC_POS "Position" #define wxPERSIST_DVC_TITLE "Title" #define wxPERSIST_DVC_WIDTH "Width" #define wxPERSIST_DVC_SORT_KEY "Sorting/Column" #define wxPERSIST_DVC_SORT_ASC "Sorting/Asc" // ---------------------------------------------------------------------------- // wxPersistentDataViewCtrl: Saves and restores user modified column widths // and single column sort order. // // Future improvements could be to save and restore column order if the user // has changed it and multicolumn sorts. // ---------------------------------------------------------------------------- class wxPersistentDataViewCtrl : public wxPersistentWindow<wxDataViewCtrl> { public: wxPersistentDataViewCtrl(wxDataViewCtrl* control) : wxPersistentWindow<wxDataViewCtrl>(control) { } virtual void Save() const wxOVERRIDE { wxDataViewCtrl* const control = Get(); const wxDataViewColumn* sortColumn = NULL; for ( unsigned int col = 0; col < control->GetColumnCount(); col++ ) { const wxDataViewColumn* const column = control->GetColumn(col); // Create a prefix string to identify each column. const wxString columnPrefix = MakeColumnPrefix(column); // Save the column attributes. SaveValue(columnPrefix + wxPERSIST_DVC_HIDDEN, column->IsHidden()); SaveValue(columnPrefix + wxPERSIST_DVC_POS, control->GetColumnPosition(column)); SaveValue(columnPrefix + wxPERSIST_DVC_WIDTH, column->GetWidth()); // Check if this column is the current sort key. if ( column->IsSortKey() ) sortColumn = column; } // Note: The current implementation does not save and restore multi- // column sort keys. if ( control->IsMultiColumnSortAllowed() ) return; // Save the sort key and direction if there is a valid sort. if ( sortColumn ) { SaveValue(wxPERSIST_DVC_SORT_KEY, sortColumn->GetTitle()); SaveValue(wxPERSIST_DVC_SORT_ASC, sortColumn->IsSortOrderAscending()); } } virtual bool Restore() wxOVERRIDE { wxDataViewCtrl* const control = Get(); for ( unsigned int col = 0; col < control->GetColumnCount(); col++ ) { wxDataViewColumn* const column = control->GetColumn(col); // Create a prefix string to identify each column within the // persistence store (columns are stored by title). The persistence // store benignly handles cases where the title is not found. const wxString columnPrefix = MakeColumnPrefix(column); // Restore column hidden status. bool hidden; if ( RestoreValue(columnPrefix + wxPERSIST_DVC_HIDDEN, &hidden) ) column->SetHidden(hidden); // Restore the column width. int width; if ( RestoreValue(columnPrefix + wxPERSIST_DVC_WIDTH, &width) ) column->SetWidth(width); // TODO: Set the column's view position. } // Restore the sort key and order if there is a valid model and sort // criteria. wxString sortColumn; if ( control->GetModel() && RestoreValue(wxPERSIST_DVC_SORT_KEY, &sortColumn) && !sortColumn.empty() ) { bool sortAsc = true; if ( wxDataViewColumn* column = GetColumnByTitle(control, sortColumn) ) { RestoreValue(wxPERSIST_DVC_SORT_ASC, &sortAsc); column->SetSortOrder(sortAsc); // Resort the control based on the new sort criteria. control->GetModel()->Resort(); } } return true; } virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_DVC_KIND; } private: // Return a (slash-terminated) prefix for the column-specific entries. static wxString MakeColumnPrefix(const wxDataViewColumn* column) { return wxString::Format("/Columns/%s/", column->GetTitle()); } // Return the column with the given title or NULL. static wxDataViewColumn* GetColumnByTitle(wxDataViewCtrl* control, const wxString& title) { for ( unsigned int col = 0; col < control->GetColumnCount(); col++ ) { if ( control->GetColumn(col)->GetTitle() == title ) return control->GetColumn(col); } return NULL; } }; inline wxPersistentObject *wxCreatePersistentObject(wxDataViewCtrl* control) { return new wxPersistentDataViewCtrl(control); } #endif // _WX_PERSIST_DATAVIEW_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/splitter.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/splitter.h // Purpose: Persistence support for wxSplitterWindow. // Author: Vadim Zeitlin // Created: 2011-08-31 // Copyright: (c) 2011 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_SPLITTER_H_ #define _WX_PERSIST_SPLITTER_H_ #include "wx/persist/window.h" #include "wx/splitter.h" // ---------------------------------------------------------------------------- // string constants used by wxPersistentSplitter // ---------------------------------------------------------------------------- #define wxPERSIST_SPLITTER_KIND "Splitter" // Special position value of -1 means the splitter is not split at all. #define wxPERSIST_SPLITTER_POSITION "Position" // ---------------------------------------------------------------------------- // wxPersistentSplitter: supports saving/restoring splitter position // ---------------------------------------------------------------------------- class wxPersistentSplitter : public wxPersistentWindow<wxSplitterWindow> { public: wxPersistentSplitter(wxSplitterWindow* splitter) : wxPersistentWindow<wxSplitterWindow>(splitter) { } virtual void Save() const wxOVERRIDE { wxSplitterWindow* const splitter = Get(); int pos = splitter->IsSplit() ? splitter->GetSashPosition() : -1; SaveValue(wxPERSIST_SPLITTER_POSITION, pos); } virtual bool Restore() wxOVERRIDE { int pos; if ( !RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) ) return false; if ( pos == -1 ) Get()->Unsplit(); else Get()->SetSashPosition(pos); return true; } virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_SPLITTER_KIND; } }; inline wxPersistentObject *wxCreatePersistentObject(wxSplitterWindow* splitter) { return new wxPersistentSplitter(splitter); } #endif // _WX_PERSIST_SPLITTER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/persist/window.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/persist/window.h // Purpose: wxPersistentWindow declaration // Author: Vadim Zeitlin // Created: 2009-01-23 // Copyright: (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_PERSIST_WINDOW_H_ #define _WX_PERSIST_WINDOW_H_ #include "wx/persist.h" #include "wx/window.h" // ---------------------------------------------------------------------------- // wxPersistentWindow: base class for persistent windows, uses the window name // as persistent name by default and automatically reacts // to the window destruction // ---------------------------------------------------------------------------- // type-independent part of wxPersistentWindow class wxPersistentWindowBase : public wxPersistentObject { public: wxPersistentWindowBase(wxWindow *win) : wxPersistentObject(win) { win->Bind(wxEVT_DESTROY, &wxPersistentWindowBase::HandleDestroy, this); } virtual wxString GetName() const wxOVERRIDE { const wxString name = GetWindow()->GetName(); wxASSERT_MSG( !name.empty(), "persistent windows should be named!" ); return name; } protected: wxWindow *GetWindow() const { return static_cast<wxWindow *>(GetObject()); } private: void HandleDestroy(wxWindowDestroyEvent& event) { event.Skip(); // only react to the destruction of this object itself, not of any of // its children if ( event.GetEventObject() == GetObject() ) { // this will delete this object itself wxPersistenceManager::Get().SaveAndUnregister(GetWindow()); } } wxDECLARE_NO_COPY_CLASS(wxPersistentWindowBase); }; template <class T> class wxPersistentWindow : public wxPersistentWindowBase { public: typedef T WindowType; wxPersistentWindow(WindowType *win) : wxPersistentWindowBase(win) { } WindowType *Get() const { return static_cast<WindowType *>(GetWindow()); } }; #endif // _WX_PERSIST_WINDOW_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/srchctlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/srchctlg.h // Purpose: generic wxSearchCtrl class // Author: Vince Harron // Created: 2006-02-19 // Copyright: Vince Harron // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_SEARCHCTRL_H_ #define _WX_GENERIC_SEARCHCTRL_H_ #if wxUSE_SEARCHCTRL #include "wx/bitmap.h" class WXDLLIMPEXP_FWD_CORE wxSearchButton; class WXDLLIMPEXP_FWD_CORE wxSearchTextCtrl; // ---------------------------------------------------------------------------- // wxSearchCtrl is a combination of wxTextCtrl and wxSearchButton // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase { public: // creation // -------- wxSearchCtrl(); wxSearchCtrl(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 = wxSearchCtrlNameStr); virtual ~wxSearchCtrl(); 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 = wxSearchCtrlNameStr); #if wxUSE_MENUS // get/set search button menu // -------------------------- virtual void SetMenu( wxMenu* menu ) wxOVERRIDE; virtual wxMenu* GetMenu() wxOVERRIDE; #endif // wxUSE_MENUS // get/set search options // ---------------------- virtual void ShowSearchButton( bool show ) wxOVERRIDE; virtual bool IsSearchButtonVisible() const wxOVERRIDE; virtual void ShowCancelButton( bool show ) wxOVERRIDE; virtual bool IsCancelButtonVisible() const wxOVERRIDE; virtual void SetDescriptiveText(const wxString& text) wxOVERRIDE; virtual wxString GetDescriptiveText() const wxOVERRIDE; // accessors // --------- virtual wxString GetRange(long from, long to) const wxOVERRIDE; virtual int GetLineLength(long lineNo) const wxOVERRIDE; virtual wxString GetLineText(long lineNo) const wxOVERRIDE; virtual int GetNumberOfLines() const wxOVERRIDE; virtual bool IsModified() const wxOVERRIDE; virtual bool IsEditable() const wxOVERRIDE; // more readable flag testing methods virtual bool IsSingleLine() const; virtual bool IsMultiLine() const; // If the return values from and to are the same, there is no selection. virtual void GetSelection(long* from, long* to) const wxOVERRIDE; virtual wxString GetStringSelection() const wxOVERRIDE; // operations // ---------- virtual void ChangeValue(const wxString& value) wxOVERRIDE; // editing virtual void Clear() wxOVERRIDE; virtual void Replace(long from, long to, const wxString& value) wxOVERRIDE; virtual void Remove(long from, long to) wxOVERRIDE; // load/save the controls contents from/to the file virtual bool LoadFile(const wxString& file); virtual bool SaveFile(const wxString& file = wxEmptyString); // sets/clears the dirty flag virtual void MarkDirty() wxOVERRIDE; virtual void DiscardEdits() wxOVERRIDE; // set the max number of characters which may be entered in a single line // text control virtual void SetMaxLength(unsigned long WXUNUSED(len)) wxOVERRIDE; // writing text inserts it at the current position, appending always // inserts it at the end virtual void WriteText(const wxString& text) wxOVERRIDE; virtual void AppendText(const wxString& text) wxOVERRIDE; // insert the character which would have resulted from this key event, // return true if anything has been inserted virtual bool EmulateKeyPress(const wxKeyEvent& event); // text control under some platforms supports the text styles: these // methods allow to apply the given text style to the given selection or to // set/get the style which will be used for all appended text virtual bool SetStyle(long start, long end, const wxTextAttr& style) wxOVERRIDE; virtual bool GetStyle(long position, wxTextAttr& style) wxOVERRIDE; virtual bool SetDefaultStyle(const wxTextAttr& style) wxOVERRIDE; virtual const wxTextAttr& GetDefaultStyle() const wxOVERRIDE; // translate between the position (which is just an index in the text ctrl // considering all its contents as a single strings) and (x, y) coordinates // which represent column and line. virtual long XYToPosition(long x, long y) const wxOVERRIDE; virtual bool PositionToXY(long pos, long *x, long *y) const wxOVERRIDE; virtual void ShowPosition(long pos) wxOVERRIDE; // find the character at position given in pixels // // NB: pt is in device coords (not adjusted for the client area origin nor // scrolling) virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const wxOVERRIDE; virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, wxTextCoord *col, wxTextCoord *row) const wxOVERRIDE; // Clipboard operations virtual void Copy() wxOVERRIDE; virtual void Cut() wxOVERRIDE; virtual void Paste() wxOVERRIDE; virtual bool CanCopy() const wxOVERRIDE; virtual bool CanCut() const wxOVERRIDE; virtual bool CanPaste() const wxOVERRIDE; // Undo/redo virtual void Undo() wxOVERRIDE; virtual void Redo() wxOVERRIDE; virtual bool CanUndo() const wxOVERRIDE; virtual bool CanRedo() const wxOVERRIDE; // Insertion point virtual void SetInsertionPoint(long pos) wxOVERRIDE; virtual void SetInsertionPointEnd() wxOVERRIDE; virtual long GetInsertionPoint() const wxOVERRIDE; virtual wxTextPos GetLastPosition() const wxOVERRIDE; virtual void SetSelection(long from, long to) wxOVERRIDE; virtual void SelectAll() wxOVERRIDE; virtual void SetEditable(bool editable) wxOVERRIDE; // Autocomplete virtual bool DoAutoCompleteStrings(const wxArrayString &choices) wxOVERRIDE; virtual bool DoAutoCompleteFileNames(int flags) wxOVERRIDE; virtual bool DoAutoCompleteCustom(wxTextCompleter *completer) wxOVERRIDE; virtual bool ShouldInheritColours() const wxOVERRIDE; // wxWindow overrides virtual bool SetFont(const wxFont& font) wxOVERRIDE; virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE; // search control generic only void SetSearchBitmap( const wxBitmap& bitmap ); void SetCancelBitmap( const wxBitmap& bitmap ); #if wxUSE_MENUS void SetSearchMenuBitmap( const wxBitmap& bitmap ); #endif // wxUSE_MENUS protected: virtual void DoSetValue(const wxString& value, int flags) wxOVERRIDE; virtual wxString DoGetValue() const wxOVERRIDE; virtual bool DoLoadFile(const wxString& file, int fileType) wxOVERRIDE; virtual bool DoSaveFile(const wxString& file, int fileType) wxOVERRIDE; // override the base class virtuals involved into geometry calculations virtual wxSize DoGetBestClientSize() const wxOVERRIDE; virtual void RecalcBitmaps(); void Init(); virtual wxBitmap RenderSearchBitmap( int x, int y, bool renderDrop ); virtual wxBitmap RenderCancelBitmap( int x, int y ); void OnCancelButton( wxCommandEvent& event ); void OnSize( wxSizeEvent& event ); bool HasMenu() const { #if wxUSE_MENUS return m_menu != NULL; #else // !wxUSE_MENUS return false; #endif // wxUSE_MENUS/!wxUSE_MENUS } private: friend class wxSearchButton; // Implement pure virtual function inherited from wxCompositeWindow. virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE; // Position the child controls using the current window size. void LayoutControls(); #if wxUSE_MENUS void PopupSearchMenu(); #endif // wxUSE_MENUS // the subcontrols wxSearchTextCtrl *m_text; wxSearchButton *m_searchButton; wxSearchButton *m_cancelButton; #if wxUSE_MENUS wxMenu *m_menu; #endif // wxUSE_MENUS bool m_searchBitmapUser; bool m_cancelBitmapUser; #if wxUSE_MENUS bool m_searchMenuBitmapUser; #endif // wxUSE_MENUS wxBitmap m_searchBitmap; wxBitmap m_cancelBitmap; #if wxUSE_MENUS wxBitmap m_searchMenuBitmap; #endif // wxUSE_MENUS private: wxDECLARE_DYNAMIC_CLASS(wxSearchCtrl); wxDECLARE_EVENT_TABLE(); }; #endif // wxUSE_SEARCHCTRL #endif // _WX_GENERIC_SEARCHCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/collheaderctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/collheaderctrl.h // Purpose: wxGenericCollapsibleHeaderCtrl // Author: Tobias Taschner // Created: 2015-09-19 // Copyright: (c) 2015 wxWidgets development team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_ #define _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_ class WXDLLIMPEXP_CORE wxGenericCollapsibleHeaderCtrl : public wxCollapsibleHeaderCtrlBase { public: wxGenericCollapsibleHeaderCtrl() { Init(); } wxGenericCollapsibleHeaderCtrl(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCollapsibleHeaderCtrlNameStr) { Init(); Create(parent, id, label, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCollapsibleHeaderCtrlNameStr); virtual void SetCollapsed(bool collapsed = true) wxOVERRIDE; virtual bool IsCollapsed() const wxOVERRIDE { return m_collapsed; } protected: virtual wxSize DoGetBestClientSize() const wxOVERRIDE; private: bool m_collapsed; bool m_inWindow; bool m_mouseDown; void Init(); void OnPaint(wxPaintEvent& event); // Handle set/kill focus events (invalidate for painting focus rect) void OnFocus(wxFocusEvent& event); // Handle click void OnLeftUp(wxMouseEvent& event); // Handle pressed state void OnLeftDown(wxMouseEvent& event); // Handle current state void OnEnterWindow(wxMouseEvent& event); void OnLeaveWindow(wxMouseEvent& event); // Toggle on space void OnChar(wxKeyEvent& event); void DoSetCollapsed(bool collapsed); wxDECLARE_NO_COPY_CLASS(wxGenericCollapsibleHeaderCtrl); }; #endif // _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/listctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/listctrl.h // Purpose: Generic list control // Author: Robert Roebling // Created: 01/02/97 // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_LISTCTRL_H_ #define _WX_GENERIC_LISTCTRL_H_ #include "wx/containr.h" #include "wx/scrolwin.h" #include "wx/textctrl.h" #if wxUSE_DRAG_AND_DROP class WXDLLIMPEXP_FWD_CORE wxDropTarget; #endif //----------------------------------------------------------------------------- // internal classes //----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxListHeaderWindow; class WXDLLIMPEXP_FWD_CORE wxListMainWindow; //----------------------------------------------------------------------------- // wxListCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericListCtrl: public wxNavigationEnabled<wxListCtrlBase>, public wxScrollHelper { public: wxGenericListCtrl() : wxScrollHelper(this) { Init(); } wxGenericListCtrl( wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString &name = wxListCtrlNameStr) : wxScrollHelper(this) { Create(parent, winid, pos, size, style, validator, name); } virtual ~wxGenericListCtrl(); void Init(); bool Create( wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString &name = wxListCtrlNameStr); bool GetColumn( int col, wxListItem& item ) const wxOVERRIDE; bool SetColumn( int col, const wxListItem& item ) wxOVERRIDE; int GetColumnWidth( int col ) const wxOVERRIDE; bool SetColumnWidth( int col, int width) wxOVERRIDE; int GetCountPerPage() const; // not the same in wxGLC as in Windows, I think wxRect GetViewRect() const; bool GetItem( wxListItem& info ) const; bool SetItem( wxListItem& info ) ; bool SetItem( long index, int col, const wxString& label, int imageId = -1 ); int GetItemState( long item, long stateMask ) const; bool SetItemState( long item, long state, long stateMask); bool SetItemImage( long item, int image, int selImage = -1 ); bool SetItemColumnImage( long item, long column, int image ); wxString GetItemText( long item, int col = 0 ) const; void SetItemText( long item, const wxString& str ); wxUIntPtr GetItemData( long item ) const; bool SetItemPtrData(long item, wxUIntPtr data); bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; bool GetSubItemRect( long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; bool GetItemPosition( long item, wxPoint& pos ) const; bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC int GetItemCount() const; int GetColumnCount() const wxOVERRIDE; void SetItemSpacing( int spacing, bool isSmall = false ); wxSize GetItemSpacing() const; void SetItemTextColour( long item, const wxColour& col); wxColour GetItemTextColour( long item ) const; void SetItemBackgroundColour( long item, const wxColour &col); wxColour GetItemBackgroundColour( long item ) const; void SetItemFont( long item, const wxFont &f); wxFont GetItemFont( long item ) const; int GetSelectedItemCount() const; wxColour GetTextColour() const; void SetTextColour(const wxColour& col); long GetTopItem() const; virtual bool HasCheckBoxes() const wxOVERRIDE; virtual bool EnableCheckBoxes(bool enable = true) wxOVERRIDE; virtual bool IsItemChecked(long item) const wxOVERRIDE; virtual void CheckItem(long item, bool check) wxOVERRIDE; void SetSingleStyle( long style, bool add = true ) ; void SetWindowStyleFlag( long style ) wxOVERRIDE; void RecreateWindow() {} long GetNextItem( long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE ) const; wxImageList *GetImageList( int which ) const wxOVERRIDE; void SetImageList( wxImageList *imageList, int which ) wxOVERRIDE; void AssignImageList( wxImageList *imageList, int which ) wxOVERRIDE; bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC void ClearAll(); bool DeleteItem( long item ); bool DeleteAllItems(); bool DeleteAllColumns() wxOVERRIDE; bool DeleteColumn( int col ) wxOVERRIDE; void SetItemCount(long count); wxTextCtrl *EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); // End label editing, optionally cancelling the edit bool EndEditLabel(bool cancel); wxTextCtrl* GetEditControl() const; void Edit( long item ) { EditLabel(item); } bool EnsureVisible( long item ); long FindItem( long start, const wxString& str, bool partial = false ); long FindItem( long start, wxUIntPtr data ); long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL ) const; long InsertItem(wxListItem& info); long InsertItem( long index, const wxString& label ); long InsertItem( long index, int imageIndex ); long InsertItem( long index, const wxString& label, int imageIndex ); bool ScrollList( int dx, int dy ); bool SortItems( wxListCtrlCompare fn, wxIntPtr data ); // do we have a header window? bool HasHeader() const { return InReportView() && !HasFlag(wxLC_NO_HEADER); } // refresh items selectively (only useful for virtual list controls) void RefreshItem(long item); void RefreshItems(long itemFrom, long itemTo); virtual void EnableBellOnNoMatch(bool on = true) wxOVERRIDE; // overridden base class virtuals // ------------------------------ virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE { return GetClassDefaultAttributes(GetWindowVariant()); } static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); virtual void Update() wxOVERRIDE; // implementation only from now on // ------------------------------- // generic version extension, don't use in portable code bool Update( long item ); void OnInternalIdle( ) wxOVERRIDE; // We have to hand down a few functions virtual void Refresh(bool eraseBackground = true, const wxRect *rect = NULL) wxOVERRIDE; virtual bool SetBackgroundColour( const wxColour &colour ) wxOVERRIDE; virtual bool SetForegroundColour( const wxColour &colour ) wxOVERRIDE; virtual wxColour GetBackgroundColour() const; virtual wxColour GetForegroundColour() const; virtual bool SetFont( const wxFont &font ) wxOVERRIDE; virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE; #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE; virtual wxDropTarget *GetDropTarget() const wxOVERRIDE; #endif virtual bool ShouldInheritColours() const wxOVERRIDE { return false; } // implementation // -------------- wxImageList *m_imageListNormal; wxImageList *m_imageListSmall; wxImageList *m_imageListState; // what's that ? bool m_ownsImageListNormal, m_ownsImageListSmall, m_ownsImageListState; wxListHeaderWindow *m_headerWin; wxListMainWindow *m_mainWin; protected: // Implement base class pure virtual methods. long DoInsertColumn(long col, const wxListItem& info) wxOVERRIDE; virtual wxSize DoGetBestClientSize() const wxOVERRIDE; // 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; // it calls our OnGetXXX() functions friend class WXDLLIMPEXP_FWD_CORE wxListMainWindow; virtual wxBorder GetDefaultBorder() const wxOVERRIDE; virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size) wxOVERRIDE; private: void CreateOrDestroyHeaderWindowAsNeeded(); void OnScroll( wxScrollWinEvent& event ); void OnSize( wxSizeEvent &event ); // we need to return a special WM_GETDLGCODE value to process just the // arrows but let the other navigation characters through #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); #endif // __WXMSW__ WX_FORWARD_TO_SCROLL_HELPER() wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericListCtrl); }; #if (!defined(__WXMSW__) || defined(__WXUNIVERSAL__)) && (!(defined(__WXMAC__) && wxOSX_USE_CARBON) || defined(__WXUNIVERSAL__ )) /* * wxListCtrl has to be a real class or we have problems with * the run-time information. */ class WXDLLIMPEXP_CORE wxListCtrl: public wxGenericListCtrl { wxDECLARE_DYNAMIC_CLASS(wxListCtrl); public: wxListCtrl() {} wxListCtrl(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator &validator = wxDefaultValidator, const wxString &name = wxListCtrlNameStr) : wxGenericListCtrl(parent, winid, pos, size, style, validator, name) { } }; #endif // !__WXMSW__ || __WXUNIVERSAL__ #endif // _WX_GENERIC_LISTCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/activityindicator.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/activityindicator.h // Purpose: Declaration of wxActivityIndicatorGeneric. // Author: Vadim Zeitlin // Created: 2015-03-06 // Copyright: (c) 2015 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ACTIVITYINDICATOR_H_ #define _WX_GENERIC_ACTIVITYINDICATOR_H_ #ifndef wxHAS_NATIVE_ACTIVITYINDICATOR // This is the only implementation we have, so call it accordingly. #define wxActivityIndicatorGeneric wxActivityIndicator #endif // ---------------------------------------------------------------------------- // wxActivityIndicatorGeneric: built-in generic implementation. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxActivityIndicatorGeneric : public wxActivityIndicatorBase { public: wxActivityIndicatorGeneric() { m_impl = NULL; } explicit wxActivityIndicatorGeneric(wxWindow* parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxActivityIndicatorNameStr) { m_impl = NULL; Create(parent, winid, pos, size, style, name); } bool Create(wxWindow* parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxActivityIndicatorNameStr); virtual ~wxActivityIndicatorGeneric(); virtual void Start() wxOVERRIDE; virtual void Stop() wxOVERRIDE; virtual bool IsRunning() const wxOVERRIDE; protected: virtual wxSize DoGetBestClientSize() const wxOVERRIDE; private: class wxActivityIndicatorImpl *m_impl; #ifndef wxHAS_NATIVE_ACTIVITYINDICATOR wxDECLARE_DYNAMIC_CLASS(wxActivityIndicator); #endif }; #endif // _WX_GENERIC_ACTIVITYINDICATOR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/msgdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/msgdlgg.h // Purpose: Generic wxMessageDialog // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_MSGDLGG_H_ #define _WX_GENERIC_MSGDLGG_H_ class WXDLLIMPEXP_FWD_CORE wxSizer; class WXDLLIMPEXP_CORE wxGenericMessageDialog : public wxMessageDialogBase { public: wxGenericMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); virtual int ShowModal() wxOVERRIDE; protected: // Creates a message dialog taking any options that have been set after // object creation into account such as custom labels. void DoCreateMsgdialog(); void OnYes(wxCommandEvent& event); void OnNo(wxCommandEvent& event); void OnHelp(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); // can be overridden to provide more contents to the dialog virtual void AddMessageDialogCheckBox(wxSizer *WXUNUSED(sizer)) { } virtual void AddMessageDialogDetails(wxSizer *WXUNUSED(sizer)) { } private: // Creates and returns a standard button sizer using the style of this // dialog and the custom labels, if any. // // May return NULL on smart phone platforms not using buttons at all. wxSizer *CreateMsgDlgButtonSizer(); wxPoint m_pos; bool m_created; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericMessageDialog); }; #endif // _WX_GENERIC_MSGDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/combo.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/combo.h // Purpose: Generic wxComboCtrl // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_COMBOCTRL_H_ #define _WX_GENERIC_COMBOCTRL_H_ #if wxUSE_COMBOCTRL // Only define generic if native doesn't have all the features #if !defined(wxCOMBOCONTROL_FULLY_FEATURED) #include "wx/containr.h" // ---------------------------------------------------------------------------- // Generic wxComboCtrl // ---------------------------------------------------------------------------- #if defined(__WXUNIVERSAL__) // all actions of single line text controls are supported // popup/dismiss the choice window #define wxACTION_COMBOBOX_POPUP wxT("popup") #define wxACTION_COMBOBOX_DISMISS wxT("dismiss") #endif extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; class WXDLLIMPEXP_CORE wxGenericComboCtrl : public wxNavigationEnabled<wxComboCtrlBase> { public: // ctors and such wxGenericComboCtrl() { Init(); } wxGenericComboCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) { Init(); (void)Create(parent, id, value, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); virtual ~wxGenericComboCtrl(); void SetCustomPaintWidth( int width ); virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const wxOVERRIDE; static int GetFeatures() { return wxComboCtrlFeatures::All; } #if defined(__WXUNIVERSAL__) // we have our own input handler and our own actions virtual bool PerformAction(const wxControlAction& action, long numArg = 0l, const wxString& strArg = wxEmptyString); #endif protected: // Dummies for platform-specific wxTextEntry implementations #if defined(__WXUNIVERSAL__) // Looks like there's nothing we need to override here #elif defined(__WXMOTIF__) virtual WXWidget GetTextWidget() const { return NULL; } #elif defined(__WXGTK__) #if defined(__WXGTK20__) virtual GtkEditable *GetEditable() const wxOVERRIDE { return NULL; } virtual GtkEntry *GetEntry() const wxOVERRIDE { return NULL; } #endif #elif defined(__WXMAC__) // Looks like there's nothing we need to override here #endif // For better transparent background rendering virtual bool HasTransparentBackground() wxOVERRIDE; // Mandatory virtuals virtual void OnResize() wxOVERRIDE; // Event handlers void OnPaintEvent( wxPaintEvent& event ); void OnMouseEvent( wxMouseEvent& event ); private: void Init(); wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericComboCtrl); }; #ifndef _WX_COMBOCONTROL_H_ // If native wxComboCtrl was not defined, then prepare a simple // front-end so that wxRTTI works as expected. class WXDLLIMPEXP_CORE wxComboCtrl : public wxGenericComboCtrl { public: wxComboCtrl() : wxGenericComboCtrl() {} wxComboCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) : wxGenericComboCtrl() { (void)Create(parent, id, value, pos, size, style, validator, name); } virtual ~wxComboCtrl() {} protected: private: wxDECLARE_DYNAMIC_CLASS(wxComboCtrl); }; #endif // _WX_COMBOCONTROL_H_ #else #define wxGenericComboCtrl wxComboCtrl #endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED) #endif // wxUSE_COMBOCTRL #endif // _WX_GENERIC_COMBOCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/animate.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/animate.h // Purpose: wxAnimation and wxAnimationCtrl // Author: Julian Smart and Guillermo Rodriguez Garcia // Modified by: Francesco Montorsi // Created: 13/8/99 // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ANIMATEH__ #define _WX_GENERIC_ANIMATEH__ #include "wx/bitmap.h" // ---------------------------------------------------------------------------- // wxAnimation // ---------------------------------------------------------------------------- WX_DECLARE_LIST_WITH_DECL(wxAnimationDecoder, wxAnimationDecoderList, class WXDLLIMPEXP_ADV); class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase { public: wxAnimation() {} wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) { LoadFile(name, type); } virtual bool IsOk() const wxOVERRIDE { return m_refData != NULL; } virtual unsigned int GetFrameCount() const wxOVERRIDE; virtual int GetDelay(unsigned int i) const wxOVERRIDE; virtual wxImage GetFrame(unsigned int i) const wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; // extended interface used by the generic implementation of wxAnimationCtrl wxPoint GetFramePosition(unsigned int frame) const; wxSize GetFrameSize(unsigned int frame) const; wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; wxColour GetTransparentColour(unsigned int frame) const; wxColour GetBackgroundColour() const; protected: static wxAnimationDecoderList sm_handlers; public: static inline wxAnimationDecoderList& GetHandlers() { return sm_handlers; } static void AddHandler(wxAnimationDecoder *handler); static void InsertHandler(wxAnimationDecoder *handler); static const wxAnimationDecoder *FindHandler( wxAnimationType animType ); static void CleanUpHandlers(); static void InitStandardHandlers(); wxDECLARE_DYNAMIC_CLASS(wxAnimation); }; // ---------------------------------------------------------------------------- // wxAnimationCtrl // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase { public: wxAnimationCtrl() { Init(); } wxAnimationCtrl(wxWindow *parent, wxWindowID id, const wxAnimation& anim = wxNullAnimation, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = wxAnimationCtrlNameStr) { Init(); Create(parent, id, anim, pos, size, style, name); } void Init(); bool Create(wxWindow *parent, wxWindowID id, const wxAnimation& anim = wxNullAnimation, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = wxAnimationCtrlNameStr); ~wxAnimationCtrl(); public: virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; virtual void Stop() wxOVERRIDE; virtual bool Play() wxOVERRIDE { return Play(true /* looped */); } virtual bool IsPlaying() const wxOVERRIDE { return m_isPlaying; } void SetAnimation(const wxAnimation &animation) wxOVERRIDE; wxAnimation GetAnimation() const wxOVERRIDE { return m_animation; } virtual void SetInactiveBitmap(const wxBitmap &bmp) wxOVERRIDE; // override base class method virtual bool SetBackgroundColour(const wxColour& col) wxOVERRIDE; public: // event handlers void OnPaint(wxPaintEvent& event); void OnTimer(wxTimerEvent& event); void OnSize(wxSizeEvent& event); public: // extended API specific to this implementation of wxAnimateCtrl // Specify whether the animation's background colour is to be shown (the default), // or whether the window background should show through void SetUseWindowBackgroundColour(bool useWinBackground = true) { m_useWinBackgroundColour = useWinBackground; } bool IsUsingWindowBackgroundColour() const { return m_useWinBackgroundColour; } // This overload of Play() lets you specify if the animation must loop or not bool Play(bool looped); // Draw the current frame of the animation into given DC. // This is fast as current frame is always cached. void DrawCurrentFrame(wxDC& dc); // Returns a wxBitmap with the current frame drawn in it wxBitmap& GetBackingStore() { return m_backingStore; } protected: // internal utilities // resize this control to fit m_animation void FitToAnimation(); // Draw the background; use this when e.g. previous frame had wxANIM_TOBACKGROUND disposal. void DisposeToBackground(); void DisposeToBackground(wxDC& dc); void DisposeToBackground(wxDC& dc, const wxPoint &pos, const wxSize &sz); void IncrementalUpdateBackingStore(); bool RebuildBackingStoreUpToFrame(unsigned int); void DrawFrame(wxDC &dc, unsigned int); virtual void DisplayStaticImage() wxOVERRIDE; virtual wxSize DoGetBestSize() const wxOVERRIDE; protected: unsigned int m_currentFrame; // Current frame bool m_looped; // Looped, or not wxTimer m_timer; // The timer wxAnimation m_animation; // The animation bool m_isPlaying; // Is the animation playing? bool m_useWinBackgroundColour; // Use animation bg colour or window bg colour? wxBitmap m_backingStore; // The frames are drawn here and then blitted // on the screen private: typedef wxAnimationCtrlBase base_type; wxDECLARE_DYNAMIC_CLASS(wxAnimationCtrl); wxDECLARE_EVENT_TABLE(); }; #endif // _WX_GENERIC_ANIMATEH__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/helpext.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/helpext.h // Purpose: an external help controller for wxWidgets // Author: Karsten Ballueder ([email protected]) // Modified by: // Copyright: (c) Karsten Ballueder 1998 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __WX_HELPEXT_H_ #define __WX_HELPEXT_H_ #if wxUSE_HELP // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- #include "wx/helpbase.h" // ---------------------------------------------------------------------------- // wxExtHelpController // ---------------------------------------------------------------------------- // This class implements help via an external browser. class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase { public: wxExtHelpController(wxWindow* parentWindow = NULL); virtual ~wxExtHelpController(); #if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED(void SetBrowser(const wxString& browsername = wxEmptyString, bool isNetscape = false) ); #endif // Set viewer: new name for SetBrowser virtual void SetViewer(const wxString& viewer = wxEmptyString, long flags = wxHELP_NETSCAPE) wxOVERRIDE; virtual bool Initialize(const wxString& dir, int WXUNUSED(server)) wxOVERRIDE { return Initialize(dir); } virtual bool Initialize(const wxString& dir) wxOVERRIDE; virtual bool LoadFile(const wxString& file = wxEmptyString) wxOVERRIDE; virtual bool DisplayContents(void) wxOVERRIDE; virtual bool DisplaySection(int sectionNo) wxOVERRIDE; virtual bool DisplaySection(const wxString& section) wxOVERRIDE; virtual bool DisplayBlock(long blockNo) wxOVERRIDE; virtual bool KeywordSearch(const wxString& k, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) wxOVERRIDE; virtual bool Quit(void) wxOVERRIDE; virtual void OnQuit(void) wxOVERRIDE; virtual bool DisplayHelp(const wxString &) ; virtual void SetFrameParameters(const wxString& WXUNUSED(title), const wxSize& WXUNUSED(size), const wxPoint& WXUNUSED(pos) = wxDefaultPosition, bool WXUNUSED(newFrameEachTime) = false) wxOVERRIDE { // does nothing by default } virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, wxPoint *WXUNUSED(pos) = NULL, bool *WXUNUSED(newFrameEachTime) = NULL) wxOVERRIDE { return NULL; // does nothing by default } protected: // Filename of currently active map file. wxString m_helpDir; // How many entries do we have in the map file? int m_NumOfEntries; // A list containing all id,url,documentation triples. wxList *m_MapList; private: // parse a single line of the map file (called by LoadFile()) // // return true if the line was valid or false otherwise bool ParseMapFileLine(const wxString& line); // Deletes the list and all objects. void DeleteList(void); // How to call the html viewer. wxString m_BrowserName; // Is the viewer a variant of netscape? bool m_BrowserIsNetscape; wxDECLARE_CLASS(wxExtHelpController); }; #endif // wxUSE_HELP #endif // __WX_HELPEXT_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/statusbr.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/statusbr.h // Purpose: wxStatusBarGeneric class // Author: Julian Smart // Modified by: VZ at 05.02.00 to derive from wxStatusBarBase // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_STATUSBR_H_ #define _WX_GENERIC_STATUSBR_H_ #include "wx/defs.h" #if wxUSE_STATUSBAR #include "wx/pen.h" #include "wx/arrstr.h" // ---------------------------------------------------------------------------- // wxStatusBarGeneric // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxStatusBarGeneric : public wxStatusBarBase { public: wxStatusBarGeneric() { Init(); } wxStatusBarGeneric(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, const wxString& name = wxStatusBarNameStr) { Init(); Create(parent, winid, style, name); } virtual ~wxStatusBarGeneric(); bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, const wxString& name = wxStatusBarNameStr); // implement base class methods virtual void SetStatusWidths(int n, const int widths_field[]) wxOVERRIDE; virtual bool GetFieldRect(int i, wxRect& rect) const wxOVERRIDE; virtual void SetMinHeight(int height) wxOVERRIDE; virtual int GetBorderX() const wxOVERRIDE { return m_borderX; } virtual int GetBorderY() const wxOVERRIDE { return m_borderY; } // implementation only (not part of wxStatusBar public API): int GetFieldFromPoint(const wxPoint& point) const; protected: virtual void DoUpdateStatusText(int number) wxOVERRIDE; // event handlers void OnPaint(wxPaintEvent& event); void OnSize(wxSizeEvent& event); void OnLeftDown(wxMouseEvent& event); void OnRightDown(wxMouseEvent& event); // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); protected: virtual void DrawFieldText(wxDC& dc, const wxRect& rc, int i, int textHeight); virtual void DrawField(wxDC& dc, int i, int textHeight); void SetBorderX(int x); void SetBorderY(int y); virtual void InitColours(); // true if the status bar shows the size grip: for this it must have // wxSTB_SIZEGRIP style and the window it is attached to must be resizable // and not maximized bool ShowsSizeGrip() const; // returns the position and the size of the size grip wxRect GetSizeGripRect() const; // common part of all ctors void Init(); // the last known size, fields widths must be updated whenever it's out of // date wxSize m_lastClientSize; // the absolute widths of the status bar panes in pixels wxArrayInt m_widthsAbs; int m_borderX; int m_borderY; wxPen m_mediumShadowPen; wxPen m_hilightPen; virtual wxSize DoGetBestSize() const wxOVERRIDE; private: // Update m_lastClientSize and m_widthsAbs from the current size. void DoUpdateFieldWidths(); wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric); }; #endif // wxUSE_STATUSBAR #endif // _WX_GENERIC_STATUSBR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/choicdgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/choicdgg.h // Purpose: Generic choice dialogs // Author: Julian Smart // Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions // Created: 01/02/97 // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_CHOICDGG_H_ #define _WX_GENERIC_CHOICDGG_H_ #include "wx/dynarray.h" #include "wx/dialog.h" class WXDLLIMPEXP_FWD_CORE wxListBoxBase; // ---------------------------------------------------------------------------- // some (ugly...) constants // ---------------------------------------------------------------------------- #define wxCHOICE_HEIGHT 150 #define wxCHOICE_WIDTH 200 #define wxCHOICEDLG_STYLE \ (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE) // ---------------------------------------------------------------------------- // wxAnyChoiceDialog: a base class for dialogs containing a listbox // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxAnyChoiceDialog : public wxDialog { public: wxAnyChoiceDialog() { } wxAnyChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, long styleLbox = wxLB_ALWAYS_SB) { (void)Create(parent, message, caption, n, choices, styleDlg, pos, styleLbox); } wxAnyChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, long styleLbox = wxLB_ALWAYS_SB) { (void)Create(parent, message, caption, choices, styleDlg, pos, styleLbox); } bool Create(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, long styleLbox = wxLB_ALWAYS_SB); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long styleDlg = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition, long styleLbox = wxLB_ALWAYS_SB); protected: wxListBoxBase *m_listbox; virtual wxListBoxBase *CreateList(int n, const wxString *choices, long styleLbox); wxDECLARE_NO_COPY_CLASS(wxAnyChoiceDialog); }; // ---------------------------------------------------------------------------- // wxSingleChoiceDialog: a dialog with single selection listbox // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxSingleChoiceDialog : public wxAnyChoiceDialog { public: wxSingleChoiceDialog() { m_selection = -1; } wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, void **clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) { Create(parent, message, caption, n, choices, clientData, style, pos); } wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void **clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) { Create(parent, message, caption, choices, clientData, style, pos); } bool Create(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, void **clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void **clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); void SetSelection(int sel); int GetSelection() const { return m_selection; } wxString GetStringSelection() const { return m_stringSelection; } void* GetSelectionData() const { return m_clientData; } #if WXWIN_COMPATIBILITY_2_8 // Deprecated overloads taking "char**" client data. wxDEPRECATED_CONSTRUCTOR ( wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, char **clientData, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ) { Create(parent, message, caption, n, choices, (void**)clientData, style, pos); } wxDEPRECATED_CONSTRUCTOR ( wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, char **clientData, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ) { Create(parent, message, caption, choices, (void**)clientData, style, pos); } wxDEPRECATED_INLINE ( bool Create(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, char **clientData, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition), return Create(parent, message, caption, n, choices, (void**)clientData, style, pos); ) wxDEPRECATED_INLINE ( bool Create(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, char **clientData, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition), return Create(parent, message, caption, choices, (void**)clientData, style, pos); ) // NB: no need to make it return wxChar, it's untyped wxDEPRECATED_ACCESSOR ( char* GetSelectionClientData() const, (char*)GetSelectionData() ) #endif // WXWIN_COMPATIBILITY_2_8 // implementation from now on void OnOK(wxCommandEvent& event); void OnListBoxDClick(wxCommandEvent& event); protected: int m_selection; wxString m_stringSelection; void DoChoice(); private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxSingleChoiceDialog); wxDECLARE_EVENT_TABLE(); }; // ---------------------------------------------------------------------------- // wxMultiChoiceDialog: a dialog with multi selection listbox // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxMultiChoiceDialog : public wxAnyChoiceDialog { public: wxMultiChoiceDialog() { } wxMultiChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) { (void)Create(parent, message, caption, n, choices, style, pos); } wxMultiChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) { (void)Create(parent, message, caption, choices, style, pos); } bool Create(wxWindow *parent, const wxString& message, const wxString& caption, int n, const wxString *choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition); void SetSelections(const wxArrayInt& selections); wxArrayInt GetSelections() const { return m_selections; } // implementation from now on virtual bool TransferDataFromWindow() wxOVERRIDE; protected: #if wxUSE_CHECKLISTBOX virtual wxListBoxBase *CreateList(int n, const wxString *choices, long styleLbox) wxOVERRIDE; #endif // wxUSE_CHECKLISTBOX wxArrayInt m_selections; private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMultiChoiceDialog); }; // ---------------------------------------------------------------------------- // wrapper functions which can be used to get selection(s) from the user // ---------------------------------------------------------------------------- // get the user selection as a string WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, const wxString& caption, int n, const wxString *choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, const wxString& caption, const wxArrayString& choices, int initialSelection, wxWindow *parent = NULL); WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, const wxString& caption, int n, const wxString *choices, int initialSelection, wxWindow *parent = NULL); // Same as above but gets position in list of strings, instead of string, // or -1 if no selection WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, int n, const wxString *choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, const wxArrayString& choices, int initialSelection, wxWindow *parent = NULL); WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, int n, const wxString *choices, int initialSelection, wxWindow *parent = NULL); // Return client data instead or NULL if canceled WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, const wxString& caption, const wxArrayString& choices, void **client_data, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, const wxString& caption, int n, const wxString *choices, void **client_data, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT, int initialSelection = 0); WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, const wxString& caption, const wxArrayString& choices, void **client_data, int initialSelection, wxWindow *parent = NULL); WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, const wxString& caption, int n, const wxString *choices, void **client_data, int initialSelection, wxWindow *parent = NULL); // fill the array with the indices of the chosen items, it will be empty // if no items were selected or Cancel was pressed - return the number of // selections or -1 if cancelled WXDLLIMPEXP_CORE int wxGetSelectedChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, int n, const wxString *choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); WXDLLIMPEXP_CORE int wxGetSelectedChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); #if WXWIN_COMPATIBILITY_2_8 // fill the array with the indices of the chosen items, it will be empty // if no items were selected or Cancel was pressed - return the number of // selections wxDEPRECATED( WXDLLIMPEXP_CORE size_t wxGetMultipleChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, int n, const wxString *choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT) ); wxDEPRECATED( WXDLLIMPEXP_CORE size_t wxGetMultipleChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT)); #endif // WXWIN_COMPATIBILITY_2_8 #endif // _WX_GENERIC_CHOICDGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/imaglist.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/imaglist.h // Purpose: // Author: Robert Roebling // Created: 01/02/97 // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_IMAGLISTG_H_ #define _WX_IMAGLISTG_H_ #include "wx/bitmap.h" #include "wx/gdicmn.h" #include "wx/vector.h" class WXDLLIMPEXP_FWD_CORE wxDC; class WXDLLIMPEXP_FWD_CORE wxIcon; class WXDLLIMPEXP_FWD_CORE wxColour; class WXDLLIMPEXP_CORE wxGenericImageList: public wxObject { public: wxGenericImageList() { } wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 ); virtual ~wxGenericImageList(); bool Create( int width, int height, bool mask = true, int initialCount = 1 ); virtual int GetImageCount() const; virtual bool GetSize( int index, int &width, int &height ) const; virtual wxSize GetSize() const { return m_size; } int Add( const wxBitmap& bitmap ); int Add( const wxBitmap& bitmap, const wxBitmap& mask ); int Add( const wxBitmap& bitmap, const wxColour& maskColour ); wxBitmap GetBitmap(int index) const; wxIcon GetIcon(int index) const; bool Replace( int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap ); bool Remove( int index ); bool RemoveAll(); virtual bool Draw(int index, wxDC& dc, int x, int y, int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = false); #if WXWIN_COMPATIBILITY_3_0 wxDEPRECATED_MSG("Don't use this overload: it's not portable and does nothing") bool Create() { return true; } wxDEPRECATED_MSG("Use GetBitmap() instead") const wxBitmap *GetBitmapPtr(int index) const { return DoGetPtr(index); } #endif // WXWIN_COMPATIBILITY_3_0 private: const wxBitmap *DoGetPtr(int index) const; wxVector<wxBitmap> m_images; // Size of a single bitmap in the list. wxSize m_size; wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList); }; #ifndef wxHAS_NATIVE_IMAGELIST /* * wxImageList has to be a real class or we have problems with * the run-time information. */ class WXDLLIMPEXP_CORE wxImageList: public wxGenericImageList { wxDECLARE_DYNAMIC_CLASS(wxImageList); public: wxImageList() {} wxImageList( int width, int height, bool mask = true, int initialCount = 1 ) : wxGenericImageList(width, height, mask, initialCount) { } }; #endif // !wxHAS_NATIVE_IMAGELIST #endif // _WX_IMAGLISTG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/aboutdlgg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/aboutdlgg.h // Purpose: generic wxAboutBox() implementation // Author: Vadim Zeitlin // Created: 2006-10-07 // Copyright: (c) 2006 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ABOUTDLGG_H_ #define _WX_GENERIC_ABOUTDLGG_H_ #include "wx/defs.h" #if wxUSE_ABOUTDLG #include "wx/dialog.h" class WXDLLIMPEXP_FWD_CORE wxAboutDialogInfo; class WXDLLIMPEXP_FWD_CORE wxSizer; class WXDLLIMPEXP_FWD_CORE wxSizerFlags; // Under GTK and OS X "About" dialogs are not supposed to be modal, unlike MSW // and, presumably, all the other platforms. #ifndef wxUSE_MODAL_ABOUT_DIALOG #if defined(__WXGTK__) || defined(__WXMAC__) #define wxUSE_MODAL_ABOUT_DIALOG 0 #else #define wxUSE_MODAL_ABOUT_DIALOG 1 #endif #endif // wxUSE_MODAL_ABOUT_DIALOG not defined // ---------------------------------------------------------------------------- // wxGenericAboutDialog: generic "About" dialog implementation // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericAboutDialog : public wxDialog { public: // constructors and Create() method // -------------------------------- // default ctor, you must use Create() to really initialize the dialog wxGenericAboutDialog() { Init(); } // ctor which fully initializes the object wxGenericAboutDialog(const wxAboutDialogInfo& info, wxWindow* parent = NULL) { Init(); (void)Create(info, parent); } // this method must be called if and only if the default ctor was used bool Create(const wxAboutDialogInfo& info, wxWindow* parent = NULL); protected: // this virtual method may be overridden to add some more controls to the // dialog // // notice that for this to work you must call Create() from the derived // class ctor and not use the base class ctor directly as otherwise the // virtual function of the derived class wouldn't be called virtual void DoAddCustomControls() { } // add arbitrary control to the text sizer contents with the specified // flags void AddControl(wxWindow *win, const wxSizerFlags& flags); // add arbitrary control to the text sizer contents and center it void AddControl(wxWindow *win); // add the text, if it's not empty, to the text sizer contents void AddText(const wxString& text); #if wxUSE_COLLPANE // add a wxCollapsiblePane containing the given text void AddCollapsiblePane(const wxString& title, const wxString& text); #endif // wxUSE_COLLPANE private: // common part of all ctors void Init() { m_sizerText = NULL; } #if !wxUSE_MODAL_ABOUT_DIALOG // An explicit handler for deleting the dialog when it's closed is needed // when we show it non-modally. void OnCloseWindow(wxCloseEvent& event); void OnOK(wxCommandEvent& event); #endif // !wxUSE_MODAL_ABOUT_DIALOG wxSizer *m_sizerText; }; // unlike wxAboutBox which can show either the native or generic about dialog, // this function always shows the generic one WXDLLIMPEXP_CORE void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); #endif // wxUSE_ABOUTDLG #endif // _WX_GENERIC_ABOUTDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/filectrlg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/filectrlg.h // Purpose: wxGenericFileCtrl Header // Author: Diaa M. Sami // Modified by: // Created: Jul-07-2007 // Copyright: (c) Diaa M. Sami // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_FILECTRL_H_ #define _WX_GENERIC_FILECTRL_H_ #if wxUSE_FILECTRL #include "wx/containr.h" #include "wx/listctrl.h" #include "wx/filectrl.h" #include "wx/filename.h" class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxChoice; class WXDLLIMPEXP_FWD_CORE wxStaticText; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[]; //----------------------------------------------------------------------------- // wxFileData - a class to hold the file info for the wxFileListCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxFileData { public: enum fileType { is_file = 0x0000, is_dir = 0x0001, is_link = 0x0002, is_exe = 0x0004, is_drive = 0x0008 }; wxFileData() { Init(); } // Full copy constructor wxFileData( const wxFileData& fileData ) { Copy(fileData); } // Create a filedata from this information wxFileData( const wxString &filePath, const wxString &fileName, fileType type, int image_id ); // make a full copy of the other wxFileData void Copy( const wxFileData &other ); // (re)read the extra data about the file from the system void ReadData(); // get the name of the file, dir, drive wxString GetFileName() const { return m_fileName; } // get the full path + name of the file, dir, path wxString GetFilePath() const { return m_filePath; } // Set the path + name and name of the item void SetNewName( const wxString &filePath, const wxString &fileName ); // Get the size of the file in bytes wxFileOffset GetSize() const { return m_size; } // Get the type of file, either file extension or <DIR>, <LINK>, <DRIVE> wxString GetFileType() const; // get the last modification time wxDateTime GetDateTime() const { return m_dateTime; } // Get the time as a formatted string wxString GetModificationTime() const; // in UNIX get rwx for file, in MSW get attributes ARHS wxString GetPermissions() const { return m_permissions; } // Get the id of the image used in a wxImageList int GetImageId() const { return m_image; } bool IsFile() const { return !IsDir() && !IsLink() && !IsDrive(); } bool IsDir() const { return (m_type & is_dir ) != 0; } bool IsLink() const { return (m_type & is_link ) != 0; } bool IsExe() const { return (m_type & is_exe ) != 0; } bool IsDrive() const { return (m_type & is_drive) != 0; } // Get/Set the type of file, file/dir/drive/link int GetType() const { return m_type; } // the wxFileListCtrl fields in report view enum fileListFieldType { FileList_Name, FileList_Size, FileList_Type, FileList_Time, #if defined(__UNIX__) || defined(__WIN32__) FileList_Perm, #endif // defined(__UNIX__) || defined(__WIN32__) FileList_Max }; // Get the entry for report view of wxFileListCtrl wxString GetEntry( fileListFieldType num ) const; // Get a string representation of the file info wxString GetHint() const; // initialize a wxListItem attributes void MakeItem( wxListItem &item ); // operators wxFileData& operator = (const wxFileData& fd) { Copy(fd); return *this; } protected: wxString m_fileName; wxString m_filePath; wxFileOffset m_size; wxDateTime m_dateTime; wxString m_permissions; int m_type; int m_image; private: void Init(); }; //----------------------------------------------------------------------------- // wxFileListCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxFileListCtrl : public wxListCtrl { public: wxFileListCtrl(); wxFileListCtrl( wxWindow *win, wxWindowID id, const wxString &wild, bool showHidden, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLC_LIST, const wxValidator &validator = wxDefaultValidator, const wxString &name = wxT("filelist") ); virtual ~wxFileListCtrl(); virtual void ChangeToListMode(); virtual void ChangeToReportMode(); virtual void ChangeToSmallIconMode(); virtual void ShowHidden( bool show = true ); bool GetShowHidden() const { return m_showHidden; } virtual long Add( wxFileData *fd, wxListItem &item ); virtual void UpdateItem(const wxListItem &item); virtual void UpdateFiles(); virtual void MakeDir(); virtual void GoToParentDir(); virtual void GoToHomeDir(); virtual void GoToDir( const wxString &dir ); virtual void SetWild( const wxString &wild ); wxString GetWild() const { return m_wild; } wxString GetDir() const { return m_dirName; } void OnListDeleteItem( wxListEvent &event ); void OnListDeleteAllItems( wxListEvent &event ); void OnListEndLabelEdit( wxListEvent &event ); void OnListColClick( wxListEvent &event ); void OnSize( wxSizeEvent &event ); virtual void SortItems(wxFileData::fileListFieldType field, bool forward); bool GetSortDirection() const { return m_sort_forward; } wxFileData::fileListFieldType GetSortField() const { return m_sort_field; } protected: void FreeItemData(wxListItem& item); void FreeAllItemsData(); wxString m_dirName; bool m_showHidden; wxString m_wild; bool m_sort_forward; wxFileData::fileListFieldType m_sort_field; private: wxDECLARE_DYNAMIC_CLASS(wxFileListCtrl); wxDECLARE_EVENT_TABLE(); }; class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxNavigationEnabled<wxControl>, public wxFileCtrlBase { public: wxGenericFileCtrl() { m_ignoreChanges = false; } wxGenericFileCtrl ( wxWindow *parent, wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxFileCtrlNameStr ) { m_ignoreChanges = false; Create(parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); } virtual ~wxGenericFileCtrl() {} bool Create( wxWindow *parent, wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFileName = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxFileCtrlNameStr ); virtual void SetWildcard( const wxString& wildCard ) wxOVERRIDE; virtual void SetFilterIndex( int filterindex ) wxOVERRIDE; virtual bool SetDirectory( const wxString& dir ) wxOVERRIDE; // Selects a certain file. // In case the filename specified isn't found/couldn't be shown with // currently selected filter, false is returned and nothing happens virtual bool SetFilename( const wxString& name ) wxOVERRIDE; // Changes to a certain directory and selects a certain file. // In case the filename specified isn't found/couldn't be shown with // currently selected filter, false is returned and if directory exists // it's chdir'ed to virtual bool SetPath( const wxString& path ) wxOVERRIDE; virtual wxString GetFilename() const wxOVERRIDE; virtual wxString GetDirectory() const wxOVERRIDE; virtual wxString GetWildcard() const wxOVERRIDE { return this->m_wildCard; } virtual wxString GetPath() const wxOVERRIDE; virtual void GetPaths( wxArrayString& paths ) const wxOVERRIDE; virtual void GetFilenames( wxArrayString& files ) const wxOVERRIDE; virtual int GetFilterIndex() const wxOVERRIDE { return m_filterIndex; } virtual bool HasMultipleFileSelection() const wxOVERRIDE { return HasFlag(wxFC_MULTIPLE); } virtual void ShowHidden(bool show) wxOVERRIDE { m_list->ShowHidden( show ); } void GoToParentDir(); void GoToHomeDir(); // get the directory currently shown in the control: this can be different // from GetDirectory() if the user entered a full path (with a path other // than the one currently shown in the control) in the text control // manually wxString GetShownDirectory() const { return m_list->GetDir(); } wxFileListCtrl *GetFileList() { return m_list; } void ChangeToReportMode() { m_list->ChangeToReportMode(); } void ChangeToListMode() { m_list->ChangeToListMode(); } private: void OnChoiceFilter( wxCommandEvent &event ); void OnCheck( wxCommandEvent &event ); void OnActivated( wxListEvent &event ); void OnTextEnter( wxCommandEvent &WXUNUSED( event ) ); void OnTextChange( wxCommandEvent &WXUNUSED( event ) ); void OnSelected( wxListEvent &event ); void HandleAction( const wxString &fn ); void DoSetFilterIndex( int filterindex ); void UpdateControls(); // the first of these methods can only be used for the controls with single // selection (i.e. without wxFC_MULTIPLE style), the second one in any case wxFileName DoGetFileName() const; void DoGetFilenames( wxArrayString& filenames, bool fullPath ) const; int m_style; wxString m_filterExtension; wxChoice *m_choice; wxTextCtrl *m_text; wxFileListCtrl *m_list; wxCheckBox *m_check; wxStaticText *m_static; wxString m_dir; wxString m_fileName; wxString m_wildCard; // wild card in one string as we got it int m_filterIndex; bool m_inSelected; bool m_ignoreChanges; bool m_noSelChgEvent; // suppress selection changed events. wxDECLARE_DYNAMIC_CLASS(wxGenericFileCtrl); wxDECLARE_EVENT_TABLE(); }; #endif // wxUSE_FILECTRL #endif // _WX_GENERIC_FILECTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/textdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/textdlgg.h // Purpose: wxTextEntryDialog class // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_TEXTDLGG_H_ #define _WX_TEXTDLGG_H_ #include "wx/defs.h" #if wxUSE_TEXTDLG #include "wx/dialog.h" #if wxUSE_VALIDATORS #include "wx/valtext.h" #include "wx/textctrl.h" #endif class WXDLLIMPEXP_FWD_CORE wxTextCtrl; extern WXDLLIMPEXP_DATA_CORE(const char) wxGetTextFromUserPromptStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxGetPasswordFromUserPromptStr[]; #define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE) // ---------------------------------------------------------------------------- // wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog { public: wxTextEntryDialog() { m_textctrl = NULL; } wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition) { Create(parent, message, caption, value, style, pos); } bool Create(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition); void SetValue(const wxString& val); wxString GetValue() const { return m_value; } void SetMaxLength(unsigned long len); void ForceUpper(); #if wxUSE_VALIDATORS void SetTextValidator( const wxTextValidator& validator ); #if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED( void SetTextValidator( long style ) ); #endif void SetTextValidator( wxTextValidatorStyle style = wxFILTER_NONE ); wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); } #endif // wxUSE_VALIDATORS virtual bool TransferDataToWindow() wxOVERRIDE; virtual bool TransferDataFromWindow() wxOVERRIDE; // implementation only void OnOK(wxCommandEvent& event); protected: wxTextCtrl *m_textctrl; wxString m_value; long m_dialogStyle; private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxTextEntryDialog); wxDECLARE_NO_COPY_CLASS(wxTextEntryDialog); }; // ---------------------------------------------------------------------------- // wxPasswordEntryDialog: dialog with password control, [ok] and [cancel] // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPasswordEntryDialog : public wxTextEntryDialog { public: wxPasswordEntryDialog() { } wxPasswordEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition) { Create(parent, message, caption, value, style, pos); } bool Create(wxWindow *parent, const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition); private: wxDECLARE_DYNAMIC_CLASS(wxPasswordEntryDialog); wxDECLARE_NO_COPY_CLASS(wxPasswordEntryDialog); }; // ---------------------------------------------------------------------------- // function to get a string from user // ---------------------------------------------------------------------------- WXDLLIMPEXP_CORE wxString wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, wxCoord y = wxDefaultCoord, bool centre = true); WXDLLIMPEXP_CORE wxString wxGetPasswordFromUser(const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, wxCoord y = wxDefaultCoord, bool centre = true); #endif // wxUSE_TEXTDLG #endif // _WX_TEXTDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/hyperlink.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/hyperlink.h // Purpose: Hyperlink control // Author: David Norris <[email protected]>, Otto Wyss // Modified by: Ryan Norton, Francesco Montorsi // Created: 04/02/2005 // Copyright: (c) 2005 David Norris // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERICHYPERLINKCTRL_H_ #define _WX_GENERICHYPERLINKCTRL_H_ // ---------------------------------------------------------------------------- // wxGenericHyperlinkCtrl // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxGenericHyperlinkCtrl : public wxHyperlinkCtrlBase { public: // Default constructor (for two-step construction). wxGenericHyperlinkCtrl() { Init(); } // Constructor. wxGenericHyperlinkCtrl(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = wxHyperlinkCtrlNameStr) { Init(); (void) Create(parent, id, label, url, pos, size, style, name); } // Creation function (for two-step construction). bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = wxHyperlinkCtrlNameStr); // get/set wxColour GetHoverColour() const wxOVERRIDE { return m_hoverColour; } void SetHoverColour(const wxColour &colour) wxOVERRIDE { m_hoverColour = colour; } wxColour GetNormalColour() const wxOVERRIDE { return m_normalColour; } void SetNormalColour(const wxColour &colour) wxOVERRIDE; wxColour GetVisitedColour() const wxOVERRIDE { return m_visitedColour; } void SetVisitedColour(const wxColour &colour) wxOVERRIDE; wxString GetURL() const wxOVERRIDE { return m_url; } void SetURL (const wxString &url) wxOVERRIDE { m_url=url; } void SetVisited(bool visited = true) wxOVERRIDE { m_visited=visited; } bool GetVisited() const wxOVERRIDE { return m_visited; } // NOTE: also wxWindow::Set/GetLabel, wxWindow::Set/GetBackgroundColour, // wxWindow::Get/SetFont, wxWindow::Get/SetCursor are important ! protected: // Helper used by this class itself and native MSW implementation that // connects OnRightUp() and OnPopUpCopy() handlers. void ConnectMenuHandlers(); // event handlers // Renders the hyperlink. void OnPaint(wxPaintEvent& event); // Handle set/kill focus events (invalidate for painting focus rect) void OnFocus(wxFocusEvent& event); // Fire a HyperlinkEvent on space void OnChar(wxKeyEvent& event); // Returns the wxRect of the label of this hyperlink. // This is different from the clientsize's rectangle when // clientsize != bestsize and this rectangle is influenced // by the alignment of the label (wxHL_ALIGN_*). wxRect GetLabelRect() const; // If the click originates inside the bounding box of the label, // a flag is set so that an event will be fired when the left // button is released. void OnLeftDown(wxMouseEvent& event); // If the click both originated and finished inside the bounding box // of the label, a HyperlinkEvent is fired. void OnLeftUp(wxMouseEvent& event); void OnRightUp(wxMouseEvent& event); // Changes the cursor to a hand, if the mouse is inside the label's // bounding box. void OnMotion(wxMouseEvent& event); // Changes the cursor back to the default, if necessary. void OnLeaveWindow(wxMouseEvent& event); // handles "Copy URL" menuitem void OnPopUpCopy(wxCommandEvent& event); // overridden base class virtuals // Returns the best size for the window, which is the size needed // to display the text label. virtual wxSize DoGetBestClientSize() const wxOVERRIDE; // creates a context menu with "Copy URL" menuitem virtual void DoContextMenu(const wxPoint &); private: // Common part of all ctors. void Init(); // URL associated with the link. This is transmitted inside // the HyperlinkEvent fired when the user clicks on the label. wxString m_url; // Foreground colours for various link types. // NOTE: wxWindow::m_backgroundColour is used for background, // wxWindow::m_foregroundColour is used to render non-visited links wxColour m_hoverColour; wxColour m_normalColour; wxColour m_visitedColour; // True if the mouse cursor is inside the label's bounding box. bool m_rollover; // True if the link has been clicked before. bool m_visited; // True if a click is in progress (left button down) and the click // originated inside the label's bounding box. bool m_clicking; }; #endif // _WX_GENERICHYPERLINKCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/propdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/propdlg.h // Purpose: wxPropertySheetDialog // Author: Julian Smart // Modified by: // Created: 2005-03-12 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPDLG_H_ #define _WX_PROPDLG_H_ #include "wx/defs.h" #if wxUSE_BOOKCTRL #include "wx/dialog.h" class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase; //----------------------------------------------------------------------------- // wxPropertySheetDialog // A platform-independent properties dialog with a notebook and standard // buttons. // // To use this class, call Create from your derived class. // Then create pages and add to the book control. Finally call CreateButtons and // LayoutDialog. // // For example: // // MyPropertySheetDialog::Create(...) // { // wxPropertySheetDialog::Create(...); // // // Add page // wxPanel* panel = new wxPanel(GetBookCtrl(), ...); // GetBookCtrl()->AddPage(panel, wxT("General")); // // CreateButtons(); // LayoutDialog(); // } // // Override CreateBookCtrl and AddBookCtrl to create and add a different // kind of book control. //----------------------------------------------------------------------------- enum wxPropertySheetDialogFlags { // Use the platform default wxPROPSHEET_DEFAULT = 0x0001, // Use a notebook wxPROPSHEET_NOTEBOOK = 0x0002, // Use a toolbook wxPROPSHEET_TOOLBOOK = 0x0004, // Use a choicebook wxPROPSHEET_CHOICEBOOK = 0x0008, // Use a listbook wxPROPSHEET_LISTBOOK = 0x0010, // Use a wxButtonToolBar toolbook wxPROPSHEET_BUTTONTOOLBOOK = 0x0020, // Use a treebook wxPROPSHEET_TREEBOOK = 0x0040, // Shrink dialog to fit current page wxPROPSHEET_SHRINKTOFIT = 0x0100 }; class WXDLLIMPEXP_ADV wxPropertySheetDialog : public wxDialog { public: wxPropertySheetDialog() : wxDialog() { Init(); } wxPropertySheetDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) { Init(); Create(parent, id, title, pos, sz, style, name); } bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); //// Accessors // Set and get the notebook void SetBookCtrl(wxBookCtrlBase* book) { m_bookCtrl = book; } wxBookCtrlBase* GetBookCtrl() const { return m_bookCtrl; } // Override function in base virtual wxWindow* GetContentWindow() const wxOVERRIDE; // Set and get the inner sizer void SetInnerSizer(wxSizer* sizer) { m_innerSizer = sizer; } wxSizer* GetInnerSizer() const { return m_innerSizer ; } // Set and get the book style void SetSheetStyle(long sheetStyle) { m_sheetStyle = sheetStyle; } long GetSheetStyle() const { return m_sheetStyle ; } // Set and get the border around the whole dialog void SetSheetOuterBorder(int border) { m_sheetOuterBorder = border; } int GetSheetOuterBorder() const { return m_sheetOuterBorder ; } // Set and get the border around the book control only void SetSheetInnerBorder(int border) { m_sheetInnerBorder = border; } int GetSheetInnerBorder() const { return m_sheetInnerBorder ; } /// Operations // Creates the buttons virtual void CreateButtons(int flags = wxOK|wxCANCEL); // Lay out the dialog, to be called after pages have been created virtual void LayoutDialog(int centreFlags = wxBOTH); /// Implementation // Creates the book control. If you want to use a different kind of // control, override. virtual wxBookCtrlBase* CreateBookCtrl(); // Adds the book control to the inner sizer. virtual void AddBookCtrl(wxSizer* sizer); // Resize dialog if necessary void OnIdle(wxIdleEvent& event); private: void Init(); protected: wxBookCtrlBase* m_bookCtrl; wxSizer* m_innerSizer; // sizer for extra space long m_sheetStyle; int m_sheetOuterBorder; int m_sheetInnerBorder; int m_selectedPage; wxDECLARE_DYNAMIC_CLASS(wxPropertySheetDialog); wxDECLARE_EVENT_TABLE(); }; #endif // wxUSE_BOOKCTRL #endif // _WX_PROPDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/notifmsg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/notifmsg.h // Purpose: generic implementation of wxGenericNotificationMessage // Author: Vadim Zeitlin // Created: 2007-11-24 // Copyright: (c) 2007 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_NOTIFMSG_H_ #define _WX_GENERIC_NOTIFMSG_H_ // ---------------------------------------------------------------------------- // wxGenericNotificationMessage // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxGenericNotificationMessage : public wxNotificationMessageBase { public: wxGenericNotificationMessage() { Init(); } wxGenericNotificationMessage(const wxString& title, const wxString& message = wxString(), wxWindow *parent = NULL, int flags = wxICON_INFORMATION) { Init(); Create(title, message, parent, flags); } // generic implementation-specific methods // get/set the default timeout (used if Timeout_Auto is specified) static int GetDefaultTimeout(); static void SetDefaultTimeout(int timeout); private: void Init(); wxDECLARE_NO_COPY_CLASS(wxGenericNotificationMessage); }; #endif // _WX_GENERIC_NOTIFMSG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/calctrlg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/calctrlg.h // Purpose: generic implementation of date-picker control // Author: Vadim Zeitlin // Modified by: // Created: 29.12.99 // Copyright: (c) 1999 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_CALCTRLG_H #define _WX_GENERIC_CALCTRLG_H #include "wx/control.h" // the base class #include "wx/dcclient.h" // for wxPaintDC class WXDLLIMPEXP_FWD_CORE wxComboBox; class WXDLLIMPEXP_FWD_CORE wxStaticText; class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; class WXDLLIMPEXP_FWD_CORE wxSpinEvent; // ---------------------------------------------------------------------------- // wxGenericCalendarCtrl // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxGenericCalendarCtrl : public wxCalendarCtrlBase { public: // construction wxGenericCalendarCtrl() { Init(); } wxGenericCalendarCtrl(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); 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 ~wxGenericCalendarCtrl(); virtual bool Destroy() wxOVERRIDE; // set/get the current date // ------------------------ virtual bool SetDate(const wxDateTime& date) wxOVERRIDE; virtual wxDateTime GetDate() const wxOVERRIDE { return m_date; } // set/get the range in which selection can occur // --------------------------------------------- virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, const wxDateTime& upperdate = wxDefaultDateTime) wxOVERRIDE; virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const wxOVERRIDE; // these functions are for generic version only, don't use them but use the // Set/GetDateRange() above instead bool SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime); const wxDateTime& GetLowerDateLimit() const { return m_lowdate; } bool SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime); const wxDateTime& GetUpperDateLimit() const { return m_highdate; } // calendar mode // ------------- // some calendar styles can't be changed after the control creation by // just using SetWindowStyle() and Refresh() and the functions below // should be used instead for them // corresponds to wxCAL_NO_MONTH_CHANGE bit virtual bool EnableMonthChange(bool enable = true) wxOVERRIDE; // corresponds to wxCAL_NO_YEAR_CHANGE bit, deprecated, generic only void EnableYearChange(bool enable = true); // customization // ------------- virtual void Mark(size_t day, bool mark) wxOVERRIDE; // all other functions in this section are for generic version only // header colours are used for painting the weekdays at the top virtual void SetHeaderColours(const wxColour& colFg, const wxColour& colBg) wxOVERRIDE { m_colHeaderFg = colFg; m_colHeaderBg = colBg; } virtual const wxColour& GetHeaderColourFg() const wxOVERRIDE { return m_colHeaderFg; } virtual const wxColour& GetHeaderColourBg() const wxOVERRIDE { return m_colHeaderBg; } // highlight colour is used for the currently selected date virtual void SetHighlightColours(const wxColour& colFg, const wxColour& colBg) wxOVERRIDE { m_colHighlightFg = colFg; m_colHighlightBg = colBg; } virtual const wxColour& GetHighlightColourFg() const wxOVERRIDE { return m_colHighlightFg; } virtual const wxColour& GetHighlightColourBg() const wxOVERRIDE { return m_colHighlightBg; } // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS) virtual void SetHolidayColours(const wxColour& colFg, const wxColour& colBg) wxOVERRIDE { m_colHolidayFg = colFg; m_colHolidayBg = colBg; } virtual const wxColour& GetHolidayColourFg() const wxOVERRIDE { return m_colHolidayFg; } virtual const wxColour& GetHolidayColourBg() const wxOVERRIDE { return m_colHolidayBg; } virtual wxCalendarDateAttr *GetAttr(size_t day) const wxOVERRIDE { wxCHECK_MSG( day > 0 && day < 32, NULL, wxT("invalid day") ); return m_attrs[day - 1]; } virtual void SetAttr(size_t day, wxCalendarDateAttr *attr) wxOVERRIDE { wxCHECK_RET( day > 0 && day < 32, wxT("invalid day") ); delete m_attrs[day - 1]; m_attrs[day - 1] = attr; } virtual void ResetAttr(size_t day) wxOVERRIDE { SetAttr(day, NULL); } virtual void SetHoliday(size_t day) wxOVERRIDE; virtual wxCalendarHitTestResult HitTest(const wxPoint& pos, wxDateTime *date = NULL, wxDateTime::WeekDay *wd = NULL) wxOVERRIDE; // implementation only from now on // ------------------------------- // forward these functions to all subcontrols virtual bool Enable(bool enable = true) wxOVERRIDE; virtual bool Show(bool show = true) wxOVERRIDE; virtual void SetWindowStyleFlag(long style) wxOVERRIDE; virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE { return GetClassDefaultAttributes(GetWindowVariant()); } static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); void OnSysColourChanged(wxSysColourChangedEvent& event); protected: // override some base class virtuals virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; virtual void DoGetSize(int *width, int *height) const wxOVERRIDE; private: // common part of all ctors void Init(); // startup colours and reinitialization after colour changes in system void InitColours(); // event handlers void OnPaint(wxPaintEvent& event); void OnClick(wxMouseEvent& event); void OnDClick(wxMouseEvent& event); void OnWheel(wxMouseEvent& event); void OnChar(wxKeyEvent& event); void OnMonthChange(wxCommandEvent& event); void HandleYearChange(wxCommandEvent& event); void OnYearChange(wxSpinEvent& event); void OnYearTextChange(wxCommandEvent& event); // (re)calc m_widthCol and m_heightRow void RecalcGeometry(); // set the date and send the notification void SetDateAndNotify(const wxDateTime& date); // get the week (row, in range 1..6) for the given date size_t GetWeek(const wxDateTime& date) const; // get the date from which we start drawing days wxDateTime GetStartDate() const; // get the first/last days of the week corresponding to the current style wxDateTime::WeekDay GetWeekStart() const { return WeekStartsOnMonday() ? wxDateTime::Mon : wxDateTime::Sun; } wxDateTime::WeekDay GetWeekEnd() const { return WeekStartsOnMonday() ? wxDateTime::Sun : wxDateTime::Sat; } // is this date shown? bool IsDateShown(const wxDateTime& date) const; // is this date in the currently allowed range? bool IsDateInRange(const wxDateTime& date) const; // adjust the date to the currently allowed range, return true if it was // changed bool AdjustDateToRange(wxDateTime *date) const; // redraw the given date void RefreshDate(const wxDateTime& date); // change the date inside the same month/year void ChangeDay(const wxDateTime& date); // deprecated bool AllowYearChange() const { return !(GetWindowStyle() & wxCAL_NO_YEAR_CHANGE); } // show the correct controls void ShowCurrentControls(); // create the month combo and year spin controls void CreateMonthComboBox(); void CreateYearSpinCtrl(); public: // get the currently shown control for month/year wxControl *GetMonthControl() const; wxControl *GetYearControl() const; private: virtual void ResetHolidayAttrs() wxOVERRIDE; virtual void RefreshHolidays() wxOVERRIDE { Refresh(); } // OnPaint helper-methods // Highlight the [fromdate : todate] range using pen and brush void HighlightRange(wxPaintDC* dc, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pen, const wxBrush* brush); // Get the "coordinates" for the date relative to the month currently displayed. // using (day, week): upper left coord is (1, 1), lower right coord is (7, 6) // if the date isn't visible (-1, -1) is put in (day, week) and false is returned bool GetDateCoord(const wxDateTime& date, int *day, int *week) const; // Set the flag for SetDate(): otherwise it would overwrite the year // typed in by the user void SetUserChangedYear() { m_userChangedYear = true; } // the subcontrols wxStaticText *m_staticMonth; wxComboBox *m_comboMonth; wxStaticText *m_staticYear; wxSpinCtrl *m_spinYear; // the current selection wxDateTime m_date; // the date-range wxDateTime m_lowdate; wxDateTime m_highdate; // default attributes wxColour m_colHighlightFg, m_colHighlightBg, m_colHolidayFg, m_colHolidayBg, m_colHeaderFg, m_colHeaderBg, m_colBackground, m_colSurrounding; // the attributes for each of the month days wxCalendarDateAttr *m_attrs[31]; // the width and height of one column/row in the calendar wxCoord m_widthCol, m_heightRow, m_rowOffset, m_calendarWeekWidth; wxRect m_leftArrowRect, m_rightArrowRect; // the week day names wxString m_weekdays[7]; // true if SetDate() is being called as the result of changing the year in // the year control bool m_userChangedYear; wxDECLARE_DYNAMIC_CLASS(wxGenericCalendarCtrl); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxGenericCalendarCtrl); }; #endif // _WX_GENERIC_CALCTRLG_H
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/wizard.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/wizard.h // Purpose: declaration of generic wxWizard class // Author: Vadim Zeitlin // Modified by: Robert Vazan (sizers) // Created: 28.09.99 // Copyright: (c) 1999 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_WIZARD_H_ #define _WX_GENERIC_WIZARD_H_ // ---------------------------------------------------------------------------- // wxWizard // ---------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxButton; class WXDLLIMPEXP_FWD_CORE wxStaticBitmap; class WXDLLIMPEXP_FWD_CORE wxWizardEvent; class WXDLLIMPEXP_FWD_CORE wxBoxSizer; class WXDLLIMPEXP_FWD_CORE wxWizardSizer; class WXDLLIMPEXP_CORE wxWizard : public wxWizardBase { public: // ctor wxWizard() { Init(); } wxWizard(wxWindow *parent, int id = wxID_ANY, const wxString& title = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE) { Init(); Create(parent, id, title, bitmap, pos, style); } bool Create(wxWindow *parent, int id = wxID_ANY, const wxString& title = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); void Init(); virtual ~wxWizard(); // implement base class pure virtuals virtual bool RunWizard(wxWizardPage *firstPage) wxOVERRIDE; virtual wxWizardPage *GetCurrentPage() const wxOVERRIDE; virtual void SetPageSize(const wxSize& size) wxOVERRIDE; virtual wxSize GetPageSize() const wxOVERRIDE; virtual void FitToPage(const wxWizardPage *firstPage) wxOVERRIDE; virtual wxSizer *GetPageAreaSizer() const wxOVERRIDE; virtual void SetBorder(int border) wxOVERRIDE; /// set/get bitmap const wxBitmap& GetBitmap() const { return m_bitmap; } void SetBitmap(const wxBitmap& bitmap); // implementation only from now on // ------------------------------- // is the wizard running? bool IsRunning() const { return m_page != NULL; } // show the prev/next page, but call TransferDataFromWindow on the current // page first and return false without changing the page if // TransferDataFromWindow() returns false - otherwise, returns true virtual bool ShowPage(wxWizardPage *page, bool goingForward = true); // do fill the dialog with controls // this is app-overridable to, for example, set help and tooltip text virtual void DoCreateControls(); // Do the adaptation virtual bool DoLayoutAdaptation() wxOVERRIDE; // Set/get bitmap background colour void SetBitmapBackgroundColour(const wxColour& colour) { m_bitmapBackgroundColour = colour; } const wxColour& GetBitmapBackgroundColour() const { return m_bitmapBackgroundColour; } // Set/get bitmap placement (centred, tiled etc.) void SetBitmapPlacement(int placement) { m_bitmapPlacement = placement; } int GetBitmapPlacement() const { return m_bitmapPlacement; } // Set/get minimum bitmap width void SetMinimumBitmapWidth(int w) { m_bitmapMinimumWidth = w; } int GetMinimumBitmapWidth() const { return m_bitmapMinimumWidth; } // Tile bitmap static bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap); protected: // for compatibility only, doesn't do anything any more void FinishLayout() { } // Do fit, and adjust to screen size if necessary virtual void DoWizardLayout(); // Resize bitmap if necessary virtual bool ResizeBitmap(wxBitmap& bmp); // was the dialog really created? bool WasCreated() const { return m_btnPrev != NULL; } // event handlers void OnCancel(wxCommandEvent& event); void OnBackOrNext(wxCommandEvent& event); void OnHelp(wxCommandEvent& event); void OnWizEvent(wxWizardEvent& event); void AddBitmapRow(wxBoxSizer *mainColumn); void AddStaticLine(wxBoxSizer *mainColumn); void AddBackNextPair(wxBoxSizer *buttonRow); void AddButtonRow(wxBoxSizer *mainColumn); // the page size requested by user wxSize m_sizePage; // the dialog position from the ctor wxPoint m_posWizard; // wizard state wxWizardPage *m_page; // the current page or NULL wxWizardPage *m_firstpage; // the page RunWizard started on or NULL wxBitmap m_bitmap; // the default bitmap to show // wizard controls wxButton *m_btnPrev, // the "<Back" button *m_btnNext; // the "Next>" or "Finish" button wxStaticBitmap *m_statbmp; // the control for the bitmap // cached labels so their translations stay consistent wxString m_nextLabel, m_finishLabel; // Border around page area sizer requested using SetBorder() int m_border; // Whether RunWizard() was called bool m_started; // Whether was modal (modeless has to be destroyed on finish or cancel) bool m_wasModal; // True if pages are laid out using the sizer bool m_usingSizer; // Page area sizer will be inserted here with padding wxBoxSizer *m_sizerBmpAndPage; // Actual position and size of pages wxWizardSizer *m_sizerPage; // Bitmap background colour if resizing bitmap wxColour m_bitmapBackgroundColour; // Bitmap placement flags int m_bitmapPlacement; // Minimum bitmap width int m_bitmapMinimumWidth; friend class wxWizardSizer; wxDECLARE_DYNAMIC_CLASS(wxWizard); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxWizard); }; #endif // _WX_GENERIC_WIZARD_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/gridsel.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/gridsel.h // Purpose: wxGridSelection // Author: Stefan Neis // Modified by: // Created: 20/02/2000 // Copyright: (c) Stefan Neis // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_GRIDSEL_H_ #define _WX_GENERIC_GRIDSEL_H_ #include "wx/defs.h" #if wxUSE_GRID #include "wx/grid.h" class WXDLLIMPEXP_CORE wxGridSelection { public: wxGridSelection(wxGrid *grid, wxGrid::wxGridSelectionModes sel = wxGrid::wxGridSelectCells); bool IsSelection(); bool IsInSelection(int row, int col); bool IsInSelection(const wxGridCellCoords& coords) { return IsInSelection(coords.GetRow(), coords.GetCol()); } void SetSelectionMode(wxGrid::wxGridSelectionModes selmode); wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; } void SelectRow(int row, const wxKeyboardState& kbd = wxKeyboardState()); void SelectCol(int col, const wxKeyboardState& kbd = wxKeyboardState()); void SelectBlock(int topRow, int leftCol, int bottomRow, int rightCol, const wxKeyboardState& kbd = wxKeyboardState(), bool sendEvent = true ); void SelectBlock(const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, const wxKeyboardState& kbd = wxKeyboardState(), bool sendEvent = true ) { SelectBlock(topLeft.GetRow(), topLeft.GetCol(), bottomRight.GetRow(), bottomRight.GetCol(), kbd, sendEvent); } void SelectCell(int row, int col, const wxKeyboardState& kbd = wxKeyboardState(), bool sendEvent = true); void SelectCell(const wxGridCellCoords& coords, const wxKeyboardState& kbd = wxKeyboardState(), bool sendEvent = true) { SelectCell(coords.GetRow(), coords.GetCol(), kbd, sendEvent); } void ToggleCellSelection(int row, int col, const wxKeyboardState& kbd = wxKeyboardState()); void ToggleCellSelection(const wxGridCellCoords& coords, const wxKeyboardState& kbd = wxKeyboardState()) { ToggleCellSelection(coords.GetRow(), coords.GetCol(), kbd); } void ClearSelection(); void UpdateRows( size_t pos, int numRows ); void UpdateCols( size_t pos, int numCols ); private: int BlockContain( int topRow1, int leftCol1, int bottomRow1, int rightCol1, int topRow2, int leftCol2, int bottomRow2, int rightCol2 ); // returns 1, if Block1 contains Block2, // -1, if Block2 contains Block1, // 0, otherwise int BlockContainsCell( int topRow, int leftCol, int bottomRow, int rightCol, int row, int col ) // returns 1, if Block contains Cell, // 0, otherwise { return ( topRow <= row && row <= bottomRow && leftCol <= col && col <= rightCol ); } void SelectBlockNoEvent(int topRow, int leftCol, int bottomRow, int rightCol) { SelectBlock(topRow, leftCol, bottomRow, rightCol, wxKeyboardState(), false); } wxGridCellCoordsArray m_cellSelection; wxGridCellCoordsArray m_blockSelectionTopLeft; wxGridCellCoordsArray m_blockSelectionBottomRight; wxArrayInt m_rowSelection; wxArrayInt m_colSelection; wxGrid *m_grid; wxGrid::wxGridSelectionModes m_selectionMode; friend class WXDLLIMPEXP_FWD_CORE wxGrid; wxDECLARE_NO_COPY_CLASS(wxGridSelection); }; #endif // wxUSE_GRID #endif // _WX_GENERIC_GRIDSEL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/logg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/logg.h // Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 // Copyright: (c) 1998 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_LOGG_H_ #define _WX_LOGG_H_ #if wxUSE_GUI class WXDLLIMPEXP_FWD_CORE wxTextCtrl; class WXDLLIMPEXP_FWD_CORE wxLogFrame; class WXDLLIMPEXP_FWD_CORE wxWindow; // ---------------------------------------------------------------------------- // the following log targets are only compiled in if the we're compiling the // GUI part (andnot just the base one) of the library, they're implemented in // src/generic/logg.cpp *and not src/common/log.cpp unlike all the rest) // ---------------------------------------------------------------------------- #if wxUSE_TEXTCTRL // log everything to a text window (GUI only of course) class WXDLLIMPEXP_CORE wxLogTextCtrl : public wxLog { public: wxLogTextCtrl(wxTextCtrl *pTextCtrl); protected: // implement sink function virtual void DoLogText(const wxString& msg) wxOVERRIDE; private: // the control we use wxTextCtrl *m_pTextCtrl; wxDECLARE_NO_COPY_CLASS(wxLogTextCtrl); }; #endif // wxUSE_TEXTCTRL // ---------------------------------------------------------------------------- // GUI log target, the default one for wxWidgets programs // ---------------------------------------------------------------------------- #if wxUSE_LOGGUI class WXDLLIMPEXP_CORE wxLogGui : public wxLog { public: // ctor wxLogGui(); // show all messages that were logged since the last Flush() virtual void Flush() wxOVERRIDE; protected: virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) wxOVERRIDE; // return the title to be used for the log dialog, depending on m_bErrors // and m_bWarnings values wxString GetTitle() const; // return the icon (one of wxICON_XXX constants) to be used for the dialog // depending on m_bErrors/m_bWarnings int GetSeverityIcon() const; // empty everything void Clear(); wxArrayString m_aMessages; // the log message texts wxArrayInt m_aSeverity; // one of wxLOG_XXX values wxArrayLong m_aTimes; // the time of each message bool m_bErrors, // do we have any errors? m_bWarnings, // any warnings? m_bHasMessages; // any messages at all? private: // this method is called to show a single log message, it uses // wxMessageBox() by default virtual void DoShowSingleLogMessage(const wxString& message, const wxString& title, int style); // this method is called to show multiple log messages, it uses wxLogDialog virtual void DoShowMultipleLogMessages(const wxArrayString& messages, const wxArrayInt& severities, const wxArrayLong& times, const wxString& title, int style); }; #endif // wxUSE_LOGGUI // ---------------------------------------------------------------------------- // (background) log window: this class forwards all log messages to the log // target which was active when it was instantiated, but also collects them // to the log window. This window has its own menu which allows the user to // close it, clear the log contents or save it to the file. // ---------------------------------------------------------------------------- #if wxUSE_LOGWINDOW class WXDLLIMPEXP_CORE wxLogWindow : public wxLogPassThrough { public: wxLogWindow(wxWindow *pParent, // the parent frame (can be NULL) const wxString& szTitle, // the title of the frame bool bShow = true, // show window immediately? bool bPassToOld = true); // pass messages to the old target? virtual ~wxLogWindow(); // window operations // show/hide the log window void Show(bool bShow = true); // retrieve the pointer to the frame wxFrame *GetFrame() const; // overridables // called if the user closes the window interactively, will not be // called if it is destroyed for another reason (such as when program // exits) - return true from here to allow the frame to close, false // to prevent this from happening virtual bool OnFrameClose(wxFrame *frame); // called right before the log frame is going to be deleted: will // always be called unlike OnFrameClose() virtual void OnFrameDelete(wxFrame *frame); protected: virtual void DoLogTextAtLevel(wxLogLevel level, const wxString& msg) wxOVERRIDE; private: wxLogFrame *m_pLogFrame; // the log frame wxDECLARE_NO_COPY_CLASS(wxLogWindow); }; #endif // wxUSE_LOGWINDOW #endif // wxUSE_GUI #endif // _WX_LOGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/treectlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/treectlg.h // Purpose: wxTreeCtrl class // Author: Robert Roebling // Modified by: // Created: 01/02/97 // Copyright: (c) 1997,1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _GENERIC_TREECTRL_H_ #define _GENERIC_TREECTRL_H_ #if wxUSE_TREECTRL #include "wx/scrolwin.h" #include "wx/pen.h" // ----------------------------------------------------------------------------- // forward declaration // ----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem; class WXDLLIMPEXP_FWD_CORE wxTreeItemData; class WXDLLIMPEXP_FWD_CORE wxTreeRenameTimer; class WXDLLIMPEXP_FWD_CORE wxTreeFindTimer; class WXDLLIMPEXP_FWD_CORE wxTreeTextCtrl; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; // ----------------------------------------------------------------------------- // wxGenericTreeCtrl - the tree control // ----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericTreeCtrl : public wxTreeCtrlBase, public wxScrollHelper { public: // creation // -------- wxGenericTreeCtrl() : wxTreeCtrlBase(), wxScrollHelper(this) { Init(); } wxGenericTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr) : wxTreeCtrlBase(), wxScrollHelper(this) { Init(); Create(parent, id, pos, size, style, validator, name); } virtual ~wxGenericTreeCtrl(); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr); // implement base class pure virtuals // ---------------------------------- virtual unsigned int GetCount() const wxOVERRIDE; virtual unsigned int GetIndent() const wxOVERRIDE { return m_indent; } virtual void SetIndent(unsigned int indent) wxOVERRIDE; virtual void SetImageList(wxImageList *imageList) wxOVERRIDE; virtual void SetStateImageList(wxImageList *imageList) wxOVERRIDE; virtual wxString GetItemText(const wxTreeItemId& item) const wxOVERRIDE; virtual int GetItemImage(const wxTreeItemId& item, wxTreeItemIcon which = wxTreeItemIcon_Normal) const wxOVERRIDE; virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const wxOVERRIDE; virtual wxColour GetItemTextColour(const wxTreeItemId& item) const wxOVERRIDE; virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const wxOVERRIDE; virtual wxFont GetItemFont(const wxTreeItemId& item) const wxOVERRIDE; virtual void SetItemText(const wxTreeItemId& item, const wxString& text) wxOVERRIDE; virtual void SetItemImage(const wxTreeItemId& item, int image, wxTreeItemIcon which = wxTreeItemIcon_Normal) wxOVERRIDE; virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data) wxOVERRIDE; virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true) wxOVERRIDE; virtual void SetItemBold(const wxTreeItemId& item, bool bold = true) wxOVERRIDE; virtual void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true) wxOVERRIDE; virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col) wxOVERRIDE; virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col) wxOVERRIDE; virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font) wxOVERRIDE; virtual bool IsVisible(const wxTreeItemId& item) const wxOVERRIDE; virtual bool ItemHasChildren(const wxTreeItemId& item) const wxOVERRIDE; virtual bool IsExpanded(const wxTreeItemId& item) const wxOVERRIDE; virtual bool IsSelected(const wxTreeItemId& item) const wxOVERRIDE; virtual bool IsBold(const wxTreeItemId& item) const wxOVERRIDE; virtual size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true) const wxOVERRIDE; // navigation // ---------- virtual wxTreeItemId GetRootItem() const wxOVERRIDE { return m_anchor; } virtual wxTreeItemId GetSelection() const wxOVERRIDE { wxASSERT_MSG( !HasFlag(wxTR_MULTIPLE), wxT("must use GetSelections() with this control") ); return m_current; } virtual size_t GetSelections(wxArrayTreeItemIds&) const wxOVERRIDE; virtual wxTreeItemId GetFocusedItem() const wxOVERRIDE { return m_current; } virtual void ClearFocusedItem() wxOVERRIDE; virtual void SetFocusedItem(const wxTreeItemId& item) wxOVERRIDE; virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const wxOVERRIDE; virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const wxOVERRIDE; virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const wxOVERRIDE; virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const wxOVERRIDE; virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const wxOVERRIDE; virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const wxOVERRIDE; virtual wxTreeItemId GetFirstVisibleItem() const wxOVERRIDE; virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const wxOVERRIDE; virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const wxOVERRIDE; // operations // ---------- virtual wxTreeItemId AddRoot(const wxString& text, int image = -1, int selectedImage = -1, wxTreeItemData *data = NULL) wxOVERRIDE; virtual void Delete(const wxTreeItemId& item) wxOVERRIDE; virtual void DeleteChildren(const wxTreeItemId& item) wxOVERRIDE; virtual void DeleteAllItems() wxOVERRIDE; virtual void Expand(const wxTreeItemId& item) wxOVERRIDE; virtual void Collapse(const wxTreeItemId& item) wxOVERRIDE; virtual void CollapseAndReset(const wxTreeItemId& item) wxOVERRIDE; virtual void Toggle(const wxTreeItemId& item) wxOVERRIDE; virtual void Unselect() wxOVERRIDE; virtual void UnselectAll() wxOVERRIDE; virtual void SelectItem(const wxTreeItemId& item, bool select = true) wxOVERRIDE; virtual void SelectChildren(const wxTreeItemId& parent) wxOVERRIDE; virtual void EnsureVisible(const wxTreeItemId& item) wxOVERRIDE; virtual void ScrollTo(const wxTreeItemId& item) wxOVERRIDE; virtual wxTextCtrl *EditLabel(const wxTreeItemId& item, wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)) wxOVERRIDE; virtual wxTextCtrl *GetEditControl() const wxOVERRIDE; virtual void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false) wxOVERRIDE; virtual void EnableBellOnNoMatch(bool on = true) wxOVERRIDE; virtual void SortChildren(const wxTreeItemId& item) wxOVERRIDE; // items geometry // -------------- virtual bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, bool textOnly = false) const wxOVERRIDE; // this version specific methods // ----------------------------- wxImageList *GetButtonsImageList() const { return m_imageListButtons; } void SetButtonsImageList(wxImageList *imageList); void AssignButtonsImageList(wxImageList *imageList); void SetDropEffectAboveItem( bool above = false ) { m_dropEffectAboveItem = above; } bool GetDropEffectAboveItem() const { return m_dropEffectAboveItem; } wxTreeItemId GetNext(const wxTreeItemId& item) const; // implementation only from now on // overridden base class virtuals virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE; virtual bool SetForegroundColour(const wxColour& colour) wxOVERRIDE; virtual void Refresh(bool eraseBackground = true, const wxRect *rect = NULL) wxOVERRIDE; virtual bool SetFont( const wxFont &font ) wxOVERRIDE; virtual void SetWindowStyleFlag(long styles) wxOVERRIDE; // callbacks void OnPaint( wxPaintEvent &event ); void OnSetFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event ); void OnKeyDown( wxKeyEvent &event ); void OnChar( wxKeyEvent &event ); void OnMouse( wxMouseEvent &event ); void OnGetToolTip( wxTreeEvent &event ); void OnSize( wxSizeEvent &event ); void OnInternalIdle( ) wxOVERRIDE; virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE { return GetClassDefaultAttributes(GetWindowVariant()); } static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); // implementation helpers void AdjustMyScrollbars(); WX_FORWARD_TO_SCROLL_HELPER() protected: friend class wxGenericTreeItem; friend class wxTreeRenameTimer; friend class wxTreeFindTimer; friend class wxTreeTextCtrl; wxFont m_normalFont; wxFont m_boldFont; wxGenericTreeItem *m_anchor; wxGenericTreeItem *m_current, *m_key_current, // A hint to select a parent item after deleting a child *m_select_me; unsigned short m_indent; int m_lineHeight; wxPen m_dottedPen; wxBrush *m_hilightBrush, *m_hilightUnfocusedBrush; bool m_hasFocus; bool m_dirty; bool m_ownsImageListButtons; bool m_isDragging; // true between BEGIN/END drag events bool m_lastOnSame; // last click on the same item as prev wxImageList *m_imageListButtons; int m_dragCount; wxPoint m_dragStart; wxGenericTreeItem *m_dropTarget; wxCursor m_oldCursor; // cursor is changed while dragging wxGenericTreeItem *m_oldSelection; wxGenericTreeItem *m_underMouse; // for visual effects enum { NoEffect, BorderEffect, AboveEffect, BelowEffect } m_dndEffect; wxGenericTreeItem *m_dndEffectItem; wxTreeTextCtrl *m_textCtrl; wxTimer *m_renameTimer; // incremental search data wxString m_findPrefix; wxTimer *m_findTimer; // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 // if it is globally enabled but has been temporarily disabled because we // had already beeped for this particular search. int m_findBell; bool m_dropEffectAboveItem; // the common part of all ctors void Init(); // overridden wxWindow methods virtual void DoThaw() wxOVERRIDE; // misc helpers void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted); void DrawBorder(const wxTreeItemId& item); void DrawLine(const wxTreeItemId& item, bool below); void DrawDropEffect(wxGenericTreeItem *item); void DoSelectItem(const wxTreeItemId& id, bool unselect_others = true, bool extended_select = false); virtual int DoGetItemState(const wxTreeItemId& item) const wxOVERRIDE; virtual void DoSetItemState(const wxTreeItemId& item, int state) wxOVERRIDE; virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, size_t previous, const wxString& text, int image, int selectedImage, wxTreeItemData *data) wxOVERRIDE; virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent, const wxTreeItemId& idPrevious, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData *data = NULL) wxOVERRIDE; virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const wxOVERRIDE; // called by wxTextTreeCtrl when it marks itself for deletion void ResetTextControl(); // find the first item starting with the given prefix after the given item wxTreeItemId FindItem(const wxTreeItemId& id, const wxString& prefix) const; bool HasButtons() const { return HasFlag(wxTR_HAS_BUTTONS); } void CalculateLineHeight(); int GetLineHeight(wxGenericTreeItem *item) const; void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y ); void PaintItem( wxGenericTreeItem *item, wxDC& dc); void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y ); void CalculatePositions(); void RefreshSubtree( wxGenericTreeItem *item ); void RefreshLine( wxGenericTreeItem *item ); // redraw all selected items void RefreshSelected(); // RefreshSelected() recursive helper void RefreshSelectedUnder(wxGenericTreeItem *item); void OnRenameTimer(); bool OnRenameAccept(wxGenericTreeItem *item, const wxString& value); void OnRenameCancelled(wxGenericTreeItem *item); void FillArray(wxGenericTreeItem*, wxArrayTreeItemIds&) const; void SelectItemRange( wxGenericTreeItem *item1, wxGenericTreeItem *item2 ); bool TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select); bool TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select); void UnselectAllChildren( wxGenericTreeItem *item ); void ChildrenClosing(wxGenericTreeItem* item); void DoDirtyProcessing(); virtual wxSize DoGetBestSize() const wxOVERRIDE; private: // Reset the state of the last find (i.e. keyboard incremental search) // operation. void ResetFindState(); wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl); wxDECLARE_NO_COPY_CLASS(wxGenericTreeCtrl); }; #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) /* * wxTreeCtrl has to be a real class or we have problems with * the run-time information. */ class WXDLLIMPEXP_CORE wxTreeCtrl: public wxGenericTreeCtrl { wxDECLARE_DYNAMIC_CLASS(wxTreeCtrl); public: wxTreeCtrl() {} wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr) : wxGenericTreeCtrl(parent, id, pos, size, style, validator, name) { } }; #endif // !__WXMSW__ || __WXUNIVERSAL__ #endif // wxUSE_TREECTRL #endif // _GENERIC_TREECTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/region.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/region.h // Purpose: generic wxRegion class // Author: David Elliott // Modified by: // Created: 2004/04/12 // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_REGION_H__ #define _WX_GENERIC_REGION_H__ class WXDLLIMPEXP_CORE wxRegionGeneric : public wxRegionBase { public: wxRegionGeneric(wxCoord x, wxCoord y, wxCoord w, wxCoord h); wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRight); wxRegionGeneric(const wxRect& rect); wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); wxRegionGeneric(const wxBitmap& bmp); wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0); wxRegionGeneric(); virtual ~wxRegionGeneric(); // wxRegionBase pure virtuals virtual void Clear(); virtual bool IsEmpty() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; // wxRegionBase pure virtuals 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); friend class WXDLLIMPEXP_FWD_CORE wxRegionIteratorGeneric; }; class WXDLLIMPEXP_CORE wxRegionIteratorGeneric : public wxObject { public: wxRegionIteratorGeneric(); wxRegionIteratorGeneric(const wxRegionGeneric& region); wxRegionIteratorGeneric(const wxRegionIteratorGeneric& iterator); virtual ~wxRegionIteratorGeneric(); wxRegionIteratorGeneric& operator=(const wxRegionIteratorGeneric& iterator); void Reset() { m_current = 0; } void Reset(const wxRegionGeneric& region); operator bool () const { return HaveRects(); } bool HaveRects() const; wxRegionIteratorGeneric& operator++(); wxRegionIteratorGeneric operator++(int); long GetX() const; long GetY() const; long GetW() const; long GetWidth() const { return GetW(); } long GetH() const; long GetHeight() const { return GetH(); } wxRect GetRect() const; private: long m_current; wxRegionGeneric m_region; }; #endif // _WX_GENERIC_REGION_H__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/fontpickerg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/fontpickerg.h // Purpose: wxGenericFontButton header // Author: Francesco Montorsi // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FONTPICKER_H_ #define _WX_FONTPICKER_H_ #include "wx/button.h" #include "wx/fontdata.h" //----------------------------------------------------------------------------- // wxGenericFontButton: a button which brings up a wxFontDialog //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericFontButton : public wxButton, public wxFontPickerWidgetBase { public: wxGenericFontButton() {} wxGenericFontButton(wxWindow *parent, wxWindowID id, const wxFont &initial = wxNullFont, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFontPickerWidgetNameStr) { Create(parent, id, initial, pos, size, style, validator, name); } virtual wxColour GetSelectedColour() const wxOVERRIDE { return m_data.GetColour(); } virtual void SetSelectedColour(const wxColour &colour) wxOVERRIDE { m_data.SetColour(colour); UpdateFont(); } virtual ~wxGenericFontButton() {} public: // API extensions specific for wxGenericFontButton // user can override this to init font data in a different way virtual void InitFontData(); // returns the font data shown in wxFontDialog wxFontData *GetFontData() { return &m_data; } public: bool Create(wxWindow *parent, wxWindowID id, const wxFont &initial = *wxNORMAL_FONT, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFontPickerWidgetNameStr); void OnButtonClick(wxCommandEvent &); protected: void UpdateFont() wxOVERRIDE; wxFontData m_data; private: wxDECLARE_DYNAMIC_CLASS(wxGenericFontButton); }; #endif // _WX_FONTPICKER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/mask.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/mask.h // Purpose: generic implementation of wxMask // Author: Vadim Zeitlin // Created: 2006-09-28 // Copyright: (c) 2006 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_MASKG_H_ #define _WX_GENERIC_MASKG_H_ // ---------------------------------------------------------------------------- // generic wxMask implementation // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxMask : public wxMaskBase { public: wxMask() { } wxMask(const wxBitmap& bitmap, const wxColour& colour) { InitFromColour(bitmap, colour); } #if wxUSE_PALETTE wxMask(const wxBitmap& bitmap, int paletteIndex) { Create(bitmap, paletteIndex); } #endif // wxUSE_PALETTE wxMask(const wxBitmap& bitmap) { InitFromMonoBitmap(bitmap); } // implementation-only from now on wxBitmap GetBitmap() const { return m_bitmap; } private: // implement wxMaskBase pure virtuals virtual void FreeData(); virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour); virtual bool InitFromMonoBitmap(const wxBitmap& bitmap); wxBitmap m_bitmap; wxDECLARE_DYNAMIC_CLASS(wxMask); }; #endif // _WX_GENERIC_MASKG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/datectrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/datectrl.h // Purpose: generic wxDatePickerCtrl implementation // Author: Andreas Pflug // Modified by: // Created: 2005-01-19 // Copyright: (c) 2005 Andreas Pflug <[email protected]> // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_DATECTRL_H_ #define _WX_GENERIC_DATECTRL_H_ #include "wx/compositewin.h" #include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxComboCtrl; class WXDLLIMPEXP_FWD_CORE wxCalendarCtrl; class WXDLLIMPEXP_FWD_CORE wxCalendarComboPopup; class WXDLLIMPEXP_CORE wxDatePickerCtrlGeneric : public wxCompositeWindow< wxNavigationEnabled<wxDatePickerCtrlBase> > { public: // creating the control wxDatePickerCtrlGeneric() { Init(); } virtual ~wxDatePickerCtrlGeneric(); wxDatePickerCtrlGeneric(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr) { Init(); (void)Create(parent, id, date, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr); // wxDatePickerCtrl methods void SetValue(const wxDateTime& date) wxOVERRIDE; wxDateTime GetValue() const wxOVERRIDE; bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const wxOVERRIDE; void SetRange(const wxDateTime &dt1, const wxDateTime &dt2) wxOVERRIDE; bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, const wxDateTime& upperdate = wxDefaultDateTime); // extra methods available only in this (generic) implementation wxCalendarCtrl *GetCalendar() const; // implementation only from now on // ------------------------------- // overridden base class methods virtual bool Destroy() wxOVERRIDE; protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; private: void Init(); // return the list of the windows composing this one virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE; void OnText(wxCommandEvent &event); void OnSize(wxSizeEvent& event); #ifdef __WXOSX_COCOA__ virtual void OSXGenerateEvent(const wxDateTime& WXUNUSED(dt)) wxOVERRIDE { } #endif wxComboCtrl* m_combo; wxCalendarComboPopup* m_popup; wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxDatePickerCtrlGeneric); }; #endif // _WX_GENERIC_DATECTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/colour.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/colour.h // Purpose: wxColour class // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_COLOUR_H_ #define _WX_GENERIC_COLOUR_H_ #include "wx/object.h" // Colour class WXDLLIMPEXP_CORE wxColour: public wxColourBase { public: // constructors // ------------ DEFINE_STD_WXCOLOUR_CONSTRUCTORS // copy ctors and assignment operators wxColour(const wxColour& col) { *this = col; } wxColour& operator=(const wxColour& col); // accessors virtual bool IsOk() const { return m_isInit; } unsigned char Red() const { return m_red; } unsigned char Green() const { return m_green; } unsigned char Blue() const { return m_blue; } unsigned char Alpha() const { return m_alpha; } // comparison bool operator==(const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue && m_alpha == colour.m_alpha && m_isInit == colour.m_isInit); } bool operator!=(const wxColour& colour) const { return !(*this == colour); } protected: // Helper function void Init(); virtual void InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); private: bool m_isInit; unsigned char m_red; unsigned char m_blue; unsigned char m_green; unsigned char m_alpha; private: wxDECLARE_DYNAMIC_CLASS(wxColour); }; #endif // _WX_GENERIC_COLOUR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/gridctrl.h
/////////////////////////////////////////////////////////////////////////// // Name: wx/generic/gridctrl.h // Purpose: wxGrid controls // Author: Paul Gammans, Roger Gammans // Modified by: // Created: 11/04/2001 // Copyright: (c) The Computer Surgery ([email protected]) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_GRIDCTRL_H_ #define _WX_GENERIC_GRIDCTRL_H_ #include "wx/grid.h" #if wxUSE_GRID #define wxGRID_VALUE_CHOICEINT wxT("choiceint") #define wxGRID_VALUE_DATETIME wxT("datetime") // the default renderer for the cells containing string data class WXDLLIMPEXP_ADV wxGridCellStringRenderer : public wxGridCellRenderer { public: // draw the string virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; // return the string extent virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE { return new wxGridCellStringRenderer; } protected: // set the text colours before drawing void SetTextColoursAndFont(const wxGrid& grid, const wxGridCellAttr& attr, wxDC& dc, bool isSelected); // calc the string extent for given string/font wxSize DoGetBestSize(const wxGridCellAttr& attr, wxDC& dc, const wxString& text); }; // the default renderer for the cells containing numeric (long) data class WXDLLIMPEXP_ADV wxGridCellNumberRenderer : public wxGridCellStringRenderer { public: // draw the string right aligned virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE { return new wxGridCellNumberRenderer; } protected: wxString GetString(const wxGrid& grid, int row, int col); }; class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer { public: wxGridCellFloatRenderer(int width = -1, int precision = -1, int format = wxGRID_FLOAT_FORMAT_DEFAULT); // get/change formatting parameters int GetWidth() const { return m_width; } void SetWidth(int width) { m_width = width; m_format.clear(); } int GetPrecision() const { return m_precision; } void SetPrecision(int precision) { m_precision = precision; m_format.clear(); } int GetFormat() const { return m_style; } void SetFormat(int format) { m_style = format; m_format.clear(); } // draw the string right aligned with given width/precision virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; // parameters string format is "width[,precision[,format]]" // with format being one of f|e|g|E|F|G virtual void SetParameters(const wxString& params) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE; protected: wxString GetString(const wxGrid& grid, int row, int col); private: // formatting parameters int m_width, m_precision; int m_style; wxString m_format; }; // renderer for boolean fields class WXDLLIMPEXP_ADV wxGridCellBoolRenderer : public wxGridCellRenderer { public: // draw a check mark or nothing virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; // return the checkmark size virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE { return new wxGridCellBoolRenderer; } private: static wxSize ms_sizeCheckMark; }; #if wxUSE_DATETIME #include "wx/datetime.h" // the default renderer for the cells containing times and dates class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer { public: wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat, const wxString& informat = wxDefaultDateTimeFormat); // draw the string right aligned virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE; // output strptime()-like format string virtual void SetParameters(const wxString& params) wxOVERRIDE; protected: wxString GetString(const wxGrid& grid, int row, int col); wxString m_iformat; wxString m_oformat; wxDateTime m_dateDef; wxDateTime::TimeZone m_tz; }; #endif // wxUSE_DATETIME // renders a number using the corresponding text string class WXDLLIMPEXP_ADV wxGridCellEnumRenderer : public wxGridCellStringRenderer { public: wxGridCellEnumRenderer( const wxString& choices = wxEmptyString ); // draw the string right aligned virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE; // parameters string format is "item1[,item2[...,itemN]]" where itemN will // be used if the cell value is N-1 virtual void SetParameters(const wxString& params) wxOVERRIDE; protected: wxString GetString(const wxGrid& grid, int row, int col); wxArrayString m_choices; }; class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellStringRenderer { public: wxGridCellAutoWrapStringRenderer() : wxGridCellStringRenderer() { } virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) wxOVERRIDE; virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) wxOVERRIDE; virtual int GetBestHeight(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col, int width) wxOVERRIDE; virtual int GetBestWidth(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col, int height) wxOVERRIDE; virtual wxGridCellRenderer *Clone() const wxOVERRIDE { return new wxGridCellAutoWrapStringRenderer; } private: wxArrayString GetTextLines( wxGrid& grid, wxDC& dc, const wxGridCellAttr& attr, const wxRect& rect, int row, int col); // Helper methods of GetTextLines() // Break a single logical line of text into several physical lines, all of // which are added to the lines array. The lines are broken at maxWidth and // the dc is used for measuring text extent only. void BreakLine(wxDC& dc, const wxString& logicalLine, wxCoord maxWidth, wxArrayString& lines); // Break a word, which is supposed to be wider than maxWidth, into several // lines, which are added to lines array and the last, incomplete, of which // is returned in line output parameter. // // Returns the width of the last line. wxCoord BreakWord(wxDC& dc, const wxString& word, wxCoord maxWidth, wxArrayString& lines, wxString& line); }; #endif // wxUSE_GRID #endif // _WX_GENERIC_GRIDCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/custombgwin.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/custombgwin.h // Purpose: Generic implementation of wxCustomBackgroundWindow. // Author: Vadim Zeitlin // Created: 2011-10-10 // Copyright: (c) 2011 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_CUSTOMBGWIN_H_ #define _WX_GENERIC_CUSTOMBGWIN_H_ #include "wx/bitmap.h" #include "wx/dc.h" #include "wx/event.h" #include "wx/window.h" // A helper to avoid template bloat: this class contains all type-independent // code of wxCustomBackgroundWindow<> below. class wxCustomBackgroundWindowGenericBase : public wxCustomBackgroundWindowBase { public: wxCustomBackgroundWindowGenericBase() { } protected: void DoEraseBackground(wxEraseEvent& event, wxWindow* win) { wxDC& dc = *event.GetDC(); const wxSize clientSize = win->GetClientSize(); const wxSize bitmapSize = m_bitmapBg.GetSize(); for ( int x = 0; x < clientSize.x; x += bitmapSize.x ) { for ( int y = 0; y < clientSize.y; y += bitmapSize.y ) { dc.DrawBitmap(m_bitmapBg, x, y); } } } // The bitmap used for painting the background if valid. wxBitmap m_bitmapBg; wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowGenericBase); }; // ---------------------------------------------------------------------------- // wxCustomBackgroundWindow // ---------------------------------------------------------------------------- template <class W> class wxCustomBackgroundWindow : public W, public wxCustomBackgroundWindowGenericBase { public: typedef W BaseWindowClass; wxCustomBackgroundWindow() { } protected: virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) wxOVERRIDE { m_bitmapBg = bmp; if ( m_bitmapBg.IsOk() ) { BaseWindowClass::Bind ( wxEVT_ERASE_BACKGROUND, &wxCustomBackgroundWindow::OnEraseBackground, this ); } else { BaseWindowClass::Unbind ( wxEVT_ERASE_BACKGROUND, &wxCustomBackgroundWindow::OnEraseBackground, this ); } } private: // Event handler for erasing the background which is only used when we have // a valid background bitmap. void OnEraseBackground(wxEraseEvent& event) { DoEraseBackground(event, this); } wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W); }; #endif // _WX_GENERIC_CUSTOMBGWIN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/colrdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/colrdlgg.h // Purpose: wxGenericColourDialog // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_COLORDLGG_H_ #define _WX_COLORDLGG_H_ #include "wx/gdicmn.h" #include "wx/dialog.h" #if wxUSE_SLIDER class WXDLLIMPEXP_FWD_CORE wxSlider; #endif // wxUSE_SLIDER // Preview with opacity is possible only if wxGCDC and wxStaticBitmap are // available and currently it only works in wxOSX and wxMSW as it uses wxBitmap // UseAlpha() and HasAlpha() methods which only these ports provide. #if ((wxUSE_GRAPHICS_CONTEXT && wxUSE_STATBMP) && \ (defined(__WXMSW__) || defined(__WXOSX__))) #define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA 1 #else #define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA 0 #endif #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA class wxStaticBitmap; #endif // wxCLRDLGG_USE_PREVIEW_WITH_ALPHA class WXDLLIMPEXP_CORE wxGenericColourDialog : public wxDialog { public: wxGenericColourDialog(); wxGenericColourDialog(wxWindow *parent, wxColourData *data = NULL); virtual ~wxGenericColourDialog(); bool Create(wxWindow *parent, wxColourData *data = NULL); wxColourData &GetColourData() { return m_colourData; } virtual int ShowModal() wxOVERRIDE; // Internal functions void OnMouseEvent(wxMouseEvent& event); void OnPaint(wxPaintEvent& event); #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA void OnCustomColourMouseClick(wxMouseEvent& event); #endif // wxCLRDLGG_USE_PREVIEW_WITH_ALPHA virtual void CalculateMeasurements(); virtual void CreateWidgets(); virtual void InitializeColours(); virtual void PaintBasicColours(wxDC& dc); #if !wxCLRDLGG_USE_PREVIEW_WITH_ALPHA virtual void PaintCustomColours(wxDC& dc, int clrIndex = -1); #endif // !wxCLRDLGG_USE_PREVIEW_WITH_ALPHA virtual void PaintCustomColour(wxDC& dc); virtual void PaintHighlight(wxDC& dc, bool draw); virtual void OnBasicColourClick(int which); virtual void OnCustomColourClick(int which); void OnAddCustom(wxCommandEvent& event); #if wxUSE_SLIDER void OnRedSlider(wxCommandEvent& event); void OnGreenSlider(wxCommandEvent& event); void OnBlueSlider(wxCommandEvent& event); void OnAlphaSlider(wxCommandEvent& event); #endif // wxUSE_SLIDER void OnCloseWindow(wxCloseEvent& event); #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA void DoPreviewBitmap(wxBitmap& bmp, const wxColour& colour); #endif // wxCLRDLGG_USE_PREVIEW_WITH_ALPHA protected: wxColourData m_colourData; // Area reserved for grids of colours wxRect m_standardColoursRect; wxRect m_customColoursRect; wxRect m_singleCustomColourRect; // Size of each colour rectangle wxSize m_smallRectangleSize; // Grid spacing (between rectangles) int m_gridSpacing; // Section spacing (between left and right halves of dialog box) int m_sectionSpacing; // 48 'standard' colours wxColour m_standardColours[48]; // 16 'custom' colours wxColour m_customColours[16]; // Which colour is selected? An index into one of the two areas. int m_colourSelection; int m_whichKind; // 1 for standard colours, 2 for custom colours, #if wxUSE_SLIDER wxSlider *m_redSlider; wxSlider *m_greenSlider; wxSlider *m_blueSlider; wxSlider *m_alphaSlider; #endif // wxUSE_SLIDER #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA // Bitmap to preview selected colour (with alpha channel) wxStaticBitmap *m_customColourBmp; // Bitmaps to preview custom colours (with alpha channel) wxStaticBitmap *m_customColoursBmp[16]; #endif // wxCLRDLGG_USE_PREVIEW_WITH_ALPHA int m_buttonY; int m_okButtonX; int m_customButtonX; // static bool colourDialogCancelled; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericColourDialog); }; #endif // _WX_COLORDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/grid.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/grid.h // Purpose: wxGrid and related classes // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_GRID_H_ #define _WX_GENERIC_GRID_H_ #include "wx/defs.h" #if wxUSE_GRID #include "wx/hashmap.h" #include "wx/scrolwin.h" // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- extern WXDLLIMPEXP_DATA_CORE(const char) wxGridNameStr[]; // Default parameters for wxGrid // #define WXGRID_DEFAULT_NUMBER_ROWS 10 #define WXGRID_DEFAULT_NUMBER_COLS 10 #if defined(__WXMSW__) || defined(__WXGTK20__) #define WXGRID_DEFAULT_ROW_HEIGHT 25 #else #define WXGRID_DEFAULT_ROW_HEIGHT 30 #endif // __WXMSW__ #define WXGRID_DEFAULT_COL_WIDTH 80 #define WXGRID_DEFAULT_COL_LABEL_HEIGHT 32 #define WXGRID_DEFAULT_ROW_LABEL_WIDTH 82 #define WXGRID_LABEL_EDGE_ZONE 2 #define WXGRID_MIN_ROW_HEIGHT 15 #define WXGRID_MIN_COL_WIDTH 15 #define WXGRID_DEFAULT_SCROLLBAR_WIDTH 16 // type names for grid table values #define wxGRID_VALUE_STRING wxT("string") #define wxGRID_VALUE_BOOL wxT("bool") #define wxGRID_VALUE_NUMBER wxT("long") #define wxGRID_VALUE_FLOAT wxT("double") #define wxGRID_VALUE_CHOICE wxT("choice") #define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING #define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER // magic constant which tells (to some functions) to automatically calculate // the appropriate size #define wxGRID_AUTOSIZE (-1) // many wxGrid methods work either with columns or rows, this enum is used for // the parameter indicating which one should it be enum wxGridDirection { wxGRID_COLUMN, wxGRID_ROW }; // Flags used with wxGrid::Render() to select parts of the grid to draw. enum wxGridRenderStyle { wxGRID_DRAW_ROWS_HEADER = 0x001, wxGRID_DRAW_COLS_HEADER = 0x002, wxGRID_DRAW_CELL_LINES = 0x004, wxGRID_DRAW_BOX_RECT = 0x008, wxGRID_DRAW_SELECTION = 0x010, wxGRID_DRAW_DEFAULT = wxGRID_DRAW_ROWS_HEADER | wxGRID_DRAW_COLS_HEADER | wxGRID_DRAW_CELL_LINES | wxGRID_DRAW_BOX_RECT }; // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxGrid; class WXDLLIMPEXP_FWD_CORE wxGridCellAttr; class WXDLLIMPEXP_FWD_CORE wxGridCellAttrProviderData; class WXDLLIMPEXP_FWD_CORE wxGridColLabelWindow; class WXDLLIMPEXP_FWD_CORE wxGridCornerLabelWindow; class WXDLLIMPEXP_FWD_CORE wxGridRowLabelWindow; class WXDLLIMPEXP_FWD_CORE wxGridWindow; class WXDLLIMPEXP_FWD_CORE wxGridTypeRegistry; class WXDLLIMPEXP_FWD_CORE wxGridSelection; class WXDLLIMPEXP_FWD_CORE wxHeaderCtrl; class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxComboBox; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; #if wxUSE_SPINCTRL class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; #endif class wxGridFixedIndicesSet; class wxGridOperations; class wxGridRowOperations; class wxGridColumnOperations; class wxGridDirectionOperations; // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- #define wxSafeIncRef(p) if ( p ) (p)->IncRef() #define wxSafeDecRef(p) if ( p ) (p)->DecRef() // ---------------------------------------------------------------------------- // wxGridCellWorker: common base class for wxGridCellRenderer and // wxGridCellEditor // // NB: this is more an implementation convenience than a design issue, so this // class is not documented and is not public at all // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridCellWorker : public wxClientDataContainer, public wxRefCounter { public: wxGridCellWorker() { } // interpret renderer parameters: arbitrary string whose interpretation is // left to the derived classes virtual void SetParameters(const wxString& params); protected: // virtual dtor for any base class - private because only DecRef() can // delete us virtual ~wxGridCellWorker(); private: // suppress the stupid gcc warning about the class having private dtor and // no friends friend class wxGridCellWorkerDummyFriend; }; // ---------------------------------------------------------------------------- // wxGridCellRenderer: this class is responsible for actually drawing the cell // in the grid. You may pass it to the wxGridCellAttr (below) to change the // format of one given cell or to wxGrid::SetDefaultRenderer() to change the // view of all cells. This is an ABC, you will normally use one of the // predefined derived classes or derive your own class from it. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridCellRenderer : public wxGridCellWorker { public: // draw the given cell on the provided DC inside the given rectangle // using the style specified by the attribute and the default or selected // state corresponding to the isSelected value. // // this pure virtual function has a default implementation which will // prepare the DC using the given attribute: it will draw the rectangle // with the bg colour from attr and set the text colour and font virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) = 0; // get the preferred size of the cell for its contents virtual wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) = 0; // Get the preferred height for a given width. Override this method if the // renderer computes height as function of its width, as is the case of the // standard wxGridCellAutoWrapStringRenderer, for example. // and vice versa virtual int GetBestHeight(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col, int WXUNUSED(width)) { return GetBestSize(grid, attr, dc, row, col).GetHeight(); } // Get the preferred width for a given height, this is the symmetric // version of GetBestHeight(). virtual int GetBestWidth(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col, int WXUNUSED(height)) { return GetBestSize(grid, attr, dc, row, col).GetWidth(); } // create a new object which is the copy of this one virtual wxGridCellRenderer *Clone() const = 0; }; // ---------------------------------------------------------------------------- // wxGridCellEditor: This class is responsible for providing and manipulating // the in-place edit controls for the grid. Instances of wxGridCellEditor // (actually, instances of derived classes since it is an ABC) can be // associated with the cell attributes for individual cells, rows, columns, or // even for the entire grid. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridCellEditor : public wxGridCellWorker { public: wxGridCellEditor(); bool IsCreated() const { return m_control != NULL; } wxControl* GetControl() const { return m_control; } void SetControl(wxControl* control) { m_control = control; } wxGridCellAttr* GetCellAttr() const { return m_attr; } void SetCellAttr(wxGridCellAttr* attr) { m_attr = attr; } // Creates the actual edit control virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) = 0; // Size and position the edit control virtual void SetSize(const wxRect& rect); // Show or hide the edit control, use the specified attributes to set // colours/fonts for it virtual void Show(bool show, wxGridCellAttr *attr = NULL); // Draws the part of the cell not occupied by the control: the base class // version just fills it with background colour from the attribute virtual void PaintBackground(wxDC& dc, const wxRect& rectCell, const wxGridCellAttr& attr); // The methods called by wxGrid when a cell is edited: first BeginEdit() is // called, then EndEdit() is and if it returns true and if the change is // not vetoed by a user-defined event handler, finally ApplyEdit() is called // Fetch the value from the table and prepare the edit control // to begin editing. Set the focus to the edit control. virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; // Returns false if nothing changed, otherwise returns true and return the // new value in its string form in the newval output parameter. // // This should also store the new value in its real type internally so that // it could be used by ApplyEdit() but it must not modify the grid as the // change could still be vetoed. virtual bool EndEdit(int row, int col, const wxGrid *grid, const wxString& oldval, wxString *newval) = 0; // Complete the editing of the current cell by storing the value saved by // the previous call to EndEdit() in the grid virtual void ApplyEdit(int row, int col, wxGrid* grid) = 0; // Reset the value in the control back to its starting value virtual void Reset() = 0; // return true to allow the given key to start editing: the base class // version only checks that the event has no modifiers. The derived // classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in // their IsAcceptedKey() implementation, although, of course, it is not a // mandatory requirment. // // NB: if the key is F2 (special), editing will always start and this // method will not be called at all (but StartingKey() will) virtual bool IsAcceptedKey(wxKeyEvent& event); // If the editor is enabled by pressing keys on the grid, this will be // called to let the editor do something about that first key if desired virtual void StartingKey(wxKeyEvent& event); // if the editor is enabled by clicking on the cell, this method will be // called virtual void StartingClick(); // Some types of controls on some platforms may need some help // with the Return key. virtual void HandleReturn(wxKeyEvent& event); // Final cleanup virtual void Destroy(); // create a new object which is the copy of this one virtual wxGridCellEditor *Clone() const = 0; // added GetValue so we can get the value which is in the control virtual wxString GetValue() const = 0; protected: // the dtor is private because only DecRef() can delete us virtual ~wxGridCellEditor(); // the control we show on screen wxControl* m_control; // a temporary pointer to the attribute being edited wxGridCellAttr* m_attr; // if we change the colours/font of the control from the default ones, we // must restore the default later and we save them here between calls to // Show(true) and Show(false) wxColour m_colFgOld, m_colBgOld; wxFont m_fontOld; // suppress the stupid gcc warning about the class having private dtor and // no friends friend class wxGridCellEditorDummyFriend; wxDECLARE_NO_COPY_CLASS(wxGridCellEditor); }; // ---------------------------------------------------------------------------- // wxGridHeaderRenderer and company: like wxGridCellRenderer but for headers // ---------------------------------------------------------------------------- // Base class for header cells renderers. class WXDLLIMPEXP_CORE wxGridHeaderLabelsRenderer { public: virtual ~wxGridHeaderLabelsRenderer() {} // Draw the border around cell window. virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const = 0; // Draw header cell label virtual void DrawLabel(const wxGrid& grid, wxDC& dc, const wxString& value, const wxRect& rect, int horizAlign, int vertAlign, int textOrientation) const; }; // Currently the row/column/corner renders don't need any methods other than // those already in wxGridHeaderLabelsRenderer but still define separate classes // for them for future extensions and also for better type safety (i.e. to // avoid inadvertently using a column header renderer for the row headers) class WXDLLIMPEXP_CORE wxGridRowHeaderRenderer : public wxGridHeaderLabelsRenderer { }; class WXDLLIMPEXP_CORE wxGridColumnHeaderRenderer : public wxGridHeaderLabelsRenderer { }; class WXDLLIMPEXP_CORE wxGridCornerHeaderRenderer : public wxGridHeaderLabelsRenderer { }; // Also define the default renderers which are used by wxGridCellAttrProvider // by default class WXDLLIMPEXP_CORE wxGridRowHeaderRendererDefault : public wxGridRowHeaderRenderer { public: virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const wxOVERRIDE; }; // Column header cells renderers class WXDLLIMPEXP_CORE wxGridColumnHeaderRendererDefault : public wxGridColumnHeaderRenderer { public: virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const wxOVERRIDE; }; // Header corner renderer class WXDLLIMPEXP_CORE wxGridCornerHeaderRendererDefault : public wxGridCornerHeaderRenderer { public: virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const wxOVERRIDE; }; // ---------------------------------------------------------------------------- // wxGridCellAttr: this class can be used to alter the cells appearance in // the grid by changing their colour/font/... from default. An object of this // class may be returned by wxGridTable::GetAttr(). // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridCellAttr : public wxClientDataContainer, public wxRefCounter { public: enum wxAttrKind { Any, Default, Cell, Row, Col, Merged }; // ctors wxGridCellAttr(wxGridCellAttr *attrDefault = NULL) { Init(attrDefault); SetAlignment(wxALIGN_INVALID, wxALIGN_INVALID); } // VZ: considering the number of members wxGridCellAttr has now, this ctor // seems to be pretty useless... may be we should just remove it? wxGridCellAttr(const wxColour& colText, const wxColour& colBack, const wxFont& font, int hAlign, int vAlign) : m_colText(colText), m_colBack(colBack), m_font(font) { Init(); SetAlignment(hAlign, vAlign); } // creates a new copy of this object wxGridCellAttr *Clone() const; void MergeWith(wxGridCellAttr *mergefrom); // setters void SetTextColour(const wxColour& colText) { m_colText = colText; } void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } void SetFont(const wxFont& font) { m_font = font; } void SetAlignment(int hAlign, int vAlign) { m_hAlign = hAlign; m_vAlign = vAlign; } void SetSize(int num_rows, int num_cols); void SetOverflow(bool allow = true) { m_overflow = allow ? Overflow : SingleCell; } void SetReadOnly(bool isReadOnly = true) { m_isReadOnly = isReadOnly ? ReadOnly : ReadWrite; } // takes ownership of the pointer void SetRenderer(wxGridCellRenderer *renderer) { wxSafeDecRef(m_renderer); m_renderer = renderer; } void SetEditor(wxGridCellEditor* editor) { wxSafeDecRef(m_editor); m_editor = editor; } void SetKind(wxAttrKind kind) { m_attrkind = kind; } // accessors bool HasTextColour() const { return m_colText.IsOk(); } bool HasBackgroundColour() const { return m_colBack.IsOk(); } bool HasFont() const { return m_font.IsOk(); } bool HasAlignment() const { return m_hAlign != wxALIGN_INVALID || m_vAlign != wxALIGN_INVALID; } bool HasRenderer() const { return m_renderer != NULL; } bool HasEditor() const { return m_editor != NULL; } bool HasReadWriteMode() const { return m_isReadOnly != Unset; } bool HasOverflowMode() const { return m_overflow != UnsetOverflow; } bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; } const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; const wxFont& GetFont() const; void GetAlignment(int *hAlign, int *vAlign) const; // unlike GetAlignment() which always overwrites its output arguments with // the alignment values to use, falling back on default alignment if this // attribute doesn't have any, this function will preserve the values of // parameters on entry if the corresponding alignment is not set in this // attribute meaning that they can be initialized to default alignment (and // also that they must be initialized, unlike with GetAlignment()) void GetNonDefaultAlignment(int *hAlign, int *vAlign) const; void GetSize(int *num_rows, int *num_cols) const; bool GetOverflow() const { return m_overflow != SingleCell; } wxGridCellRenderer *GetRenderer(const wxGrid* grid, int row, int col) const; wxGridCellEditor *GetEditor(const wxGrid* grid, int row, int col) const; bool IsReadOnly() const { return m_isReadOnly == wxGridCellAttr::ReadOnly; } wxAttrKind GetKind() { return m_attrkind; } void SetDefAttr(wxGridCellAttr* defAttr) { m_defGridAttr = defAttr; } protected: // the dtor is private because only DecRef() can delete us virtual ~wxGridCellAttr() { wxSafeDecRef(m_renderer); wxSafeDecRef(m_editor); } private: enum wxAttrReadMode { Unset = -1, ReadWrite, ReadOnly }; enum wxAttrOverflowMode { UnsetOverflow = -1, Overflow, SingleCell }; // the common part of all ctors void Init(wxGridCellAttr *attrDefault = NULL); wxColour m_colText, m_colBack; wxFont m_font; int m_hAlign, m_vAlign; int m_sizeRows, m_sizeCols; wxAttrOverflowMode m_overflow; wxGridCellRenderer* m_renderer; wxGridCellEditor* m_editor; wxGridCellAttr* m_defGridAttr; wxAttrReadMode m_isReadOnly; wxAttrKind m_attrkind; // use Clone() instead wxDECLARE_NO_COPY_CLASS(wxGridCellAttr); // suppress the stupid gcc warning about the class having private dtor and // no friends friend class wxGridCellAttrDummyFriend; }; // ---------------------------------------------------------------------------- // wxGridCellAttrProvider: class used by wxGridTableBase to retrieve/store the // cell attributes. // ---------------------------------------------------------------------------- // implementation note: we separate it from wxGridTableBase because we wish to // avoid deriving a new table class if possible, and sometimes it will be // enough to just derive another wxGridCellAttrProvider instead // // the default implementation is reasonably efficient for the generic case, // but you might still wish to implement your own for some specific situations // if you have performance problems with the stock one class WXDLLIMPEXP_CORE wxGridCellAttrProvider : public wxClientDataContainer { public: wxGridCellAttrProvider(); virtual ~wxGridCellAttrProvider(); // DecRef() must be called on the returned pointer virtual wxGridCellAttr *GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind ) const; // all these functions take ownership of the pointer, don't call DecRef() // on it virtual void SetAttr(wxGridCellAttr *attr, int row, int col); virtual void SetRowAttr(wxGridCellAttr *attr, int row); virtual void SetColAttr(wxGridCellAttr *attr, int col); // these functions must be called whenever some rows/cols are deleted // because the internal data must be updated then void UpdateAttrRows( size_t pos, int numRows ); void UpdateAttrCols( size_t pos, int numCols ); // get renderers for the given row/column header label and the corner // window: unlike cell renderers, these objects are not reference counted // and are never NULL so they are returned by reference virtual const wxGridColumnHeaderRenderer& GetColumnHeaderRenderer(int col); virtual const wxGridRowHeaderRenderer& GetRowHeaderRenderer(int row); virtual const wxGridCornerHeaderRenderer& GetCornerRenderer(); private: void InitData(); wxGridCellAttrProviderData *m_data; wxDECLARE_NO_COPY_CLASS(wxGridCellAttrProvider); }; // ---------------------------------------------------------------------------- // wxGridCellCoords: location of a cell in the grid // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridCellCoords { public: wxGridCellCoords() { m_row = m_col = -1; } wxGridCellCoords( int r, int c ) { m_row = r; m_col = c; } // default copy ctor is ok int GetRow() const { return m_row; } void SetRow( int n ) { m_row = n; } int GetCol() const { return m_col; } void SetCol( int n ) { m_col = n; } void Set( int row, int col ) { m_row = row; m_col = col; } wxGridCellCoords& operator=( const wxGridCellCoords& other ) { if ( &other != this ) { m_row=other.m_row; m_col=other.m_col; } return *this; } bool operator==( const wxGridCellCoords& other ) const { return (m_row == other.m_row && m_col == other.m_col); } bool operator!=( const wxGridCellCoords& other ) const { return (m_row != other.m_row || m_col != other.m_col); } bool operator!() const { return (m_row == -1 && m_col == -1 ); } private: int m_row; int m_col; }; // For comparisons... // extern WXDLLIMPEXP_CORE wxGridCellCoords wxGridNoCellCoords; extern WXDLLIMPEXP_CORE wxRect wxGridNoCellRect; // An array of cell coords... // WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellCoords, wxGridCellCoordsArray, class WXDLLIMPEXP_CORE); // ---------------------------------------------------------------------------- // Grid table classes // ---------------------------------------------------------------------------- // the abstract base class class WXDLLIMPEXP_CORE wxGridTableBase : public wxObject, public wxClientDataContainer { public: wxGridTableBase(); virtual ~wxGridTableBase(); // You must override these functions in a derived table class // // return the number of rows and columns in this table virtual int GetNumberRows() = 0; virtual int GetNumberCols() = 0; // the methods above are unfortunately non-const even though they should // have been const -- but changing it now is not possible any longer as it // would break the existing code overriding them, so instead we provide // these const synonyms which can be used from const-correct code int GetRowsCount() const { return const_cast<wxGridTableBase *>(this)->GetNumberRows(); } int GetColsCount() const { return const_cast<wxGridTableBase *>(this)->GetNumberCols(); } virtual bool IsEmptyCell( int row, int col ) { return GetValue(row, col).empty(); } bool IsEmpty(const wxGridCellCoords& coord) { return IsEmptyCell(coord.GetRow(), coord.GetCol()); } virtual wxString GetValue( int row, int col ) = 0; virtual void SetValue( int row, int col, const wxString& value ) = 0; // Data type determination and value access virtual wxString GetTypeName( int row, int col ); virtual bool CanGetValueAs( int row, int col, const wxString& typeName ); virtual bool CanSetValueAs( int row, int col, const wxString& typeName ); virtual long GetValueAsLong( int row, int col ); virtual double GetValueAsDouble( int row, int col ); virtual bool GetValueAsBool( int row, int col ); virtual void SetValueAsLong( int row, int col, long value ); virtual void SetValueAsDouble( int row, int col, double value ); virtual void SetValueAsBool( int row, int col, bool value ); // For user defined types virtual void* GetValueAsCustom( int row, int col, const wxString& typeName ); virtual void SetValueAsCustom( int row, int col, const wxString& typeName, void* value ); // Overriding these is optional // virtual void SetView( wxGrid *grid ) { m_view = grid; } virtual wxGrid * GetView() const { return m_view; } virtual void Clear() {} virtual bool InsertRows( size_t pos = 0, size_t numRows = 1 ); virtual bool AppendRows( size_t numRows = 1 ); virtual bool DeleteRows( size_t pos = 0, size_t numRows = 1 ); virtual bool InsertCols( size_t pos = 0, size_t numCols = 1 ); virtual bool AppendCols( size_t numCols = 1 ); virtual bool DeleteCols( size_t pos = 0, size_t numCols = 1 ); virtual wxString GetRowLabelValue( int row ); virtual wxString GetColLabelValue( int col ); virtual wxString GetCornerLabelValue() const; virtual void SetRowLabelValue( int WXUNUSED(row), const wxString& ) {} virtual void SetColLabelValue( int WXUNUSED(col), const wxString& ) {} virtual void SetCornerLabelValue( const wxString& ) {} // Attribute handling // // give us the attr provider to use - we take ownership of the pointer void SetAttrProvider(wxGridCellAttrProvider *attrProvider); // get the currently used attr provider (may be NULL) wxGridCellAttrProvider *GetAttrProvider() const { return m_attrProvider; } // Does this table allow attributes? Default implementation creates // a wxGridCellAttrProvider if necessary. virtual bool CanHaveAttributes(); // by default forwarded to wxGridCellAttrProvider if any. May be // overridden to handle attributes directly in the table. virtual wxGridCellAttr *GetAttr( int row, int col, wxGridCellAttr::wxAttrKind kind ); // these functions take ownership of the pointer virtual void SetAttr(wxGridCellAttr* attr, int row, int col); virtual void SetRowAttr(wxGridCellAttr *attr, int row); virtual void SetColAttr(wxGridCellAttr *attr, int col); private: wxGrid * m_view; wxGridCellAttrProvider *m_attrProvider; wxDECLARE_ABSTRACT_CLASS(wxGridTableBase); wxDECLARE_NO_COPY_CLASS(wxGridTableBase); }; // ---------------------------------------------------------------------------- // wxGridTableMessage // ---------------------------------------------------------------------------- // IDs for messages sent from grid table to view // enum wxGridTableRequest { // The first two requests never did anything, simply don't use them. #if WXWIN_COMPATIBILITY_3_0 wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000, wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES, #endif // WXWIN_COMPATIBILITY_3_0 wxGRIDTABLE_NOTIFY_ROWS_INSERTED = 2002, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, wxGRIDTABLE_NOTIFY_ROWS_DELETED, wxGRIDTABLE_NOTIFY_COLS_INSERTED, wxGRIDTABLE_NOTIFY_COLS_APPENDED, wxGRIDTABLE_NOTIFY_COLS_DELETED }; class WXDLLIMPEXP_CORE wxGridTableMessage { public: wxGridTableMessage(); wxGridTableMessage( wxGridTableBase *table, int id, int comInt1 = -1, int comInt2 = -1 ); void SetTableObject( wxGridTableBase *table ) { m_table = table; } wxGridTableBase * GetTableObject() const { return m_table; } void SetId( int id ) { m_id = id; } int GetId() { return m_id; } void SetCommandInt( int comInt1 ) { m_comInt1 = comInt1; } int GetCommandInt() { return m_comInt1; } void SetCommandInt2( int comInt2 ) { m_comInt2 = comInt2; } int GetCommandInt2() { return m_comInt2; } private: wxGridTableBase *m_table; int m_id; int m_comInt1; int m_comInt2; wxDECLARE_NO_COPY_CLASS(wxGridTableMessage); }; // ------ wxGridStringArray // A 2-dimensional array of strings for data values // WX_DECLARE_OBJARRAY_WITH_DECL(wxArrayString, wxGridStringArray, class WXDLLIMPEXP_CORE); // ------ wxGridStringTable // // Simplest type of data table for a grid for small tables of strings // that are stored in memory // class WXDLLIMPEXP_CORE wxGridStringTable : public wxGridTableBase { public: wxGridStringTable(); wxGridStringTable( int numRows, int numCols ); // these are pure virtual in wxGridTableBase // virtual int GetNumberRows() wxOVERRIDE { return static_cast<int>(m_data.size()); } virtual int GetNumberCols() wxOVERRIDE { return m_numCols; } virtual wxString GetValue( int row, int col ) wxOVERRIDE; virtual void SetValue( int row, int col, const wxString& s ) wxOVERRIDE; // overridden functions from wxGridTableBase // void Clear() wxOVERRIDE; bool InsertRows( size_t pos = 0, size_t numRows = 1 ) wxOVERRIDE; bool AppendRows( size_t numRows = 1 ) wxOVERRIDE; bool DeleteRows( size_t pos = 0, size_t numRows = 1 ) wxOVERRIDE; bool InsertCols( size_t pos = 0, size_t numCols = 1 ) wxOVERRIDE; bool AppendCols( size_t numCols = 1 ) wxOVERRIDE; bool DeleteCols( size_t pos = 0, size_t numCols = 1 ) wxOVERRIDE; void SetRowLabelValue( int row, const wxString& ) wxOVERRIDE; void SetColLabelValue( int col, const wxString& ) wxOVERRIDE; void SetCornerLabelValue( const wxString& ) wxOVERRIDE; wxString GetRowLabelValue( int row ) wxOVERRIDE; wxString GetColLabelValue( int col ) wxOVERRIDE; wxString GetCornerLabelValue() const wxOVERRIDE; private: wxGridStringArray m_data; // notice that while we don't need to store the number of our rows as it's // always equal to the size of m_data array, we do need to store the number // of our columns as we can't retrieve it from m_data when the number of // rows is 0 (see #10818) int m_numCols; // These only get used if you set your own labels, otherwise the // GetRow/ColLabelValue functions return wxGridTableBase defaults // wxArrayString m_rowLabels; wxArrayString m_colLabels; wxString m_cornerLabel; wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxGridStringTable); }; // ============================================================================ // Grid view classes // ============================================================================ // ---------------------------------------------------------------------------- // wxGridSizesInfo stores information about sizes of the rows or columns. // // It assumes that most of the columns or rows have default size and so stores // the default size separately and uses a hash to map column or row numbers to // their non default size for those which don't have the default size. // ---------------------------------------------------------------------------- // hash map to store positions as the keys and sizes as the values WX_DECLARE_HASH_MAP_WITH_DECL( unsigned, int, wxIntegerHash, wxIntegerEqual, wxUnsignedToIntHashMap, class WXDLLIMPEXP_CORE ); struct WXDLLIMPEXP_CORE wxGridSizesInfo { // default ctor, initialize m_sizeDefault and m_customSizes later wxGridSizesInfo() { } // ctor used by wxGrid::Get{Col,Row}Sizes() wxGridSizesInfo(int defSize, const wxArrayInt& allSizes); // default copy ctor, assignment operator and dtor are ok // Get the size of the element with the given index int GetSize(unsigned pos) const; // default size int m_sizeDefault; // position -> size map containing all elements with non-default size wxUnsignedToIntHashMap m_customSizes; }; // ---------------------------------------------------------------------------- // wxGrid // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGrid : public wxScrolledWindow { public: // possible selection modes enum wxGridSelectionModes { wxGridSelectCells = 0, // allow selecting anything wxGridSelectRows = 1, // allow selecting only entire rows wxGridSelectColumns = 2, // allow selecting only entire columns wxGridSelectRowsOrColumns = wxGridSelectRows | wxGridSelectColumns }; // Different behaviour of the TAB key when the end (or the beginning, for // Shift-TAB) of the current row is reached: enum TabBehaviour { Tab_Stop, // Do nothing, this is default. Tab_Wrap, // Move to the next (or previous) row. Tab_Leave // Move to the next (or previous) control. }; // creation and destruction // ------------------------ // ctor and Create() create the grid window, as with the other controls wxGrid() { Init(); } wxGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxGridNameStr) { Init(); Create(parent, id, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxGridNameStr); virtual ~wxGrid(); // however to initialize grid data either CreateGrid() or SetTable() must // be also called // this is basically equivalent to // // SetTable(new wxGridStringTable(numRows, numCols), true, selmode) // bool CreateGrid( int numRows, int numCols, wxGridSelectionModes selmode = wxGridSelectCells ); bool SetTable( wxGridTableBase *table, bool takeOwnership = false, wxGridSelectionModes selmode = wxGridSelectCells ); bool ProcessTableMessage(wxGridTableMessage&); wxGridTableBase *GetTable() const { return m_table; } void SetSelectionMode(wxGridSelectionModes selmode); wxGridSelectionModes GetSelectionMode() const; // ------ grid dimensions // int GetNumberRows() const { return m_numRows; } int GetNumberCols() const { return m_numCols; } // ------ display update functions // wxArrayInt CalcRowLabelsExposed( const wxRegion& reg ) const; wxArrayInt CalcColLabelsExposed( const wxRegion& reg ) const; wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg ) const; void ClearGrid(); bool InsertRows(int pos = 0, int numRows = 1, bool updateLabels = true) { return DoModifyLines(&wxGridTableBase::InsertRows, pos, numRows, updateLabels); } bool InsertCols(int pos = 0, int numCols = 1, bool updateLabels = true) { return DoModifyLines(&wxGridTableBase::InsertCols, pos, numCols, updateLabels); } bool AppendRows(int numRows = 1, bool updateLabels = true) { return DoAppendLines(&wxGridTableBase::AppendRows, numRows, updateLabels); } bool AppendCols(int numCols = 1, bool updateLabels = true) { return DoAppendLines(&wxGridTableBase::AppendCols, numCols, updateLabels); } bool DeleteRows(int pos = 0, int numRows = 1, bool updateLabels = true) { return DoModifyLines(&wxGridTableBase::DeleteRows, pos, numRows, updateLabels); } bool DeleteCols(int pos = 0, int numCols = 1, bool updateLabels = true) { return DoModifyLines(&wxGridTableBase::DeleteCols, pos, numCols, updateLabels); } void DrawGridCellArea( wxDC& dc , const wxGridCellCoordsArray& cells ); void DrawGridSpace( wxDC& dc ); void DrawCellBorder( wxDC& dc, const wxGridCellCoords& ); void DrawAllGridLines( wxDC& dc, const wxRegion & reg ); void DrawCell( wxDC& dc, const wxGridCellCoords& ); void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells); // this function is called when the current cell highlight must be redrawn // and may be overridden by the user virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ); virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows ); virtual void DrawRowLabel( wxDC& dc, int row ); virtual void DrawColLabels( wxDC& dc, const wxArrayInt& cols ); virtual void DrawColLabel( wxDC& dc, int col ); virtual void DrawCornerLabel(wxDC& dc); // ------ Cell text drawing functions // void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&, int horizontalAlignment = wxALIGN_LEFT, int verticalAlignment = wxALIGN_TOP, int textOrientation = wxHORIZONTAL ) const; void DrawTextRectangle( wxDC& dc, const wxArrayString& lines, const wxRect&, int horizontalAlignment = wxALIGN_LEFT, int verticalAlignment = wxALIGN_TOP, int textOrientation = wxHORIZONTAL ) const; // ------ grid render function for printing // void Render( wxDC& dc, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxGridCellCoords& topLeft = wxGridCellCoords(-1, -1), const wxGridCellCoords& bottomRight = wxGridCellCoords(-1, -1), int style = wxGRID_DRAW_DEFAULT ); // Split a string containing newline characters into an array of // strings and return the number of lines // void StringToLines( const wxString& value, wxArrayString& lines ) const; void GetTextBoxSize( const wxDC& dc, const wxArrayString& lines, long *width, long *height ) const; // ------ // Code that does a lot of grid modification can be enclosed // between BeginBatch() and EndBatch() calls to avoid screen // flicker // void BeginBatch() { m_batchCount++; } void EndBatch(); int GetBatchCount() { return m_batchCount; } virtual void Refresh(bool eraseb = true, const wxRect* rect = NULL) wxOVERRIDE; // Use this, rather than wxWindow::Refresh(), to force an // immediate repainting of the grid. Has no effect if you are // already inside a BeginBatch / EndBatch block. // // This function is necessary because wxGrid has a minimal OnPaint() // handler to reduce screen flicker. // void ForceRefresh(); // ------ edit control functions // bool IsEditable() const { return m_editable; } void EnableEditing( bool edit ); void EnableCellEditControl( bool enable = true ); void DisableCellEditControl() { EnableCellEditControl(false); } bool CanEnableCellControl() const; bool IsCellEditControlEnabled() const; bool IsCellEditControlShown() const; bool IsCurrentCellReadOnly() const; void ShowCellEditControl(); void HideCellEditControl(); void SaveEditControlValue(); // ------ grid location functions // Note that all of these functions work with the logical coordinates of // grid cells and labels so you will need to convert from device // coordinates for mouse events etc. // wxGridCellCoords XYToCell(int x, int y) const; void XYToCell(int x, int y, wxGridCellCoords& coords) const { coords = XYToCell(x, y); } wxGridCellCoords XYToCell(const wxPoint& pos) const { return XYToCell(pos.x, pos.y); } // these functions return the index of the row/columns corresponding to the // given logical position in pixels // // if clipToMinMax is false (default, wxNOT_FOUND is returned if the // position is outside any row/column, otherwise the first/last element is // returned in this case int YToRow( int y, bool clipToMinMax = false ) const; int XToCol( int x, bool clipToMinMax = false ) const; int YToEdgeOfRow( int y ) const; int XToEdgeOfCol( int x ) const; wxRect CellToRect( int row, int col ) const; wxRect CellToRect( const wxGridCellCoords& coords ) const { return CellToRect( coords.GetRow(), coords.GetCol() ); } int GetGridCursorRow() const { return m_currentCellCoords.GetRow(); } int GetGridCursorCol() const { return m_currentCellCoords.GetCol(); } // check to see if a cell is either wholly visible (the default arg) or // at least partially visible in the grid window // bool IsVisible( int row, int col, bool wholeCellVisible = true ) const; bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true ) const { return IsVisible( coords.GetRow(), coords.GetCol(), wholeCellVisible ); } void MakeCellVisible( int row, int col ); void MakeCellVisible( const wxGridCellCoords& coords ) { MakeCellVisible( coords.GetRow(), coords.GetCol() ); } // ------ grid cursor movement functions // void SetGridCursor(int row, int col) { SetCurrentCell(row, col); } void SetGridCursor(const wxGridCellCoords& c) { SetCurrentCell(c); } void GoToCell(int row, int col) { if ( SetCurrentCell(row, col) ) MakeCellVisible(row, col); } void GoToCell(const wxGridCellCoords& coords) { if ( SetCurrentCell(coords) ) MakeCellVisible(coords); } bool MoveCursorUp( bool expandSelection ); bool MoveCursorDown( bool expandSelection ); bool MoveCursorLeft( bool expandSelection ); bool MoveCursorRight( bool expandSelection ); bool MovePageDown(); bool MovePageUp(); bool MoveCursorUpBlock( bool expandSelection ); bool MoveCursorDownBlock( bool expandSelection ); bool MoveCursorLeftBlock( bool expandSelection ); bool MoveCursorRightBlock( bool expandSelection ); void SetTabBehaviour(TabBehaviour behaviour) { m_tabBehaviour = behaviour; } // ------ label and gridline formatting // int GetDefaultRowLabelSize() const { return WXGRID_DEFAULT_ROW_LABEL_WIDTH; } int GetRowLabelSize() const { return m_rowLabelWidth; } int GetDefaultColLabelSize() const { return WXGRID_DEFAULT_COL_LABEL_HEIGHT; } int GetColLabelSize() const { return m_colLabelHeight; } wxColour GetLabelBackgroundColour() const { return m_labelBackgroundColour; } wxColour GetLabelTextColour() const { return m_labelTextColour; } wxFont GetLabelFont() const { return m_labelFont; } void GetRowLabelAlignment( int *horiz, int *vert ) const; void GetColLabelAlignment( int *horiz, int *vert ) const; void GetCornerLabelAlignment( int *horiz, int *vert ) const; int GetColLabelTextOrientation() const; int GetCornerLabelTextOrientation() const; wxString GetRowLabelValue( int row ) const; wxString GetColLabelValue( int col ) const; wxString GetCornerLabelValue() const; wxColour GetCellHighlightColour() const { return m_cellHighlightColour; } int GetCellHighlightPenWidth() const { return m_cellHighlightPenWidth; } int GetCellHighlightROPenWidth() const { return m_cellHighlightROPenWidth; } // this one will use wxHeaderCtrl for the column labels void UseNativeColHeader(bool native = true); // this one will still draw them manually but using the native renderer // instead of using the same appearance as for the row labels void SetUseNativeColLabels( bool native = true ); void SetRowLabelSize( int width ); void SetColLabelSize( int height ); void HideRowLabels() { SetRowLabelSize( 0 ); } void HideColLabels() { SetColLabelSize( 0 ); } void SetLabelBackgroundColour( const wxColour& ); void SetLabelTextColour( const wxColour& ); void SetLabelFont( const wxFont& ); void SetRowLabelAlignment( int horiz, int vert ); void SetColLabelAlignment( int horiz, int vert ); void SetCornerLabelAlignment( int horiz, int vert ); void SetColLabelTextOrientation( int textOrientation ); void SetCornerLabelTextOrientation( int textOrientation ); void SetRowLabelValue( int row, const wxString& ); void SetColLabelValue( int col, const wxString& ); void SetCornerLabelValue( const wxString& ); void SetCellHighlightColour( const wxColour& ); void SetCellHighlightPenWidth(int width); void SetCellHighlightROPenWidth(int width); // interactive grid mouse operations control // ----------------------------------------- // functions globally enabling row/column interactive resizing (enabled by // default) void EnableDragRowSize( bool enable = true ); void DisableDragRowSize() { EnableDragRowSize( false ); } void EnableDragColSize( bool enable = true ); void DisableDragColSize() { EnableDragColSize( false ); } // if interactive resizing is enabled, some rows/columns can still have // fixed size void DisableRowResize(int row) { DoDisableLineResize(row, m_setFixedRows); } void DisableColResize(int col) { DoDisableLineResize(col, m_setFixedCols); } // these functions return whether the given row/column can be // effectively resized: for this interactive resizing must be enabled // and this index must not have been passed to DisableRow/ColResize() bool CanDragRowSize(int row) const { return m_canDragRowSize && DoCanResizeLine(row, m_setFixedRows); } bool CanDragColSize(int col) const { return m_canDragColSize && DoCanResizeLine(col, m_setFixedCols); } // interactive column reordering (disabled by default) void EnableDragColMove( bool enable = true ); void DisableDragColMove() { EnableDragColMove( false ); } bool CanDragColMove() const { return m_canDragColMove; } // interactive resizing of grid cells (enabled by default) void EnableDragGridSize(bool enable = true); void DisableDragGridSize() { EnableDragGridSize(false); } bool CanDragGridSize() const { return m_canDragGridSize; } // interactive dragging of cells (disabled by default) void EnableDragCell( bool enable = true ); void DisableDragCell() { EnableDragCell( false ); } bool CanDragCell() const { return m_canDragCell; } // grid lines // ---------- // enable or disable drawing of the lines void EnableGridLines(bool enable = true); bool GridLinesEnabled() const { return m_gridLinesEnabled; } // by default grid lines stop at last column/row, but this may be changed void ClipHorzGridLines(bool clip) { DoClipGridLines(m_gridLinesClipHorz, clip); } void ClipVertGridLines(bool clip) { DoClipGridLines(m_gridLinesClipVert, clip); } bool AreHorzGridLinesClipped() const { return m_gridLinesClipHorz; } bool AreVertGridLinesClipped() const { return m_gridLinesClipVert; } // this can be used to change the global grid lines colour void SetGridLineColour(const wxColour& col); wxColour GetGridLineColour() const { return m_gridLineColour; } // these methods may be overridden to customize individual grid lines // appearance virtual wxPen GetDefaultGridLinePen(); virtual wxPen GetRowGridLinePen(int row); virtual wxPen GetColGridLinePen(int col); // attributes // ---------- // this sets the specified attribute for this cell or in this row/col void SetAttr(int row, int col, wxGridCellAttr *attr); void SetRowAttr(int row, wxGridCellAttr *attr); void SetColAttr(int col, wxGridCellAttr *attr); // the grid can cache attributes for the recently used cells (currently it // only caches one attribute for the most recently used one) and might // notice that its value in the attribute provider has changed -- if this // happens, call this function to force it void RefreshAttr(int row, int col); // returns the attribute we may modify in place: a new one if this cell // doesn't have any yet or the existing one if it does // // DecRef() must be called on the returned pointer, as usual wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const; // shortcuts for setting the column parameters // set the format for the data in the column: default is string void SetColFormatBool(int col); void SetColFormatNumber(int col); void SetColFormatFloat(int col, int width = -1, int precision = -1); void SetColFormatCustom(int col, const wxString& typeName); // ------ row and col formatting // int GetDefaultRowSize() const; int GetRowSize( int row ) const; bool IsRowShown(int row) const { return GetRowSize(row) != 0; } int GetDefaultColSize() const; int GetColSize( int col ) const; bool IsColShown(int col) const { return GetColSize(col) != 0; } wxColour GetDefaultCellBackgroundColour() const; wxColour GetCellBackgroundColour( int row, int col ) const; wxColour GetDefaultCellTextColour() const; wxColour GetCellTextColour( int row, int col ) const; wxFont GetDefaultCellFont() const; wxFont GetCellFont( int row, int col ) const; void GetDefaultCellAlignment( int *horiz, int *vert ) const; void GetCellAlignment( int row, int col, int *horiz, int *vert ) const; bool GetDefaultCellOverflow() const; bool GetCellOverflow( int row, int col ) const; // this function returns 1 in num_rows and num_cols for normal cells, // positive numbers for a cell spanning multiple columns/rows (as set with // SetCellSize()) and _negative_ numbers corresponding to the offset of the // top left cell of the span from this one for the other cells covered by // this cell // // the return value is CellSpan_None, CellSpan_Main or CellSpan_Inside for // each of these cases respectively enum CellSpan { CellSpan_Inside = -1, CellSpan_None = 0, CellSpan_Main }; CellSpan GetCellSize( int row, int col, int *num_rows, int *num_cols ) const; wxSize GetCellSize(const wxGridCellCoords& coords) { wxSize s; GetCellSize(coords.GetRow(), coords.GetCol(), &s.x, &s.y); return s; } // ------ row and col sizes void SetDefaultRowSize( int height, bool resizeExistingRows = false ); void SetRowSize( int row, int height ); void HideRow(int row) { DoSetRowSize(row, 0); } void ShowRow(int row) { DoSetRowSize(row, -1); } void SetDefaultColSize( int width, bool resizeExistingCols = false ); void SetColSize( int col, int width ); void HideCol(int col) { DoSetColSize(col, 0); } void ShowCol(int col) { DoSetColSize(col, -1); } // the row and column sizes can be also set all at once using // wxGridSizesInfo which holds all of them at once wxGridSizesInfo GetColSizes() const { return wxGridSizesInfo(GetDefaultColSize(), m_colWidths); } wxGridSizesInfo GetRowSizes() const { return wxGridSizesInfo(GetDefaultRowSize(), m_rowHeights); } void SetColSizes(const wxGridSizesInfo& sizeInfo); void SetRowSizes(const wxGridSizesInfo& sizeInfo); // ------- columns (only, for now) reordering // columns index <-> positions mapping: by default, the position of the // column is the same as its index, but the columns can also be reordered // (either by calling SetColPos() explicitly or by the user dragging the // columns around) in which case their indices don't correspond to their // positions on display any longer // // internally we always work with indices except for the functions which // have "Pos" in their names (and which work with columns, not pixels) and // only the display and hit testing code really cares about display // positions at all // set the positions of all columns at once (this method uses the same // conventions as wxHeaderCtrl::SetColumnsOrder() for the order array) void SetColumnsOrder(const wxArrayInt& order); // return the column index corresponding to the given (valid) position int GetColAt(int pos) const { return m_colAt.empty() ? pos : m_colAt[pos]; } // reorder the columns so that the column with the given index is now shown // as the position pos void SetColPos(int idx, int pos); // return the position at which the column with the given index is // displayed: notice that this is a slow operation as we don't maintain the // reverse mapping currently int GetColPos(int idx) const { if ( m_colAt.IsEmpty() ) return idx; int pos = m_colAt.Index(idx); wxASSERT_MSG( pos != wxNOT_FOUND, "invalid column index" ); return pos; } // reset the columns positions to the default order void ResetColPos(); // automatically size the column or row to fit to its contents, if // setAsMin is true, this optimal width will also be set as minimal width // for this column void AutoSizeColumn( int col, bool setAsMin = true ) { AutoSizeColOrRow(col, setAsMin, wxGRID_COLUMN); } void AutoSizeRow( int row, bool setAsMin = true ) { AutoSizeColOrRow(row, setAsMin, wxGRID_ROW); } // auto size all columns (very ineffective for big grids!) void AutoSizeColumns( bool setAsMin = true ) { (void)SetOrCalcColumnSizes(false, setAsMin); } void AutoSizeRows( bool setAsMin = true ) { (void)SetOrCalcRowSizes(false, setAsMin); } // auto size the grid, that is make the columns/rows of the "right" size // and also set the grid size to just fit its contents void AutoSize(); // Note for both AutoSizeRowLabelSize and AutoSizeColLabelSize: // If col equals to wxGRID_AUTOSIZE value then function autosizes labels column // instead of data column. Note that this operation may be slow for large // tables. // autosize row height depending on label text void AutoSizeRowLabelSize( int row ); // autosize column width depending on label text void AutoSizeColLabelSize( int col ); // column won't be resized to be lesser width - this must be called during // the grid creation because it won't resize the column if it's already // narrower than the minimal width void SetColMinimalWidth( int col, int width ); void SetRowMinimalHeight( int row, int width ); /* These members can be used to query and modify the minimal * acceptable size of grid rows and columns. Call this function in * your code which creates the grid if you want to display cells * with a size smaller than the default acceptable minimum size. * Like the members SetColMinimalWidth and SetRowMinimalWidth, * the existing rows or columns will not be checked/resized. */ void SetColMinimalAcceptableWidth( int width ); void SetRowMinimalAcceptableHeight( int width ); int GetColMinimalAcceptableWidth() const; int GetRowMinimalAcceptableHeight() const; void SetDefaultCellBackgroundColour( const wxColour& ); void SetCellBackgroundColour( int row, int col, const wxColour& ); void SetDefaultCellTextColour( const wxColour& ); void SetCellTextColour( int row, int col, const wxColour& ); void SetDefaultCellFont( const wxFont& ); void SetCellFont( int row, int col, const wxFont& ); void SetDefaultCellAlignment( int horiz, int vert ); void SetCellAlignment( int row, int col, int horiz, int vert ); void SetDefaultCellOverflow( bool allow ); void SetCellOverflow( int row, int col, bool allow ); void SetCellSize( int row, int col, int num_rows, int num_cols ); // takes ownership of the pointer void SetDefaultRenderer(wxGridCellRenderer *renderer); void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer); wxGridCellRenderer *GetDefaultRenderer() const; wxGridCellRenderer* GetCellRenderer(int row, int col) const; // takes ownership of the pointer void SetDefaultEditor(wxGridCellEditor *editor); void SetCellEditor(int row, int col, wxGridCellEditor *editor); wxGridCellEditor *GetDefaultEditor() const; wxGridCellEditor* GetCellEditor(int row, int col) const; // ------ cell value accessors // wxString GetCellValue( int row, int col ) const { if ( m_table ) { return m_table->GetValue( row, col ); } else { return wxEmptyString; } } wxString GetCellValue( const wxGridCellCoords& coords ) const { return GetCellValue( coords.GetRow(), coords.GetCol() ); } void SetCellValue( int row, int col, const wxString& s ); void SetCellValue( const wxGridCellCoords& coords, const wxString& s ) { SetCellValue( coords.GetRow(), coords.GetCol(), s ); } // returns true if the cell can't be edited bool IsReadOnly(int row, int col) const; // make the cell editable/readonly void SetReadOnly(int row, int col, bool isReadOnly = true); // ------ select blocks of cells // void SelectRow( int row, bool addToSelected = false ); void SelectCol( int col, bool addToSelected = false ); void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, bool addToSelected = false ); void SelectBlock( const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, bool addToSelected = false ) { SelectBlock( topLeft.GetRow(), topLeft.GetCol(), bottomRight.GetRow(), bottomRight.GetCol(), addToSelected ); } void SelectAll(); bool IsSelection() const; // ------ deselect blocks or cells // void DeselectRow( int row ); void DeselectCol( int col ); void DeselectCell( int row, int col ); void ClearSelection(); bool IsInSelection( int row, int col ) const; bool IsInSelection( const wxGridCellCoords& coords ) const { return IsInSelection( coords.GetRow(), coords.GetCol() ); } wxGridCellCoordsArray GetSelectedCells() const; wxGridCellCoordsArray GetSelectionBlockTopLeft() const; wxGridCellCoordsArray GetSelectionBlockBottomRight() const; wxArrayInt GetSelectedRows() const; wxArrayInt GetSelectedCols() const; // This function returns the rectangle that encloses the block of cells // limited by TopLeft and BottomRight cell in device coords and clipped // to the client size of the grid window. // wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, const wxGridCellCoords & bottomRight ) const; // Access or update the selection fore/back colours wxColour GetSelectionBackground() const { return m_selectionBackground; } wxColour GetSelectionForeground() const { return m_selectionForeground; } void SetSelectionBackground(const wxColour& c) { m_selectionBackground = c; } void SetSelectionForeground(const wxColour& c) { m_selectionForeground = c; } // Methods for a registry for mapping data types to Renderers/Editors void RegisterDataType(const wxString& typeName, wxGridCellRenderer* renderer, wxGridCellEditor* editor); // DJC MAPTEK virtual wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const; wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const { return GetDefaultEditorForCell(c.GetRow(), c.GetCol()); } virtual wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const; virtual wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const; virtual wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const; // grid may occupy more space than needed for its rows/columns, this // function allows to set how big this extra space is void SetMargins(int extraWidth, int extraHeight) { m_extraWidth = extraWidth; m_extraHeight = extraHeight; CalcDimensions(); } // Accessors for component windows wxWindow* GetGridWindow() const { return (wxWindow*)m_gridWin; } wxWindow* GetGridRowLabelWindow() const { return (wxWindow*)m_rowLabelWin; } wxWindow* GetGridColLabelWindow() const { return m_colWindow; } wxWindow* GetGridCornerLabelWindow() const { return (wxWindow*)m_cornerLabelWin; } // This one can only be called if we are using the native header window wxHeaderCtrl *GetGridColHeader() const { wxASSERT_MSG( m_useNativeHeader, "no column header window" ); // static_cast<> doesn't work without the full class declaration in // view and we prefer to avoid adding more compile-time dependencies // even at the cost of using reinterpret_cast<> return reinterpret_cast<wxHeaderCtrl *>(m_colWindow); } // Allow adjustment of scroll increment. The default is (15, 15). void SetScrollLineX(int x) { m_xScrollPixelsPerLine = x; } void SetScrollLineY(int y) { m_yScrollPixelsPerLine = y; } int GetScrollLineX() const { return m_xScrollPixelsPerLine; } int GetScrollLineY() const { return m_yScrollPixelsPerLine; } // ------- drag and drop #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget(wxDropTarget *dropTarget) wxOVERRIDE; #endif // wxUSE_DRAG_AND_DROP // ------- sorting support // wxGrid doesn't support sorting on its own but it can indicate the sort // order in the column header (currently only if native header control is // used though) // return the column currently displaying the sort indicator or wxNOT_FOUND // if none int GetSortingColumn() const { return m_sortCol; } // return true if this column is currently used for sorting bool IsSortingBy(int col) const { return GetSortingColumn() == col; } // return the current sorting order (on GetSortingColumn()): true for // ascending sort and false for descending; it doesn't make sense to call // it if GetSortingColumn() returns wxNOT_FOUND bool IsSortOrderAscending() const { return m_sortIsAscending; } // set the sorting column (or unsets any existing one if wxNOT_FOUND) and // the order in which to sort void SetSortingColumn(int col, bool ascending = true); // unset any existing sorting column void UnsetSortingColumn() { SetSortingColumn(wxNOT_FOUND); } #if WXWIN_COMPATIBILITY_2_8 // ------ For compatibility with previous wxGrid only... // // ************************************************ // ** Don't use these in new code because they ** // ** are liable to disappear in a future ** // ** revision ** // ************************************************ // wxGrid( wxWindow *parent, int x, int y, int w = wxDefaultCoord, int h = wxDefaultCoord, long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr ) { Init(); Create(parent, wxID_ANY, wxPoint(x, y), wxSize(w, h), style, name); } void SetCellValue( const wxString& val, int row, int col ) { SetCellValue( row, col, val ); } void UpdateDimensions() { CalcDimensions(); } int GetRows() const { return GetNumberRows(); } int GetCols() const { return GetNumberCols(); } int GetCursorRow() const { return GetGridCursorRow(); } int GetCursorColumn() const { return GetGridCursorCol(); } int GetScrollPosX() const { return 0; } int GetScrollPosY() const { return 0; } void SetScrollX( int WXUNUSED(x) ) { } void SetScrollY( int WXUNUSED(y) ) { } void SetColumnWidth( int col, int width ) { SetColSize( col, width ); } int GetColumnWidth( int col ) const { return GetColSize( col ); } void SetRowHeight( int row, int height ) { SetRowSize( row, height ); } // GetRowHeight() is below int GetViewHeight() const // returned num whole rows visible { return 0; } int GetViewWidth() const // returned num whole cols visible { return 0; } void SetLabelSize( int orientation, int sz ) { if ( orientation == wxHORIZONTAL ) SetColLabelSize( sz ); else SetRowLabelSize( sz ); } int GetLabelSize( int orientation ) const { if ( orientation == wxHORIZONTAL ) return GetColLabelSize(); else return GetRowLabelSize(); } void SetLabelAlignment( int orientation, int align ) { if ( orientation == wxHORIZONTAL ) SetColLabelAlignment( align, wxALIGN_INVALID ); else SetRowLabelAlignment( align, wxALIGN_INVALID ); } int GetLabelAlignment( int orientation, int WXUNUSED(align) ) const { int h, v; if ( orientation == wxHORIZONTAL ) { GetColLabelAlignment( &h, &v ); return h; } else { GetRowLabelAlignment( &h, &v ); return h; } } void SetLabelValue( int orientation, const wxString& val, int pos ) { if ( orientation == wxHORIZONTAL ) SetColLabelValue( pos, val ); else SetRowLabelValue( pos, val ); } wxString GetLabelValue( int orientation, int pos) const { if ( orientation == wxHORIZONTAL ) return GetColLabelValue( pos ); else return GetRowLabelValue( pos ); } wxFont GetCellTextFont() const { return m_defaultCellAttr->GetFont(); } wxFont GetCellTextFont(int WXUNUSED(row), int WXUNUSED(col)) const { return m_defaultCellAttr->GetFont(); } void SetCellTextFont(const wxFont& fnt) { SetDefaultCellFont( fnt ); } void SetCellTextFont(const wxFont& fnt, int row, int col) { SetCellFont( row, col, fnt ); } void SetCellTextColour(const wxColour& val, int row, int col) { SetCellTextColour( row, col, val ); } void SetCellTextColour(const wxColour& col) { SetDefaultCellTextColour( col ); } void SetCellBackgroundColour(const wxColour& col) { SetDefaultCellBackgroundColour( col ); } void SetCellBackgroundColour(const wxColour& colour, int row, int col) { SetCellBackgroundColour( row, col, colour ); } bool GetEditable() const { return IsEditable(); } void SetEditable( bool edit = true ) { EnableEditing( edit ); } bool GetEditInPlace() const { return IsCellEditControlEnabled(); } void SetEditInPlace(bool WXUNUSED(edit) = true) { } void SetCellAlignment( int align, int row, int col) { SetCellAlignment(row, col, align, wxALIGN_CENTER); } void SetCellAlignment( int WXUNUSED(align) ) {} void SetCellBitmap(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(row), int WXUNUSED(col)) { } void SetDividerPen(const wxPen& WXUNUSED(pen)) { } wxPen& GetDividerPen() const; void OnActivate(bool WXUNUSED(active)) {} // ******** End of compatibility functions ********** // ------ control IDs enum { wxGRID_CELLCTRL = 2000, wxGRID_TOPCTRL }; // ------ control types enum { wxGRID_TEXTCTRL = 2100, wxGRID_CHECKBOX, wxGRID_CHOICE, wxGRID_COMBOBOX }; wxDEPRECATED_INLINE(bool CanDragRowSize() const, return m_canDragRowSize; ) wxDEPRECATED_INLINE(bool CanDragColSize() const, return m_canDragColSize; ) #endif // WXWIN_COMPATIBILITY_2_8 // override some base class functions virtual bool Enable(bool enable = true) wxOVERRIDE; virtual wxWindow *GetMainWindowOfCompositeControl() wxOVERRIDE { return (wxWindow*)m_gridWin; } virtual void Fit() wxOVERRIDE; // implementation only void CancelMouseCapture(); protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; bool m_created; wxGridWindow *m_gridWin; wxGridCornerLabelWindow *m_cornerLabelWin; wxGridRowLabelWindow *m_rowLabelWin; // the real type of the column window depends on m_useNativeHeader value: // if it is true, its dynamic type is wxHeaderCtrl, otherwise it is // wxGridColLabelWindow, use accessors below when the real type matters wxWindow *m_colWindow; wxGridColLabelWindow *GetColLabelWindow() const { wxASSERT_MSG( !m_useNativeHeader, "no column label window" ); return reinterpret_cast<wxGridColLabelWindow *>(m_colWindow); } wxGridTableBase *m_table; bool m_ownTable; int m_numRows; int m_numCols; wxGridCellCoords m_currentCellCoords; // the corners of the block being currently selected or wxGridNoCellCoords wxGridCellCoords m_selectedBlockTopLeft; wxGridCellCoords m_selectedBlockBottomRight; // when selecting blocks of cells (either from the keyboard using Shift // with cursor keys, or by dragging the mouse), the selection is anchored // at m_currentCellCoords which defines one of the corners of the rectangle // being selected -- and this variable defines the other corner, i.e. it's // either m_selectedBlockTopLeft or m_selectedBlockBottomRight depending on // which of them is not m_currentCellCoords // // if no block selection is in process, it is set to wxGridNoCellCoords wxGridCellCoords m_selectedBlockCorner; wxGridSelection *m_selection; wxColour m_selectionBackground; wxColour m_selectionForeground; // NB: *never* access m_row/col arrays directly because they are created // on demand, *always* use accessor functions instead! // init the m_rowHeights/Bottoms arrays with default values void InitRowHeights(); int m_defaultRowHeight; int m_minAcceptableRowHeight; wxArrayInt m_rowHeights; wxArrayInt m_rowBottoms; // init the m_colWidths/Rights arrays void InitColWidths(); int m_defaultColWidth; int m_minAcceptableColWidth; wxArrayInt m_colWidths; wxArrayInt m_colRights; int m_sortCol; bool m_sortIsAscending; bool m_useNativeHeader, m_nativeColumnLabels; // get the col/row coords int GetColWidth(int col) const; int GetColLeft(int col) const; int GetColRight(int col) const; // this function must be public for compatibility... public: int GetRowHeight(int row) const; protected: int GetRowTop(int row) const; int GetRowBottom(int row) const; int m_rowLabelWidth; int m_colLabelHeight; // the size of the margin left to the right and bottom of the cell area int m_extraWidth, m_extraHeight; wxColour m_labelBackgroundColour; wxColour m_labelTextColour; wxFont m_labelFont; int m_rowLabelHorizAlign; int m_rowLabelVertAlign; int m_colLabelHorizAlign; int m_colLabelVertAlign; int m_colLabelTextOrientation; int m_cornerLabelHorizAlign; int m_cornerLabelVertAlign; int m_cornerLabelTextOrientation; bool m_defaultRowLabelValues; bool m_defaultColLabelValues; wxColour m_gridLineColour; bool m_gridLinesEnabled; bool m_gridLinesClipHorz, m_gridLinesClipVert; wxColour m_cellHighlightColour; int m_cellHighlightPenWidth; int m_cellHighlightROPenWidth; // common part of AutoSizeColumn/Row() and GetBestSize() int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = true); int SetOrCalcRowSizes(bool calcOnly, bool setAsMin = true); // common part of AutoSizeColumn/Row() void AutoSizeColOrRow(int n, bool setAsMin, wxGridDirection direction); // Calculate the minimum acceptable size for labels area wxCoord CalcColOrRowLabelAreaMinSize(wxGridDirection direction); // if a column has a minimal width, it will be the value for it in this // hash table wxLongToLongHashMap m_colMinWidths, m_rowMinHeights; // get the minimal width of the given column/row int GetColMinimalWidth(int col) const; int GetRowMinimalHeight(int col) const; // do we have some place to store attributes in? bool CanHaveAttributes() const; // cell attribute cache (currently we only cache 1, may be will do // more/better later) struct CachedAttr { int row, col; wxGridCellAttr *attr; } m_attrCache; // invalidates the attribute cache void ClearAttrCache(); // adds an attribute to cache void CacheAttr(int row, int col, wxGridCellAttr *attr) const; // looks for an attr in cache, returns true if found bool LookupAttr(int row, int col, wxGridCellAttr **attr) const; // looks for the attr in cache, if not found asks the table and caches the // result wxGridCellAttr *GetCellAttr(int row, int col) const; wxGridCellAttr *GetCellAttr(const wxGridCellCoords& coords ) const { return GetCellAttr( coords.GetRow(), coords.GetCol() ); } // the default cell attr object for cells that don't have their own wxGridCellAttr* m_defaultCellAttr; bool m_inOnKeyDown; int m_batchCount; wxGridTypeRegistry* m_typeRegistry; enum CursorMode { WXGRID_CURSOR_SELECT_CELL, WXGRID_CURSOR_RESIZE_ROW, WXGRID_CURSOR_RESIZE_COL, WXGRID_CURSOR_SELECT_ROW, WXGRID_CURSOR_SELECT_COL, WXGRID_CURSOR_MOVE_COL }; // this method not only sets m_cursorMode but also sets the correct cursor // for the given mode and, if captureMouse is not false releases the mouse // if it was captured and captures it if it must be captured // // for this to work, you should always use it and not set m_cursorMode // directly! void ChangeCursorMode(CursorMode mode, wxWindow *win = NULL, bool captureMouse = true); wxWindow *m_winCapture; // the window which captured the mouse // this variable is used not for finding the correct current cursor but // mainly for finding out what is going to happen if the mouse starts being // dragged right now // // by default it is WXGRID_CURSOR_SELECT_CELL meaning that nothing else is // going on, and it is set to one of RESIZE/SELECT/MOVE values while the // corresponding operation will be started if the user starts dragging the // mouse from the current position CursorMode m_cursorMode; //Column positions wxArrayInt m_colAt; bool m_canDragRowSize; bool m_canDragColSize; bool m_canDragColMove; bool m_canDragGridSize; bool m_canDragCell; // the last position (horizontal or vertical depending on whether the user // is resizing a column or a row) where a row or column separator line was // dragged by the user or -1 of there is no drag operation in progress int m_dragLastPos; int m_dragRowOrCol; // true if a drag operation is in progress; when this is true, // m_startDragPos is valid, i.e. not wxDefaultPosition bool m_isDragging; // the position (in physical coordinates) where the user started dragging // the mouse or wxDefaultPosition if mouse isn't being dragged // // notice that this can be != wxDefaultPosition while m_isDragging is still // false because we wait until the mouse is moved some distance away before // setting m_isDragging to true wxPoint m_startDragPos; bool m_waitForSlowClick; wxGridCellCoords m_selectionStart; wxCursor m_rowResizeCursor; wxCursor m_colResizeCursor; bool m_editable; // applies to whole grid bool m_cellEditCtrlEnabled; // is in-place edit currently shown? TabBehaviour m_tabBehaviour; // determines how the TAB key behaves void Init(); // common part of all ctors void Create(); void CreateColumnWindow(); void CalcDimensions(); void CalcWindowSizes(); bool Redimension( wxGridTableMessage& ); // generate the appropriate grid event and return -1 if it was vetoed, 1 if // it was processed (but not vetoed) and 0 if it wasn't processed int SendEvent(wxEventType evtType, int row, int col, const wxMouseEvent& e); int SendEvent(wxEventType evtType, const wxGridCellCoords& coords, const wxMouseEvent& e) { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), e); } int SendEvent(wxEventType evtType, int row, int col, const wxString& s = wxString()); int SendEvent(wxEventType evtType, const wxGridCellCoords& coords, const wxString& s = wxString()) { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), s); } int SendEvent(wxEventType evtType, const wxString& s = wxString()) { return SendEvent(evtType, m_currentCellCoords, s); } // send wxEVT_GRID_{ROW,COL}_SIZE or wxEVT_GRID_COL_AUTO_SIZE, return true // if the event was processed, false otherwise bool SendGridSizeEvent(wxEventType type, int row, int col, const wxMouseEvent& mouseEv); void OnPaint( wxPaintEvent& ); void OnSize( wxSizeEvent& ); void OnKeyDown( wxKeyEvent& ); void OnKeyUp( wxKeyEvent& ); void OnChar( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); void OnHideEditor( wxCommandEvent& ); bool SetCurrentCell( const wxGridCellCoords& coords ); bool SetCurrentCell( int row, int col ) { return SetCurrentCell( wxGridCellCoords(row, col) ); } // this function is called to extend the block being currently selected // from mouse and keyboard event handlers void UpdateBlockBeingSelected(int topRow, int leftCol, int bottomRow, int rightCol); void UpdateBlockBeingSelected(const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight) { UpdateBlockBeingSelected(topLeft.GetRow(), topLeft.GetCol(), bottomRight.GetRow(), bottomRight.GetCol()); } friend class WXDLLIMPEXP_FWD_CORE wxGridSelection; friend class wxGridRowOperations; friend class wxGridColumnOperations; // they call our private Process{{Corner,Col,Row}Label,GridCell}MouseEvent() friend class wxGridCornerLabelWindow; friend class wxGridColLabelWindow; friend class wxGridRowLabelWindow; friend class wxGridWindow; friend class wxGridHeaderRenderer; friend class wxGridHeaderCtrl; private: // implement wxScrolledWindow method to return m_gridWin size virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size) wxOVERRIDE; // redraw the grid lines, should be called after changing their attributes void RedrawGridLines(); // draw all grid lines in the given cell region (unlike the public // DrawAllGridLines() which just draws all of them) void DrawRangeGridLines(wxDC& dc, const wxRegion& reg, const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight); // draw all lines from top to bottom row and left to right column in the // rectangle determined by (top, left)-(bottom, right) -- but notice that // the caller must have set up the clipping correctly, this rectangle is // only used here for optimization void DoDrawGridLines(wxDC& dc, int top, int left, int bottom, int right, int topRow, int leftCol, int bottomRight, int rightCol); // common part of Clip{Horz,Vert}GridLines void DoClipGridLines(bool& var, bool clip); // update the sorting indicator shown in the specified column (whose index // must be valid) // // this will use GetSortingColumn() and IsSortOrderAscending() to determine // the sorting indicator to effectively show void UpdateColumnSortingIndicator(int col); // update the grid after changing the columns order (common part of // SetColPos() and ResetColPos()) void RefreshAfterColPosChange(); // reset the variables used during dragging operations after it ended, // either because we called EndDraggingIfNecessary() ourselves or because // we lost mouse capture void DoAfterDraggingEnd(); // release the mouse capture if it's currently captured void EndDraggingIfNecessary(); // return the position (not index) of the column at the given logical pixel // position // // this always returns a valid position, even if the coordinate is out of // bounds (in which case first/last column is returned) int XToPos(int x) const; // event handlers and their helpers // -------------------------------- // process mouse drag event in WXGRID_CURSOR_SELECT_CELL mode bool DoGridCellDrag(wxMouseEvent& event, const wxGridCellCoords& coords, bool isFirstDrag); // process row/column resizing drag event void DoGridLineDrag(wxMouseEvent& event, const wxGridOperations& oper); // process mouse drag event in the grid window, return false if starting // dragging was vetoed by the user-defined wxEVT_GRID_CELL_BEGIN_DRAG // handler bool DoGridDragEvent(wxMouseEvent& event, const wxGridCellCoords& coords, bool isFirstDrag); // process different clicks on grid cells void DoGridCellLeftDown(wxMouseEvent& event, const wxGridCellCoords& coords, const wxPoint& pos); void DoGridCellLeftDClick(wxMouseEvent& event, const wxGridCellCoords& coords, const wxPoint& pos); void DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords); // process movement (but not dragging) event in the grid cell area void DoGridMouseMoveEvent(wxMouseEvent& event, const wxGridCellCoords& coords, const wxPoint& pos); // process mouse events in the grid window void ProcessGridCellMouseEvent(wxMouseEvent& event); // process mouse events in the row/column labels/corner windows void ProcessRowLabelMouseEvent(wxMouseEvent& event); void ProcessColLabelMouseEvent(wxMouseEvent& event); void ProcessCornerLabelMouseEvent(wxMouseEvent& event); void DoColHeaderClick(int col); void DoStartResizeCol(int col); void DoUpdateResizeCol(int x); void DoUpdateResizeColWidth(int w); void DoStartMoveCol(int col); void DoEndDragResizeRow(const wxMouseEvent& event); void DoEndDragResizeCol(const wxMouseEvent& event); void DoEndMoveCol(int pos); // process a TAB keypress void DoGridProcessTab(wxKeyboardState& kbdState); // common implementations of methods defined for both rows and columns void DeselectLine(int line, const wxGridOperations& oper); bool DoEndDragResizeLine(const wxGridOperations& oper); int PosToLinePos(int pos, bool clipToMinMax, const wxGridOperations& oper) const; int PosToLine(int pos, bool clipToMinMax, const wxGridOperations& oper) const; int PosToEdgeOfLine(int pos, const wxGridOperations& oper) const; bool DoMoveCursor(bool expandSelection, const wxGridDirectionOperations& diroper); bool DoMoveCursorByPage(const wxGridDirectionOperations& diroper); bool DoMoveCursorByBlock(bool expandSelection, const wxGridDirectionOperations& diroper); void AdvanceToNextNonEmpty(wxGridCellCoords& coords, const wxGridDirectionOperations& diroper); // common part of {Insert,Delete}{Rows,Cols} bool DoModifyLines(bool (wxGridTableBase::*funcModify)(size_t, size_t), int pos, int num, bool updateLabels); // Append{Rows,Cols} is a bit different because of one less parameter bool DoAppendLines(bool (wxGridTableBase::*funcAppend)(size_t), int num, bool updateLabels); // common part of Set{Col,Row}Sizes void DoSetSizes(const wxGridSizesInfo& sizeInfo, const wxGridOperations& oper); // common part of Disable{Row,Col}Resize and CanDrag{Row,Col}Size void DoDisableLineResize(int line, wxGridFixedIndicesSet *& setFixed); bool DoCanResizeLine(int line, const wxGridFixedIndicesSet *setFixed) const; // Helper of Render(): get grid size, origin offset and fill cell arrays void GetRenderSizes( const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, wxPoint& pointOffSet, wxSize& sizeGrid, wxGridCellCoordsArray& renderCells, wxArrayInt& arrayCols, wxArrayInt& arrayRows ); // Helper of Render(): set the scale to draw the cells at the right size. void SetRenderScale( wxDC& dc, const wxPoint& pos, const wxSize& size, const wxSize& sizeGrid ); // Helper of Render(): get render start position from passed parameter wxPoint GetRenderPosition( wxDC& dc, const wxPoint& position ); // Helper of Render(): draws a box around the rendered area void DoRenderBox( wxDC& dc, const int& style, const wxPoint& pointOffSet, const wxSize& sizeCellArea, const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight ); // Implementation of public Set{Row,Col}Size() and {Hide,Show}{Row,Col}(). // They interpret their height or width parameter slightly different from // the public methods where -1 in it means "auto fit to the label" for the // compatibility reasons. Here it means "show a previously hidden row or // column" while 0 means "hide it" just as in the public methods. And any // positive values are handled naturally, i.e. they just specify the size. void DoSetRowSize( int row, int height ); void DoSetColSize( int col, int width ); // these sets contain the indices of fixed, i.e. non-resizable // interactively, grid rows or columns and are NULL if there are no fixed // elements (which is the default) wxGridFixedIndicesSet *m_setFixedRows, *m_setFixedCols; wxDECLARE_DYNAMIC_CLASS(wxGrid); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxGrid); }; // ---------------------------------------------------------------------------- // wxGridUpdateLocker prevents updates to a grid during its lifetime // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridUpdateLocker { public: // if the pointer is NULL, Create() can be called later wxGridUpdateLocker(wxGrid *grid = NULL) { Init(grid); } // can be called if ctor was used with a NULL pointer, must not be called // more than once void Create(wxGrid *grid) { wxASSERT_MSG( !m_grid, wxT("shouldn't be called more than once") ); Init(grid); } ~wxGridUpdateLocker() { if ( m_grid ) m_grid->EndBatch(); } private: void Init(wxGrid *grid) { m_grid = grid; if ( m_grid ) m_grid->BeginBatch(); } wxGrid *m_grid; wxDECLARE_NO_COPY_CLASS(wxGridUpdateLocker); }; // ---------------------------------------------------------------------------- // Grid event class and event types // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGridEvent : public wxNotifyEvent, public wxKeyboardState { public: wxGridEvent() : wxNotifyEvent() { Init(-1, -1, -1, -1, false); } wxGridEvent(int id, wxEventType type, wxObject* obj, int row = -1, int col = -1, int x = -1, int y = -1, bool sel = true, const wxKeyboardState& kbd = wxKeyboardState()) : wxNotifyEvent(type, id), wxKeyboardState(kbd) { Init(row, col, x, y, sel); SetEventObject(obj); } // explicitly specifying inline allows gcc < 3.4 to // handle the deprecation attribute even in the constructor. wxDEPRECATED_CONSTRUCTOR( wxGridEvent(int id, wxEventType type, wxObject* obj, int row, int col, int x, int y, bool sel, bool control, bool shift = false, bool alt = false, bool meta = false)); virtual int GetRow() { return m_row; } virtual int GetCol() { return m_col; } wxPoint GetPosition() { return wxPoint( m_x, m_y ); } bool Selecting() { return m_selecting; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxGridEvent(*this); } protected: int m_row; int m_col; int m_x; int m_y; bool m_selecting; private: void Init(int row, int col, int x, int y, bool sel) { m_row = row; m_col = col; m_x = x; m_y = y; m_selecting = sel; } wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEvent); }; class WXDLLIMPEXP_CORE wxGridSizeEvent : public wxNotifyEvent, public wxKeyboardState { public: wxGridSizeEvent() : wxNotifyEvent() { Init(-1, -1, -1); } wxGridSizeEvent(int id, wxEventType type, wxObject* obj, int rowOrCol = -1, int x = -1, int y = -1, const wxKeyboardState& kbd = wxKeyboardState()) : wxNotifyEvent(type, id), wxKeyboardState(kbd) { Init(rowOrCol, x, y); SetEventObject(obj); } wxDEPRECATED_CONSTRUCTOR( wxGridSizeEvent(int id, wxEventType type, wxObject* obj, int rowOrCol, int x, int y, bool control, bool shift = false, bool alt = false, bool meta = false) ); int GetRowOrCol() { return m_rowOrCol; } wxPoint GetPosition() { return wxPoint( m_x, m_y ); } virtual wxEvent *Clone() const wxOVERRIDE { return new wxGridSizeEvent(*this); } protected: int m_rowOrCol; int m_x; int m_y; private: void Init(int rowOrCol, int x, int y) { m_rowOrCol = rowOrCol; m_x = x; m_y = y; } wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridSizeEvent); }; class WXDLLIMPEXP_CORE wxGridRangeSelectEvent : public wxNotifyEvent, public wxKeyboardState { public: wxGridRangeSelectEvent() : wxNotifyEvent() { Init(wxGridNoCellCoords, wxGridNoCellCoords, false); } wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj, const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, bool sel = true, const wxKeyboardState& kbd = wxKeyboardState()) : wxNotifyEvent(type, id), wxKeyboardState(kbd) { Init(topLeft, bottomRight, sel); SetEventObject(obj); } wxDEPRECATED_CONSTRUCTOR( wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj, const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, bool sel, bool control, bool shift = false, bool alt = false, bool meta = false) ); wxGridCellCoords GetTopLeftCoords() { return m_topLeft; } wxGridCellCoords GetBottomRightCoords() { return m_bottomRight; } int GetTopRow() { return m_topLeft.GetRow(); } int GetBottomRow() { return m_bottomRight.GetRow(); } int GetLeftCol() { return m_topLeft.GetCol(); } int GetRightCol() { return m_bottomRight.GetCol(); } bool Selecting() { return m_selecting; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxGridRangeSelectEvent(*this); } protected: void Init(const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, bool selecting) { m_topLeft = topLeft; m_bottomRight = bottomRight; m_selecting = selecting; } wxGridCellCoords m_topLeft; wxGridCellCoords m_bottomRight; bool m_selecting; wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridRangeSelectEvent); }; class WXDLLIMPEXP_CORE wxGridEditorCreatedEvent : public wxCommandEvent { public: wxGridEditorCreatedEvent() : wxCommandEvent() { m_row = 0; m_col = 0; m_ctrl = NULL; } wxGridEditorCreatedEvent(int id, wxEventType type, wxObject* obj, int row, int col, wxControl* ctrl); int GetRow() { return m_row; } int GetCol() { return m_col; } wxControl* GetControl() { return m_ctrl; } void SetRow(int row) { m_row = row; } void SetCol(int col) { m_col = col; } void SetControl(wxControl* ctrl) { m_ctrl = ctrl; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxGridEditorCreatedEvent(*this); } private: int m_row; int m_col; wxControl* m_ctrl; wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEditorCreatedEvent); }; wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_LEFT_CLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_RIGHT_DCLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_LABEL_RIGHT_DCLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_ROW_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_AUTO_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_CHANGING, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_CHANGED, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_SELECT_CELL, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_EDITOR_SHOWN, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_EDITOR_HIDDEN, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_BEGIN_DRAG, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_MOVE, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_SORT, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_TABBING, wxGridEvent ); typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&); typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&); typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&); typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreatedEvent&); #define wxGridEventHandler(func) \ wxEVENT_HANDLER_CAST(wxGridEventFunction, func) #define wxGridSizeEventHandler(func) \ wxEVENT_HANDLER_CAST(wxGridSizeEventFunction, func) #define wxGridRangeSelectEventHandler(func) \ wxEVENT_HANDLER_CAST(wxGridRangeSelectEventFunction, func) #define wxGridEditorCreatedEventHandler(func) \ wxEVENT_HANDLER_CAST(wxGridEditorCreatedEventFunction, func) #define wx__DECLARE_GRIDEVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEventHandler(fn)) #define wx__DECLARE_GRIDSIZEEVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridSizeEventHandler(fn)) #define wx__DECLARE_GRIDRANGESELEVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridRangeSelectEventHandler(fn)) #define wx__DECLARE_GRIDEDITOREVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEditorCreatedEventHandler(fn)) #define EVT_GRID_CMD_CELL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_CLICK, id, fn) #define EVT_GRID_CMD_CELL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_CLICK, id, fn) #define EVT_GRID_CMD_CELL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_DCLICK, id, fn) #define EVT_GRID_CMD_CELL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_DCLICK, id, fn) #define EVT_GRID_CMD_LABEL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_CLICK, id, fn) #define EVT_GRID_CMD_LABEL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_CLICK, id, fn) #define EVT_GRID_CMD_LABEL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_DCLICK, id, fn) #define EVT_GRID_CMD_LABEL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_DCLICK, id, fn) #define EVT_GRID_CMD_ROW_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_SIZE, id, fn) #define EVT_GRID_CMD_COL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_SIZE, id, fn) #define EVT_GRID_CMD_COL_AUTO_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_AUTO_SIZE, id, fn) #define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDEVT(COL_MOVE, id, fn) #define EVT_GRID_CMD_COL_SORT(id, fn) wx__DECLARE_GRIDEVT(COL_SORT, id, fn) #define EVT_GRID_CMD_RANGE_SELECT(id, fn) wx__DECLARE_GRIDRANGESELEVT(RANGE_SELECT, id, fn) #define EVT_GRID_CMD_CELL_CHANGING(id, fn) wx__DECLARE_GRIDEVT(CELL_CHANGING, id, fn) #define EVT_GRID_CMD_CELL_CHANGED(id, fn) wx__DECLARE_GRIDEVT(CELL_CHANGED, id, fn) #define EVT_GRID_CMD_SELECT_CELL(id, fn) wx__DECLARE_GRIDEVT(SELECT_CELL, id, fn) #define EVT_GRID_CMD_EDITOR_SHOWN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_SHOWN, id, fn) #define EVT_GRID_CMD_EDITOR_HIDDEN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_HIDDEN, id, fn) #define EVT_GRID_CMD_EDITOR_CREATED(id, fn) wx__DECLARE_GRIDEDITOREVT(EDITOR_CREATED, id, fn) #define EVT_GRID_CMD_CELL_BEGIN_DRAG(id, fn) wx__DECLARE_GRIDEVT(CELL_BEGIN_DRAG, id, fn) #define EVT_GRID_CMD_TABBING(id, fn) wx__DECLARE_GRIDEVT(TABBING, id, fn) // same as above but for any id (exists mainly for backwards compatibility but // then it's also true that you rarely have multiple grid in the same window) #define EVT_GRID_CELL_LEFT_CLICK(fn) EVT_GRID_CMD_CELL_LEFT_CLICK(wxID_ANY, fn) #define EVT_GRID_CELL_RIGHT_CLICK(fn) EVT_GRID_CMD_CELL_RIGHT_CLICK(wxID_ANY, fn) #define EVT_GRID_CELL_LEFT_DCLICK(fn) EVT_GRID_CMD_CELL_LEFT_DCLICK(wxID_ANY, fn) #define EVT_GRID_CELL_RIGHT_DCLICK(fn) EVT_GRID_CMD_CELL_RIGHT_DCLICK(wxID_ANY, fn) #define EVT_GRID_LABEL_LEFT_CLICK(fn) EVT_GRID_CMD_LABEL_LEFT_CLICK(wxID_ANY, fn) #define EVT_GRID_LABEL_RIGHT_CLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_CLICK(wxID_ANY, fn) #define EVT_GRID_LABEL_LEFT_DCLICK(fn) EVT_GRID_CMD_LABEL_LEFT_DCLICK(wxID_ANY, fn) #define EVT_GRID_LABEL_RIGHT_DCLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_DCLICK(wxID_ANY, fn) #define EVT_GRID_ROW_SIZE(fn) EVT_GRID_CMD_ROW_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_SIZE(fn) EVT_GRID_CMD_COL_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_AUTO_SIZE(fn) EVT_GRID_CMD_COL_AUTO_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_MOVE(fn) EVT_GRID_CMD_COL_MOVE(wxID_ANY, fn) #define EVT_GRID_COL_SORT(fn) EVT_GRID_CMD_COL_SORT(wxID_ANY, fn) #define EVT_GRID_RANGE_SELECT(fn) EVT_GRID_CMD_RANGE_SELECT(wxID_ANY, fn) #define EVT_GRID_CELL_CHANGING(fn) EVT_GRID_CMD_CELL_CHANGING(wxID_ANY, fn) #define EVT_GRID_CELL_CHANGED(fn) EVT_GRID_CMD_CELL_CHANGED(wxID_ANY, fn) #define EVT_GRID_SELECT_CELL(fn) EVT_GRID_CMD_SELECT_CELL(wxID_ANY, fn) #define EVT_GRID_EDITOR_SHOWN(fn) EVT_GRID_CMD_EDITOR_SHOWN(wxID_ANY, fn) #define EVT_GRID_EDITOR_HIDDEN(fn) EVT_GRID_CMD_EDITOR_HIDDEN(wxID_ANY, fn) #define EVT_GRID_EDITOR_CREATED(fn) EVT_GRID_CMD_EDITOR_CREATED(wxID_ANY, fn) #define EVT_GRID_CELL_BEGIN_DRAG(fn) EVT_GRID_CMD_CELL_BEGIN_DRAG(wxID_ANY, fn) #define EVT_GRID_TABBING(fn) EVT_GRID_CMD_TABBING(wxID_ANY, fn) // we used to have a single wxEVT_GRID_CELL_CHANGE event but it was split into // wxEVT_GRID_CELL_CHANGING and CHANGED ones in wx 2.9.0, however the CHANGED // is basically the same as the old CHANGE event so we keep the name for // compatibility #if WXWIN_COMPATIBILITY_2_8 #define wxEVT_GRID_CELL_CHANGE wxEVT_GRID_CELL_CHANGED #define EVT_GRID_CMD_CELL_CHANGE EVT_GRID_CMD_CELL_CHANGED #define EVT_GRID_CELL_CHANGE EVT_GRID_CELL_CHANGED #endif // WXWIN_COMPATIBILITY_2_8 #if 0 // TODO: implement these ? others ? extern const int wxEVT_GRID_CREATE_CELL; extern const int wxEVT_GRID_CHANGE_LABELS; extern const int wxEVT_GRID_CHANGE_SEL_LABEL; #define EVT_GRID_CREATE_CELL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), #define EVT_GRID_CHANGE_LABELS(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), #define EVT_GRID_CHANGE_SEL_LABEL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), #endif #endif // wxUSE_GRID #endif // _WX_GENERIC_GRID_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/infobar.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/infobar.h // Purpose: generic wxInfoBar class declaration // Author: Vadim Zeitlin // Created: 2009-07-28 // Copyright: (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_INFOBAR_H_ #define _WX_GENERIC_INFOBAR_H_ class WXDLLIMPEXP_FWD_CORE wxBitmapButton; class WXDLLIMPEXP_FWD_CORE wxStaticBitmap; class WXDLLIMPEXP_FWD_CORE wxStaticText; // ---------------------------------------------------------------------------- // wxInfoBar // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxInfoBarGeneric : public wxInfoBarBase { public: // the usual ctors and Create() but remember that info bar is created // hidden wxInfoBarGeneric() { Init(); } wxInfoBarGeneric(wxWindow *parent, wxWindowID winid = wxID_ANY) { Init(); Create(parent, winid); } bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY); // implement base class methods // ---------------------------- virtual void ShowMessage(const wxString& msg, int flags = wxICON_INFORMATION) wxOVERRIDE; virtual void Dismiss() wxOVERRIDE; virtual void AddButton(wxWindowID btnid, const wxString& label = wxString()) wxOVERRIDE; virtual void RemoveButton(wxWindowID btnid) wxOVERRIDE; virtual size_t GetButtonCount() const wxOVERRIDE; virtual wxWindowID GetButtonId(size_t idx) const wxOVERRIDE; virtual bool HasButtonId(wxWindowID btnid) const wxOVERRIDE; // methods specific to this version // -------------------------------- // set the effect(s) to use when showing/hiding the bar, may be // wxSHOW_EFFECT_NONE to disable any effects entirely // // by default, slide to bottom/top is used when it's positioned on the top // of the window for showing/hiding it and top/bottom when it's positioned // at the bottom void SetShowHideEffects(wxShowEffect showEffect, wxShowEffect hideEffect) { m_showEffect = showEffect; m_hideEffect = hideEffect; } // get effect used when showing/hiding the window wxShowEffect GetShowEffect() const; wxShowEffect GetHideEffect() const; // set the duration of animation used when showing/hiding the bar, in ms void SetEffectDuration(int duration) { m_effectDuration = duration; } // get the currently used effect animation duration int GetEffectDuration() const { return m_effectDuration; } // overridden base class methods // ----------------------------- // setting the font of this window sets it for the text control inside it // (default font is a larger and bold version of the normal one) virtual bool SetFont(const wxFont& font) wxOVERRIDE; // same thing with the colour: this affects the text colour virtual bool SetForegroundColour(const wxColor& colour) wxOVERRIDE; protected: // info bar shouldn't have any border by default, the colour difference // between it and the main window separates it well enough virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; } // update the parent to take our new or changed size into account (notably // should be called when we're shown or hidden) void UpdateParent(); private: // common part of all ctors void Init(); // handler for the close button void OnButton(wxCommandEvent& event); // show/hide the bar void DoShow(); void DoHide(); // determine the placement of the bar from its position in the containing // sizer enum BarPlacement { BarPlacement_Top, BarPlacement_Bottom, BarPlacement_Unknown }; BarPlacement GetBarPlacement() const; // different controls making up the bar wxStaticBitmap *m_icon; wxStaticText *m_text; wxBitmapButton *m_button; // the effects to use when showing/hiding and duration for them: by default // the effect is determined by the info bar automatically depending on its // position and the default duration is used wxShowEffect m_showEffect, m_hideEffect; int m_effectDuration; wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxInfoBarGeneric); }; #endif // _WX_GENERIC_INFOBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/tabg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/tabg.h // Purpose: Generic tabbed dialogs; used by wxMotif's wxNotebook // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __TABGH_G__ #define __TABGH_G__ #define WXTAB_VERSION 1.1 #include "wx/hashmap.h" #include "wx/string.h" #include "wx/dialog.h" #include "wx/panel.h" #include "wx/list.h" class WXDLLIMPEXP_FWD_CORE wxTabView; /* * A wxTabControl is the internal and visual representation * of the tab. */ class WXDLLIMPEXP_CORE wxTabControl: public wxObject { wxDECLARE_DYNAMIC_CLASS(wxTabControl); public: wxTabControl(wxTabView *v = NULL); virtual ~wxTabControl(void); virtual void OnDraw(wxDC& dc, bool lastInRow); void SetLabel(const wxString& str) { m_controlLabel = str; } wxString GetLabel(void) const { return m_controlLabel; } void SetFont(const wxFont& f) { m_labelFont = f; } wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; } void SetSelected(bool sel) { m_isSelected = sel; } bool IsSelected(void) const { return m_isSelected; } void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; } void SetSize(int x, int y) { m_width = x; m_height = y; } void SetRowPosition(int r) { m_rowPosition = r; } int GetRowPosition() const { return m_rowPosition; } void SetColPosition(int c) { m_colPosition = c; } int GetColPosition() const { return m_colPosition; } int GetX(void) const { return m_offsetX; } int GetY(void) const { return m_offsetY; } int GetWidth(void) const { return m_width; } int GetHeight(void) const { return m_height; } int GetId(void) const { return m_id; } void SetId(int i) { m_id = i; } virtual bool HitTest(int x, int y) const ; protected: wxTabView* m_view; wxString m_controlLabel; bool m_isSelected; wxFont m_labelFont; int m_offsetX; // Offsets from top-left of tab view area (the area below the tabs) int m_offsetY; int m_width; int m_height; int m_id; int m_rowPosition; // Position in row from 0 int m_colPosition; // Position in col from 0 }; /* * Each wxTabLayer is a list of tabs. E.g. there * are 3 layers in the MS Word Options dialog. */ class WXDLLIMPEXP_CORE wxTabLayer: public wxList { }; /* * The wxTabView controls and draws the tabbed object */ WX_DECLARE_LIST(wxTabLayer, wxTabLayerList); #define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers #define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline class WXDLLIMPEXP_CORE wxTabView: public wxObject { wxDECLARE_DYNAMIC_CLASS(wxTabView); public: wxTabView(long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); virtual ~wxTabView(); inline int GetNumberOfLayers() const { return m_layers.GetCount(); } inline wxTabLayerList& GetLayers() { return m_layers; } inline void SetWindow(wxWindow* wnd) { m_window = wnd; } inline wxWindow* GetWindow(void) const { return m_window; } // Automatically positions tabs wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = NULL); // Remove the tab without deleting the window bool RemoveTab(int id); void ClearTabs(bool deleteTabs = true); bool SetTabText(int id, const wxString& label); wxString GetTabText(int id) const; // Layout tabs (optional, e.g. if resizing window) void LayoutTabs(); // Draw all tabs virtual void Draw(wxDC& dc); // Process mouse event, return false if we didn't process it virtual bool OnEvent(wxMouseEvent& event); // Called when a tab is activated virtual void OnTabActivate(int activateId, int deactivateId); // Allows vetoing virtual bool OnTabPreActivate(int WXUNUSED(activateId), int WXUNUSED(deactivateId) ) { return true; } // Allows use of application-supplied wxTabControl classes. virtual wxTabControl *OnCreateTabControl(void) { return new wxTabControl(this); } void SetHighlightColour(const wxColour& col); void SetShadowColour(const wxColour& col); void SetBackgroundColour(const wxColour& col); inline void SetTextColour(const wxColour& col) { m_textColour = col; } inline wxColour GetHighlightColour(void) const { return m_highlightColour; } inline wxColour GetShadowColour(void) const { return m_shadowColour; } inline wxColour GetBackgroundColour(void) const { return m_backgroundColour; } inline wxColour GetTextColour(void) const { return m_textColour; } inline const wxPen *GetHighlightPen(void) const { return m_highlightPen; } inline const wxPen *GetShadowPen(void) const { return m_shadowPen; } inline const wxPen *GetBackgroundPen(void) const { return m_backgroundPen; } inline const wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; } inline void SetViewRect(const wxRect& rect) { m_tabViewRect = rect; } inline wxRect GetViewRect(void) const { return m_tabViewRect; } // Calculate tab width to fit to view, and optionally adjust the view // to fit the tabs exactly. int CalculateTabWidth(int noTabs, bool adjustView = false); inline void SetTabStyle(long style) { m_tabStyle = style; } inline long GetTabStyle(void) const { return m_tabStyle; } inline void SetTabSize(int w, int h) { m_tabWidth = w; m_tabHeight = h; } inline int GetTabWidth(void) const { return m_tabWidth; } inline int GetTabHeight(void) const { return m_tabHeight; } inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; } inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; } // Returns the total height of the tabs component -- this may be several // times the height of a tab, if there are several tab layers (rows). int GetTotalTabHeight(); inline int GetTopMargin(void) const { return m_topMargin; } inline void SetTopMargin(int margin) { m_topMargin = margin; } void SetTabSelection(int sel, bool activateTool = true); inline int GetTabSelection() const { return m_tabSelection; } // Find tab control for id wxTabControl *FindTabControlForId(int id) const ; // Find tab control for layer, position (starting from zero) wxTabControl *FindTabControlForPosition(int layer, int position) const ; inline int GetHorizontalTabOffset() const { return m_tabHorizontalOffset; } inline int GetHorizontalTabSpacing() const { return m_tabHorizontalSpacing; } inline void SetHorizontalTabOffset(int sp) { m_tabHorizontalOffset = sp; } inline void SetHorizontalTabSpacing(int sp) { m_tabHorizontalSpacing = sp; } inline void SetVerticalTabTextSpacing(int s) { m_tabVerticalTextSpacing = s; } inline int GetVerticalTabTextSpacing() const { return m_tabVerticalTextSpacing; } inline wxFont *GetTabFont() const { return (wxFont*) & m_tabFont; } inline void SetTabFont(const wxFont& f) { m_tabFont = f; } inline wxFont *GetSelectedTabFont() const { return (wxFont*) & m_tabSelectedFont; } inline void SetSelectedTabFont(const wxFont& f) { m_tabSelectedFont = f; } // Find the node and the column at which this control is positioned. wxList::compatibility_iterator FindTabNodeAndColumn(wxTabControl *control, int *col) const ; // Do the necessary to change to this tab virtual bool ChangeTab(wxTabControl *control); // Move the selected tab to the bottom layer, if necessary, // without calling app activation code bool MoveSelectionTab(wxTabControl *control); inline int GetNumberOfTabs() const { return m_noTabs; } protected: // List of layers, from front to back. wxTabLayerList m_layers; // Selected tab int m_tabSelection; // Usual tab height int m_tabHeight; // The height of the selected tab int m_tabSelectionHeight; // Usual tab width int m_tabWidth; // Space between tabs int m_tabHorizontalSpacing; // Space between top of normal tab and text int m_tabVerticalTextSpacing; // Horizontal offset of each tab row above the first int m_tabHorizontalOffset; // The distance between the bottom of the first tab row // and the top of the client area (i.e. the margin) int m_topMargin; // The position and size of the view above which the tabs are placed. // I.e., the internal client area of the sheet. wxRect m_tabViewRect; // Bitlist of styles long m_tabStyle; // Colours wxColour m_highlightColour; wxColour m_shadowColour; wxColour m_backgroundColour; wxColour m_textColour; // Pen and brush cache const wxPen* m_highlightPen; const wxPen* m_shadowPen; const wxPen* m_backgroundPen; const wxBrush* m_backgroundBrush; wxFont m_tabFont; wxFont m_tabSelectedFont; int m_noTabs; wxWindow* m_window; }; /* * A dialog box class that is tab-friendly */ class WXDLLIMPEXP_CORE wxTabbedDialog : public wxDialog { wxDECLARE_DYNAMIC_CLASS(wxTabbedDialog); public: wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); virtual ~wxTabbedDialog(); wxTabView *GetTabView() const { return m_tabView; } void SetTabView(wxTabView *v) { m_tabView = v; } void OnCloseWindow(wxCloseEvent& event); void OnMouseEvent(wxMouseEvent& event); void OnPaint(wxPaintEvent& event); protected: wxTabView* m_tabView; private: wxDECLARE_EVENT_TABLE(); }; /* * A panel class that is tab-friendly */ class WXDLLIMPEXP_CORE wxTabbedPanel : public wxPanel { wxDECLARE_DYNAMIC_CLASS(wxTabbedPanel); public: wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long windowStyle = 0, const wxString& name = wxPanelNameStr); virtual ~wxTabbedPanel(); wxTabView *GetTabView() const { return m_tabView; } void SetTabView(wxTabView *v) { m_tabView = v; } void OnMouseEvent(wxMouseEvent& event); void OnPaint(wxPaintEvent& event); protected: wxTabView* m_tabView; private: wxDECLARE_EVENT_TABLE(); }; WX_DECLARE_HASH_MAP(int, wxWindow*, wxIntegerHash, wxIntegerEqual, wxIntToWindowHashMap); class WXDLLIMPEXP_CORE wxPanelTabView : public wxTabView { wxDECLARE_DYNAMIC_CLASS(wxPanelTabView); public: wxPanelTabView(wxPanel *pan, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); virtual ~wxPanelTabView(void); // Called when a tab is activated virtual void OnTabActivate(int activateId, int deactivateId); // Specific to this class void AddTabWindow(int id, wxWindow *window); wxWindow *GetTabWindow(int id) const ; void ClearWindows(bool deleteWindows = true); wxWindow *GetCurrentWindow() const { return m_currentWindow; } void ShowWindowForTab(int id); // wxList& GetWindows() const { return (wxList&) m_tabWindows; } protected: // List of panels, one for each tab. Indexed // by tab ID. wxIntToWindowHashMap m_tabWindows; wxWindow* m_currentWindow; wxPanel* m_panel; }; #endif
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dataview.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dataview.h // Purpose: wxDataViewCtrl generic implementation header // Author: Robert Roebling // Modified By: Bo Yang // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __GENERICDATAVIEWCTRLH__ #define __GENERICDATAVIEWCTRLH__ #include "wx/defs.h" #include "wx/object.h" #include "wx/list.h" #include "wx/control.h" #include "wx/scrolwin.h" #include "wx/icon.h" #include "wx/vector.h" #if wxUSE_ACCESSIBILITY #include "wx/access.h" #endif // wxUSE_ACCESSIBILITY class WXDLLIMPEXP_FWD_CORE wxDataViewMainWindow; class WXDLLIMPEXP_FWD_CORE wxDataViewHeaderWindow; #if wxUSE_ACCESSIBILITY class WXDLLIMPEXP_FWD_CORE wxDataViewCtrlAccessible; #endif // wxUSE_ACCESSIBILITY // --------------------------------------------------------- // wxDataViewColumn // --------------------------------------------------------- class WXDLLIMPEXP_CORE 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) : wxDataViewColumnBase(renderer, model_column), m_title(title) { Init(width, align, flags); } wxDataViewColumn(const wxBitmap& bitmap, wxDataViewRenderer *renderer, unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTER, int flags = wxDATAVIEW_COL_RESIZABLE) : wxDataViewColumnBase(bitmap, renderer, model_column) { Init(width, align, flags); } // implement wxHeaderColumnBase methods virtual void SetTitle(const wxString& title) wxOVERRIDE { m_title = title; UpdateWidth(); } virtual wxString GetTitle() const wxOVERRIDE { return m_title; } virtual void SetWidth(int width) wxOVERRIDE { // As a small optimization, use this method to avoid calling // UpdateWidth() if the width didn't really change, even if we don't // care about its return value. (void)WXUpdateWidth(width); } virtual int GetWidth() const wxOVERRIDE; virtual void SetMinWidth(int minWidth) wxOVERRIDE { m_minWidth = minWidth; UpdateWidth(); } virtual int GetMinWidth() const wxOVERRIDE { return m_minWidth; } virtual void SetAlignment(wxAlignment align) wxOVERRIDE { m_align = align; UpdateDisplay(); } virtual wxAlignment GetAlignment() const wxOVERRIDE { return m_align; } virtual void SetFlags(int flags) wxOVERRIDE { m_flags = flags; UpdateDisplay(); } virtual int GetFlags() const wxOVERRIDE { return m_flags; } virtual bool IsSortKey() const wxOVERRIDE { return m_sort; } virtual void UnsetAsSortKey() wxOVERRIDE; virtual void SetSortOrder(bool ascending) wxOVERRIDE; virtual bool IsSortOrderAscending() const wxOVERRIDE { return m_sortAscending; } virtual void SetBitmap( const wxBitmap& bitmap ) wxOVERRIDE { wxDataViewColumnBase::SetBitmap(bitmap); UpdateWidth(); } // This method is specific to the generic implementation and is used only // by wxWidgets itself. bool WXUpdateWidth(int width) { if ( width == m_width ) return false; m_width = width; UpdateWidth(); return true; } private: // common part of all ctors void Init(int width, wxAlignment align, int flags); // These methods forward to wxDataViewCtrl::OnColumnChange() and // OnColumnWidthChange() respectively, i.e. the latter is stronger than the // former. void UpdateDisplay(); void UpdateWidth(); wxString m_title; int m_width, m_minWidth; wxAlignment m_align; int m_flags; bool m_sort, m_sortAscending; friend class wxDataViewHeaderWindowBase; friend class wxDataViewHeaderWindow; friend class wxDataViewHeaderWindowMSW; }; // --------------------------------------------------------- // wxDataViewCtrl // --------------------------------------------------------- WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList, class WXDLLIMPEXP_CORE); class WXDLLIMPEXP_CORE wxDataViewCtrl : public wxDataViewCtrlBase, public wxScrollHelper { friend class wxDataViewMainWindow; friend class wxDataViewHeaderWindowBase; friend class wxDataViewHeaderWindow; friend class wxDataViewHeaderWindowMSW; friend class wxDataViewColumn; #if wxUSE_ACCESSIBILITY friend class wxDataViewCtrlAccessible; #endif // wxUSE_ACCESSIBILITY public: wxDataViewCtrl() : wxScrollHelper(this) { Init(); } wxDataViewCtrl( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDataViewCtrlNameStr ) : wxScrollHelper(this) { Create(parent, id, pos, size, style, validator, name); } virtual ~wxDataViewCtrl(); void Init(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDataViewCtrlNameStr); virtual bool AssociateModel( wxDataViewModel *model ) wxOVERRIDE; virtual bool AppendColumn( wxDataViewColumn *col ) wxOVERRIDE; virtual bool PrependColumn( wxDataViewColumn *col ) wxOVERRIDE; virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ) wxOVERRIDE; virtual void DoSetExpanderColumn() wxOVERRIDE; virtual void DoSetIndent() wxOVERRIDE; virtual unsigned int GetColumnCount() const wxOVERRIDE; virtual wxDataViewColumn* GetColumn( unsigned int pos ) const wxOVERRIDE; virtual bool DeleteColumn( wxDataViewColumn *column ) wxOVERRIDE; virtual bool ClearColumns() wxOVERRIDE; virtual int GetColumnPosition( const wxDataViewColumn *column ) const wxOVERRIDE; virtual wxDataViewColumn *GetSortingColumn() const wxOVERRIDE; virtual wxVector<wxDataViewColumn *> GetSortingColumns() const wxOVERRIDE; virtual wxDataViewItem GetTopItem() const wxOVERRIDE; virtual int GetCountPerPage() const wxOVERRIDE; virtual int GetSelectedItemsCount() const wxOVERRIDE; virtual int GetSelections( wxDataViewItemArray & sel ) const wxOVERRIDE; virtual void SetSelections( const wxDataViewItemArray & sel ) wxOVERRIDE; virtual void Select( const wxDataViewItem & item ) wxOVERRIDE; virtual void Unselect( const wxDataViewItem & item ) wxOVERRIDE; virtual bool IsSelected( const wxDataViewItem & item ) const wxOVERRIDE; virtual void SelectAll() wxOVERRIDE; virtual void UnselectAll() wxOVERRIDE; virtual void EnsureVisible( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) wxOVERRIDE; virtual void HitTest( const wxPoint & point, wxDataViewItem & item, wxDataViewColumn* &column ) const wxOVERRIDE; virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const wxOVERRIDE; virtual bool SetRowHeight( int rowHeight ) wxOVERRIDE; virtual void Collapse( const wxDataViewItem & item ) wxOVERRIDE; virtual bool IsExpanded( const wxDataViewItem & item ) const wxOVERRIDE; virtual void SetFocus() wxOVERRIDE; virtual bool SetFont(const wxFont & font) wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual bool Show(bool show = true) wxOVERRIDE; virtual void SetName(const wxString &name) wxOVERRIDE; virtual bool Reparent(wxWindowBase *newParent) wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Enable(bool enable = true) wxOVERRIDE; virtual bool AllowMultiColumnSort(bool allow) wxOVERRIDE; virtual bool IsMultiColumnSortAllowed() const wxOVERRIDE { return m_allowMultiColumnSort; } virtual void ToggleSortByColumn(int column) wxOVERRIDE; #if wxUSE_DRAG_AND_DROP virtual bool EnableDragSource( const wxDataFormat &format ) wxOVERRIDE; virtual bool EnableDropTarget( const wxDataFormat &format ) wxOVERRIDE; #endif // wxUSE_DRAG_AND_DROP virtual wxBorder GetDefaultBorder() const wxOVERRIDE; virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) wxOVERRIDE; virtual bool SetHeaderAttr(const wxItemAttr& attr) wxOVERRIDE; virtual bool SetAlternateRowColour(const wxColour& colour) wxOVERRIDE; // This method is specific to generic wxDataViewCtrl implementation and // should not be used in portable code. wxColour GetAlternateRowColour() const { return m_alternateRowColour; } // The returned pointer is null if the control has wxDV_NO_HEADER style. // // This method is only available in the generic versions. wxHeaderCtrl* GenericGetHeader() const; protected: void EnsureVisibleRowCol( int row, int column ); // Notice that row here may be invalid (i.e. >= GetRowCount()), this is not // an error and this function simply returns an invalid item in this case. wxDataViewItem GetItemByRow( unsigned int row ) const; int GetRowByItem( const wxDataViewItem & item ) const; // Mark the column as being used or not for sorting. void UseColumnForSorting(int idx); void DontUseColumnForSorting(int idx); // Return true if the given column is sorted bool IsColumnSorted(int idx) const; // Reset all columns currently used for sorting. void ResetAllSortColumns(); virtual void DoEnableSystemTheme(bool enable, wxWindow* window) wxOVERRIDE; public: // utility functions not part of the API // returns the "best" width for the idx-th column unsigned int GetBestColumnWidth(int idx) const; // called by header window after reorder void ColumnMoved( wxDataViewColumn* col, unsigned int new_pos ); // update the display after a change to an individual column void OnColumnChange(unsigned int idx); // update after the column width changes, also calls OnColumnChange() void OnColumnWidthChange(unsigned int idx); // update after a change to the number of columns void OnColumnsCountChanged(); wxWindow *GetMainWindow() { return (wxWindow*) m_clientArea; } // return the index of the given column in m_cols int GetColumnIndex(const wxDataViewColumn *column) const; // Return the index of the column having the given model index. int GetModelColumnIndex(unsigned int model_column) const; // return the column displayed at the given position in the control wxDataViewColumn *GetColumnAt(unsigned int pos) const; virtual wxDataViewColumn *GetCurrentColumn() const wxOVERRIDE; virtual void OnInternalIdle() wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxAccessible* CreateAccessible() wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY private: virtual wxDataViewItem DoGetCurrentItem() const wxOVERRIDE; virtual void DoSetCurrentItem(const wxDataViewItem& item) wxOVERRIDE; virtual void DoExpand(const wxDataViewItem& item) wxOVERRIDE; void InvalidateColBestWidths(); void InvalidateColBestWidth(int idx); void UpdateColWidths(); wxDataViewColumnList m_cols; // cached column best widths information, values are for // respective columns from m_cols and the arrays have same size struct CachedColWidthInfo { CachedColWidthInfo() : width(0), dirty(true) {} int width; // cached width or 0 if not computed bool dirty; // column was invalidated, header needs updating }; wxVector<CachedColWidthInfo> m_colsBestWidths; // This indicates that at least one entry in m_colsBestWidths has 'dirty' // flag set. It's cheaper to check one flag in OnInternalIdle() than to // iterate over m_colsBestWidths to check if anything needs to be done. bool m_colsDirty; wxDataViewModelNotifier *m_notifier; wxDataViewMainWindow *m_clientArea; wxDataViewHeaderWindow *m_headerArea; // user defined color to draw row lines, may be invalid wxColour m_alternateRowColour; // columns indices used for sorting, empty if nothing is sorted wxVector<int> m_sortingColumnIdxs; // if true, allow sorting by more than one column bool m_allowMultiColumnSort; private: void OnSize( wxSizeEvent &event ); virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size) wxOVERRIDE; // we need to return a special WM_GETDLGCODE value to process just the // arrows but let the other navigation characters through #ifdef __WXMSW__ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE; #endif // __WXMSW__ WX_FORWARD_TO_SCROLL_HELPER() private: wxDECLARE_DYNAMIC_CLASS(wxDataViewCtrl); wxDECLARE_NO_COPY_CLASS(wxDataViewCtrl); wxDECLARE_EVENT_TABLE(); }; #if wxUSE_ACCESSIBILITY //----------------------------------------------------------------------------- // wxDataViewCtrlAccessible //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxDataViewCtrlAccessible: public wxWindowAccessible { public: wxDataViewCtrlAccessible(wxDataViewCtrl* win); virtual ~wxDataViewCtrlAccessible() {} virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject) wxOVERRIDE; virtual wxAccStatus GetLocation(wxRect& rect, int elementId) wxOVERRIDE; virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** toObject) wxOVERRIDE; virtual wxAccStatus GetName(int childId, wxString* name) wxOVERRIDE; virtual wxAccStatus GetChildCount(int* childCount) wxOVERRIDE; virtual wxAccStatus GetChild(int childId, wxAccessible** child) wxOVERRIDE; // wxWindowAccessible::GetParent() implementation is enough. // virtual wxAccStatus GetParent(wxAccessible** parent) wxOVERRIDE; virtual wxAccStatus DoDefaultAction(int childId) wxOVERRIDE; virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName) wxOVERRIDE; virtual wxAccStatus GetDescription(int childId, wxString* description) wxOVERRIDE; virtual wxAccStatus GetHelpText(int childId, wxString* helpText) wxOVERRIDE; virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut) wxOVERRIDE; virtual wxAccStatus GetRole(int childId, wxAccRole* role) wxOVERRIDE; virtual wxAccStatus GetState(int childId, long* state) wxOVERRIDE; virtual wxAccStatus GetValue(int childId, wxString* strValue) wxOVERRIDE; virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags) wxOVERRIDE; virtual wxAccStatus GetFocus(int* childId, wxAccessible** child) wxOVERRIDE; virtual wxAccStatus GetSelections(wxVariant* selections) wxOVERRIDE; }; #endif // wxUSE_ACCESSIBILITY #endif // __GENERICDATAVIEWCTRLH__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/accel.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/accel.h // Purpose: wxAcceleratorTable class // Author: Robert Roebling // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ACCEL_H_ #define _WX_GENERIC_ACCEL_H_ class WXDLLIMPEXP_FWD_CORE wxKeyEvent; // ---------------------------------------------------------------------------- // wxAcceleratorTable // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject { public: wxAcceleratorTable(); wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); virtual ~wxAcceleratorTable(); bool Ok() const { return IsOk(); } bool IsOk() const; void Add(const wxAcceleratorEntry& entry); void Remove(const wxAcceleratorEntry& entry); // implementation // -------------- wxMenuItem *GetMenuItem(const wxKeyEvent& event) const; int GetCommand(const wxKeyEvent& event) const; const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const; protected: // ref counting code virtual wxObjectRefData *CreateRefData() const wxOVERRIDE; virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const wxOVERRIDE; private: wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable); }; #endif // _WX_GENERIC_ACCEL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dvrenderer.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dvrenderer.h // Purpose: wxDataViewRenderer for generic wxDataViewCtrl implementation // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/generic/dataview.h) // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_DVRENDERER_H_ #define _WX_GENERIC_DVRENDERER_H_ // ---------------------------------------------------------------------------- // wxDataViewRenderer // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewCustomRendererBase { public: wxDataViewRenderer( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); virtual ~wxDataViewRenderer(); virtual wxDC *GetDC() wxOVERRIDE; virtual void SetAlignment( int align ) wxOVERRIDE; virtual int GetAlignment() const wxOVERRIDE; virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE) wxOVERRIDE { m_ellipsizeMode = mode; } virtual wxEllipsizeMode GetEllipsizeMode() const wxOVERRIDE { return m_ellipsizeMode; } virtual void SetMode( wxDataViewCellMode mode ) wxOVERRIDE { m_mode = mode; } virtual wxDataViewCellMode GetMode() const wxOVERRIDE { return m_mode; } // implementation // This callback is used by generic implementation of wxDVC itself. It's // different from the corresponding ActivateCell() method which should only // be overridable for the custom renderers while the generic implementation // uses this one for all of them, including the standard ones. virtual bool WXActivateCell(const wxRect& WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem & WXUNUSED(item), unsigned int WXUNUSED(col), const wxMouseEvent* WXUNUSED(mouseEvent)) { return false; } void SetState(int state) { m_state = state; } protected: virtual bool IsHighlighted() const wxOVERRIDE { return m_state & wxDATAVIEW_CELL_SELECTED; } private: int m_align; wxDataViewCellMode m_mode; wxEllipsizeMode m_ellipsizeMode; wxDC *m_dc; int m_state; wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer); }; #endif // _WX_GENERIC_DVRENDERER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/paletteg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/paletteg.h // Purpose: // Author: Robert Roebling // Created: 01/02/97 // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __WX_PALETTEG_H__ #define __WX_PALETTEG_H__ #include "wx/defs.h" #include "wx/object.h" #include "wx/gdiobj.h" #include "wx/gdicmn.h" //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxPalette; //----------------------------------------------------------------------------- // wxPalette //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase { public: wxPalette(); wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); virtual ~wxPalette(); bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const; bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; virtual int GetColoursCount() const wxOVERRIDE; protected: virtual wxGDIRefData *CreateGDIRefData() const wxOVERRIDE; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const wxOVERRIDE; private: wxDECLARE_DYNAMIC_CLASS(wxPalette); }; #endif // __WX_PALETTEG_H__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/collpaneg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/collpaneg.h // Purpose: wxGenericCollapsiblePane // Author: Francesco Montorsi // Modified by: // Created: 8/10/2006 // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_COLLAPSABLE_PANE_H_GENERIC_ #define _WX_COLLAPSABLE_PANE_H_GENERIC_ // forward declared class WXDLLIMPEXP_FWD_CORE wxCollapsibleHeaderCtrl; #include "wx/containr.h" // ---------------------------------------------------------------------------- // wxGenericCollapsiblePane // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericCollapsiblePane : public wxNavigationEnabled<wxCollapsiblePaneBase> { public: wxGenericCollapsiblePane() { Init(); } wxGenericCollapsiblePane(wxWindow *parent, wxWindowID winid, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, const wxString& name = wxCollapsiblePaneNameStr) { Init(); Create(parent, winid, label, pos, size, style, val, name); } virtual ~wxGenericCollapsiblePane(); bool Create(wxWindow *parent, wxWindowID winid, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, const wxString& name = wxCollapsiblePaneNameStr); // public wxCollapsiblePane API virtual void Collapse(bool collapse = true) wxOVERRIDE; virtual void SetLabel(const wxString &label) wxOVERRIDE; virtual bool IsCollapsed() const wxOVERRIDE { return m_pPane==NULL || !m_pPane->IsShown(); } virtual wxWindow *GetPane() const wxOVERRIDE { return m_pPane; } virtual wxString GetLabel() const wxOVERRIDE; virtual bool Layout() wxOVERRIDE; // for the generic collapsible pane only: wxControl* GetControlWidget() const { return (wxControl*)m_pButton; } // implementation only, don't use void OnStateChange(const wxSize& sizeNew); protected: // overridden methods virtual wxSize DoGetBestSize() const wxOVERRIDE; int GetBorder() const; // child controls wxCollapsibleHeaderCtrl *m_pButton; wxWindow *m_pPane; wxSizer *m_sz; private: void Init(); // event handlers void OnButton(wxCommandEvent &ev); void OnSize(wxSizeEvent &ev); wxDECLARE_DYNAMIC_CLASS(wxGenericCollapsiblePane); wxDECLARE_EVENT_TABLE(); }; #endif // _WX_COLLAPSABLE_PANE_H_GENERIC_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/filedlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/filedlgg.h // Purpose: wxGenericFileDialog // Author: Robert Roebling // Modified by: // Created: 8/17/99 // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FILEDLGG_H_ #define _WX_FILEDLGG_H_ #include "wx/listctrl.h" #include "wx/datetime.h" #include "wx/filefn.h" #include "wx/artprov.h" #include "wx/filedlg.h" #include "wx/generic/filectrlg.h" //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxBitmapButton; class WXDLLIMPEXP_FWD_CORE wxGenericFileCtrl; class WXDLLIMPEXP_FWD_CORE wxGenericFileDialog; class WXDLLIMPEXP_FWD_CORE wxFileCtrlEvent; //------------------------------------------------------------------------- // wxGenericFileDialog //------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericFileDialog: public wxFileDialogBase { public: wxGenericFileDialog() : wxFileDialogBase() { Init(); } wxGenericFileDialog(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 bypassGenericImpl = false ); 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, bool bypassGenericImpl = false ); virtual ~wxGenericFileDialog(); virtual void SetDirectory(const wxString& dir) wxOVERRIDE { m_filectrl->SetDirectory(dir); } virtual void SetFilename(const wxString& name) wxOVERRIDE { m_filectrl->SetFilename(name); } virtual void SetMessage(const wxString& message) wxOVERRIDE { SetTitle(message); } virtual void SetPath(const wxString& path) wxOVERRIDE { m_filectrl->SetPath(path); } virtual void SetFilterIndex(int filterIndex) wxOVERRIDE { m_filectrl->SetFilterIndex(filterIndex); } virtual void SetWildcard(const wxString& wildCard) wxOVERRIDE { m_filectrl->SetWildcard(wildCard); } virtual wxString GetPath() const wxOVERRIDE { return m_filectrl->GetPath(); } virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE { m_filectrl->GetPaths(paths); } virtual wxString GetDirectory() const wxOVERRIDE { return m_filectrl->GetDirectory(); } virtual wxString GetFilename() const wxOVERRIDE { return m_filectrl->GetFilename(); } virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE { m_filectrl->GetFilenames(files); } virtual wxString GetWildcard() const wxOVERRIDE { return m_filectrl->GetWildcard(); } virtual int GetFilterIndex() const wxOVERRIDE { return m_filectrl->GetFilterIndex(); } virtual bool SupportsExtraControl() const wxOVERRIDE { return true; } // implementation only from now on // ------------------------------- virtual int ShowModal() wxOVERRIDE; virtual bool Show( bool show = true ) wxOVERRIDE; void OnList( wxCommandEvent &event ); void OnReport( wxCommandEvent &event ); void OnUp( wxCommandEvent &event ); void OnHome( wxCommandEvent &event ); void OnOk( wxCommandEvent &event ); void OnNew( wxCommandEvent &event ); void OnFileActivated( wxFileCtrlEvent &event); private: // if true, don't use this implementation at all bool m_bypassGenericImpl; protected: // update the state of m_upDirButton and m_newDirButton depending on the // currently selected directory void OnUpdateButtonsUI(wxUpdateUIEvent& event); wxString m_filterExtension; wxGenericFileCtrl *m_filectrl; wxBitmapButton *m_upDirButton; wxBitmapButton *m_newDirButton; private: void Init(); wxBitmapButton* AddBitmapButton( wxWindowID winId, const wxArtID& artId, const wxString& tip, wxSizer *sizer ); wxDECLARE_DYNAMIC_CLASS(wxGenericFileDialog); wxDECLARE_EVENT_TABLE(); // these variables are preserved between wxGenericFileDialog calls static long ms_lastViewStyle; // list or report? static bool ms_lastShowHidden; // did we show hidden files? }; #ifdef wxHAS_GENERIC_FILEDIALOG class WXDLLIMPEXP_CORE wxFileDialog: public wxGenericFileDialog { public: wxFileDialog() {} wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = 0, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize) :wxGenericFileDialog(parent, message, defaultDir, defaultFile, wildCard, style, pos, size) { } private: wxDECLARE_DYNAMIC_CLASS(wxFileDialog); }; #endif // wxHAS_GENERIC_FILEDIALOG #endif // _WX_FILEDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/laywin.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/laywin.h // Purpose: Implements a simple layout algorithm, plus // wxSashLayoutWindow which is an example of a window with // layout-awareness (via event handlers). This is suited to // IDE-style window layout. // Author: Julian Smart // Modified by: // Created: 04/01/98 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_LAYWIN_H_G_ #define _WX_LAYWIN_H_G_ #if wxUSE_SASH #include "wx/sashwin.h" #endif // wxUSE_SASH #include "wx/event.h" class WXDLLIMPEXP_FWD_CORE wxQueryLayoutInfoEvent; class WXDLLIMPEXP_FWD_CORE wxCalculateLayoutEvent; wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_QUERY_LAYOUT_INFO, wxQueryLayoutInfoEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CALCULATE_LAYOUT, wxCalculateLayoutEvent ); enum wxLayoutOrientation { wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL }; enum wxLayoutAlignment { wxLAYOUT_NONE, wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM }; // Not sure this is necessary // Tell window which dimension we're sizing on #define wxLAYOUT_LENGTH_Y 0x0008 #define wxLAYOUT_LENGTH_X 0x0000 // Use most recently used length #define wxLAYOUT_MRU_LENGTH 0x0010 // Only a query, so don't actually move it. #define wxLAYOUT_QUERY 0x0100 /* * This event is used to get information about window alignment, * orientation and size. */ class WXDLLIMPEXP_CORE wxQueryLayoutInfoEvent: public wxEvent { public: wxQueryLayoutInfoEvent(wxWindowID id = 0) { SetEventType(wxEVT_QUERY_LAYOUT_INFO); m_requestedLength = 0; m_flags = 0; m_id = id; m_alignment = wxLAYOUT_TOP; m_orientation = wxLAYOUT_HORIZONTAL; } // Read by the app void SetRequestedLength(int length) { m_requestedLength = length; } int GetRequestedLength() const { return m_requestedLength; } void SetFlags(int flags) { m_flags = flags; } int GetFlags() const { return m_flags; } // Set by the app void SetSize(const wxSize& size) { m_size = size; } wxSize GetSize() const { return m_size; } void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; } wxLayoutOrientation GetOrientation() const { return m_orientation; } void SetAlignment(wxLayoutAlignment align) { m_alignment = align; } wxLayoutAlignment GetAlignment() const { return m_alignment; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxQueryLayoutInfoEvent(*this); } protected: int m_flags; int m_requestedLength; wxSize m_size; wxLayoutOrientation m_orientation; wxLayoutAlignment m_alignment; private: wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryLayoutInfoEvent); }; typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&); #define wxQueryLayoutInfoEventHandler( func ) \ wxEVENT_HANDLER_CAST( wxQueryLayoutInfoEventFunction, func ) #define EVT_QUERY_LAYOUT_INFO(func) \ wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, wxID_ANY, wxID_ANY, wxQueryLayoutInfoEventHandler( func ), NULL ), /* * This event is used to take a bite out of the available client area. */ class WXDLLIMPEXP_CORE wxCalculateLayoutEvent: public wxEvent { public: wxCalculateLayoutEvent(wxWindowID id = 0) { SetEventType(wxEVT_CALCULATE_LAYOUT); m_flags = 0; m_id = id; } // Read by the app void SetFlags(int flags) { m_flags = flags; } int GetFlags() const { return m_flags; } // Set by the app void SetRect(const wxRect& rect) { m_rect = rect; } wxRect GetRect() const { return m_rect; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxCalculateLayoutEvent(*this); } protected: int m_flags; wxRect m_rect; private: wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalculateLayoutEvent); }; typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&); #define wxCalculateLayoutEventHandler( func ) wxEVENT_HANDLER_CAST(wxCalculateLayoutEventFunction, func) #define EVT_CALCULATE_LAYOUT(func) \ wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, wxID_ANY, wxID_ANY, wxCalculateLayoutEventHandler( func ), NULL ), #if wxUSE_SASH // This is window that can remember alignment/orientation, does its own layout, // and can provide sashes too. Useful for implementing docked windows with sashes in // an IDE-style interface. class WXDLLIMPEXP_CORE wxSashLayoutWindow: public wxSashWindow { public: wxSashLayoutWindow() { Init(); } wxSashLayoutWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow")) { Create(parent, id, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow")); // Accessors inline wxLayoutAlignment GetAlignment() const { return m_alignment; } inline wxLayoutOrientation GetOrientation() const { return m_orientation; } inline void SetAlignment(wxLayoutAlignment align) { m_alignment = align; } inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; } // Give the window default dimensions inline void SetDefaultSize(const wxSize& size) { m_defaultSize = size; } // Event handlers // Called by layout algorithm to allow window to take a bit out of the // client rectangle, and size itself if not in wxLAYOUT_QUERY mode. void OnCalculateLayout(wxCalculateLayoutEvent& event); // Called by layout algorithm to retrieve information about the window. void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event); private: void Init(); wxLayoutAlignment m_alignment; wxLayoutOrientation m_orientation; wxSize m_defaultSize; private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxSashLayoutWindow); wxDECLARE_EVENT_TABLE(); }; #endif // wxUSE_SASH class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame; class WXDLLIMPEXP_FWD_CORE wxFrame; // This class implements the layout algorithm class WXDLLIMPEXP_CORE wxLayoutAlgorithm: public wxObject { public: wxLayoutAlgorithm() {} #if wxUSE_MDI_ARCHITECTURE // The MDI client window is sized to whatever's left over. bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL); #endif // wxUSE_MDI_ARCHITECTURE // mainWindow is sized to whatever's left over. This function for backward // compatibility; use LayoutWindow. bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL); // mainWindow is sized to whatever's left over. bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = NULL); }; #endif // _WX_LAYWIN_H_G_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/panelg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/panelg.h // Purpose: wxPanel: a container for child controls // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_PANELG_H_ #define _WX_GENERIC_PANELG_H_ #include "wx/bitmap.h" class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase { public: wxPanel() { } // Constructor wxPanel(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) { Create(parent, winid, pos, size, style, name); } #if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED_CONSTRUCTOR( wxPanel(wxWindow *parent, int x, int y, int width, int height, long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) { Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); } ) #endif // WXWIN_COMPATIBILITY_2_8 private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); }; #endif // _WX_GENERIC_PANELG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dragimgg.h
////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dragimgg.h // Purpose: wxDragImage class: a kind of a cursor, that can cope // with more sophisticated images // Author: Julian Smart // Modified by: // Created: 29/2/2000 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DRAGIMGG_H_ #define _WX_DRAGIMGG_H_ #include "wx/bitmap.h" #include "wx/icon.h" #include "wx/cursor.h" #include "wx/treectrl.h" #include "wx/listctrl.h" #include "wx/log.h" #include "wx/overlay.h" /* To use this class, create a wxDragImage when you start dragging, for example: void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) { #ifdef __WXMSW__ ::UpdateWindow((HWND) GetHWND()); // We need to implement this in wxWidgets #endif CaptureMouse(); m_dragImage = new wxDragImage(* this, itemId); m_dragImage->BeginDrag(wxPoint(0, 0), this); m_dragImage->Move(pt, this); m_dragImage->Show(this); ... } In your OnMouseMove function, hide the image, do any display updating required, then move and show the image again: void MyTreeCtrl::OnMouseMove(wxMouseEvent& event) { if (m_dragMode == MY_TREE_DRAG_NONE) { event.Skip(); return; } // Prevent screen corruption by hiding the image if (m_dragImage) m_dragImage->Hide(this); // Do some updating of the window, such as highlighting the drop target ... #ifdef __WXMSW__ if (updateWindow) ::UpdateWindow((HWND) GetHWND()); #endif // Move and show the image again m_dragImage->Move(event.GetPosition(), this); m_dragImage->Show(this); } Eventually we end the drag and delete the drag image. void MyTreeCtrl::OnLeftUp(wxMouseEvent& event) { ... // End the drag and delete the drag image if (m_dragImage) { m_dragImage->EndDrag(this); delete m_dragImage; m_dragImage = NULL; } ReleaseMouse(); } */ /* * wxGenericDragImage */ class WXDLLIMPEXP_CORE wxGenericDragImage: public wxObject { public: // Ctors & dtor //////////////////////////////////////////////////////////////////////////// wxGenericDragImage(const wxCursor& cursor = wxNullCursor) { Init(); Create(cursor); } wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor) { Init(); Create(image, cursor); } wxGenericDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor) { Init(); Create(image, cursor); } wxGenericDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor) { Init(); Create(str, cursor); } #if wxUSE_TREECTRL wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) { Init(); Create(treeCtrl, id); } #endif #if wxUSE_LISTCTRL wxGenericDragImage(const wxListCtrl& listCtrl, long id) { Init(); Create(listCtrl, id); } #endif virtual ~wxGenericDragImage(); // Attributes //////////////////////////////////////////////////////////////////////////// #ifdef wxHAS_NATIVE_OVERLAY // backing store is not used when native overlays are void SetBackingBitmap(wxBitmap* WXUNUSED(bitmap)) { } #else // For efficiency, tell wxGenericDragImage to use a bitmap that's already // created (e.g. from last drag) void SetBackingBitmap(wxBitmap* bitmap) { m_pBackingBitmap = bitmap; } #endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY // Operations //////////////////////////////////////////////////////////////////////////// // Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect) bool Create(const wxCursor& cursor = wxNullCursor); // Create a drag image from a bitmap and optional cursor bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor); // Create a drag image from an icon and optional cursor bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor); // Create a drag image from a string and optional cursor bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor); #if wxUSE_TREECTRL // Create a drag image for the given tree control item bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id); #endif #if wxUSE_LISTCTRL // Create a drag image for the given list control item bool Create(const wxListCtrl& listCtrl, long id); #endif // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. This is full screen only. fullScreenRect gives the // position of the window on the screen, to restrict the drag to. bool BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect); // End drag bool EndDrag(); // Move the image: call from OnMouseMove. Pt is in window client coordinates if window // is non-NULL, or in screen coordinates if NULL. bool Move(const wxPoint& pt); // Show the image bool Show(); // Hide the image bool Hide(); // Implementation //////////////////////////////////////////////////////////////////////////// void Init(); // Override this if you are using a virtual image (drawing your own image) virtual wxRect GetImageRect(const wxPoint& pos) const; // Override this if you are using a virtual image (drawing your own image) virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos) const; // Override this if you wish to draw the window contents to the backing bitmap // yourself. This can be desirable if you wish to avoid flicker by not having to // redraw the window itself before dragging in order to be graphic-minus-dragged-objects. // Instead, paint the drag image's backing bitmap to be correct, and leave the window // to be updated only when dragging the objects away (thus giving a smoother appearance). virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, const wxRect& sourceRect, const wxRect& destRect) const; // Erase and redraw simultaneously if possible virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew); protected: wxBitmap m_bitmap; wxIcon m_icon; wxCursor m_cursor; wxCursor m_oldCursor; // wxPoint m_hotspot; wxPoint m_offset; // The hostpot value passed to BeginDrag wxPoint m_position; bool m_isDirty; bool m_isShown; wxWindow* m_window; wxDC* m_windowDC; #ifdef wxHAS_NATIVE_OVERLAY wxOverlay m_overlay; wxDCOverlay* m_dcOverlay; #else // Stores the window contents while we're dragging the image around wxBitmap m_backingBitmap; wxBitmap* m_pBackingBitmap; // Pointer to existing backing bitmap // (pass to wxGenericDragImage as an efficiency measure) // A temporary bitmap for repairing/redrawing wxBitmap m_repairBitmap; #endif // !wxHAS_NATIVE_OVERLAY wxRect m_boundingRect; bool m_fullScreen; private: wxDECLARE_DYNAMIC_CLASS(wxGenericDragImage); wxDECLARE_NO_COPY_CLASS(wxGenericDragImage); }; #endif // _WX_DRAGIMGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/stattextg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/stattextg.h // Purpose: wxGenericStaticText header // Author: Marcin Wojdyr // Created: 2008-06-26 // Copyright: Marcin Wojdyr // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_STATTEXTG_H_ #define _WX_GENERIC_STATTEXTG_H_ // prevent it from including the platform-specific wxStaticText declaration as // this is not going to compile if it derives from wxGenericStaticText defined // below (currently this is only the case in wxUniv but it could also happen // with other ports) #define wxNO_PORT_STATTEXT_INCLUDE #include "wx/stattext.h" #undef wxNO_PORT_STATTEXT_INCLUDE class WXDLLIMPEXP_CORE wxGenericStaticText : public wxStaticTextBase { public: wxGenericStaticText() { Init(); } wxGenericStaticText(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticTextNameStr) { Init(); Create(parent, id, label, pos, size, style, name); } 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 ~wxGenericStaticText(); // overridden base class virtual methods virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual bool SetFont(const wxFont &font) wxOVERRIDE; protected: virtual wxSize DoGetBestClientSize() const wxOVERRIDE; virtual wxString DoGetLabel() const wxOVERRIDE { return m_label; } virtual void DoSetLabel(const wxString& label) wxOVERRIDE; void DoSetSize(int x, int y, int width, int height, int sizeFlags) wxOVERRIDE; #if wxUSE_MARKUP virtual bool DoSetLabelMarkup(const wxString& markup) wxOVERRIDE; #endif // wxUSE_MARKUP private: void Init() { #if wxUSE_MARKUP m_markupText = NULL; #endif // wxUSE_MARKUP } void OnPaint(wxPaintEvent& event); void DoDrawLabel(wxDC& dc, const wxRect& rect); // These fields are only used if m_markupText == NULL. wxString m_label; int m_mnemonic; #if wxUSE_MARKUP class wxMarkupText *m_markupText; #endif // wxUSE_MARKUP wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText); }; #endif // _WX_GENERIC_STATTEXTG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/ctrlsub.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/ctrlsub.h // Purpose: common functionality of wxItemContainer-derived controls // Author: Vadim Zeitlin // Created: 2007-07-25 // Copyright: (c) 2007 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_CTRLSUB_H_ #define _WX_GENERIC_CTRLSUB_H_ #include "wx/dynarray.h" // ---------------------------------------------------------------------------- // wxControlWithItemsGeneric: generic implementation of item client data // ---------------------------------------------------------------------------- class wxControlWithItemsGeneric : public wxControlWithItemsBase { public: wxControlWithItemsGeneric() { } virtual void DoInitItemClientData() { m_itemsClientData.resize(GetCount(), NULL); } virtual void DoSetItemClientData(unsigned int n, void *clientData) { m_itemsClientData[n] = clientData; } virtual void *DoGetItemClientData(unsigned int n) const { return m_itemsClientData[n]; } virtual void DoClear() { m_itemsClientData.clear(); } virtual void DoDeleteOneItem(unsigned int pos) { if ( HasClientData() ) m_itemsClientData.RemoveAt(pos); } protected: // preallocate memory for numItems new items: this should be called from // the derived classes DoInsertItems() to speed up appending big numbers of // items with client data; it is safe to call even if we don't use client // data at all and does nothing in this case void AllocClientData(unsigned int numItems) { if ( HasClientData() ) m_itemsClientData.reserve(m_itemsClientData.size() + numItems); } // this must be called by derived classes when a new item is added to the // control to add storage for the corresponding client data pointer (before // inserting many items, call AllocClientData()) void InsertNewItemClientData(unsigned int pos, void **clientData, unsigned int n, wxClientDataType type) { if ( InitClientDataIfNeeded(type) ) m_itemsClientData.Insert(clientData[n], pos); } // the same as InsertNewItemClientData() but for numItems consecutive items // (this can only be used if the control doesn't support sorting as // otherwise the items positions wouldn't be consecutive any more) void InsertNewItemsClientData(unsigned int pos, unsigned int numItems, void **clientData, wxClientDataType type) { if ( InitClientDataIfNeeded(type) ) { // it's more efficient to insert everything at once and then update // for big number of items to avoid moving the array contents // around (which would result in O(N^2) algorithm) m_itemsClientData.Insert(NULL, pos, numItems); for ( unsigned int n = 0; n < numItems; ++n, ++pos ) m_itemsClientData[pos] = clientData[n]; } } // vector containing the client data pointers: it is either empty (if // client data is not used) or has the same number of elements as the // control wxArrayPtrVoid m_itemsClientData; private: // initialize client data if needed, return false if we don't have any // client data and true otherwise bool InitClientDataIfNeeded(wxClientDataType type) { if ( !HasClientData() ) { if ( type == wxClientData_None ) { // we didn't have the client data before and are not asked to // store it now neither return false; } // this is the first time client data is used with this control DoInitItemClientData(); SetClientDataType(type); } //else: we already have client data return true; } wxDECLARE_NO_COPY_CLASS(wxControlWithItemsGeneric); }; #endif // _WX_GENERIC_CTRLSUB_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/statbmpg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/statbmpg.h // Purpose: wxGenericStaticBitmap header // Author: Marcin Wojdyr, Stefan Csomor // Created: 2008-06-16 // Copyright: wxWidgets developers // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_STATBMP_H_ #define _WX_GENERIC_STATBMP_H_ #include "wx/statbmp.h" class WXDLLIMPEXP_CORE wxGenericStaticBitmap : public wxStaticBitmapBase { public: wxGenericStaticBitmap() {} wxGenericStaticBitmap(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBitmapNameStr) { Create(parent, id, bitmap, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBitmapNameStr); virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE { m_bitmap = bitmap; SetInitialSize(GetBitmapSize()); Refresh(); } virtual wxBitmap GetBitmap() const wxOVERRIDE { return m_bitmap; } virtual void SetIcon(const wxIcon& icon) wxOVERRIDE { m_bitmap.CopyFromIcon(icon); SetInitialSize(GetBitmapSize()); Refresh(); } #if defined(__WXGTK20__) || defined(__WXMAC__) // icons and bitmaps are really the same thing in wxGTK and wxMac wxIcon GetIcon() const wxOVERRIDE { return (const wxIcon &)m_bitmap; } #endif virtual void SetScaleMode(ScaleMode scaleMode) wxOVERRIDE { m_scaleMode = scaleMode; Refresh(); } virtual ScaleMode GetScaleMode() const wxOVERRIDE { return m_scaleMode; } private: wxSize GetBitmapSize() { return m_bitmap.IsOk() ? m_bitmap.GetScaledSize() : wxSize(16, 16); // this is completely arbitrary } void OnPaint(wxPaintEvent& event); wxBitmap m_bitmap; ScaleMode m_scaleMode; wxDECLARE_DYNAMIC_CLASS(wxGenericStaticBitmap); }; #endif //_WX_GENERIC_STATBMP_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/icon.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/icon.h // Purpose: wxIcon implementation for ports where it's same as wxBitmap // Author: Julian Smart // Modified by: // Created: 17/09/98 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ICON_H_ #define _WX_GENERIC_ICON_H_ #include "wx/bitmap.h" //----------------------------------------------------------------------------- // wxIcon //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxIcon: public wxBitmap { public: wxIcon(); wxIcon(const char* const* bits); #ifdef wxNEEDS_CHARPP wxIcon(char **bits); #endif // For compatibility with wxMSW where desired size is sometimes required to // distinguish between multiple icons in a resource. wxIcon( const wxString& filename, wxBitmapType type = wxICON_DEFAULT_TYPE, int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) : wxBitmap(filename, type) { } wxIcon(const wxIconLocation& loc) : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY) { } bool LoadFile(const wxString& name, wxBitmapType flags, int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) { return wxBitmap::LoadFile(name, flags); } // unhide the base class version virtual bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE) wxOVERRIDE { return wxBitmap::LoadFile(name, flags); } // create from bitmap (which should have a mask unless it's monochrome): // there shouldn't be any implicit bitmap -> icon conversion (i.e. no // ctors, assignment operators...), but it's ok to have such function void CopyFromBitmap(const wxBitmap& bmp); private: wxDECLARE_DYNAMIC_CLASS(wxIcon); }; #endif // _WX_GENERIC_ICON_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/printps.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/printps.h // Purpose: wxPostScriptPrinter, wxPostScriptPrintPreview // wxGenericPageSetupDialog // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __PRINTPSH__ #define __PRINTPSH__ #include "wx/prntbase.h" #if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT // ---------------------------------------------------------------------------- // Represents the printer: manages printing a wxPrintout object // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPostScriptPrinter : public wxPrinterBase { public: wxPostScriptPrinter(wxPrintDialogData *data = NULL); virtual ~wxPostScriptPrinter(); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true) wxOVERRIDE; virtual wxDC* PrintDialog(wxWindow *parent) wxOVERRIDE; virtual bool Setup(wxWindow *parent) wxOVERRIDE; private: wxDECLARE_DYNAMIC_CLASS(wxPostScriptPrinter); }; // ---------------------------------------------------------------------------- // wxPrintPreview: programmer creates an object of this class to preview a // wxPrintout. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPostScriptPrintPreview : public wxPrintPreviewBase { public: wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintDialogData *data = NULL); wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); virtual ~wxPostScriptPrintPreview(); virtual bool Print(bool interactive) wxOVERRIDE; virtual void DetermineScaling() wxOVERRIDE; private: void Init(wxPrintout *printout, wxPrintout *printoutForPrinting); private: wxDECLARE_CLASS(wxPostScriptPrintPreview); }; #endif #endif // __PRINTPSH__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/caret.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/caret.h // Purpose: generic wxCaret class // Author: Vadim Zeitlin (original code by Robert Roebling) // Modified by: // Created: 25.05.99 // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_CARET_H_ #define _WX_CARET_H_ #include "wx/timer.h" #include "wx/dc.h" #include "wx/overlay.h" #ifdef wxHAS_NATIVE_OVERLAY #define wxHAS_CARET_USING_OVERLAYS #endif class WXDLLIMPEXP_FWD_CORE wxCaret; class WXDLLIMPEXP_CORE wxCaretTimer : public wxTimer { public: wxCaretTimer(wxCaret *caret); virtual void Notify() wxOVERRIDE; private: wxCaret *m_caret; }; class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase { public: // ctors // ----- // default - use Create() wxCaret() : m_timer(this) { InitGeneric(); } // creates a block caret associated with the given window wxCaret(wxWindowBase *window, int width, int height) : wxCaretBase(window, width, height), m_timer(this) { InitGeneric(); } wxCaret(wxWindowBase *window, const wxSize& size) : wxCaretBase(window, size), m_timer(this) { InitGeneric(); } virtual ~wxCaret(); // implementation // -------------- // called by wxWindow (not using the event tables) virtual void OnSetFocus() wxOVERRIDE; virtual void OnKillFocus() wxOVERRIDE; // called by wxCaretTimer void OnTimer(); protected: virtual void DoShow() wxOVERRIDE; virtual void DoHide() wxOVERRIDE; virtual void DoMove() wxOVERRIDE; virtual void DoSize() wxOVERRIDE; // blink the caret once void Blink(); // refresh the caret void Refresh(); // draw the caret on the given DC void DoDraw(wxDC *dc, wxWindow* win); private: // GTK specific initialization void InitGeneric(); #ifdef wxHAS_CARET_USING_OVERLAYS // the overlay for displaying the caret wxOverlay m_overlay; #else // the bitmap holding the part of window hidden by the caret when it was // at (m_xOld, m_yOld) wxBitmap m_bmpUnderCaret; int m_xOld, m_yOld; #endif wxCaretTimer m_timer; bool m_blinkedOut, // true => caret hidden right now m_hasFocus; // true => our window has focus }; #endif // _WX_CARET_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/numdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/numdlgg.h // Purpose: wxNumberEntryDialog class // Author: John Labenski // Modified by: // Created: 07.02.04 (extracted from textdlgg.cpp) // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __NUMDLGH_G__ #define __NUMDLGH_G__ #include "wx/defs.h" #if wxUSE_NUMBERDLG #include "wx/dialog.h" #if wxUSE_SPINCTRL class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; #else class WXDLLIMPEXP_FWD_CORE wxTextCtrl; #endif // wxUSE_SPINCTRL // ---------------------------------------------------------------------------- // wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxNumberEntryDialog : public wxDialog { public: wxNumberEntryDialog() { m_value = m_min = m_max = 0; } wxNumberEntryDialog(wxWindow *parent, const wxString& message, const wxString& prompt, const wxString& caption, long value, long min, long max, const wxPoint& pos = wxDefaultPosition) { Create(parent, message, prompt, caption, value, min, max, pos); } bool Create(wxWindow *parent, const wxString& message, const wxString& prompt, const wxString& caption, long value, long min, long max, const wxPoint& pos = wxDefaultPosition); long GetValue() const { return m_value; } // implementation only void OnOK(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); protected: #if wxUSE_SPINCTRL wxSpinCtrl *m_spinctrl; #else wxTextCtrl *m_spinctrl; #endif // wxUSE_SPINCTRL long m_value, m_min, m_max; private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxNumberEntryDialog); wxDECLARE_NO_COPY_CLASS(wxNumberEntryDialog); }; // ---------------------------------------------------------------------------- // function to get a number from user // ---------------------------------------------------------------------------- WXDLLIMPEXP_CORE long wxGetNumberFromUser(const wxString& message, const wxString& prompt, const wxString& caption, long value = 0, long min = 0, long max = 100, wxWindow *parent = NULL, const wxPoint& pos = wxDefaultPosition); #endif // wxUSE_NUMBERDLG #endif // __NUMDLGH_G__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/prntdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/prntdlgg.h // Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog, // wxGenericPageSetupDialog // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __PRINTDLGH_G_ #define __PRINTDLGH_G_ #include "wx/defs.h" #if wxUSE_PRINTING_ARCHITECTURE #include "wx/dialog.h" #include "wx/cmndata.h" #include "wx/prntbase.h" #include "wx/printdlg.h" #include "wx/listctrl.h" #include "wx/dc.h" #if wxUSE_POSTSCRIPT #include "wx/dcps.h" #endif class WXDLLIMPEXP_FWD_CORE wxTextCtrl; class WXDLLIMPEXP_FWD_CORE wxButton; class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxComboBox; class WXDLLIMPEXP_FWD_CORE wxStaticText; class WXDLLIMPEXP_FWD_CORE wxRadioBox; class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogData; // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- // This is not clear why all these enums start with 10 or 30 but do not change it // without good reason to avoid some subtle backwards compatibility breakage enum { wxPRINTID_STATIC = 10, wxPRINTID_RANGE, wxPRINTID_FROM, wxPRINTID_TO, wxPRINTID_COPIES, wxPRINTID_PRINTTOFILE, wxPRINTID_SETUP }; enum { wxPRINTID_LEFTMARGIN = 30, wxPRINTID_RIGHTMARGIN, wxPRINTID_TOPMARGIN, wxPRINTID_BOTTOMMARGIN }; enum { wxPRINTID_PRINTCOLOUR = 10, wxPRINTID_ORIENTATION, wxPRINTID_COMMAND, wxPRINTID_OPTIONS, wxPRINTID_PAPERSIZE, wxPRINTID_PRINTER }; #if wxUSE_POSTSCRIPT //---------------------------------------------------------------------------- // wxPostScriptNativeData //---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPostScriptPrintNativeData: public wxPrintNativeDataBase { public: wxPostScriptPrintNativeData(); virtual ~wxPostScriptPrintNativeData(); virtual bool TransferTo( wxPrintData &data ) wxOVERRIDE; virtual bool TransferFrom( const wxPrintData &data ) wxOVERRIDE; virtual bool Ok() const wxOVERRIDE { return IsOk(); } virtual bool IsOk() const wxOVERRIDE { return true; } const wxString& GetPrinterCommand() const { return m_printerCommand; } const wxString& GetPrinterOptions() const { return m_printerOptions; } const wxString& GetPreviewCommand() const { return m_previewCommand; } const wxString& GetFontMetricPath() const { return m_afmPath; } double GetPrinterScaleX() const { return m_printerScaleX; } double GetPrinterScaleY() const { return m_printerScaleY; } long GetPrinterTranslateX() const { return m_printerTranslateX; } long GetPrinterTranslateY() const { return m_printerTranslateY; } void SetPrinterCommand(const wxString& command) { m_printerCommand = command; } void SetPrinterOptions(const wxString& options) { m_printerOptions = options; } void SetPreviewCommand(const wxString& command) { m_previewCommand = command; } void SetFontMetricPath(const wxString& path) { m_afmPath = path; } void SetPrinterScaleX(double x) { m_printerScaleX = x; } void SetPrinterScaleY(double y) { m_printerScaleY = y; } void SetPrinterScaling(double x, double y) { m_printerScaleX = x; m_printerScaleY = y; } void SetPrinterTranslateX(long x) { m_printerTranslateX = x; } void SetPrinterTranslateY(long y) { m_printerTranslateY = y; } void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; } #if wxUSE_STREAMS wxOutputStream *GetOutputStream() { return m_outputStream; } void SetOutputStream( wxOutputStream *output ) { m_outputStream = output; } #endif private: wxString m_printerCommand; wxString m_previewCommand; wxString m_printerOptions; wxString m_afmPath; double m_printerScaleX; double m_printerScaleY; long m_printerTranslateX; long m_printerTranslateY; #if wxUSE_STREAMS wxOutputStream *m_outputStream; #endif private: wxDECLARE_DYNAMIC_CLASS(wxPostScriptPrintNativeData); }; // ---------------------------------------------------------------------------- // Simulated Print and Print Setup dialogs for non-Windows platforms (and // Windows using PostScript print/preview) // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericPrintDialog : public wxPrintDialogBase { public: wxGenericPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); wxGenericPrintDialog(wxWindow *parent, wxPrintData* data); virtual ~wxGenericPrintDialog(); void OnSetup(wxCommandEvent& event); void OnRange(wxCommandEvent& event); void OnOK(wxCommandEvent& event); virtual bool TransferDataFromWindow() wxOVERRIDE; virtual bool TransferDataToWindow() wxOVERRIDE; virtual int ShowModal() wxOVERRIDE; wxPrintData& GetPrintData() wxOVERRIDE { return m_printDialogData.GetPrintData(); } wxPrintDialogData& GetPrintDialogData() wxOVERRIDE { return m_printDialogData; } wxDC *GetPrintDC() wxOVERRIDE; public: // wxStaticText* m_printerMessage; wxButton* m_setupButton; // wxButton* m_helpButton; wxRadioBox* m_rangeRadioBox; wxTextCtrl* m_fromText; wxTextCtrl* m_toText; wxTextCtrl* m_noCopiesText; wxCheckBox* m_printToFileCheckBox; // wxCheckBox* m_collateCopiesCheckBox; wxPrintDialogData m_printDialogData; protected: void Init(wxWindow *parent); private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericPrintDialog); }; class WXDLLIMPEXP_CORE wxGenericPrintSetupDialog : public wxDialog { public: // There are no configuration options for the dialog, so we // just pass the wxPrintData object (no wxPrintSetupDialogData class needed) wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data); virtual ~wxGenericPrintSetupDialog(); void Init(wxPrintData* data); void OnPrinter(wxListEvent& event); virtual bool TransferDataFromWindow() wxOVERRIDE; virtual bool TransferDataToWindow() wxOVERRIDE; virtual wxComboBox *CreatePaperTypeChoice(); public: wxListCtrl* m_printerListCtrl; wxRadioBox* m_orientationRadioBox; wxTextCtrl* m_printerCommandText; wxTextCtrl* m_printerOptionsText; wxCheckBox* m_colourCheckBox; wxComboBox* m_paperTypeChoice; wxPrintData m_printData; wxPrintData& GetPrintData() { return m_printData; } // After pressing OK, write data here. wxPrintData* m_targetData; private: wxDECLARE_EVENT_TABLE(); wxDECLARE_CLASS(wxGenericPrintSetupDialog); }; #endif // wxUSE_POSTSCRIPT class WXDLLIMPEXP_CORE wxGenericPageSetupDialog : public wxPageSetupDialogBase { public: wxGenericPageSetupDialog(wxWindow *parent = NULL, wxPageSetupDialogData* data = NULL); virtual ~wxGenericPageSetupDialog(); virtual bool TransferDataFromWindow() wxOVERRIDE; virtual bool TransferDataToWindow() wxOVERRIDE; virtual wxPageSetupDialogData& GetPageSetupDialogData() wxOVERRIDE; void OnPrinter(wxCommandEvent& event); wxComboBox *CreatePaperTypeChoice(int* x, int* y); public: wxButton* m_printerButton; wxRadioBox* m_orientationRadioBox; wxTextCtrl* m_marginLeftText; wxTextCtrl* m_marginTopText; wxTextCtrl* m_marginRightText; wxTextCtrl* m_marginBottomText; wxComboBox* m_paperTypeChoice; wxPageSetupDialogData m_pageData; private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericPageSetupDialog); }; #endif #endif // __PRINTDLGH_G_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/timectrl.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/timectrl.h // Purpose: Generic implementation of wxTimePickerCtrl. // Author: Paul Breen, Vadim Zeitlin // Created: 2011-09-22 // Copyright: (c) 2011 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_TIMECTRL_H_ #define _WX_GENERIC_TIMECTRL_H_ #include "wx/containr.h" #include "wx/compositewin.h" class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric : public wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> > { public: typedef wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> > Base; // Creating the control. wxTimePickerCtrlGeneric() { Init(); } virtual ~wxTimePickerCtrlGeneric(); wxTimePickerCtrlGeneric(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTP_DEFAULT, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTimePickerCtrlNameStr) { Init(); (void)Create(parent, id, date, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTP_DEFAULT, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTimePickerCtrlNameStr); // Implement pure virtual wxTimePickerCtrlBase methods. virtual void SetValue(const wxDateTime& date) wxOVERRIDE; virtual wxDateTime GetValue() const wxOVERRIDE; protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; private: void Init(); // Return the list of the windows composing this one. virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE; // Implementation data. class wxTimePickerGenericImpl* m_impl; wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric); }; #endif // _WX_GENERIC_TIMECTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/buttonbar.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/buttonbar.h // Purpose: wxButtonToolBar declaration // Author: Julian Smart, after Robert Roebling, Vadim Zeitlin, SciTech // Modified by: // Created: 2006-04-13 // Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin, // SciTech Software, Inc. // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_BUTTONBAR_H_ #define _WX_BUTTONBAR_H_ #include "wx/bmpbuttn.h" #include "wx/toolbar.h" class WXDLLIMPEXP_FWD_CORE wxButtonToolBarTool; // ---------------------------------------------------------------------------- // wxButtonToolBar // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxButtonToolBar : public wxToolBarBase { public: // construction/destruction wxButtonToolBar() { Init(); } wxButtonToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxToolBarNameStr) { Init(); Create(parent, id, pos, size, style, name); } bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxToolBarNameStr ); virtual ~wxButtonToolBar(); virtual bool Realize() wxOVERRIDE; virtual void SetToolShortHelp(int id, const wxString& helpString) wxOVERRIDE; virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE; protected: // common part of all ctors void Init(); // implement base class pure virtuals 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; virtual wxToolBarToolBase *CreateTool(int id, const wxString& label, const wxBitmap& bmpNormal, const wxBitmap& bmpDisabled, wxItemKind kind, wxObject *clientData, const wxString& shortHelp, const wxString& longHelp) wxOVERRIDE; virtual wxToolBarToolBase *CreateTool(wxControl *control, const wxString& label) wxOVERRIDE; virtual wxSize DoGetBestClientSize() const wxOVERRIDE; // calculate layout void DoLayout(); // get the bounding rect for the given tool wxRect GetToolRect(wxToolBarToolBase *tool) const; // get the rect limits depending on the orientation: top/bottom for a // vertical toolbar, left/right for a horizontal one void GetRectLimits(const wxRect& rect, wxCoord *start, wxCoord *end) const; // receives button commands void OnCommand(wxCommandEvent& event); // paints a border void OnPaint(wxPaintEvent& event); // detects mouse clicks outside buttons void OnLeftUp(wxMouseEvent& event); private: // have we calculated the positions of our tools? bool m_needsLayout; // the width of a separator wxCoord m_widthSeparator; // the total size of all toolbar elements wxCoord m_maxWidth, m_maxHeight; // the height of a label int m_labelHeight; // the space above the label int m_labelMargin; private: wxDECLARE_DYNAMIC_CLASS(wxButtonToolBar); wxDECLARE_EVENT_TABLE(); }; #endif // _WX_BUTTONBAR_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/scrolwin.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/scrolwin.h // Purpose: generic wxScrollHelper // Author: Vadim Zeitlin // Created: 2008-12-24 (replacing old file with the same name) // Copyright: (c) 2008 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_SCROLLWIN_H_ #define _WX_GENERIC_SCROLLWIN_H_ #include "wx/recguard.h" // ---------------------------------------------------------------------------- // generic wxScrollHelper implementation // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase { public: wxScrollHelper(wxWindow *winToScroll); // implement base class pure virtuals virtual void AdjustScrollbars() wxOVERRIDE; virtual bool IsScrollbarShown(int orient) const wxOVERRIDE; protected: virtual void DoScroll(int x, int y) wxOVERRIDE; virtual void DoShowScrollbars(wxScrollbarVisibility horz, wxScrollbarVisibility vert) wxOVERRIDE; private: // helper of AdjustScrollbars(): does the work for the single scrollbar // // notice that the parameters passed by non-const references are modified // by this function void DoAdjustScrollbar(int orient, int clientSize, int virtSize, int pixelsPerUnit, int& scrollUnits, int& scrollPosition, int& scrollLinesPerPage, wxScrollbarVisibility visibility); wxScrollbarVisibility m_xVisibility, m_yVisibility; wxRecursionGuardFlag m_adjustScrollFlagReentrancy; wxDECLARE_NO_COPY_CLASS(wxScrollHelper); }; #endif // _WX_GENERIC_SCROLLWIN_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/splitter.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/splitter.h // Purpose: wxSplitterWindow class // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_SPLITTER_H_ #define _WX_GENERIC_SPLITTER_H_ #include "wx/window.h" // base class declaration #include "wx/containr.h" // wxControlContainer class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; // --------------------------------------------------------------------------- // splitter constants // --------------------------------------------------------------------------- enum wxSplitMode { wxSPLIT_HORIZONTAL = 1, wxSPLIT_VERTICAL }; enum { wxSPLIT_DRAG_NONE, wxSPLIT_DRAG_DRAGGING, wxSPLIT_DRAG_LEFT_DOWN }; // --------------------------------------------------------------------------- // wxSplitterWindow maintains one or two panes, with // an optional vertical or horizontal split which // can be used with the mouse or programmatically. // --------------------------------------------------------------------------- // TODO: // 1) Perhaps make the borders sensitive to dragging in order to create a split. // The MFC splitter window manages scrollbars as well so is able to // put sash buttons on the scrollbars, but we probably don't want to go down // this path. // 2) for wxWidgets 2.0, we must find a way to set the WS_CLIPCHILDREN style // to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be // standard). class WXDLLIMPEXP_CORE wxSplitterWindow: public wxNavigationEnabled<wxWindow> { public: //////////////////////////////////////////////////////////////////////////// // Public API // Default constructor wxSplitterWindow() { Init(); } // Normal constructor wxSplitterWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, const wxString& name = wxT("splitter")) { Init(); Create(parent, id, pos, size, style, name); } virtual ~wxSplitterWindow(); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, const wxString& name = wxT("splitter")); // Gets the only or left/top pane wxWindow *GetWindow1() const { return m_windowOne; } // Gets the right/bottom pane wxWindow *GetWindow2() const { return m_windowTwo; } // Sets the split mode void SetSplitMode(int mode) { wxASSERT_MSG( mode == wxSPLIT_VERTICAL || mode == wxSPLIT_HORIZONTAL, wxT("invalid split mode") ); m_splitMode = (wxSplitMode)mode; } // Gets the split mode wxSplitMode GetSplitMode() const { return m_splitMode; } // Initialize with one window void Initialize(wxWindow *window); // Associates the given window with window 2, drawing the appropriate sash // and changing the split mode. // Does nothing and returns false if the window is already split. // A sashPosition of 0 means choose a default sash position, // negative sashPosition specifies the size of right/lower pane as its // absolute value rather than the size of left/upper pane. virtual bool SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition = 0) { return DoSplit(wxSPLIT_VERTICAL, window1, window2, sashPosition); } virtual bool SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition = 0) { return DoSplit(wxSPLIT_HORIZONTAL, window1, window2, sashPosition); } // Removes the specified (or second) window from the view // Doesn't actually delete the window. bool Unsplit(wxWindow *toRemove = NULL); // Replaces one of the windows with another one (neither old nor new // parameter should be NULL) bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew); // Make sure the child window sizes are updated. This is useful // for reducing flicker by updating the sizes before a // window is shown, if you know the overall size is correct. void UpdateSize(); // Is the window split? bool IsSplit() const { return (m_windowTwo != NULL); } // Sets the border size void SetBorderSize(int WXUNUSED(width)) { } // Hide or show the sash and test whether it's currently hidden. void SetSashInvisible(bool invisible = true); bool IsSashInvisible() const { return HasFlag(wxSP_NOSASH); } // Gets the current sash size which may be 0 if it's hidden and the default // sash size. int GetSashSize() const; int GetDefaultSashSize() const; // Gets the border size int GetBorderSize() const; // Set the sash position void SetSashPosition(int position, bool redraw = true); // Gets the sash position int GetSashPosition() const { return m_sashPosition; } // Set the sash gravity void SetSashGravity(double gravity); // Gets the sash gravity double GetSashGravity() const { return m_sashGravity; } // If this is zero, we can remove panes by dragging the sash. void SetMinimumPaneSize(int min); int GetMinimumPaneSize() const { return m_minimumPaneSize; } // NB: the OnXXX() functions below are for backwards compatibility only, // don't use them in new code but handle the events instead! // called when the sash position is about to change, may return a new value // for the sash or -1 to prevent the change from happening at all virtual int OnSashPositionChanging(int newSashPosition); // Called when the sash position is about to be changed, return // false from here to prevent the change from taking place. // Repositions sash to minimum position if pane would be too small. // newSashPosition here is always positive or zero. virtual bool OnSashPositionChange(int newSashPosition); // If the sash is moved to an extreme position, a subwindow // is removed from the splitter window, and the app is // notified. The app should delete or hide the window. virtual void OnUnsplit(wxWindow *removed); // Called when the sash is double-clicked. // The default behaviour is to remove the sash if the // minimum pane size is zero. virtual void OnDoubleClickSash(int x, int y); //////////////////////////////////////////////////////////////////////////// // Implementation // Paints the border and sash void OnPaint(wxPaintEvent& event); // Handles mouse events void OnMouseEvent(wxMouseEvent& ev); // Aborts dragging mode void OnMouseCaptureLost(wxMouseCaptureLostEvent& event); // Adjusts the panes void OnSize(wxSizeEvent& event); // In live mode, resize child windows in idle time void OnInternalIdle() wxOVERRIDE; // Draws the sash virtual void DrawSash(wxDC& dc); // Draws the sash tracker (for whilst moving the sash) virtual void DrawSashTracker(int x, int y); // Tests for x, y over sash virtual bool SashHitTest(int x, int y); // Resizes subwindows virtual void SizeWindows(); #ifdef __WXMAC__ virtual bool MacClipGrandChildren() const wxOVERRIDE { return true ; } #endif // Sets the sash size: this doesn't do anything and shouldn't be used at // all any more. wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; ) protected: // event handlers #if defined(__WXMSW__) || defined(__WXMAC__) void OnSetCursor(wxSetCursorEvent& event); #endif // wxMSW // send the given event, return false if the event was processed and vetoed // by the user code bool DoSendEvent(wxSplitterEvent& event); // common part of all ctors void Init(); // common part of SplitVertically() and SplitHorizontally() bool DoSplit(wxSplitMode mode, wxWindow *window1, wxWindow *window2, int sashPosition); // adjusts sash position with respect to min. pane and window sizes int AdjustSashPosition(int sashPos) const; // get either width or height depending on the split mode int GetWindowSize() const; // convert the user specified sash position which may be > 0 (as is), < 0 // (specifying the size of the right pane) or 0 (use default) to the real // position to be passed to DoSetSashPosition() int ConvertSashPosition(int sashPos) const; // set the real sash position, sashPos here must be positive // // returns true if the sash position has been changed, false otherwise bool DoSetSashPosition(int sashPos); // set the sash position and send an event about it having been changed void SetSashPositionAndNotify(int sashPos); // callbacks executed when we detect that the mouse has entered or left // the sash virtual void OnEnterSash(); virtual void OnLeaveSash(); // set the cursor appropriate for the current split mode void SetResizeCursor(); // redraw the splitter if its "hotness" changed if necessary void RedrawIfHotSensitive(bool isHot); // return the best size of the splitter equal to best sizes of its // subwindows virtual wxSize DoGetBestSize() const wxOVERRIDE; wxSplitMode m_splitMode; wxWindow* m_windowOne; wxWindow* m_windowTwo; int m_dragMode; int m_oldX; // current tracker position if not live mode int m_oldY; // current tracker position if not live mode int m_sashPosition; // Number of pixels from left or top double m_sashGravity; wxSize m_lastSize; int m_requestedSashPosition; int m_sashPositionCurrent; // while dragging wxPoint m_ptStart; // mouse position when dragging started int m_sashStart; // sash position when dragging started int m_minimumPaneSize; wxCursor m_sashCursorWE; wxCursor m_sashCursorNS; wxPen *m_sashTrackerPen; // when in live mode, set this to true to resize children in idle bool m_needUpdating:1; bool m_permitUnsplitAlways:1; bool m_isHot:1; private: wxDECLARE_DYNAMIC_CLASS(wxSplitterWindow); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxSplitterWindow); }; // ---------------------------------------------------------------------------- // event class and macros // ---------------------------------------------------------------------------- // we reuse the same class for all splitter event types because this is the // usual wxWin convention, but the three event types have different kind of // data associated with them, so the accessors can be only used if the real // event type matches with the one for which the accessors make sense class WXDLLIMPEXP_CORE wxSplitterEvent : public wxNotifyEvent { public: wxSplitterEvent(wxEventType type = wxEVT_NULL, wxSplitterWindow *splitter = NULL) : wxNotifyEvent(type) { SetEventObject(splitter); if (splitter) m_id = splitter->GetId(); } wxSplitterEvent(const wxSplitterEvent& event) : wxNotifyEvent(event), m_data(event.m_data) { } // SASH_POS_CHANGED methods // setting the sash position to -1 prevents the change from taking place at // all void SetSashPosition(int pos) { wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); m_data.pos = pos; } int GetSashPosition() const { wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); return m_data.pos; } // UNSPLIT event methods wxWindow *GetWindowBeingRemoved() const { wxASSERT( GetEventType() == wxEVT_SPLITTER_UNSPLIT ); return m_data.win; } // DCLICK event methods int GetX() const { wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.x; } int GetY() const { wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.y; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxSplitterEvent(*this); } private: friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow; // data for the different types of event union { int pos; // position for SASH_POS_CHANGED event wxWindow *win; // window being removed for UNSPLIT event struct { int x, y; } pt; // position of double click for DCLICK event } m_data; wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSplitterEvent); }; typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); #define wxSplitterEventHandler(func) \ wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func) #define wx__DECLARE_SPLITTEREVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) #define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn) #define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGING, id, fn) #define EVT_SPLITTER_DCLICK(id, fn) \ wx__DECLARE_SPLITTEREVT(DOUBLECLICKED, id, fn) #define EVT_SPLITTER_UNSPLIT(id, fn) \ wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn) // old wxEVT_COMMAND_* constants #define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_SPLITTER_SASH_POS_CHANGED #define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_SPLITTER_SASH_POS_CHANGING #define wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_SPLITTER_DOUBLECLICKED #define wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_SPLITTER_UNSPLIT #endif // _WX_GENERIC_SPLITTER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/richmsgdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/richmsgdlgg.h // Purpose: wxGenericRichMessageDialog // Author: Rickard Westerlund // Created: 2010-07-04 // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_RICHMSGDLGG_H_ #define _WX_GENERIC_RICHMSGDLGG_H_ class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane; class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent; class WXDLLIMPEXP_CORE wxGenericRichMessageDialog : public wxRichMessageDialogBase { public: wxGenericRichMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, long style = wxOK | wxCENTRE) : wxRichMessageDialogBase( parent, message, caption, style ), m_checkBox(NULL), m_detailsPane(NULL) { } virtual bool IsCheckBoxChecked() const wxOVERRIDE; protected: wxCheckBox *m_checkBox; wxCollapsiblePane *m_detailsPane; // overrides methods in the base class virtual void AddMessageDialogCheckBox(wxSizer *sizer) wxOVERRIDE; virtual void AddMessageDialogDetails(wxSizer *sizer) wxOVERRIDE; private: void OnPaneChanged(wxCollapsiblePaneEvent& event); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxGenericRichMessageDialog); }; #endif // _WX_GENERIC_RICHMSGDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dcpsg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dcpsg.h // Purpose: wxPostScriptDC class // Author: Julian Smart and others // Modified by: // Copyright: (c) Julian Smart and Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DCPSG_H_ #define _WX_DCPSG_H_ #include "wx/defs.h" #if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT #include "wx/dc.h" #include "wx/dcprint.h" #include "wx/dialog.h" #include "wx/module.h" #include "wx/cmndata.h" #include "wx/strvararg.h" //----------------------------------------------------------------------------- // wxPostScriptDC //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxPostScriptDC : public wxDC { public: wxPostScriptDC(); // Recommended constructor wxPostScriptDC(const wxPrintData& printData); private: wxDECLARE_DYNAMIC_CLASS(wxPostScriptDC); }; class WXDLLIMPEXP_CORE wxPostScriptDCImpl : public wxDCImpl { public: wxPostScriptDCImpl( wxPrinterDC *owner ); wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& data ); wxPostScriptDCImpl( wxPostScriptDC *owner ); wxPostScriptDCImpl( wxPostScriptDC *owner, const wxPrintData& data ); void Init(); virtual ~wxPostScriptDCImpl(); virtual bool Ok() const { return IsOk(); } virtual bool IsOk() const wxOVERRIDE; bool CanDrawBitmap() const wxOVERRIDE { return true; } void Clear() wxOVERRIDE; void SetFont( const wxFont& font ) wxOVERRIDE; void SetPen( const wxPen& pen ) wxOVERRIDE; void SetBrush( const wxBrush& brush ) wxOVERRIDE; void SetLogicalFunction( wxRasterOperationMode function ) wxOVERRIDE; void SetBackground( const wxBrush& brush ) wxOVERRIDE; void DestroyClippingRegion() wxOVERRIDE; bool StartDoc(const wxString& message) wxOVERRIDE; void EndDoc() wxOVERRIDE; void StartPage() wxOVERRIDE; void EndPage() wxOVERRIDE; wxCoord GetCharHeight() const wxOVERRIDE; wxCoord GetCharWidth() const wxOVERRIDE; bool CanGetTextExtent() const wxOVERRIDE { return true; } // Resolution in pixels per logical inch wxSize GetPPI() const wxOVERRIDE; virtual void ComputeScaleAndOrigin() wxOVERRIDE; void SetBackgroundMode(int WXUNUSED(mode)) wxOVERRIDE { } #if wxUSE_PALETTE void SetPalette(const wxPalette& WXUNUSED(palette)) wxOVERRIDE { } #endif void SetPrintData(const wxPrintData& data); wxPrintData& GetPrintData() { return m_printData; } virtual int GetDepth() const wxOVERRIDE { return 24; } void PsPrint( const wxString& psdata ); // Overrridden for wxPrinterDC Impl virtual int GetResolution() const wxOVERRIDE; virtual wxRect GetPaperRect() const wxOVERRIDE; virtual void* GetHandle() const wxOVERRIDE { return NULL; } protected: bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style = wxFLOOD_SURFACE) wxOVERRIDE; bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const wxOVERRIDE; void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) wxOVERRIDE; void DoCrossHair(wxCoord x, wxCoord y) wxOVERRIDE ; void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc) wxOVERRIDE; void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) wxOVERRIDE; void DoDrawPoint(wxCoord x, wxCoord y) wxOVERRIDE; void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0) wxOVERRIDE; void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) wxOVERRIDE; void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) wxOVERRIDE; void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE; void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20) wxOVERRIDE; void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE; #if wxUSE_SPLINES void DoDrawSpline(const wxPointList *points) wxOVERRIDE; #endif 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) wxOVERRIDE; void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) wxOVERRIDE; void DoDrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false) wxOVERRIDE; void DoDrawText(const wxString& text, wxCoord x, wxCoord y) wxOVERRIDE; void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) wxOVERRIDE; void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE; void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip)) wxOVERRIDE { wxFAIL_MSG( "not implemented" ); } void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, const wxFont *theFont = NULL) const wxOVERRIDE; void DoGetSize(int* width, int* height) const wxOVERRIDE; void DoGetSizeMM(int *width, int *height) const wxOVERRIDE; // Common part of DoDrawText() and DoDrawRotatedText() void DrawAnyText(const wxWX2MBbuf& textbuf, wxCoord testDescent, double lineHeight); // Actually set PostScript font void SetPSFont(); // Set PostScript color void SetPSColour(const wxColour& col); FILE* m_pstream; // PostScript output stream unsigned char m_currentRed; unsigned char m_currentGreen; unsigned char m_currentBlue; int m_pageNumber; bool m_clipping; double m_underlinePosition; double m_underlineThickness; wxPrintData m_printData; double m_pageHeight; wxArrayString m_definedPSFonts; bool m_isFontChanged; private: wxDECLARE_DYNAMIC_CLASS(wxPostScriptDCImpl); }; #endif // wxUSE_POSTSCRIPT && wxUSE_PRINTING_ARCHITECTURE #endif // _WX_DCPSG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/busyinfo.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/busyinfo.h // Purpose: Information window (when app is busy) // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_BUSYINFO_H_ #define _WX_BUSYINFO_H_ #include "wx/defs.h" #if wxUSE_BUSYINFO #include "wx/object.h" class WXDLLIMPEXP_FWD_CORE wxFrame; class WXDLLIMPEXP_FWD_CORE wxWindow; //-------------------------------------------------------------------------------- // wxBusyInfo // Displays progress information // Can be used in exactly same way as wxBusyCursor //-------------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxBusyInfo : public wxObject { public: wxBusyInfo(const wxBusyInfoFlags& flags) { Init(flags); } wxBusyInfo(const wxString& message, wxWindow *parent = NULL) { Init(wxBusyInfoFlags().Parent(parent).Label(message)); } virtual ~wxBusyInfo(); private: void Init(const wxBusyInfoFlags& flags); wxFrame *m_InfoFrame; wxDECLARE_NO_COPY_CLASS(wxBusyInfo); }; #endif // wxUSE_BUSYINFO #endif // _WX_BUSYINFO_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/notebook.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/notebook.h // Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog) // Author: Julian Smart // Modified by: // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_NOTEBOOK_H_ #define _WX_NOTEBOOK_H_ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- #include "wx/event.h" #include "wx/control.h" // ---------------------------------------------------------------------------- // types // ---------------------------------------------------------------------------- // fwd declarations class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxTabView; // ---------------------------------------------------------------------------- // wxNotebook // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase { public: // ctors // ----- // default for dynamic class wxNotebook(); // the same arguments as for wxControl (@@@ any special styles?) wxNotebook(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxNotebookNameStr); // Create() function bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxNotebookNameStr); // dtor virtual ~wxNotebook(); // accessors // --------- // Find the position of the wxNotebookPage, wxNOT_FOUND if not found. int FindPagePosition(wxNotebookPage* page) const; // set the currently selected page, return the index of the previously // selected one (or wxNOT_FOUND on error) // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events int SetSelection(size_t nPage); // cycle thru the tabs // void AdvanceSelection(bool bForward = true); // changes selected page without sending events int ChangeSelection(size_t nPage); // set/get the title of a page bool SetPageText(size_t nPage, const wxString& strText); wxString GetPageText(size_t nPage) const; // get the number of rows for a control with wxNB_MULTILINE style (not all // versions support it - they will always return 1 then) virtual int GetRowCount() const ; // sets/returns item's image index in the current image list int GetPageImage(size_t nPage) const; bool SetPageImage(size_t nPage, int nImage); // control the appearance of the notebook pages // set the size (the same for all pages) void SetPageSize(const wxSize& size); // set the padding between tabs (in pixels) void SetPadding(const wxSize& padding); // Sets the size of the tabs (assumes all tabs are the same size) void SetTabSize(const wxSize& sz); // operations // ---------- // remove one page from the notebook, and delete the page. bool DeletePage(size_t nPage); bool DeletePage(wxNotebookPage* page); // remove one page from the notebook, without deleting the page. bool RemovePage(size_t nPage); bool RemovePage(wxNotebookPage* page); virtual wxWindow* DoRemovePage(size_t nPage); // remove all pages bool DeleteAllPages(); // the same as AddPage(), but adds it at the specified position bool InsertPage(size_t nPage, wxNotebookPage *pPage, const wxString& strText, bool bSelect = false, int imageId = NO_IMAGE); // callbacks // --------- void OnSize(wxSizeEvent& event); void OnInternalIdle(); void OnSelChange(wxBookCtrlEvent& event); void OnSetFocus(wxFocusEvent& event); void OnNavigationKey(wxNavigationKeyEvent& event); // base class virtuals // ------------------- virtual void Command(wxCommandEvent& event); virtual void SetConstraintSizes(bool recurse = true); virtual bool DoPhase(int nPhase); virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; // Implementation // wxNotebook on Motif uses a generic wxTabView to implement itself. wxTabView *GetTabView() const { return m_tabView; } void SetTabView(wxTabView *v) { m_tabView = v; } void OnMouseEvent(wxMouseEvent& event); void OnPaint(wxPaintEvent& event); virtual wxRect GetAvailableClientSize(); // Implementation: calculate the layout of the view rect // and resize the children if required bool RefreshLayout(bool force = true); protected: // common part of all ctors void Init(); // helper functions void ChangePage(int nOldSel, int nSel); // change pages wxTabView* m_tabView; wxDECLARE_DYNAMIC_CLASS(wxNotebook); wxDECLARE_EVENT_TABLE(); }; #endif // _WX_NOTEBOOK_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dirdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dirdlgg.h // Purpose: wxGenericDirCtrl class // Builds on wxDirCtrl class written by Robert Roebling for the // wxFile application, modified by Harm van der Heijden. // Further modified for Windows. // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al // Modified by: // Created: 21/3/2000 // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIRDLGG_H_ #define _WX_DIRDLGG_H_ class WXDLLIMPEXP_FWD_CORE wxGenericDirCtrl; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; class WXDLLIMPEXP_FWD_CORE wxTreeEvent; // we may be included directly as well as from wx/dirdlg.h (FIXME) extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxDirSelectorPromptStr[]; #ifndef wxDD_DEFAULT_STYLE #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) #endif #include "wx/dialog.h" //----------------------------------------------------------------------------- // wxGenericDirDialog //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericDirDialog : public wxDirDialogBase { public: wxGenericDirDialog() : wxDirDialogBase() { } wxGenericDirDialog(wxWindow* parent, const wxString& title = wxDirSelectorPromptStr, const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,//Size(450, 550), const wxString& name = wxDirDialogNameStr); bool Create(wxWindow* parent, const wxString& title = wxDirSelectorPromptStr, const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,//Size(450, 550), const wxString& name = wxDirDialogNameStr); //// Accessors void SetPath(const wxString& path) wxOVERRIDE; wxString GetPath() const wxOVERRIDE; //// Overrides virtual int ShowModal() wxOVERRIDE; virtual void EndModal(int retCode) wxOVERRIDE; // this one is specific to wxGenericDirDialog wxTextCtrl* GetInputCtrl() const { return m_input; } protected: //// Event handlers void OnCloseWindow(wxCloseEvent& event); void OnOK(wxCommandEvent& event); void OnTreeSelected(wxTreeEvent &event); void OnTreeKeyDown(wxTreeEvent &event); void OnNew(wxCommandEvent& event); void OnGoHome(wxCommandEvent& event); void OnShowHidden(wxCommandEvent& event); wxGenericDirCtrl* m_dirCtrl; wxTextCtrl* m_input; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericDirDialog); }; #endif // _WX_DIRDLGG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/statline.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/statline.h // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_STATLINE_H_ #define _WX_GENERIC_STATLINE_H_ class wxStaticBox; // ---------------------------------------------------------------------------- // wxStaticLine // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase { wxDECLARE_DYNAMIC_CLASS(wxStaticLine); public: // constructors and pseudo-constructors wxStaticLine() { m_statbox = NULL; } wxStaticLine( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticLineNameStr ) { Create(parent, id, pos, size, style, name); } virtual ~wxStaticLine(); bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticLineNameStr ); // it's necessary to override this wxWindow function because we // will want to return the main widget for m_statbox // WXWidget GetMainWidget() const; // override wxWindow methods to make things work virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual void DoMoveWindow(int x, int y, int width, int height); protected: // we implement the static line using a static box wxStaticBox *m_statbox; }; #endif // _WX_GENERIC_STATLINE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dvrenderers.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dvrenderers.h // Purpose: All generic wxDataViewCtrl renderer classes // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/generic/dataview.h) // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_DVRENDERERS_H_ #define _WX_GENERIC_DVRENDERERS_H_ // --------------------------------------------------------- // 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 ); // see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h virtual bool WXActivateCell(const wxRect& cell, wxDataViewModel *model, const wxDataViewItem& item, unsigned int col, const wxMouseEvent *mouseEvent) wxOVERRIDE { return ActivateCell(cell, model, item, col, mouseEvent); } #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer); }; // --------------------------------------------------------- // 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 ); virtual ~wxDataViewTextRenderer(); #if wxUSE_MARKUP void EnableMarkup(bool enable = true); #endif // wxUSE_MARKUP virtual bool SetValue( const wxVariant &value ) wxOVERRIDE; virtual bool GetValue( wxVariant &value ) const wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Render(wxRect cell, wxDC *dc, int state) wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; // in-place editing virtual bool HasEditorCtrl() const wxOVERRIDE; virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) wxOVERRIDE; virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ) wxOVERRIDE; protected: wxString m_text; private: #if wxUSE_MARKUP class wxItemMarkupText *m_markupText; #endif // wxUSE_MARKUP wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer); }; // --------------------------------------------------------- // 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 ); virtual bool SetValue( const wxVariant &value ) wxOVERRIDE; virtual bool GetValue( wxVariant &value ) const wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Render( wxRect cell, wxDC *dc, int state ) wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; private: wxIcon m_icon; wxBitmap m_bitmap; protected: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer); }; // --------------------------------------------------------- // 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 ); void ShowAsRadio() { m_radio = true; } virtual bool SetValue( const wxVariant &value ) wxOVERRIDE; virtual bool GetValue( wxVariant &value ) const wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Render( wxRect cell, wxDC *dc, int state ) wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; // Implementation only, don't use nor override virtual bool WXActivateCell(const wxRect& cell, wxDataViewModel *model, const wxDataViewItem& item, unsigned int col, const wxMouseEvent *mouseEvent) wxOVERRIDE; private: bool m_toggle; bool m_radio; protected: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer); }; // --------------------------------------------------------- // wxDataViewProgressRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewRenderer { 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 bool SetValue( const wxVariant &value ) wxOVERRIDE; virtual bool GetValue( wxVariant& value ) const wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Render(wxRect cell, wxDC *dc, int state) wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; private: wxString m_label; int m_value; protected: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer); }; // --------------------------------------------------------- // wxDataViewIconTextRenderer // --------------------------------------------------------- class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewRenderer { public: static wxString GetDefaultType() { return wxS("wxDataViewIconText"); } wxDataViewIconTextRenderer( const wxString &varianttype = GetDefaultType(), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); virtual bool SetValue( const wxVariant &value ) wxOVERRIDE; virtual bool GetValue( wxVariant &value ) const wxOVERRIDE; #if wxUSE_ACCESSIBILITY virtual wxString GetAccessibleDescription() const wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY virtual bool Render(wxRect cell, wxDC *dc, int state) wxOVERRIDE; virtual wxSize GetSize() const wxOVERRIDE; virtual bool HasEditorCtrl() const wxOVERRIDE { return true; } virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) wxOVERRIDE; virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ) wxOVERRIDE; private: wxDataViewIconText m_value; protected: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer); }; #endif // _WX_GENERIC_DVRENDERERS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/splash.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/splash.h // Purpose: Splash screen class // Author: Julian Smart // Modified by: // Created: 28/6/2000 // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_SPLASH_H_ #define _WX_SPLASH_H_ #include "wx/bitmap.h" #include "wx/eventfilter.h" #include "wx/frame.h" #include "wx/timer.h" /* * A window for displaying a splash screen */ #define wxSPLASH_CENTRE_ON_PARENT 0x01 #define wxSPLASH_CENTRE_ON_SCREEN 0x02 #define wxSPLASH_NO_CENTRE 0x00 #define wxSPLASH_TIMEOUT 0x04 #define wxSPLASH_NO_TIMEOUT 0x00 class WXDLLIMPEXP_FWD_CORE wxSplashScreenWindow; /* * wxSplashScreen */ class WXDLLIMPEXP_CORE wxSplashScreen: public wxFrame, public wxEventFilter { public: // for RTTI macros only wxSplashScreen() { Init(); } wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); virtual ~wxSplashScreen(); void OnCloseWindow(wxCloseEvent& event); void OnNotify(wxTimerEvent& event); long GetSplashStyle() const { return m_splashStyle; } wxSplashScreenWindow* GetSplashWindow() const { return m_window; } int GetTimeout() const { return m_milliseconds; } // Override wxEventFilter method to hide splash screen on any user input. virtual int FilterEvent(wxEvent& event) wxOVERRIDE; protected: // Common part of all ctors. void Init(); wxSplashScreenWindow* m_window; long m_splashStyle; int m_milliseconds; wxTimer m_timer; wxDECLARE_DYNAMIC_CLASS(wxSplashScreen); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxSplashScreen); }; /* * wxSplashScreenWindow */ class WXDLLIMPEXP_CORE wxSplashScreenWindow: public wxWindow { public: wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); void OnPaint(wxPaintEvent& event); void OnEraseBackground(wxEraseEvent& event); void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } wxBitmap& GetBitmap() { return m_bitmap; } protected: wxBitmap m_bitmap; wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxSplashScreenWindow); }; #endif // _WX_SPLASH_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/grideditors.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/grideditors.h // Purpose: wxGridCellEditorEvtHandler and wxGrid editors // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_GRID_EDITORS_H_ #define _WX_GENERIC_GRID_EDITORS_H_ #include "wx/defs.h" #if wxUSE_GRID #include "wx/scopedptr.h" class wxGridCellEditorEvtHandler : public wxEvtHandler { public: wxGridCellEditorEvtHandler(wxGrid* grid, wxGridCellEditor* editor) : m_grid(grid), m_editor(editor), m_inSetFocus(false) { } void OnKillFocus(wxFocusEvent& event); void OnKeyDown(wxKeyEvent& event); void OnChar(wxKeyEvent& event); void SetInSetFocus(bool inSetFocus) { m_inSetFocus = inSetFocus; } private: wxGrid *m_grid; wxGridCellEditor *m_editor; // Work around the fact that a focus kill event can be sent to // a combobox within a set focus event. bool m_inSetFocus; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGridCellEditorEvtHandler); wxDECLARE_NO_COPY_CLASS(wxGridCellEditorEvtHandler); }; #if wxUSE_TEXTCTRL // the editor for string/text data class WXDLLIMPEXP_ADV wxGridCellTextEditor : public wxGridCellEditor { public: explicit wxGridCellTextEditor(size_t maxChars = 0); virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual void SetSize(const wxRect& rect) wxOVERRIDE; virtual void PaintBackground(wxDC& dc, const wxRect& rectCell, const wxGridCellAttr& attr) wxOVERRIDE; virtual bool IsAcceptedKey(wxKeyEvent& event) wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual void Reset() wxOVERRIDE; virtual void StartingKey(wxKeyEvent& event) wxOVERRIDE; virtual void HandleReturn(wxKeyEvent& event) wxOVERRIDE; // parameters string format is "max_width" virtual void SetParameters(const wxString& params) wxOVERRIDE; #if wxUSE_VALIDATORS virtual void SetValidator(const wxValidator& validator); #endif virtual wxGridCellEditor *Clone() const wxOVERRIDE; // added GetValue so we can get the value which is in the control virtual wxString GetValue() const wxOVERRIDE; protected: wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; } // parts of our virtual functions reused by the derived classes void DoCreate(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler, long style = 0); void DoBeginEdit(const wxString& startValue); void DoReset(const wxString& startValue); private: size_t m_maxChars; // max number of chars allowed #if wxUSE_VALIDATORS wxScopedPtr<wxValidator> m_validator; #endif wxString m_value; wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor); }; // the editor for numeric (long) data class WXDLLIMPEXP_ADV wxGridCellNumberEditor : public wxGridCellTextEditor { public: // allows to specify the range - if min == max == -1, no range checking is // done wxGridCellNumberEditor(int min = -1, int max = -1); virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual bool IsAcceptedKey(wxKeyEvent& event) wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual void Reset() wxOVERRIDE; virtual void StartingKey(wxKeyEvent& event) wxOVERRIDE; // parameters string format is "min,max" virtual void SetParameters(const wxString& params) wxOVERRIDE; virtual wxGridCellEditor *Clone() const wxOVERRIDE { return new wxGridCellNumberEditor(m_min, m_max); } // added GetValue so we can get the value which is in the control virtual wxString GetValue() const wxOVERRIDE; protected: #if wxUSE_SPINCTRL wxSpinCtrl *Spin() const { return (wxSpinCtrl *)m_control; } #endif // if HasRange(), we use wxSpinCtrl - otherwise wxTextCtrl bool HasRange() const { #if wxUSE_SPINCTRL return m_min != m_max; #else return false; #endif } // string representation of our value wxString GetString() const { return wxString::Format(wxT("%ld"), m_value); } private: int m_min, m_max; long m_value; wxDECLARE_NO_COPY_CLASS(wxGridCellNumberEditor); }; enum wxGridCellFloatFormat { // Decimal floating point (%f) wxGRID_FLOAT_FORMAT_FIXED = 0x0010, // Scientific notation (mantise/exponent) using e character (%e) wxGRID_FLOAT_FORMAT_SCIENTIFIC = 0x0020, // Use the shorter of %e or %f (%g) wxGRID_FLOAT_FORMAT_COMPACT = 0x0040, // To use in combination with one of the above formats (%F/%E/%G) wxGRID_FLOAT_FORMAT_UPPER = 0x0080, // Format used by default. wxGRID_FLOAT_FORMAT_DEFAULT = wxGRID_FLOAT_FORMAT_FIXED, // A mask to extract format from the combination of flags. wxGRID_FLOAT_FORMAT_MASK = wxGRID_FLOAT_FORMAT_FIXED | wxGRID_FLOAT_FORMAT_SCIENTIFIC | wxGRID_FLOAT_FORMAT_COMPACT | wxGRID_FLOAT_FORMAT_UPPER }; // the editor for floating point numbers (double) data class WXDLLIMPEXP_ADV wxGridCellFloatEditor : public wxGridCellTextEditor { public: wxGridCellFloatEditor(int width = -1, int precision = -1, int format = wxGRID_FLOAT_FORMAT_DEFAULT); virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual bool IsAcceptedKey(wxKeyEvent& event) wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual void Reset() wxOVERRIDE; virtual void StartingKey(wxKeyEvent& event) wxOVERRIDE; virtual wxGridCellEditor *Clone() const wxOVERRIDE { return new wxGridCellFloatEditor(m_width, m_precision); } // parameters string format is "width[,precision[,format]]" // format to choose beween f|e|g|E|G (f is used by default) virtual void SetParameters(const wxString& params) wxOVERRIDE; protected: // string representation of our value wxString GetString(); private: int m_width, m_precision; double m_value; int m_style; wxString m_format; wxDECLARE_NO_COPY_CLASS(wxGridCellFloatEditor); }; #endif // wxUSE_TEXTCTRL #if wxUSE_CHECKBOX // the editor for boolean data class WXDLLIMPEXP_ADV wxGridCellBoolEditor : public wxGridCellEditor { public: wxGridCellBoolEditor() { } virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual void SetSize(const wxRect& rect) wxOVERRIDE; virtual void Show(bool show, wxGridCellAttr *attr = NULL) wxOVERRIDE; virtual bool IsAcceptedKey(wxKeyEvent& event) wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual void Reset() wxOVERRIDE; virtual void StartingClick() wxOVERRIDE; virtual void StartingKey(wxKeyEvent& event) wxOVERRIDE; virtual wxGridCellEditor *Clone() const wxOVERRIDE { return new wxGridCellBoolEditor; } // added GetValue so we can get the value which is in the control, see // also UseStringValues() virtual wxString GetValue() const wxOVERRIDE; // set the string values returned by GetValue() for the true and false // states, respectively static void UseStringValues(const wxString& valueTrue = wxT("1"), const wxString& valueFalse = wxEmptyString); // return true if the given string is equal to the string representation of // true value which we currently use static bool IsTrueValue(const wxString& value); protected: wxCheckBox *CBox() const { return (wxCheckBox *)m_control; } private: bool m_value; static wxString ms_stringValues[2]; wxDECLARE_NO_COPY_CLASS(wxGridCellBoolEditor); }; #endif // wxUSE_CHECKBOX #if wxUSE_COMBOBOX // the editor for string data allowing to choose from the list of strings class WXDLLIMPEXP_ADV wxGridCellChoiceEditor : public wxGridCellEditor { public: // if !allowOthers, user can't type a string not in choices array wxGridCellChoiceEditor(size_t count = 0, const wxString choices[] = NULL, bool allowOthers = false); wxGridCellChoiceEditor(const wxArrayString& choices, bool allowOthers = false); virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual void SetSize(const wxRect& rect) wxOVERRIDE; virtual void PaintBackground(wxDC& dc, const wxRect& rectCell, const wxGridCellAttr& attr) wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual void Reset() wxOVERRIDE; // parameters string format is "item1[,item2[...,itemN]]" virtual void SetParameters(const wxString& params) wxOVERRIDE; virtual wxGridCellEditor *Clone() const wxOVERRIDE; // added GetValue so we can get the value which is in the control virtual wxString GetValue() const wxOVERRIDE; protected: wxComboBox *Combo() const { return (wxComboBox *)m_control; } wxString m_value; wxArrayString m_choices; bool m_allowOthers; wxDECLARE_NO_COPY_CLASS(wxGridCellChoiceEditor); }; #endif // wxUSE_COMBOBOX #if wxUSE_COMBOBOX class WXDLLIMPEXP_ADV wxGridCellEnumEditor : public wxGridCellChoiceEditor { public: wxGridCellEnumEditor( const wxString& choices = wxEmptyString ); virtual ~wxGridCellEnumEditor() {} virtual wxGridCellEditor* Clone() const wxOVERRIDE; virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE; virtual bool EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString *newval) wxOVERRIDE; virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE; private: long m_index; wxDECLARE_NO_COPY_CLASS(wxGridCellEnumEditor); }; #endif // wxUSE_COMBOBOX class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor { public: wxGridCellAutoWrapStringEditor() : wxGridCellTextEditor() { } virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) wxOVERRIDE; virtual wxGridCellEditor *Clone() const wxOVERRIDE { return new wxGridCellAutoWrapStringEditor; } wxDECLARE_NO_COPY_CLASS(wxGridCellAutoWrapStringEditor); }; #endif // wxUSE_GRID #endif // _WX_GENERIC_GRID_EDITORS_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/sashwin.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/sashwin.h // Purpose: wxSashWindow implementation. A sash window has an optional // sash on each edge, allowing it to be dragged. An event // is generated when the sash is released. // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_SASHWIN_H_G_ #define _WX_SASHWIN_H_G_ #if wxUSE_SASH #include "wx/defs.h" #include "wx/window.h" #include "wx/string.h" #define wxSASH_DRAG_NONE 0 #define wxSASH_DRAG_DRAGGING 1 #define wxSASH_DRAG_LEFT_DOWN 2 enum wxSashEdgePosition { wxSASH_TOP = 0, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT, wxSASH_NONE = 100 }; /* * wxSashEdge represents one of the four edges of a window. */ class WXDLLIMPEXP_CORE wxSashEdge { public: wxSashEdge() { m_show = false; m_margin = 0; } bool m_show; // Is the sash showing? int m_margin; // The margin size }; /* * wxSashWindow flags */ #define wxSW_NOBORDER 0x0000 //#define wxSW_3D 0x0010 #define wxSW_BORDER 0x0020 #define wxSW_3DSASH 0x0040 #define wxSW_3DBORDER 0x0080 #define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER) /* * wxSashWindow allows any of its edges to have a sash which can be dragged * to resize the window. The actual content window will be created as a child * of wxSashWindow. */ class WXDLLIMPEXP_CORE wxSashWindow: public wxWindow { public: // Default constructor wxSashWindow() { Init(); } // Normal constructor wxSashWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow")) { Init(); Create(parent, id, pos, size, style, name); } virtual ~wxSashWindow(); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow")); // Set whether there's a sash in this position void SetSashVisible(wxSashEdgePosition edge, bool sash); // Get whether there's a sash in this position bool GetSashVisible(wxSashEdgePosition edge) const { return m_sashes[edge].m_show; } // Get border size int GetEdgeMargin(wxSashEdgePosition edge) const { return m_sashes[edge].m_margin; } // Sets the default sash border size void SetDefaultBorderSize(int width) { m_borderSize = width; } // Gets the default sash border size int GetDefaultBorderSize() const { return m_borderSize; } // Sets the addition border size between child and sash window void SetExtraBorderSize(int width) { m_extraBorderSize = width; } // Gets the addition border size between child and sash window int GetExtraBorderSize() const { return m_extraBorderSize; } virtual void SetMinimumSizeX(int min) { m_minimumPaneSizeX = min; } virtual void SetMinimumSizeY(int min) { m_minimumPaneSizeY = min; } virtual int GetMinimumSizeX() const { return m_minimumPaneSizeX; } virtual int GetMinimumSizeY() const { return m_minimumPaneSizeY; } virtual void SetMaximumSizeX(int max) { m_maximumPaneSizeX = max; } virtual void SetMaximumSizeY(int max) { m_maximumPaneSizeY = max; } virtual int GetMaximumSizeX() const { return m_maximumPaneSizeX; } virtual int GetMaximumSizeY() const { return m_maximumPaneSizeY; } //////////////////////////////////////////////////////////////////////////// // Implementation // Paints the border and sash void OnPaint(wxPaintEvent& event); // Handles mouse events void OnMouseEvent(wxMouseEvent& ev); // Adjusts the panes void OnSize(wxSizeEvent& event); #if defined(__WXMSW__) || defined(__WXMAC__) // Handle cursor correctly void OnSetCursor(wxSetCursorEvent& event); #endif // wxMSW // Draws borders void DrawBorders(wxDC& dc); // Draws the sashes void DrawSash(wxSashEdgePosition edge, wxDC& dc); // Draws the sashes void DrawSashes(wxDC& dc); // Draws the sash tracker (for whilst moving the sash) void DrawSashTracker(wxSashEdgePosition edge, int x, int y); // Tests for x, y over sash wxSashEdgePosition SashHitTest(int x, int y, int tolerance = 2); // Resizes subwindows void SizeWindows(); // Initialize colours void InitColours(); private: void Init(); wxSashEdge m_sashes[4]; int m_dragMode; wxSashEdgePosition m_draggingEdge; int m_oldX; int m_oldY; int m_borderSize; int m_extraBorderSize; int m_firstX; int m_firstY; int m_minimumPaneSizeX; int m_minimumPaneSizeY; int m_maximumPaneSizeX; int m_maximumPaneSizeY; wxCursor* m_sashCursorWE; wxCursor* m_sashCursorNS; wxColour m_lightShadowColour; wxColour m_mediumShadowColour; wxColour m_darkShadowColour; wxColour m_hilightColour; wxColour m_faceColour; bool m_mouseCaptured; wxCursor* m_currentCursor; private: wxDECLARE_DYNAMIC_CLASS(wxSashWindow); wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxSashWindow); }; class WXDLLIMPEXP_FWD_CORE wxSashEvent; wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SASH_DRAGGED, wxSashEvent ); enum wxSashDragStatus { wxSASH_STATUS_OK, wxSASH_STATUS_OUT_OF_RANGE }; class WXDLLIMPEXP_CORE wxSashEvent: public wxCommandEvent { public: wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) { m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; m_id = id; m_edge = edge; } wxSashEvent(const wxSashEvent& event) : wxCommandEvent(event), m_edge(event.m_edge), m_dragRect(event.m_dragRect), m_dragStatus(event.m_dragStatus) { } void SetEdge(wxSashEdgePosition edge) { m_edge = edge; } wxSashEdgePosition GetEdge() const { return m_edge; } //// The rectangle formed by the drag operation void SetDragRect(const wxRect& rect) { m_dragRect = rect; } wxRect GetDragRect() const { return m_dragRect; } //// Whether the drag caused the rectangle to be reversed (e.g. //// dragging the top below the bottom) void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; } wxSashDragStatus GetDragStatus() const { return m_dragStatus; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxSashEvent(*this); } private: wxSashEdgePosition m_edge; wxRect m_dragRect; wxSashDragStatus m_dragStatus; private: wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSashEvent); }; typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&); #define wxSashEventHandler(func) \ wxEVENT_HANDLER_CAST(wxSashEventFunction, func) #define EVT_SASH_DRAGGED(id, fn) \ wx__DECLARE_EVT1(wxEVT_SASH_DRAGGED, id, wxSashEventHandler(fn)) #define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) \ wx__DECLARE_EVT2(wxEVT_SASH_DRAGGED, id1, id2, wxSashEventHandler(fn)) #endif // wxUSE_SASH #endif // _WX_SASHWIN_H_G_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/fontdlgg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/fontdlgg.h // Purpose: wxGenericFontDialog // Author: Julian Smart // Modified by: // Created: 01/02/97 // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_FONTDLGG_H #define _WX_GENERIC_FONTDLGG_H #include "wx/gdicmn.h" #include "wx/font.h" #define USE_SPINCTRL_FOR_POINT_SIZE 0 /* * FONT DIALOG */ class WXDLLIMPEXP_FWD_CORE wxChoice; class WXDLLIMPEXP_FWD_CORE wxText; class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxFontPreviewer; enum { wxID_FONT_UNDERLINE = 3000, wxID_FONT_STYLE, wxID_FONT_WEIGHT, wxID_FONT_FAMILY, wxID_FONT_COLOUR, wxID_FONT_SIZE }; class WXDLLIMPEXP_CORE wxGenericFontDialog : public wxFontDialogBase { public: wxGenericFontDialog() { Init(); } wxGenericFontDialog(wxWindow *parent) : wxFontDialogBase(parent) { Init(); } wxGenericFontDialog(wxWindow *parent, const wxFontData& data) : wxFontDialogBase(parent, data) { Init(); } virtual ~wxGenericFontDialog(); virtual int ShowModal() wxOVERRIDE; // Internal functions void OnCloseWindow(wxCloseEvent& event); virtual void CreateWidgets(); virtual void InitializeFont(); void OnChangeFont(wxCommandEvent& event); #if USE_SPINCTRL_FOR_POINT_SIZE void OnChangeSize(wxSpinEvent& event); #endif protected: virtual bool DoCreate(wxWindow *parent) wxOVERRIDE; private: // common part of all ctors void Init(); void DoChangeFont(); wxFont m_dialogFont; wxChoice *m_familyChoice; wxChoice *m_styleChoice; wxChoice *m_weightChoice; wxChoice *m_colourChoice; wxCheckBox *m_underLineCheckBox; #if USE_SPINCTRL_FOR_POINT_SIZE wxSpinCtrl *m_pointSizeSpin; #else wxChoice *m_pointSizeChoice; #endif wxFontPreviewer *m_previewer; bool m_useEvents; // static bool fontDialogCancelled; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericFontDialog); }; #endif // _WX_GENERIC_FONTDLGG_H
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/mdig.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/mdig.h // Purpose: Generic MDI (Multiple Document Interface) classes // Author: Hans Van Leemputten // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes // Created: 29/07/2002 // Copyright: (c) 2002 Hans Van Leemputten // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_MDIG_H_ #define _WX_GENERIC_MDIG_H_ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- #include "wx/panel.h" class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase; class WXDLLIMPEXP_FWD_CORE wxBookCtrlEvent; class WXDLLIMPEXP_FWD_CORE wxIcon; class WXDLLIMPEXP_FWD_CORE wxIconBundle; class WXDLLIMPEXP_FWD_CORE wxNotebook; #if wxUSE_GENERIC_MDI_AS_NATIVE #define wxGenericMDIParentFrame wxMDIParentFrame #define wxGenericMDIChildFrame wxMDIChildFrame #define wxGenericMDIClientWindow wxMDIClientWindow #else // !wxUSE_GENERIC_MDI_AS_NATIVE class WXDLLIMPEXP_FWD_CORE wxGenericMDIParentFrame; class WXDLLIMPEXP_FWD_CORE wxGenericMDIChildFrame; class WXDLLIMPEXP_FWD_CORE wxGenericMDIClientWindow; #endif // wxUSE_GENERIC_MDI_AS_NATIVE/!wxUSE_GENERIC_MDI_AS_NATIVE // ---------------------------------------------------------------------------- // wxGenericMDIParentFrame // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericMDIParentFrame : public wxMDIParentFrameBase { public: wxGenericMDIParentFrame() { Init(); } wxGenericMDIParentFrame(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr) { Init(); Create(parent, winid, title, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr); virtual ~wxGenericMDIParentFrame(); // implement base class pure virtuals static bool IsTDI() { return true; } virtual void ActivateNext() { AdvanceActive(true); } virtual void ActivatePrevious() { AdvanceActive(false); } #if wxUSE_MENUS virtual void SetWindowMenu(wxMenu* pMenu); virtual void SetMenuBar(wxMenuBar *pMenuBar); #endif // wxUSE_MENUS virtual wxGenericMDIClientWindow *OnCreateGenericClient(); // implementation only from now on void WXSetChildMenuBar(wxGenericMDIChildFrame *child); void WXUpdateChildTitle(wxGenericMDIChildFrame *child); void WXActivateChild(wxGenericMDIChildFrame *child); void WXRemoveChild(wxGenericMDIChildFrame *child); bool WXIsActiveChild(wxGenericMDIChildFrame *child) const; bool WXIsInsideChildHandler(wxGenericMDIChildFrame *child) const; // return the book control used by the client window to manage the pages wxBookCtrlBase *GetBookCtrl() const; protected: #if wxUSE_MENUS wxMenuBar *m_pMyMenuBar; #endif // wxUSE_MENUS // advance the activation forward or backwards void AdvanceActive(bool forward); private: void Init(); #if wxUSE_MENUS void RemoveWindowMenu(wxMenuBar *pMenuBar); void AddWindowMenu(wxMenuBar *pMenuBar); void OnWindowMenu(wxCommandEvent& event); #endif // wxUSE_MENUS virtual bool ProcessEvent(wxEvent& event); void OnClose(wxCloseEvent& event); // return the client window, may be NULL if we hadn't been created yet wxGenericMDIClientWindow *GetGenericClientWindow() const; // close all children, return false if any of them vetoed it bool CloseAll(); // this pointer is non-NULL if we're currently inside our ProcessEvent() // and we forwarded the event to this child (as we do with menu events) wxMDIChildFrameBase *m_childHandler; wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericMDIParentFrame); }; // ---------------------------------------------------------------------------- // wxGenericMDIChildFrame // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericMDIChildFrame : public wxTDIChildFrame { public: wxGenericMDIChildFrame() { Init(); } wxGenericMDIChildFrame(wxGenericMDIParentFrame *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) { Init(); Create(parent, winid, title, pos, size, style, name); } bool Create(wxGenericMDIParentFrame *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); virtual ~wxGenericMDIChildFrame(); // implement MDI operations virtual void Activate(); #if wxUSE_MENUS virtual void SetMenuBar( wxMenuBar *menu_bar ); virtual wxMenuBar *GetMenuBar() const; #endif // wxUSE_MENUS virtual wxString GetTitle() const { return m_title; } virtual void SetTitle(const wxString& title); virtual bool TryAfter(wxEvent& event); // implementation only from now on wxGenericMDIParentFrame* GetGenericMDIParent() const { #if wxUSE_GENERIC_MDI_AS_NATIVE return GetMDIParent(); #else // generic != native return m_mdiParentGeneric; #endif } protected: wxString m_title; #if wxUSE_MENUS wxMenuBar *m_pMenuBar; #endif // wxUSE_MENUS #if !wxUSE_GENERIC_MDI_AS_NATIVE wxGenericMDIParentFrame *m_mdiParentGeneric; #endif protected: void Init(); private: void OnMenuHighlight(wxMenuEvent& event); void OnClose(wxCloseEvent& event); wxDECLARE_DYNAMIC_CLASS(wxGenericMDIChildFrame); wxDECLARE_EVENT_TABLE(); friend class wxGenericMDIClientWindow; }; // ---------------------------------------------------------------------------- // wxGenericMDIClientWindow // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericMDIClientWindow : public wxMDIClientWindowBase { public: wxGenericMDIClientWindow() { } // unfortunately we need to provide our own version of CreateClient() // because of the difference in the type of the first parameter and // implement the base class pure virtual method in terms of it // (CreateGenericClient() is virtual itself to allow customizing the client // window creation by overriding it in the derived classes) virtual bool CreateGenericClient(wxWindow *parent); virtual bool CreateClient(wxMDIParentFrame *parent, long WXUNUSED(style) = wxVSCROLL | wxHSCROLL) { return CreateGenericClient(parent); } // implementation only wxBookCtrlBase *GetBookCtrl() const; wxGenericMDIChildFrame *GetChild(size_t pos) const; int FindChild(wxGenericMDIChildFrame *child) const; private: void PageChanged(int OldSelection, int newSelection); void OnPageChanged(wxBookCtrlEvent& event); void OnSize(wxSizeEvent& event); // the notebook containing all MDI children as its pages wxNotebook *m_notebook; wxDECLARE_DYNAMIC_CLASS(wxGenericMDIClientWindow); }; // ---------------------------------------------------------------------------- // inline functions implementation // ---------------------------------------------------------------------------- inline bool wxGenericMDIParentFrame:: WXIsInsideChildHandler(wxGenericMDIChildFrame *child) const { return child == m_childHandler; } #endif // _WX_GENERIC_MDIG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/progdlgg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/progdlgg.h // Purpose: wxGenericProgressDialog class // Author: Karsten Ballueder // Modified by: Francesco Montorsi // Created: 09.05.1999 // Copyright: (c) Karsten Ballueder // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef __PROGDLGH_G__ #define __PROGDLGH_G__ #include "wx/dialog.h" #include "wx/weakref.h" class WXDLLIMPEXP_FWD_CORE wxButton; class WXDLLIMPEXP_FWD_CORE wxEventLoop; class WXDLLIMPEXP_FWD_CORE wxGauge; class WXDLLIMPEXP_FWD_CORE wxStaticText; class WXDLLIMPEXP_FWD_CORE wxWindowDisabler; /* Progress dialog which shows a moving progress bar. Taken from the Mahogany project. */ class WXDLLIMPEXP_CORE wxGenericProgressDialog : public wxDialog { public: wxGenericProgressDialog(); wxGenericProgressDialog(const wxString& title, const wxString& message, int maximum = 100, wxWindow *parent = NULL, int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE); virtual ~wxGenericProgressDialog(); bool Create(const wxString& title, const wxString& message, int maximum = 100, wxWindow *parent = NULL, int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE); virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL); virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool *skip = NULL); virtual void Resume(); virtual int GetValue() const; virtual int GetRange() const; virtual wxString GetMessage() const; virtual void SetRange(int maximum); // Return whether "Cancel" or "Skip" button was pressed, always return // false if the corresponding button is not shown. virtual bool WasCancelled() const; virtual bool WasSkipped() const; // Must provide overload to avoid hiding it (and warnings about it) virtual void Update() wxOVERRIDE { wxDialog::Update(); } virtual bool Show( bool show = true ) wxOVERRIDE; // This enum is an implementation detail and should not be used // by user code. enum State { Uncancelable = -1, // dialog can't be canceled Canceled, // can be cancelled and, in fact, was Continue, // can be cancelled but wasn't Finished, // finished, waiting to be removed from screen Dismissed // was closed by user after finishing }; protected: // Update just the m_maximum field, this is used by public SetRange() but, // unlike it, doesn't update the controls state. This makes it useful for // both this class and its derived classes that don't use m_gauge to // display progress. void SetMaximum(int maximum); // Return the labels to use for showing the elapsed/estimated/remaining // times respectively. static wxString GetElapsedLabel() { return wxGetTranslation("Elapsed time:"); } static wxString GetEstimatedLabel() { return wxGetTranslation("Estimated time:"); } static wxString GetRemainingLabel() { return wxGetTranslation("Remaining time:"); } // Similar to wxWindow::HasFlag() but tests for a presence of a wxPD_XXX // flag in our (separate) flags instead of using m_windowStyle. bool HasPDFlag(int flag) const { return (m_pdStyle & flag) != 0; } // Return the progress dialog style. Prefer to use HasPDFlag() if possible. int GetPDStyle() const { return m_pdStyle; } void SetPDStyle(int pdStyle) { m_pdStyle = pdStyle; } // Updates estimated times from a given progress bar value and stores the // results in provided arguments. void UpdateTimeEstimates(int value, unsigned long &elapsedTime, unsigned long &estimatedTime, unsigned long &remainingTime); // Converts seconds to HH:mm:ss format. static wxString GetFormattedTime(unsigned long timeInSec); // Create a new event loop if there is no currently running one. void EnsureActiveEventLoopExists(); // callback for optional abort button void OnCancel(wxCommandEvent&); // callback for optional skip button void OnSkip(wxCommandEvent&); // callback to disable "hard" window closing void OnClose(wxCloseEvent&); // called to disable the other windows while this dialog is shown void DisableOtherWindows(); // must be called to reenable the other windows temporarily disabled while // the dialog was shown void ReenableOtherWindows(); // Store the parent window as wxWindow::m_parent and also set the top level // parent reference we store in this class itself. void SetTopParent(wxWindow* parent); // return the top level parent window of this dialog (may be NULL) wxWindow *GetTopParent() const { return m_parentTop; } // continue processing or not (return value for Update()) State m_state; // the maximum value int m_maximum; #if defined(__WXMSW__) // the factor we use to always keep the value in 16 bit range as the native // control only supports ranges from 0 to 65,535 size_t m_factor; #endif // __WXMSW__ // time when the dialog was created unsigned long m_timeStart; // time when the dialog was closed or cancelled unsigned long m_timeStop; // time between the moment the dialog was closed/cancelled and resume unsigned long m_break; private: // update the label to show the given time (in seconds) static void SetTimeLabel(unsigned long val, wxStaticText *label); // common part of all ctors void Init(); // create the label with given text and another one to show the time nearby // as the next windows in the sizer, returns the created control wxStaticText *CreateLabel(const wxString& text, wxSizer *sizer); // updates the label message void UpdateMessage(const wxString &newmsg); // common part of Update() and Pulse(), returns true if not cancelled bool DoBeforeUpdate(bool *skip); // common part of Update() and Pulse() void DoAfterUpdate(); // shortcuts for enabling buttons void EnableClose(); void EnableSkip(bool enable = true); void EnableAbort(bool enable = true); void DisableSkip() { EnableSkip(false); } void DisableAbort() { EnableAbort(false); } // the widget displaying current status (may be NULL) wxGauge *m_gauge; // the message displayed wxStaticText *m_msg; // displayed elapsed, estimated, remaining time wxStaticText *m_elapsed, *m_estimated, *m_remaining; // Reference to the parent top level window, automatically becomes NULL if // it it is destroyed and could be always NULL if it's not given at all. wxWindowRef m_parentTop; // Progress dialog styles: this is not the same as m_windowStyle because // wxPD_XXX constants clash with the existing TLW styles so to be sure we // don't have any conflicts we just use a separate variable for storing // them. int m_pdStyle; // skip some portion bool m_skip; // the abort and skip buttons (or NULL if none) wxButton *m_btnAbort; wxButton *m_btnSkip; // saves the time when elapsed time was updated so there is only one // update per second unsigned long m_last_timeupdate; // tells how often a change of the estimated time has to be confirmed // before it is actually displayed - this reduces the frequency of updates // of estimated and remaining time int m_delay; // counts the confirmations int m_ctdelay; unsigned long m_display_estimated; // for wxPD_APP_MODAL case wxWindowDisabler *m_winDisabler; // Temporary event loop created by the dialog itself if there is no // currently active loop when it is created. wxEventLoop *m_tempEventLoop; wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxGenericProgressDialog); }; #endif // __PROGDLGH_G__
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/clrpickerg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/clrpickerg.h // Purpose: wxGenericColourButton header // Author: Francesco Montorsi (based on Vadim Zeitlin's code) // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_CLRPICKER_H_ #define _WX_CLRPICKER_H_ #include "wx/button.h" #include "wx/bmpbuttn.h" #include "wx/colourdata.h" //----------------------------------------------------------------------------- // wxGenericColourButton: a button which brings up a wxColourDialog //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericColourButton : public wxBitmapButton, public wxColourPickerWidgetBase { public: wxGenericColourButton() {} wxGenericColourButton(wxWindow *parent, wxWindowID id, const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxColourPickerWidgetNameStr) { Create(parent, id, col, pos, size, style, validator, name); } virtual ~wxGenericColourButton() {} public: // API extensions specific for wxGenericColourButton // user can override this to init colour data in a different way virtual void InitColourData(); // returns the colour data shown in wxColourDialog wxColourData *GetColourData() { return &ms_data; } public: bool Create(wxWindow *parent, wxWindowID id, const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxColourPickerWidgetNameStr); void OnButtonClick(wxCommandEvent &); protected: wxBitmap m_bitmap; wxSize DoGetBestSize() const wxOVERRIDE; void UpdateColour() wxOVERRIDE; // the colour data shown in wxColourPickerCtrlGeneric // controls. This member is static so that all colour pickers // in the program share the same set of custom colours. static wxColourData ms_data; private: wxDECLARE_DYNAMIC_CLASS(wxGenericColourButton); }; #endif // _WX_CLRPICKER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/bmpcbox.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/bmpcbox.h // Purpose: wxBitmapComboBox // Author: Jaakko Salli // Modified by: // Created: Aug-30-2006 // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_BMPCBOX_H_ #define _WX_GENERIC_BMPCBOX_H_ #define wxGENERIC_BITMAPCOMBOBOX 1 #include "wx/odcombo.h" // ---------------------------------------------------------------------------- // wxBitmapComboBox: a wxComboBox that allows images to be shown // in front of string items. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxOwnerDrawnComboBox, public wxBitmapComboBoxBase { public: // ctors and such wxBitmapComboBox() : wxOwnerDrawnComboBox(), wxBitmapComboBoxBase() { Init(); } wxBitmapComboBox(wxWindow *parent, wxWindowID id = wxID_ANY, 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 = wxBitmapComboBoxNameStr) : wxOwnerDrawnComboBox(), wxBitmapComboBoxBase() { Init(); (void)Create(parent, id, value, pos, size, n, choices, style, validator, name); } wxBitmapComboBox(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxBitmapComboBoxNameStr); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxBitmapComboBoxNameStr); 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 = wxBitmapComboBoxNameStr); virtual ~wxBitmapComboBox(); // Adds item with image to the end of the combo box. int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap); int Append(const wxString& item, const wxBitmap& bitmap, void *clientData); int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData); // Inserts item with image into the list before pos. Not valid for wxCB_SORT // styles, use Append instead. int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos); int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, void *clientData); int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, wxClientData *clientData); // Sets the image for the given item. virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) wxOVERRIDE; virtual bool SetFont(const wxFont& font) wxOVERRIDE; protected: virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const wxOVERRIDE; virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const wxOVERRIDE; virtual wxCoord OnMeasureItem(size_t item) const wxOVERRIDE; virtual wxCoord OnMeasureItemWidth(size_t item) const wxOVERRIDE; // Event handlers void OnSize(wxSizeEvent& event); virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual wxItemContainer* GetItemContainer() wxOVERRIDE { return this; } virtual wxWindow* GetControl() wxOVERRIDE { return this; } // wxItemContainer implementation virtual int DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, void **clientData, wxClientDataType type) wxOVERRIDE; virtual void DoClear() wxOVERRIDE; virtual void DoDeleteOneItem(unsigned int n) wxOVERRIDE; private: bool m_inResize; void Init(); wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxBitmapComboBox); }; #endif // _WX_GENERIC_BMPCBOX_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/spinctlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/spinctlg.h // Purpose: generic wxSpinCtrl class // Author: Vadim Zeitlin // Modified by: // Created: 28.10.99 // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_SPINCTRL_H_ #define _WX_GENERIC_SPINCTRL_H_ // ---------------------------------------------------------------------------- // wxSpinCtrl is a combination of wxSpinButton and wxTextCtrl, so if // wxSpinButton is available, this is what we do - but if it isn't, we still // define wxSpinCtrl class which then has the same appearance as wxTextCtrl but // the different interface. This allows to write programs using wxSpinCtrl // without tons of #ifdefs. // ---------------------------------------------------------------------------- #if wxUSE_SPINBTN #include "wx/compositewin.h" class WXDLLIMPEXP_FWD_CORE wxSpinButton; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; class wxSpinCtrlTextGeneric; // wxTextCtrl used for the wxSpinCtrlGenericBase // The !wxUSE_SPINBTN version's GetValue() function conflicts with the // wxTextCtrl's GetValue() and so you have to input a dummy int value. #define wxSPINCTRL_GETVALUE_FIX // ---------------------------------------------------------------------------- // wxSpinCtrlGeneric is a combination of wxTextCtrl and wxSpinButton // // This class manages a double valued generic spinctrl through the DoGet/SetXXX // functions that are made public as Get/SetXXX functions for int or double // for the wxSpinCtrl and wxSpinCtrlDouble classes respectively to avoid // function ambiguity. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxNavigationEnabled<wxCompositeWindow<wxSpinCtrlBase> > { public: wxSpinCtrlGenericBase() { Init(); } 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("wxSpinCtrl")); virtual ~wxSpinCtrlGenericBase(); // accessors // T GetValue() const // T GetMin() const // T GetMax() const // T GetIncrement() const virtual bool GetSnapToTicks() const wxOVERRIDE { return m_snap_to_ticks; } // unsigned GetDigits() const - wxSpinCtrlDouble only // operations virtual void SetValue(const wxString& text) wxOVERRIDE; // void SetValue(T val) // void SetRange(T minVal, T maxVal) // void SetIncrement(T inc) virtual void SetSnapToTicks(bool snap_to_ticks) wxOVERRIDE; // void SetDigits(unsigned digits) - wxSpinCtrlDouble only // Select text in the textctrl void SetSelection(long from, long to) wxOVERRIDE; // implementation from now on // forward these functions to all subcontrols virtual bool Enable(bool enable = true) wxOVERRIDE; virtual bool Show(bool show = true) wxOVERRIDE; virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE; // get the subcontrols wxTextCtrl *GetText() const { return m_textCtrl; } wxSpinButton *GetSpinButton() const { return m_spinButton; } // forwarded events from children windows void OnSpinButton(wxSpinEvent& event); void OnTextLostFocus(wxFocusEvent& event); void OnTextChar(wxKeyEvent& event); // this window itself is used only as a container for its sub windows so it // shouldn't accept the focus at all and any attempts to explicitly set // focus to it should give focus to its text constol part virtual bool AcceptsFocus() const wxOVERRIDE { return false; } virtual void SetFocus() wxOVERRIDE; friend class wxSpinCtrlTextGeneric; protected: // override the base class virtuals involved into geometry calculations virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE; virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; #ifdef __WXMSW__ // and, for MSW, enabling this window itself virtual void DoEnable(bool enable) wxOVERRIDE; #endif // __WXMSW__ enum SendEvent { SendEvent_None, SendEvent_Text }; // generic double valued functions double DoGetValue() const { return m_value; } bool DoSetValue(double val, SendEvent sendEvent); void DoSetRange(double min_val, double max_val); void DoSetIncrement(double inc); // update our value to reflect the text control contents (if it has been // modified by user, do nothing otherwise) // // can also change the text control if its value is invalid // // return true if our value has changed bool SyncSpinToText(SendEvent sendEvent); // Send the correct event type virtual void DoSendEvent() = 0; // Convert the text to/from the corresponding value. virtual bool DoTextToValue(const wxString& text, double *val) = 0; virtual wxString DoValueToText(double val) = 0; // check if the value is in range bool InRange(double n) const { return (n >= m_min) && (n <= m_max); } // ensure that the value is in range wrapping it round if necessary double AdjustToFitInRange(double value) const; double m_value; double m_min; double m_max; double m_increment; bool m_snap_to_ticks; int m_spin_value; // the subcontrols wxTextCtrl *m_textCtrl; wxSpinButton *m_spinButton; private: // common part of all ctors void Init(); // Implement pure virtual function inherited from wxCompositeWindow. virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE; wxDECLARE_EVENT_TABLE(); }; #else // !wxUSE_SPINBTN #define wxSPINCTRL_GETVALUE_FIX int = 1 // ---------------------------------------------------------------------------- // wxSpinCtrl is just a text control // ---------------------------------------------------------------------------- #include "wx/textctrl.h" class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxTextCtrl { public: wxSpinCtrlGenericBase() : m_value(0), m_min(0), m_max(100), m_increment(1), m_snap_to_ticks(false), m_format(wxT("%g")) { } 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("wxSpinCtrl")) { m_min = min; m_max = max; m_value = initial; m_increment = inc; bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style, wxDefaultValidator, name); DoSetValue(initial, SendEvent_None); return ok; } // accessors // T GetValue() const // T GetMin() const // T GetMax() const // T GetIncrement() const virtual bool GetSnapToTicks() const { return m_snap_to_ticks; } // unsigned GetDigits() const - wxSpinCtrlDouble only // operations virtual void SetValue(const wxString& text) { wxTextCtrl::SetValue(text); } // void SetValue(T val) // void SetRange(T minVal, T maxVal) // void SetIncrement(T inc) virtual void SetSnapToTicks(bool snap_to_ticks) { m_snap_to_ticks = snap_to_ticks; } // void SetDigits(unsigned digits) - wxSpinCtrlDouble only // Select text in the textctrl //void SetSelection(long from, long to); protected: // generic double valued double DoGetValue() const { double n; if ( (wxSscanf(wxTextCtrl::GetValue(), wxT("%lf"), &n) != 1) ) n = INT_MIN; return n; } bool DoSetValue(double val, SendEvent sendEvent) { wxString str(wxString::Format(m_format, val)); switch ( sendEvent ) { case SendEvent_None: wxTextCtrl::ChangeValue(str); break; case SendEvent_Text: wxTextCtrl::SetValue(str); break; } return true; } void DoSetRange(double min_val, double max_val) { m_min = min_val; m_max = max_val; } void DoSetIncrement(double inc) { m_increment = inc; } // Note: unused double m_value; double m_min; double m_max; double m_increment; bool m_snap_to_ticks; wxString m_format; }; #endif // wxUSE_SPINBTN/!wxUSE_SPINBTN #if !defined(wxHAS_NATIVE_SPINCTRL) //----------------------------------------------------------------------------- // wxSpinCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGenericBase { public: wxSpinCtrl() { Init(); } 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")) { Init(); Create(parent, id, value, pos, size, style, min, max, initial, name); } 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")) { return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size, style, min, max, initial, 1, name); } // accessors int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue()); } int GetMin() const { return int(m_min); } int GetMax() const { return int(m_max); } int GetIncrement() const { return int(m_increment); } // operations void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } void SetValue( int value ) { DoSetValue(value, SendEvent_None); } void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); } void SetIncrement(int inc) { DoSetIncrement(inc); } virtual int GetBase() const { return m_base; } virtual bool SetBase(int base); protected: virtual void DoSendEvent(); virtual bool DoTextToValue(const wxString& text, double *val); virtual wxString DoValueToText(double val); private: // Common part of all ctors. void Init() { m_base = 10; } int m_base; wxDECLARE_DYNAMIC_CLASS(wxSpinCtrl); }; #endif // wxHAS_NATIVE_SPINCTRL //----------------------------------------------------------------------------- // wxSpinCtrlDouble //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGenericBase { public: wxSpinCtrlDouble() { Init(); } 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")) { Init(); Create(parent, id, value, pos, size, style, min, max, initial, inc, name); } 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")) { return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size, style, min, max, initial, inc, name); } // accessors double GetValue(wxSPINCTRL_GETVALUE_FIX) const { return DoGetValue(); } double GetMin() const { return m_min; } double GetMax() const { return m_max; } double GetIncrement() const { return m_increment; } unsigned GetDigits() const { return m_digits; } // operations void SetValue(const wxString& value) wxOVERRIDE { wxSpinCtrlGenericBase::SetValue(value); } void SetValue(double value) { DoSetValue(value, SendEvent_None); } void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); } void SetIncrement(double inc) { DoSetIncrement(inc); } void SetDigits(unsigned digits); // We don't implement bases support for floating point numbers, this is not // very useful in practice. virtual int GetBase() const wxOVERRIDE { return 10; } virtual bool SetBase(int WXUNUSED(base)) wxOVERRIDE { return false; } protected: virtual void DoSendEvent() wxOVERRIDE; virtual bool DoTextToValue(const wxString& text, double *val) wxOVERRIDE; virtual wxString DoValueToText(double val) wxOVERRIDE; unsigned m_digits; private: // Common part of all ctors. void Init() { m_digits = 0; m_format = wxS("%g"); } wxString m_format; wxDECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble); }; #endif // _WX_GENERIC_SPINCTRL_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/dirctrlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/dirctrlg.h // Purpose: wxGenericDirCtrl class // Builds on wxDirCtrl class written by Robert Roebling for the // wxFile application, modified by Harm van der Heijden. // Further modified for Windows. // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al // Modified by: // Created: 21/3/2000 // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIRCTRL_H_ #define _WX_DIRCTRL_H_ #if wxUSE_DIRDLG || wxUSE_FILEDLG #include "wx/treectrl.h" #include "wx/dialog.h" #include "wx/dirdlg.h" #include "wx/choice.h" //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxTextCtrl; class WXDLLIMPEXP_FWD_BASE wxHashTable; extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogDefaultFolderStr[]; //----------------------------------------------------------------------------- // Extra styles for wxGenericDirCtrl //----------------------------------------------------------------------------- enum { // Only allow directory viewing/selection, no files wxDIRCTRL_DIR_ONLY = 0x0010, // When setting the default path, select the first file in the directory wxDIRCTRL_SELECT_FIRST = 0x0020, // Show the filter list wxDIRCTRL_SHOW_FILTERS = 0x0040, // Use 3D borders on internal controls wxDIRCTRL_3D_INTERNAL = 0x0080, // Editable labels wxDIRCTRL_EDIT_LABELS = 0x0100, // Allow multiple selection wxDIRCTRL_MULTIPLE = 0x0200, wxDIRCTRL_DEFAULT_STYLE = wxDIRCTRL_3D_INTERNAL }; //----------------------------------------------------------------------------- // wxDirItemData //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxDirItemData : public wxTreeItemData { public: wxDirItemData(const wxString& path, const wxString& name, bool isDir); virtual ~wxDirItemData(){} void SetNewDirName(const wxString& path); bool HasSubDirs() const; bool HasFiles(const wxString& spec = wxEmptyString) const; wxString m_path, m_name; bool m_isHidden; bool m_isExpanded; bool m_isDir; }; //----------------------------------------------------------------------------- // wxDirCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxDirFilterListCtrl; class WXDLLIMPEXP_CORE wxGenericDirCtrl: public wxControl { public: wxGenericDirCtrl(); wxGenericDirCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_DEFAULT_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ) { Init(); Create(parent, id, dir, pos, size, style, filter, defaultFilter, name); } bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_DEFAULT_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ); virtual void Init(); virtual ~wxGenericDirCtrl(); void OnExpandItem(wxTreeEvent &event ); void OnCollapseItem(wxTreeEvent &event ); void OnBeginEditItem(wxTreeEvent &event ); void OnEndEditItem(wxTreeEvent &event ); void OnTreeSelChange(wxTreeEvent &event); void OnItemActivated(wxTreeEvent &event); void OnSize(wxSizeEvent &event ); // Try to expand as much of the given path as possible. virtual bool ExpandPath(const wxString& path); // collapse the path virtual bool CollapsePath(const wxString& path); // Accessors virtual inline wxString GetDefaultPath() const { return m_defaultPath; } virtual void SetDefaultPath(const wxString& path) { m_defaultPath = path; } // Get dir or filename virtual wxString GetPath() const; virtual void GetPaths(wxArrayString& paths) const; // Get selected filename path only (else empty string). // I.e. don't count a directory as a selection virtual wxString GetFilePath() const; virtual void GetFilePaths(wxArrayString& paths) const; virtual void SetPath(const wxString& path); virtual void SelectPath(const wxString& path, bool select = true); virtual void SelectPaths(const wxArrayString& paths); virtual void ShowHidden( bool show ); virtual bool GetShowHidden() { return m_showHidden; } virtual wxString GetFilter() const { return m_filter; } virtual void SetFilter(const wxString& filter); virtual int GetFilterIndex() const { return m_currentFilter; } virtual void SetFilterIndex(int n); virtual wxTreeItemId GetRootId() { return m_rootId; } virtual wxTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; } virtual wxDirFilterListCtrl* GetFilterListCtrl() const { return m_filterListCtrl; } virtual void UnselectAll(); // Helper virtual void SetupSections(); // Find the child that matches the first part of 'path'. // E.g. if a child path is "/usr" and 'path' is "/usr/include" // then the child for /usr is returned. // If the path string has been used (we're at the leaf), done is set to true virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done); wxString GetPath(wxTreeItemId itemId) const; // Resize the components of the control virtual void DoResize(); // Collapse & expand the tree, thus re-creating it from scratch: virtual void ReCreateTree(); // Collapse the entire tree virtual void CollapseTree(); // overridden base class methods virtual void SetFocus() wxOVERRIDE; protected: virtual void ExpandRoot(); virtual void ExpandDir(wxTreeItemId parentId); virtual void CollapseDir(wxTreeItemId parentId); virtual const wxTreeItemId AddSection(const wxString& path, const wxString& name, int imageId = 0); virtual wxTreeItemId AppendItem (const wxTreeItemId & parent, const wxString & text, int image = -1, int selectedImage = -1, wxTreeItemData * data = NULL); //void FindChildFiles(wxTreeItemId id, int dirFlags, wxArrayString& filenames); virtual wxTreeCtrl* CreateTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long treeStyle); // Extract description and actual filter from overall filter string bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description); private: void PopulateNode(wxTreeItemId node); wxDirItemData* GetItemData(wxTreeItemId itemId); bool m_showHidden; wxTreeItemId m_rootId; wxString m_defaultPath; // Starting path long m_styleEx; // Extended style wxString m_filter; // Wildcards in same format as per wxFileDialog int m_currentFilter; // The current filter index wxString m_currentFilterStr; // Current filter string wxTreeCtrl* m_treeCtrl; wxDirFilterListCtrl* m_filterListCtrl; private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS(wxGenericDirCtrl); wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl); }; wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_FILEACTIVATED, wxTreeEvent ); #define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn)) #define EVT_DIRCTRL_SELECTIONCHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(SELECTIONCHANGED, id, fn) #define EVT_DIRCTRL_FILEACTIVATED(id, fn) wx__DECLARE_DIRCTRL_EVT(FILEACTIVATED, id, fn) //----------------------------------------------------------------------------- // wxDirFilterListCtrl //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxDirFilterListCtrl: public wxChoice { public: wxDirFilterListCtrl() { Init(); } wxDirFilterListCtrl(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) { Init(); Create(parent, id, pos, size, style); } bool Create(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); void Init(); virtual ~wxDirFilterListCtrl() {} //// Operations void FillFilterList(const wxString& filter, int defaultFilter); //// Events void OnSelFilter(wxCommandEvent& event); protected: wxGenericDirCtrl* m_dirCtrl; wxDECLARE_EVENT_TABLE(); wxDECLARE_CLASS(wxDirFilterListCtrl); wxDECLARE_NO_COPY_CLASS(wxDirFilterListCtrl); }; #if !defined(__WXMSW__) && !defined(__WXMAC__) #define wxDirCtrl wxGenericDirCtrl #endif // Symbols for accessing individual controls #define wxID_TREECTRL 7000 #define wxID_FILTERLISTCTRL 7001 #endif // wxUSE_DIRDLG //------------------------------------------------------------------------- // wxFileIconsTable - use wxTheFileIconsTable which is created as necessary //------------------------------------------------------------------------- #if wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_CORE wxFileIconsTable { public: wxFileIconsTable(); ~wxFileIconsTable(); enum iconId_Type { folder, folder_open, computer, drive, cdrom, floppy, removeable, file, executable }; int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString); wxImageList *GetSmallImageList(); const wxSize& GetSize() const { return m_size; } void SetSize(const wxSize& sz) { m_size = sz; } bool IsOk() const { return m_smallImageList != NULL; } protected: void Create(const wxSize& sz); // create on first use wxImageList *m_smallImageList; wxHashTable *m_HashTable; wxSize m_size; }; // The global fileicons table extern WXDLLIMPEXP_DATA_CORE(wxFileIconsTable *) wxTheFileIconsTable; #endif // wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL // old wxEVT_COMMAND_* constants #define wxEVT_COMMAND_DIRCTRL_SELECTIONCHANGED wxEVT_DIRCTRL_SELECTIONCHANGED #define wxEVT_COMMAND_DIRCTRL_FILEACTIVATED wxEVT_DIRCTRL_FILEACTIVATED #endif // _WX_DIRCTRLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/fdrepdlg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/fdrepdlg.h // Purpose: wxGenericFindReplaceDialog class // Author: Markus Greither // Modified by: // Created: 25/05/2001 // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_FDREPDLG_H_ #define _WX_GENERIC_FDREPDLG_H_ class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxRadioBox; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; // ---------------------------------------------------------------------------- // wxGenericFindReplaceDialog: dialog for searching / replacing text // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericFindReplaceDialog : public wxFindReplaceDialogBase { public: wxGenericFindReplaceDialog() { Init(); } wxGenericFindReplaceDialog(wxWindow *parent, wxFindReplaceData *data, const wxString& title, int style = 0) { Init(); (void)Create(parent, data, title, style); } bool Create(wxWindow *parent, wxFindReplaceData *data, const wxString& title, int style = 0); protected: void Init(); void SendEvent(const wxEventType& evtType); void OnFind(wxCommandEvent& event); void OnReplace(wxCommandEvent& event); void OnReplaceAll(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); void OnUpdateFindUI(wxUpdateUIEvent& event); void OnCloseWindow(wxCloseEvent& event); wxCheckBox *m_chkCase, *m_chkWord; wxRadioBox *m_radioDir; wxTextCtrl *m_textFind, *m_textRepl; private: wxDECLARE_DYNAMIC_CLASS(wxGenericFindReplaceDialog); wxDECLARE_EVENT_TABLE(); }; #endif // _WX_GENERIC_FDREPDLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/headerctrlg.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/headerctrlg.h // Purpose: Generic wxHeaderCtrl implementation // Author: Vadim Zeitlin // Created: 2008-12-01 // Copyright: (c) 2008 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_HEADERCTRLG_H_ #define _WX_GENERIC_HEADERCTRLG_H_ #include "wx/event.h" #include "wx/vector.h" #include "wx/overlay.h" // ---------------------------------------------------------------------------- // wxHeaderCtrl // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxHeaderCtrl : public wxHeaderCtrlBase { public: wxHeaderCtrl() { Init(); } wxHeaderCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, const wxString& name = wxHeaderCtrlNameStr) { Init(); Create(parent, id, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, const wxString& name = wxHeaderCtrlNameStr); virtual ~wxHeaderCtrl(); protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; private: // implement base class pure virtuals virtual void DoSetCount(unsigned int count) wxOVERRIDE; virtual unsigned int DoGetCount() const wxOVERRIDE; virtual void DoUpdate(unsigned int idx) wxOVERRIDE; virtual void DoScrollHorz(int dx) wxOVERRIDE; virtual void DoSetColumnsOrder(const wxArrayInt& order) wxOVERRIDE; virtual wxArrayInt DoGetColumnsOrder() const wxOVERRIDE; // common part of all ctors void Init(); // event handlers void OnPaint(wxPaintEvent& event); void OnMouse(wxMouseEvent& event); void OnKeyDown(wxKeyEvent& event); void OnCaptureLost(wxMouseCaptureLostEvent& event); // move the column with given idx at given position (this doesn't generate // any events but does refresh the display) void DoMoveCol(unsigned int idx, unsigned int pos); // return the horizontal start position of the given column in physical // coordinates int GetColStart(unsigned int idx) const; // and the end position int GetColEnd(unsigned int idx) const; // refresh the given column [only]; idx must be valid void RefreshCol(unsigned int idx); // refresh the given column if idx is valid void RefreshColIfNotNone(unsigned int idx); // refresh all the controls starting from (and including) the given one void RefreshColsAfter(unsigned int idx); // return the column at the given position or -1 if it is beyond the // rightmost column and put true into onSeparator output parameter if the // position is near the divider at the right end of this column (notice // that this means that we return column 0 even if the position is over // column 1 but close enough to the divider separating it from column 0) unsigned int FindColumnAtPoint(int x, bool *onSeparator = NULL) const; // return the result of FindColumnAtPoint() if it is a valid column, // otherwise the index of the last (rightmost) displayed column unsigned int FindColumnClosestToPoint(int xPhysical) const; // return true if a drag resizing operation is currently in progress bool IsResizing() const; // return true if a drag reordering operation is currently in progress bool IsReordering() const; // return true if any drag operation is currently in progress bool IsDragging() const { return IsResizing() || IsReordering(); } // end any drag operation currently in progress (resizing or reordering) void EndDragging(); // cancel the drag operation currently in progress and generate an event // about it void CancelDragging(); // start (if m_colBeingResized is -1) or continue resizing the column // // this generates wxEVT_HEADER_BEGIN_RESIZE/RESIZING events and can // cancel the operation if the user handler decides so void StartOrContinueResizing(unsigned int col, int xPhysical); // end the resizing operation currently in progress and generate an event // about it with its cancelled flag set if xPhysical is -1 void EndResizing(int xPhysical); // same functions as above but for column moving/reordering instead of // resizing void StartReordering(unsigned int col, int xPhysical); // returns true if we did drag the column somewhere else or false if we // didn't really move it -- in this case we consider that no reordering // took place and that a normal column click event should be generated bool EndReordering(int xPhysical); // constrain the given position to be larger than the start position of the // given column plus its minimal width and return the effective width int ConstrainByMinWidth(unsigned int col, int& xPhysical); // update the information displayed while a column is being moved around void UpdateReorderingMarker(int xPhysical); // clear any overlaid markers void ClearMarkers(); // number of columns in the control currently unsigned int m_numColumns; // index of the column under mouse or -1 if none unsigned int m_hover; // the column being resized or -1 if there is no resizing operation in // progress unsigned int m_colBeingResized; // the column being moved or -1 if there is no reordering operation in // progress unsigned int m_colBeingReordered; // the distance from the start of m_colBeingReordered and the mouse // position when the user started to drag it int m_dragOffset; // the horizontal scroll offset int m_scrollOffset; // the overlay display used during the dragging operations wxOverlay m_overlay; // the indices of the column appearing at the given position on the display // (its size is always m_numColumns) wxArrayInt m_colIndices; wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl); }; #endif // _WX_GENERIC_HEADERCTRLG_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/filepickerg.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/filepickerg.h // Purpose: wxGenericFileDirButton, wxGenericFileButton, wxGenericDirButton // Author: Francesco Montorsi // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FILEDIRPICKER_H_ #define _WX_FILEDIRPICKER_H_ #include "wx/button.h" #include "wx/filedlg.h" #include "wx/dirdlg.h" wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); //----------------------------------------------------------------------------- // wxGenericFileDirButton: a button which brings up a wx{File|Dir}Dialog //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, public wxFileDirPickerWidgetBase { public: wxGenericFileDirButton() { Init(); } wxGenericFileDirButton(wxWindow *parent, wxWindowID id, const wxString& label = wxFilePickerWidgetLabel, const wxString& path = wxEmptyString, const wxString &message = wxFileSelectorPromptStr, const wxString &wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFilePickerWidgetNameStr) { Init(); Create(parent, id, label, path, message, wildcard, pos, size, style, validator, name); } virtual wxControl *AsControl() wxOVERRIDE { return this; } public: // overridable virtual wxDialog *CreateDialog() = 0; virtual wxWindow *GetDialogParent() { return GetParent(); } virtual wxEventType GetEventType() const = 0; virtual void SetInitialDirectory(const wxString& dir) wxOVERRIDE; public: bool Create(wxWindow *parent, wxWindowID id, const wxString& label = wxFilePickerWidgetLabel, const wxString& path = wxEmptyString, const wxString &message = wxFileSelectorPromptStr, const wxString &wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFilePickerWidgetNameStr); // event handler for the click void OnButtonClick(wxCommandEvent &); protected: wxString m_message, m_wildcard; // we just store the style passed to the ctor here instead of passing it to // wxButton as some of our bits can conflict with wxButton styles and it // just doesn't make sense to use picker styles for wxButton anyhow long m_pickerStyle; // Initial directory set by SetInitialDirectory() call or empty. wxString m_initialDir; private: // common part of all ctors void Init() { m_pickerStyle = -1; } }; //----------------------------------------------------------------------------- // wxGenericFileButton: a button which brings up a wxFileDialog //----------------------------------------------------------------------------- #define wxFILEBTN_DEFAULT_STYLE (wxFLP_OPEN) class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton { public: wxGenericFileButton() {} wxGenericFileButton(wxWindow *parent, wxWindowID id, const wxString& label = wxFilePickerWidgetLabel, const wxString& path = wxEmptyString, const wxString &message = wxFileSelectorPromptStr, const wxString &wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFILEBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFilePickerWidgetNameStr) { Create(parent, id, label, path, message, wildcard, pos, size, style, validator, name); } public: // overridable virtual long GetDialogStyle() const { // the derived class must initialize it if it doesn't use the // non-default wxGenericFileDirButton ctor wxASSERT_MSG( m_pickerStyle != -1, "forgot to initialize m_pickerStyle?" ); long filedlgstyle = 0; if ( m_pickerStyle & wxFLP_OPEN ) filedlgstyle |= wxFD_OPEN; if ( m_pickerStyle & wxFLP_SAVE ) filedlgstyle |= wxFD_SAVE; if ( m_pickerStyle & wxFLP_OVERWRITE_PROMPT ) filedlgstyle |= wxFD_OVERWRITE_PROMPT; if ( m_pickerStyle & wxFLP_FILE_MUST_EXIST ) filedlgstyle |= wxFD_FILE_MUST_EXIST; if ( m_pickerStyle & wxFLP_CHANGE_DIR ) filedlgstyle |= wxFD_CHANGE_DIR; return filedlgstyle; } virtual wxDialog *CreateDialog() wxOVERRIDE; wxEventType GetEventType() const wxOVERRIDE { return wxEVT_FILEPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) wxOVERRIDE { wxStaticCast(p, wxFileDialog)->SetPath(m_path); } void UpdatePathFromDialog(wxDialog *p) wxOVERRIDE { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); } private: wxDECLARE_DYNAMIC_CLASS(wxGenericFileButton); }; //----------------------------------------------------------------------------- // wxGenericDirButton: a button which brings up a wxDirDialog //----------------------------------------------------------------------------- #define wxDIRBTN_DEFAULT_STYLE 0 class WXDLLIMPEXP_CORE wxGenericDirButton : public wxGenericFileDirButton { public: wxGenericDirButton() {} wxGenericDirButton(wxWindow *parent, wxWindowID id, const wxString& label = wxDirPickerWidgetLabel, const wxString& path = wxEmptyString, const wxString &message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDirPickerWidgetNameStr) { Create(parent, id, label, path, message, wxEmptyString, pos, size, style, validator, name); } public: // overridable virtual long GetDialogStyle() const { long dirdlgstyle = wxDD_DEFAULT_STYLE; if ( m_pickerStyle & wxDIRP_DIR_MUST_EXIST ) dirdlgstyle |= wxDD_DIR_MUST_EXIST; if ( m_pickerStyle & wxDIRP_CHANGE_DIR ) dirdlgstyle |= wxDD_CHANGE_DIR; return dirdlgstyle; } virtual wxDialog *CreateDialog() wxOVERRIDE; wxEventType GetEventType() const wxOVERRIDE { return wxEVT_DIRPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) wxOVERRIDE { wxStaticCast(p, wxDirDialog)->SetPath(m_path); } void UpdatePathFromDialog(wxDialog *p) wxOVERRIDE { m_path = wxStaticCast(p, wxDirDialog)->GetPath(); } private: wxDECLARE_DYNAMIC_CLASS(wxGenericDirButton); }; // old wxEVT_COMMAND_* constants //#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED //#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED #endif // _WX_FILEDIRPICKER_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/fswatcher.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/fswatcher.h // Purpose: wxPollingFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 // Copyright: (c) 2009 Bartosz Bekier <[email protected]> // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FSWATCHER_GENERIC_H_ #define _WX_FSWATCHER_GENERIC_H_ #include "wx/defs.h" #if wxUSE_FSWATCHER class WXDLLIMPEXP_BASE wxPollingFileSystemWatcher : public wxFileSystemWatcherBase { public: }; #endif // wxUSE_FSWATCHER #endif /* _WX_FSWATCHER_GENERIC_H_ */
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/private/listctrl.h
///////////////////////////////////////////////////////////////////////////// // Name: wx/generic/private/listctrl.h // Purpose: private definitions of wxListCtrl helpers // Author: Robert Roebling // Vadim Zeitlin (virtual list control support) // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_LISTCTRL_PRIVATE_H_ #define _WX_GENERIC_LISTCTRL_PRIVATE_H_ #include "wx/defs.h" #if wxUSE_LISTCTRL #include "wx/listctrl.h" #include "wx/selstore.h" #include "wx/timer.h" #include "wx/settings.h" // ============================================================================ // private classes // ============================================================================ //----------------------------------------------------------------------------- // wxColWidthInfo (internal) //----------------------------------------------------------------------------- struct wxColWidthInfo { int nMaxWidth; bool bNeedsUpdate; // only set to true when an item whose // width == nMaxWidth is removed wxColWidthInfo(int w = 0, bool needsUpdate = false) { nMaxWidth = w; bNeedsUpdate = needsUpdate; } }; WX_DEFINE_ARRAY_PTR(wxColWidthInfo *, ColWidthArray); //----------------------------------------------------------------------------- // wxListItemData (internal) //----------------------------------------------------------------------------- class wxListItemData { public: wxListItemData(wxListMainWindow *owner); ~wxListItemData(); void SetItem( const wxListItem &info ); void SetImage( int image ) { m_image = image; } void SetData( wxUIntPtr data ) { m_data = data; } void SetPosition( int x, int y ); void SetSize( int width, int height ); bool HasText() const { return !m_text.empty(); } const wxString& GetText() const { return m_text; } void SetText(const wxString& text) { m_text = text; } // we can't use empty string for measuring the string width/height, so // always return something wxString GetTextForMeasuring() const { wxString s = GetText(); if ( s.empty() ) s = wxT('H'); return s; } bool IsHit( int x, int y ) const; int GetX() const; int GetY() const; int GetWidth() const; int GetHeight() const; int GetImage() const { return m_image; } bool HasImage() const { return GetImage() != -1; } void GetItem( wxListItem &info ) const; void SetAttr(wxItemAttr *attr) { m_attr = attr; } wxItemAttr *GetAttr() const { return m_attr; } public: // the item image or -1 int m_image; // user data associated with the item wxUIntPtr m_data; // the item coordinates are not used in report mode; instead this pointer is // NULL and the owner window is used to retrieve the item position and size wxRect *m_rect; // the list ctrl we are in wxListMainWindow *m_owner; // custom attributes or NULL wxItemAttr *m_attr; protected: // common part of all ctors void Init(); wxString m_text; }; //----------------------------------------------------------------------------- // wxListHeaderData (internal) //----------------------------------------------------------------------------- class wxListHeaderData : public wxObject { public: wxListHeaderData(); wxListHeaderData( const wxListItem &info ); void SetItem( const wxListItem &item ); void SetPosition( int x, int y ); void SetWidth( int w ); void SetState( int state ); void SetFormat( int format ); void SetHeight( int h ); bool HasImage() const; bool HasText() const { return !m_text.empty(); } const wxString& GetText() const { return m_text; } void SetText(const wxString& text) { m_text = text; } void GetItem( wxListItem &item ); bool IsHit( int x, int y ) const; int GetImage() const; int GetWidth() const; int GetFormat() const; int GetState() const; protected: long m_mask; int m_image; wxString m_text; int m_format; int m_width; int m_xpos, m_ypos; int m_height; int m_state; private: void Init(); }; //----------------------------------------------------------------------------- // wxListLineData (internal) //----------------------------------------------------------------------------- WX_DECLARE_LIST(wxListItemData, wxListItemDataList); class wxListLineData { public: // the list of subitems: only may have more than one item in report mode wxListItemDataList m_items; // this is not used in report view struct GeometryInfo { // total item rect wxRect m_rectAll; // label only wxRect m_rectLabel; // icon only wxRect m_rectIcon; // the part to be highlighted wxRect m_rectHighlight; // extend all our rects to be centered inside the one of given width void ExtendWidth(wxCoord w) { wxASSERT_MSG( m_rectAll.width <= w, wxT("width can only be increased") ); m_rectAll.width = w; m_rectLabel.x = m_rectAll.x + (w - m_rectLabel.width) / 2; m_rectIcon.x = m_rectAll.x + (w - m_rectIcon.width) / 2; m_rectHighlight.x = m_rectAll.x + (w - m_rectHighlight.width) / 2; } } *m_gi; // is this item selected? [NB: not used in virtual mode] bool m_highlighted; bool m_checked; // back pointer to the list ctrl wxListMainWindow *m_owner; public: wxListLineData(wxListMainWindow *owner); ~wxListLineData() { WX_CLEAR_LIST(wxListItemDataList, m_items); delete m_gi; } // called by the owner when it toggles report view void SetReportView(bool inReportView) { // we only need m_gi when we're not in report view so update as needed if ( inReportView ) { delete m_gi; m_gi = NULL; } else { m_gi = new GeometryInfo; } } // are we in report mode? inline bool InReportView() const; // are we in virtual report mode? inline bool IsVirtual() const; // these 2 methods shouldn't be called for report view controls, in that // case we determine our position/size ourselves // calculate the size of the line void CalculateSize( wxDC *dc, int spacing ); // remember the position this line appears at void SetPosition( int x, int y, int spacing ); // wxListCtrl API void SetImage( int image ) { SetImage(0, image); } int GetImage() const { return GetImage(0); } void SetImage( int index, int image ); int GetImage( int index ) const; void Check(bool check) { m_checked = check; } bool IsChecked() { return m_checked; } bool HasImage() const { return GetImage() != -1; } bool HasText() const { return !GetText(0).empty(); } void SetItem( int index, const wxListItem &info ); void GetItem( int index, wxListItem &info ) const; wxString GetText(int index) const; void SetText( int index, const wxString& s ); wxItemAttr *GetAttr() const; void SetAttr(wxItemAttr *attr); // return true if the highlighting really changed bool Highlight( bool on ); void ReverseHighlight(); bool IsHighlighted() const { wxASSERT_MSG( !IsVirtual(), wxT("unexpected call to IsHighlighted") ); return m_highlighted; } // draw the line on the given DC in icon/list mode void Draw( wxDC *dc, bool current ); // the same in report mode: it needs more parameters as we don't store // everything in the item in report mode void DrawInReportMode( wxDC *dc, const wxRect& rect, const wxRect& rectHL, bool highlighted, bool current ); private: // set the line to contain num items (only can be > 1 in report mode) void InitItems( int num ); // get the mode (i.e. style) of the list control inline int GetMode() const; // Apply this item attributes to the given DC: set the text font and colour // and also erase the background appropriately. void ApplyAttributes(wxDC *dc, const wxRect& rectHL, bool highlighted, bool current); // draw the text on the DC with the correct justification; also add an // ellipsis if the text is too large to fit in the current width void DrawTextFormatted(wxDC *dc, const wxString &text, int col, int x, int yMid, // this is middle, not top, of the text int width); }; class wxListLineDataArray : public wxVector<wxListLineData*> { public: void Clear() { for ( size_t n = 0; n < size(); ++n ) delete (*this)[n]; clear(); } ~wxListLineDataArray() { Clear(); } }; //----------------------------------------------------------------------------- // wxListHeaderWindow (internal) //----------------------------------------------------------------------------- class wxListHeaderWindow : public wxWindow { protected: wxListMainWindow *m_owner; const wxCursor *m_currentCursor; wxCursor *m_resizeCursor; bool m_isDragging; // column being resized or -1 int m_column; // divider line position in logical (unscrolled) coords int m_currentX; // minimal position beyond which the divider line // can't be dragged in logical coords int m_minX; public: wxListHeaderWindow(); // We provide only Create(), not the ctor, because we need to create the // C++ object before creating the window, see the explanations in // CreateOrDestroyHeaderWindowAsNeeded() bool Create( wxWindow *win, wxWindowID id, wxListMainWindow *owner, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxString &name = wxT("wxlistctrlcolumntitles") ); virtual ~wxListHeaderWindow(); // We never need focus as we don't have any keyboard interface. virtual bool AcceptsFocus() const wxOVERRIDE { return false; } void DrawCurrent(); void AdjustDC( wxDC& dc ); void OnPaint( wxPaintEvent &event ); void OnMouse( wxMouseEvent &event ); // needs refresh bool m_dirty; // Update main window's column later bool m_sendSetColumnWidth; int m_colToSend; int m_widthToSend; virtual wxWindow *GetMainWindowOfCompositeControl() wxOVERRIDE { return GetParent(); } virtual void OnInternalIdle() wxOVERRIDE; private: // common part of all ctors void Init(); // generate and process the list event of the given type, return true if // it wasn't vetoed, i.e. if we should proceed bool SendListEvent(wxEventType type, const wxPoint& pos); wxDECLARE_EVENT_TABLE(); }; //----------------------------------------------------------------------------- // wxListRenameTimer (internal) //----------------------------------------------------------------------------- class wxListRenameTimer: public wxTimer { private: wxListMainWindow *m_owner; public: wxListRenameTimer( wxListMainWindow *owner ); void Notify() wxOVERRIDE; }; //----------------------------------------------------------------------------- // wxListFindTimer (internal) //----------------------------------------------------------------------------- class wxListFindTimer: public wxTimer { public: // reset the current prefix after half a second of inactivity enum { DELAY = 500 }; wxListFindTimer( wxListMainWindow *owner ) : m_owner(owner) { } virtual void Notify() wxOVERRIDE; private: wxListMainWindow *m_owner; }; //----------------------------------------------------------------------------- // wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing //----------------------------------------------------------------------------- class wxListTextCtrlWrapper : public wxEvtHandler { public: // NB: text must be a valid object but not Create()d yet wxListTextCtrlWrapper(wxListMainWindow *owner, wxTextCtrl *text, size_t itemEdit); wxTextCtrl *GetText() const { return m_text; } // Check if the given key event should stop editing and return true if it // does or false otherwise. bool CheckForEndEditKey(const wxKeyEvent& event); // Different reasons for calling EndEdit(): // // It was called because: enum EndReason { End_Accept, // user has accepted the changes. End_Discard, // user has cancelled editing. End_Destroy // the entire control is being destroyed. }; void EndEdit(EndReason reason); protected: void OnChar( wxKeyEvent &event ); void OnKeyUp( wxKeyEvent &event ); void OnKillFocus( wxFocusEvent &event ); bool AcceptChanges(); void Finish( bool setfocus ); private: wxListMainWindow *m_owner; wxTextCtrl *m_text; wxString m_startValue; size_t m_itemEdited; bool m_aboutToFinish; wxDECLARE_EVENT_TABLE(); }; //----------------------------------------------------------------------------- // wxListMainWindow (internal) //----------------------------------------------------------------------------- WX_DECLARE_LIST(wxListHeaderData, wxListHeaderDataList); class wxListMainWindow : public wxWindow { public: wxListMainWindow(); wxListMainWindow( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size ); virtual ~wxListMainWindow(); // called by the main control when its mode changes void SetReportView(bool inReportView); // helper to simplify testing for wxLC_XXX flags bool HasFlag(int flag) const { return m_parent->HasFlag(flag); } // return true if this is a virtual list control bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); } // return true if the control is in report mode bool InReportView() const { return HasFlag(wxLC_REPORT); } // return true if we are in single selection mode, false if multi sel bool IsSingleSel() const { return HasFlag(wxLC_SINGLE_SEL); } // do we have a header window? bool HasHeader() const { return InReportView() && !HasFlag(wxLC_NO_HEADER); } void HighlightAll( bool on ); // all these functions only do something if the line is currently visible // change the line "selected" state, return true if it really changed bool HighlightLine( size_t line, bool highlight = true); // as HighlightLine() but do it for the range of lines: this is incredibly // more efficient for virtual list controls! // // NB: unlike HighlightLine() this one does refresh the lines on screen void HighlightLines( size_t lineFrom, size_t lineTo, bool on = true ); // toggle the line state and refresh it void ReverseHighlight( size_t line ) { HighlightLine(line, !IsHighlighted(line)); RefreshLine(line); } // return true if the line is highlighted bool IsHighlighted(size_t line) const; // refresh one or several lines at once void RefreshLine( size_t line ); void RefreshLines( size_t lineFrom, size_t lineTo ); // refresh all selected items void RefreshSelected(); // refresh all lines below the given one: the difference with // RefreshLines() is that the index here might not be a valid one (happens // when the last line is deleted) void RefreshAfter( size_t lineFrom ); // the methods which are forwarded to wxListLineData itself in list/icon // modes but are here because the lines don't store their positions in the // report mode // get the bound rect for the entire line wxRect GetLineRect(size_t line) const; // get the bound rect of the label wxRect GetLineLabelRect(size_t line) const; // get the bound rect of the items icon (only may be called if we do have // an icon!) wxRect GetLineIconRect(size_t line) const; // get the rect to be highlighted when the item has focus wxRect GetLineHighlightRect(size_t line) const; // get the size of the total line rect wxSize GetLineSize(size_t line) const { return GetLineRect(line).GetSize(); } // return the hit code for the corresponding position (in this line) long HitTestLine(size_t line, int x, int y) const; // bring the selected item into view, scrolling to it if necessary void MoveToItem(size_t item); bool ScrollList( int WXUNUSED(dx), int dy ); // bring the current item into view void MoveToFocus() { MoveToItem(m_current); } // start editing the label of the given item wxTextCtrl *EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); bool EndEditLabel(bool cancel); wxTextCtrl *GetEditControl() const { return m_textctrlWrapper ? m_textctrlWrapper->GetText() : NULL; } void ResetTextControl(wxTextCtrl *text) { delete text; m_textctrlWrapper = NULL; } void OnRenameTimer(); bool OnRenameAccept(size_t itemEdit, const wxString& value); void OnRenameCancelled(size_t itemEdit); void OnFindTimer(); // set whether or not to ring the find bell // (does nothing on MSW - bell is always rung) void EnableBellOnNoMatch( bool on ); void OnMouse( wxMouseEvent &event ); // called to switch the selection from the current item to newCurrent, void OnArrowChar( size_t newCurrent, const wxKeyEvent& event ); void OnCharHook( wxKeyEvent &event ); void OnChar( wxKeyEvent &event ); void OnKeyDown( wxKeyEvent &event ); void OnKeyUp( wxKeyEvent &event ); void OnSetFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event ); void OnScroll( wxScrollWinEvent& event ); void OnPaint( wxPaintEvent &event ); void OnChildFocus(wxChildFocusEvent& event); void DrawImage( int index, wxDC *dc, int x, int y ); void GetImageSize( int index, int &width, int &height ) const; void SetImageList( wxImageList *imageList, int which ); void SetItemSpacing( int spacing, bool isSmall = false ); int GetItemSpacing( bool isSmall = false ); void SetColumn( int col, const wxListItem &item ); void SetColumnWidth( int col, int width ); void GetColumn( int col, wxListItem &item ) const; int GetColumnWidth( int col ) const; int GetColumnCount() const { return m_columns.GetCount(); } // returns the sum of the heights of all columns int GetHeaderWidth() const; int GetCountPerPage() const; void SetItem( wxListItem &item ); void GetItem( wxListItem &item ) const; void SetItemState( long item, long state, long stateMask ); void SetItemStateAll( long state, long stateMask ); int GetItemState( long item, long stateMask ) const; bool GetItemRect( long item, wxRect &rect ) const { return GetSubItemRect(item, wxLIST_GETSUBITEMRECT_WHOLEITEM, rect); } bool GetSubItemRect( long item, long subItem, wxRect& rect ) const; wxRect GetViewRect() const; bool GetItemPosition( long item, wxPoint& pos ) const; int GetSelectedItemCount() const; bool HasCheckBoxes() const; bool EnableCheckBoxes(bool enable = true); bool IsItemChecked(long item) const; void CheckItem(long item, bool check); wxString GetItemText(long item, int col = 0) const { wxListItem info; info.m_mask = wxLIST_MASK_TEXT; info.m_itemId = item; info.m_col = col; GetItem( info ); return info.m_text; } void SetItemText(long item, const wxString& value) { wxListItem info; info.m_mask = wxLIST_MASK_TEXT; info.m_itemId = item; info.m_text = value; SetItem( info ); } wxImageList* GetSmallImageList() const { return m_small_image_list; } // set the scrollbars and update the positions of the items void RecalculatePositions(bool noRefresh = false); // refresh the window and the header void RefreshAll(); long GetNextItem( long item, int geometry, int state ) const; void DeleteItem( long index ); void DeleteAllItems(); void DeleteColumn( int col ); void DeleteEverything(); void EnsureVisible( long index ); long FindItem( long start, const wxString& str, bool partial = false ); long FindItem( long start, wxUIntPtr data); long FindItem( const wxPoint& pt ); long HitTest( int x, int y, int &flags ) const; void InsertItem( wxListItem &item ); long InsertColumn( long col, const wxListItem &item ); int GetItemWidthWithImage(wxListItem * item); void SortItems( wxListCtrlCompare fn, wxIntPtr data ); size_t GetItemCount() const; bool IsEmpty() const { return GetItemCount() == 0; } void SetItemCount(long count); // change the current (== focused) item, send a notification event void ChangeCurrent(size_t current); void ResetCurrent() { ChangeCurrent((size_t)-1); } bool HasCurrent() const { return m_current != (size_t)-1; } // send out a wxListEvent void SendNotify( size_t line, wxEventType command, const wxPoint& point = wxDefaultPosition ); // override base class virtual to reset m_lineHeight when the font changes virtual bool SetFont(const wxFont& font) wxOVERRIDE { if ( !wxWindow::SetFont(font) ) return false; m_lineHeight = 0; return true; } // these are for wxListLineData usage only // get the backpointer to the list ctrl wxGenericListCtrl *GetListCtrl() const { return wxStaticCast(GetParent(), wxGenericListCtrl); } // get the height of all lines (assuming they all do have the same height) wxCoord GetLineHeight() const; // get the y position of the given line (only for report view) wxCoord GetLineY(size_t line) const; // get the brush to use for the item highlighting wxBrush *GetHighlightBrush() const { return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush; } bool HasFocus() const wxOVERRIDE { return m_hasFocus; } protected: // the array of all line objects for a non virtual list control (for the // virtual list control we only ever use m_lines[0]) wxListLineDataArray m_lines; // the list of column objects wxListHeaderDataList m_columns; // currently focused item or -1 size_t m_current; // the number of lines per page int m_linesPerPage; // this flag is set when something which should result in the window // redrawing happens (i.e. an item was added or deleted, or its appearance // changed) and OnPaint() doesn't redraw the window while it is set which // allows to minimize the number of repaintings when a lot of items are // being added. The real repainting occurs only after the next OnIdle() // call bool m_dirty; wxColour *m_highlightColour; wxImageList *m_small_image_list; wxImageList *m_normal_image_list; int m_small_spacing; int m_normal_spacing; bool m_hasFocus; bool m_lastOnSame; wxTimer *m_renameTimer; // incremental search data wxString m_findPrefix; wxTimer *m_findTimer; // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 // if it is globally enabled but has been temporarily disabled because we // had already beeped for this particular search. int m_findBell; bool m_isCreated; int m_dragCount; wxPoint m_dragStart; ColWidthArray m_aColWidths; // for double click logic size_t m_lineLastClicked, m_lineBeforeLastClicked, m_lineSelectSingleOnUp; bool m_hasCheckBoxes; protected: wxWindow *GetMainWindowOfCompositeControl() wxOVERRIDE { return GetParent(); } // the total count of items in a virtual list control size_t m_countVirt; // the object maintaining the items selection state, only used in virtual // controls wxSelectionStore m_selStore; // common part of all ctors void Init(); // get the line data for the given index wxListLineData *GetLine(size_t n) const { wxASSERT_MSG( n != (size_t)-1, wxT("invalid line index") ); if ( IsVirtual() ) { wxConstCast(this, wxListMainWindow)->CacheLineData(n); n = 0; } return m_lines[n]; } // get a dummy line which can be used for geometry calculations and such: // you must use GetLine() if you want to really draw the line wxListLineData *GetDummyLine() const; // cache the line data of the n-th line in m_lines[0] void CacheLineData(size_t line); // get the range of visible lines void GetVisibleLinesRange(size_t *from, size_t *to); // force us to recalculate the range of visible lines void ResetVisibleLinesRange() { m_lineFrom = (size_t)-1; } // find the first item starting with the given prefix after the given item size_t PrefixFindItem(size_t item, const wxString& prefix) const; // get the colour to be used for drawing the rules wxColour GetRuleColour() const { return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); } private: // initialize the current item if needed void UpdateCurrent(); // delete all items but don't refresh: called from dtor void DoDeleteAllItems(); // Compute the minimal width needed to fully display the column header. int ComputeMinHeaderWidth(const wxListHeaderData* header) const; // Check if the given point is inside the checkbox of this item. // // Always returns false if there are no checkboxes. bool IsInsideCheckBox(long item, int x, int y); // the height of one line using the current font wxCoord m_lineHeight; // the total header width or 0 if not calculated yet wxCoord m_headerWidth; // the first and last lines being shown on screen right now (inclusive), // both may be -1 if they must be calculated so never access them directly: // use GetVisibleLinesRange() above instead size_t m_lineFrom, m_lineTo; // the brushes to use for item highlighting when we do/don't have focus wxBrush *m_highlightBrush, *m_highlightUnfocusedBrush; // wrapper around the text control currently used for in place editing or // NULL if no item is being edited wxListTextCtrlWrapper *m_textctrlWrapper; wxDECLARE_EVENT_TABLE(); friend class wxGenericListCtrl; friend class wxListCtrlMaxWidthCalculator; }; #endif // wxUSE_LISTCTRL #endif // _WX_GENERIC_LISTCTRL_PRIVATE_H_
h
rticonnextdds-usecases
data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/generic/private/markuptext.h
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/private/markuptext.h // Purpose: Generic wx*MarkupText classes for managing text with markup. // Author: Vadim Zeitlin // Created: 2011-02-21 // Copyright: (c) 2011 Vadim Zeitlin <[email protected]> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_PRIVATE_MARKUPTEXT_H_ #define _WX_GENERIC_PRIVATE_MARKUPTEXT_H_ #include "wx/defs.h" #include "wx/gdicmn.h" class WXDLLIMPEXP_FWD_CORE wxDC; class wxMarkupParserOutput; // ---------------------------------------------------------------------------- // wxMarkupText: allows to measure and draw the text containing markup. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxMarkupTextBase { public: virtual ~wxMarkupTextBase() {} // Update the markup string. void SetMarkup(const wxString& markup) { m_markup = markup; } // Return the width and height required by the given string and optionally // the height of the visible part above the baseline (i.e. ascent minus // internal leading). // // The font currently selected into the DC is used for measuring (notice // that it is changed by this function but normally -- i.e. if markup is // valid -- restored to its original value when it returns). wxSize Measure(wxDC& dc, int *visibleHeight = NULL) const; protected: wxMarkupTextBase(const wxString& markup) : m_markup(markup) { } // Return m_markup suitable for measuring by Measure, i.e. stripped of // any mnenomics. virtual wxString GetMarkupForMeasuring() const = 0; wxString m_markup; }; class WXDLLIMPEXP_CORE wxMarkupText : public wxMarkupTextBase { public: // Constants for Render() flags. enum { Render_Default = 0, // Don't show mnemonics visually. Render_ShowAccels = 1 // Underline mnemonics. }; // Initialize with the given string containing markup (which is supposed to // be valid, the caller must check for it before constructing this object). // // Notice that the usual rules for mnemonics apply to the markup text: if // it contains any '&' characters they must be escaped by doubling them, // otherwise they indicate that the next character is the mnemonic for this // field. // // TODO-MULTILINE-MARKUP: Currently only single line labels are supported, // search for other occurrences of this comment to find the places which // need to be updated to support multiline labels with markup. wxMarkupText(const wxString& markup) : wxMarkupTextBase(markup) { } // Default copy ctor, assignment operator and dtor are ok. // Update the markup string. // // The same rules for mnemonics as in the ctor apply to this string. void SetMarkup(const wxString& markup) { m_markup = markup; } // Render the markup string into the given DC in the specified rectangle. // // Notice that while the function uses the provided rectangle for alignment // (it centers the text in it), no clipping is done by it so use Measure() // and set the clipping region before rendering if necessary. void Render(wxDC& dc, const wxRect& rect, int flags); protected: virtual wxString GetMarkupForMeasuring() const wxOVERRIDE; }; // ---------------------------------------------------------------------------- // wxItemMarkupText: variant of wxMarkupText for items without mnemonics // ---------------------------------------------------------------------------- // This class has similar interface to wxItemMarkup, but no strings contain // mnemonics and no escaping is done. class WXDLLIMPEXP_CORE wxItemMarkupText : public wxMarkupTextBase { public: // Initialize with the given string containing markup (which is supposed to // be valid, the caller must check for it before constructing this object). // Notice that mnemonics are not interpreted at all by this class, so // literal ampersands shouldn't be escaped/doubled. wxItemMarkupText(const wxString& markup) : wxMarkupTextBase(markup) { } // Default copy ctor, assignment operator and dtor are ok. // Similar to wxMarkupText::Render(), but uses wxRendererNative::DrawItemText() // instead of generic wxDC::DrawLabel(), so is more suitable for use in // controls that already use DrawItemText() for its items. // // The meaning of the flags here is different than in wxMarkupText too: // they're passed to DrawItemText(). // // Currently the only supported ellipsize modes are wxELLIPSIZE_NONE and // wxELLIPSIZE_END, the others are treated as wxELLIPSIZE_END. void Render(wxWindow *win, wxDC& dc, const wxRect& rect, int rendererFlags, wxEllipsizeMode ellipsizeMode); protected: virtual wxString GetMarkupForMeasuring() const wxOVERRIDE { return m_markup; } }; #endif // _WX_GENERIC_PRIVATE_MARKUPTEXT_H_
h