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/Linux/include/wx/xrc/xh_toolb.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_toolb.h
// Purpose: XML resource handler for wxToolBar
// Author: Vaclav Slavik
// Created: 2000/08/11
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TOOLB_H_
#define _WX_XH_TOOLB_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TOOLBAR
class WXDLLIMPEXP_FWD_CORE wxToolBar;
class WXDLLIMPEXP_XRC wxToolBarXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxToolBarXmlHandler);
public:
wxToolBarXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxToolBar *m_toolbar;
wxSize m_toolSize;
};
#endif // wxUSE_XRC && wxUSE_TOOLBAR
#endif // _WX_XH_TOOLB_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_frame.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_frame.h
// Purpose: XML resource handler for wxFrame
// Author: Vaclav Slavik & Aleks.
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_FRAME_H_
#define _WX_XH_FRAME_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
class WXDLLIMPEXP_XRC wxFrameXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxFrameXmlHandler);
public:
wxFrameXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC
#endif // _WX_XH_FRAME_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_collpane.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_collpane.h
// Purpose: XML resource handler for wxCollapsiblePane
// Author: Francesco Montorsi
// Created: 2006-10-27
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_COLLPANE_H_
#define _WX_XH_COLLPANE_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_COLLPANE
class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane;
class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler
{
public:
wxCollapsiblePaneXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxCollapsiblePane *m_collpane;
wxDECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_COLLPANE
#endif // _WX_XH_COLLPANE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_comboctrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_comboctrl.h
// Purpose: XML resource handler for wxComboBox
// Author: Jaakko Salli
// Created: 2009/01/25
// Copyright: (c) 2009 Jaakko Salli
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_COMBOCTRL_H_
#define _WX_XH_COMBOCTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_COMBOCTRL
class WXDLLIMPEXP_XRC wxComboCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxComboCtrlXmlHandler);
public:
wxComboCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
};
#endif // wxUSE_XRC && wxUSE_COMBOCTRL
#endif // _WX_XH_COMBOCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_activityindicator.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_activityindicator.h
// Purpose: Declaration of wxActivityIndicator XRC handler.
// Author: Vadim Zeitlin
// Created: 2015-03-18
// Copyright: (c) 2015 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_ACTIVITYINDICATOR_H_
#define _WX_XH_ACTIVITYINDICATOR_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_ACTIVITYINDICATOR
class WXDLLIMPEXP_XRC wxActivityIndicatorXmlHandler : public wxXmlResourceHandler
{
public:
wxActivityIndicatorXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxActivityIndicatorXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_ACTIVITYINDICATOR
#endif // _WX_XH_ACTIVITYINDICATOR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_editlbox.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_editlbox.h
// Purpose: declaration of wxEditableListBox XRC handler
// Author: Vadim Zeitlin
// Created: 2009-06-04
// Copyright: (c) 2009 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XRC_XH_EDITLBOX_H_
#define _WX_XRC_XH_EDITLBOX_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_EDITABLELISTBOX
// ----------------------------------------------------------------------------
// wxEditableListBoxXmlHandler: XRC handler for wxEditableListBox
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_XRC wxEditableListBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxEditableListBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString m_items;
wxDECLARE_DYNAMIC_CLASS(wxEditableListBoxXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_EDITABLELISTBOX
#endif // _WX_XRC_XH_EDITLBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_filectrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_filectrl.h
// Purpose: XML resource handler for wxFileCtrl
// Author: Kinaou Hervé
// Created: 2009-05-11
// Copyright: (c) 2009 wxWidgets development team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_FILECTRL_H_
#define _WX_XH_FILECTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_FILECTRL
class WXDLLIMPEXP_XRC wxFileCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxFileCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxFileCtrlXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_FILECTRL
#endif // _WX_XH_FILEPICKERCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_split.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_split.h
// Purpose: XRC resource for wxSplitterWindow
// Author: [email protected], Vaclav Slavik
// Created: 2003/01/26
// Copyright: (c) 2003 [email protected], Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SPLIT_H_
#define _WX_XH_SPLIT_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_SPLITTER
class WXDLLIMPEXP_XRC wxSplitterWindowXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxSplitterWindowXmlHandler);
public:
wxSplitterWindowXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_SPLITTER
#endif // _WX_XH_SPLIT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_sizer.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_sizer.h
// Purpose: XML resource handler for wxBoxSizer
// Author: Vaclav Slavik
// Created: 2000/04/24
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SIZER_H_
#define _WX_XH_SIZER_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
#include "wx/sizer.h"
#include "wx/gbsizer.h"
class WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxSizerXmlHandler);
public:
wxSizerXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
protected:
virtual wxSizer* DoCreateSizer(const wxString& name);
virtual bool IsSizerNode(wxXmlNode *node) const;
private:
bool m_isInside;
bool m_isGBS;
wxSizer *m_parentSizer;
wxObject* Handle_sizeritem();
wxObject* Handle_spacer();
wxObject* Handle_sizer();
wxSizer* Handle_wxBoxSizer();
#if wxUSE_STATBOX
wxSizer* Handle_wxStaticBoxSizer();
#endif
wxSizer* Handle_wxGridSizer();
wxFlexGridSizer* Handle_wxFlexGridSizer();
wxGridBagSizer* Handle_wxGridBagSizer();
wxSizer* Handle_wxWrapSizer();
bool ValidateGridSizerChildren();
void SetFlexibleMode(wxFlexGridSizer* fsizer);
void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
wxGBPosition GetGBPos();
wxGBSpan GetGBSpan();
wxSizerItem* MakeSizerItem();
void SetSizerItemAttributes(wxSizerItem* sitem);
void AddSizerItem(wxSizerItem* sitem);
int GetSizerFlags();
};
#if wxUSE_BUTTON
class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
: public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler);
public:
wxStdDialogButtonSizerXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxStdDialogButtonSizer *m_parentSizer;
};
#endif // wxUSE_BUTTON
#endif // wxUSE_XRC
#endif // _WX_XH_SIZER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_all.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_all.h
// Purpose: includes all xh_*.h files
// Author: Vaclav Slavik
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_ALL_H_
#define _WX_XH_ALL_H_
// Existing handlers:
#include "wx/xrc/xh_activityindicator.h"
#include "wx/xrc/xh_animatctrl.h"
#include "wx/xrc/xh_bannerwindow.h"
#include "wx/xrc/xh_bmp.h"
#include "wx/xrc/xh_bmpbt.h"
#include "wx/xrc/xh_bmpcbox.h"
#include "wx/xrc/xh_bttn.h"
#include "wx/xrc/xh_cald.h"
#include "wx/xrc/xh_chckb.h"
#include "wx/xrc/xh_chckl.h"
#include "wx/xrc/xh_choic.h"
#include "wx/xrc/xh_choicbk.h"
#include "wx/xrc/xh_clrpicker.h"
#include "wx/xrc/xh_cmdlinkbn.h"
#include "wx/xrc/xh_collpane.h"
#include "wx/xrc/xh_combo.h"
#include "wx/xrc/xh_comboctrl.h"
#include "wx/xrc/xh_datectrl.h"
#include "wx/xrc/xh_dirpicker.h"
#include "wx/xrc/xh_dlg.h"
#include "wx/xrc/xh_editlbox.h"
#include "wx/xrc/xh_filectrl.h"
#include "wx/xrc/xh_filepicker.h"
#include "wx/xrc/xh_fontpicker.h"
#include "wx/xrc/xh_frame.h"
#include "wx/xrc/xh_gauge.h"
#include "wx/xrc/xh_gdctl.h"
#include "wx/xrc/xh_grid.h"
#include "wx/xrc/xh_html.h"
#include "wx/xrc/xh_htmllbox.h"
#include "wx/xrc/xh_hyperlink.h"
#include "wx/xrc/xh_listb.h"
#include "wx/xrc/xh_listc.h"
#include "wx/xrc/xh_listbk.h"
#include "wx/xrc/xh_mdi.h"
#include "wx/xrc/xh_menu.h"
#include "wx/xrc/xh_notbk.h"
#include "wx/xrc/xh_odcombo.h"
#include "wx/xrc/xh_panel.h"
#include "wx/xrc/xh_propdlg.h"
#include "wx/xrc/xh_radbt.h"
#include "wx/xrc/xh_radbx.h"
#include "wx/xrc/xh_scrol.h"
#include "wx/xrc/xh_scwin.h"
#include "wx/xrc/xh_simplebook.h"
#include "wx/xrc/xh_sizer.h"
#include "wx/xrc/xh_slidr.h"
#include "wx/xrc/xh_spin.h"
#include "wx/xrc/xh_split.h"
#include "wx/xrc/xh_srchctrl.h"
#include "wx/xrc/xh_statbar.h"
#include "wx/xrc/xh_stbox.h"
#include "wx/xrc/xh_stbmp.h"
#include "wx/xrc/xh_sttxt.h"
#include "wx/xrc/xh_stlin.h"
#include "wx/xrc/xh_text.h"
#include "wx/xrc/xh_tglbtn.h"
#include "wx/xrc/xh_timectrl.h"
#include "wx/xrc/xh_toolb.h"
#include "wx/xrc/xh_toolbk.h"
#include "wx/xrc/xh_tree.h"
#include "wx/xrc/xh_treebk.h"
#include "wx/xrc/xh_unkwn.h"
#include "wx/xrc/xh_wizrd.h"
#endif // _WX_XH_ALL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_aui.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_aui.h
// Purpose: XRC resource handler for wxAUI
// Author: Andrea Zanellato, Steve Lamerton (wxAuiNotebook)
// Created: 2011-09-18
// Copyright: (c) 2011 wxWidgets Team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_AUI_H_
#define _WX_XH_AUI_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_AUI
#include "wx/vector.h"
class WXDLLIMPEXP_FWD_AUI wxAuiManager;
class WXDLLIMPEXP_FWD_AUI wxAuiNotebook;
class WXDLLIMPEXP_AUI wxAuiXmlHandler : public wxXmlResourceHandler
{
public:
wxAuiXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
// Returns the wxAuiManager for the specified window
wxAuiManager *GetAuiManager(wxWindow *managed) const;
private:
// Used to UnInit() the wxAuiManager before destroying its managed window
void OnManagedWindowClose(wxWindowDestroyEvent &event);
typedef wxVector<wxAuiManager*> Managers;
Managers m_managers; // all wxAuiManagers created in this handler
wxAuiManager *m_manager; // Current wxAuiManager
wxWindow *m_window; // Current managed wxWindow
wxAuiNotebook *m_notebook;
bool m_mgrInside; // Are we handling a wxAuiManager or panes inside it?
bool m_anbInside; // Are we handling a wxAuiNotebook or pages inside it?
wxDECLARE_DYNAMIC_CLASS(wxAuiXmlHandler);
};
#endif //wxUSE_XRC && wxUSE_AUI
#endif //_WX_XH_AUI_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_chckb.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_chckb.h
// Purpose: XML resource handler for wxCheckBox
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_CHCKB_H_
#define _WX_XH_CHCKB_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_CHECKBOX
class WXDLLIMPEXP_XRC wxCheckBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxCheckBoxXmlHandler);
public:
wxCheckBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_CHECKBOX
#endif // _WX_XH_CHECKBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_gdctl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_gdctl.h
// Purpose: XML resource handler for wxGenericDirCtrl
// Author: Markus Greither
// Created: 2002/01/20
// Copyright: (c) 2002 Markus Greither
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_GDCTL_H_
#define _WX_XH_GDCTL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_DIRDLG
class WXDLLIMPEXP_XRC wxGenericDirCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler);
public:
wxGenericDirCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_DIRDLG
#endif // _WX_XH_GDCTL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_odcombo.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_odcombo.h
// Purpose: XML resource handler for wxOwnerDrawnComboBox
// Author: Alex Bligh - based on wx/xrc/xh_combo.h
// Created: 2006/06/19
// Copyright: (c) 2006 Alex Bligh
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_ODCOMBO_H_
#define _WX_XH_ODCOMBO_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_ODCOMBOBOX
class WXDLLIMPEXP_XRC wxOwnerDrawnComboBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxOwnerDrawnComboBoxXmlHandler);
public:
wxOwnerDrawnComboBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString strList;
};
#endif // wxUSE_XRC && wxUSE_ODCOMBOBOX
#endif // _WX_XH_ODCOMBO_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_tglbtn.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_tglbtn.h
// Purpose: XML resource handler for wxToggleButton
// Author: Julian Smart
// Created: 2004-08-30
// Copyright: (c) 2004 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TGLBTN_H_
#define _WX_XH_TGLBTN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TOGGLEBTN
class WXDLLIMPEXP_XRC wxToggleButtonXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxToggleButtonXmlHandler);
public:
wxToggleButtonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
protected:
virtual void DoCreateToggleButton(wxObject *control);
#if !defined(__WXUNIVERSAL__) && !defined(__WXMOTIF__) && !(defined(__WXGTK__) && !defined(__WXGTK20__))
virtual void DoCreateBitmapToggleButton(wxObject *control);
#endif
};
#endif // wxUSE_XRC && wxUSE_TOGGLEBTN
#endif // _WX_XH_TGLBTN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_scrol.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_scrol.h
// Purpose: XML resource handler for wxScrollBar
// Author: Brian Gavin
// Created: 2000/09/09
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SCROL_H_
#define _WX_XH_SCROL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_SCROLLBAR
class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler
{
public:
wxScrollBarXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_SCROLLBAR
#endif // _WX_XH_SCROL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_timectrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_timectrl.h
// Purpose: XML resource handler for wxTimePickerCtrl
// Author: Vadim Zeitlin
// Created: 2011-09-22
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TIMECTRL_H_
#define _WX_XH_TIMECTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TIMEPICKCTRL
class WXDLLIMPEXP_XRC wxTimeCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxTimeCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxTimeCtrlXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_TIMEPICKCTRL
#endif // _WX_XH_TIMECTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_cmdlinkbn.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_cmdlinkbn.h
// Purpose: XML resource handler for command link buttons
// Author: Kinaou Herve
// Created: 2010-10-20
// Copyright: (c) 2010 wxWidgets development team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_CMDLINKBN_H_
#define _WX_XH_CMDLINKBN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_COMMANDLINKBUTTON
class WXDLLIMPEXP_XRC wxCommandLinkButtonXmlHandler : public wxXmlResourceHandler
{
public:
wxCommandLinkButtonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON
#endif // _WX_XH_CMDLINKBN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_filepicker.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_filepicker.h
// Purpose: XML resource handler for wxFilePickerCtrl
// Author: Francesco Montorsi
// Created: 2006-04-17
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_FILEPICKERCTRL_H_
#define _WX_XH_FILEPICKERCTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_FILEPICKERCTRL
class WXDLLIMPEXP_XRC wxFilePickerCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxFilePickerCtrlXmlHandler);
public:
wxFilePickerCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_FILEPICKERCTRL
#endif // _WX_XH_FILEPICKERCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_ribbon.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_ribbon.h
// Purpose: XML resource handler for wxRibbon related classes
// Author: Armel Asselin
// Created: 2010-04-23
// Copyright: (c) 2010 Armel Asselin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XRC_XH_RIBBON_H_
#define _WX_XRC_XH_RIBBON_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_RIBBON
class WXDLLIMPEXP_FWD_RIBBON wxRibbonControl;
class WXDLLIMPEXP_RIBBON wxRibbonXmlHandler : public wxXmlResourceHandler
{
public:
wxRibbonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
const wxClassInfo *m_isInside;
bool IsRibbonControl (wxXmlNode *node);
wxObject* Handle_buttonbar();
wxObject* Handle_button();
wxObject* Handle_control();
wxObject* Handle_page();
wxObject* Handle_gallery();
wxObject* Handle_galleryitem();
wxObject* Handle_panel();
wxObject* Handle_bar();
void Handle_RibbonArtProvider(wxRibbonControl *control);
wxDECLARE_DYNAMIC_CLASS(wxRibbonXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_RIBBON
#endif // _WX_XRC_XH_RIBBON_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_chckl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_chckl.h
// Purpose: XML resource handler for wxCheckListBox
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_CHCKL_H_
#define _WX_XH_CHCKL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_CHECKLISTBOX
class WXDLLIMPEXP_XRC wxCheckListBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler);
public:
wxCheckListBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString strList;
};
#endif // wxUSE_XRC && wxUSE_CHECKLISTBOX
#endif // _WX_XH_CHECKLIST_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_listc.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_listc.h
// Purpose: XML resource handler for wxListCtrl
// Author: Brian Gavin
// Created: 2000/09/09
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_LISTC_H_
#define _WX_XH_LISTC_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_LISTCTRL
class WXDLLIMPEXP_FWD_CORE wxListCtrl;
class WXDLLIMPEXP_FWD_CORE wxListItem;
class WXDLLIMPEXP_XRC wxListCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxListCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
// handlers for wxListCtrl itself and its listcol and listitem children
wxListCtrl *HandleListCtrl();
void HandleListCol();
void HandleListItem();
// common part to HandleList{Col,Item}()
void HandleCommonItemAttrs(wxListItem& item);
// gets the items image index in the corresponding image list (normal if
// which is wxIMAGE_LIST_NORMAL or small if it is wxIMAGE_LIST_SMALL)
long GetImageIndex(wxListCtrl *listctrl, int which);
wxDECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_LISTCTRL
#endif // _WX_XH_LISTC_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_unkwn.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_unkwn.h
// Purpose: XML resource handler for unknown widget
// Author: Vaclav Slavik
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_UNKWN_H_
#define _WX_XH_UNKWN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
class WXDLLIMPEXP_XRC wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxUnknownWidgetXmlHandler);
public:
wxUnknownWidgetXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC
#endif // _WX_XH_UNKWN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_listb.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_listb.h
// Purpose: XML resource handler for wxListbox
// Author: Bob Mitchell & Vaclav Slavik
// Created: 2000/07/29
// Copyright: (c) 2000 Bob Mitchell & Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_LISTB_H_
#define _WX_XH_LISTB_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_LISTBOX
class WXDLLIMPEXP_XRC wxListBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxListBoxXmlHandler);
public:
wxListBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString strList;
};
#endif // wxUSE_XRC && wxUSE_LISTBOX
#endif // _WX_XH_LISTB_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_mdi.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_mdi.h
// Purpose: XML resource handler for wxMDI
// Author: David M. Falkinder & Vaclav Slavik
// Created: 14/02/2005
// Copyright: (c) 2005 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_MDI_H_
#define _WX_XH_MDI_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_MDI
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_XRC wxMdiXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxMdiXmlHandler);
public:
wxMdiXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxWindow *CreateFrame();
};
#endif // wxUSE_XRC && wxUSE_MDI
#endif // _WX_XH_MDI_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_simplebook.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_simplebook.h
// Purpose: XML resource handler for wxSimplebook
// Author: Vadim Zeitlin
// Created: 2014-08-05
// Copyright: (c) 2014 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SIMPLEBOOK_H_
#define _WX_XH_SIMPLEBOOK_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_BOOKCTRL
class wxSimplebook;
class WXDLLIMPEXP_XRC wxSimplebookXmlHandler : public wxXmlResourceHandler
{
public:
wxSimplebookXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxSimplebook *m_simplebook;
wxDECLARE_DYNAMIC_CLASS(wxSimplebookXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_BOOKCTRL
#endif // _WX_XH_SIMPLEBOOK_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_animatctrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_animatctrl.h
// Purpose: XML resource handler for wxAnimationCtrl
// Author: Francesco Montorsi
// Created: 2006-10-15
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_ANIMATIONCTRL_H_
#define _WX_XH_ANIMATIONCTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_ANIMATIONCTRL
class WXDLLIMPEXP_XRC wxAnimationCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxAnimationCtrlXmlHandler);
public:
wxAnimationCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_ANIMATIONCTRL
#endif // _WX_XH_ANIMATIONCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_sttxt.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_sttxt.h
// Purpose: XML resource handler for wxStaticText
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_STTXT_H_
#define _WX_XH_STTXT_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_STATTEXT
class WXDLLIMPEXP_XRC wxStaticTextXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxStaticTextXmlHandler);
public:
wxStaticTextXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_STATTEXT
#endif // _WX_XH_STTXT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_statbar.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_statbar.h
// Purpose: XML resource handler for wxStatusBar
// Author: Brian Ravnsgaard Riis
// Created: 2004/01/21
// Copyright: (c) 2004 Brian Ravnsgaard Riis
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_STATBAR_H_
#define _WX_XH_STATBAR_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_STATUSBAR
class WXDLLIMPEXP_XRC wxStatusBarXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxStatusBarXmlHandler);
public:
wxStatusBarXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_STATUSBAR
#endif // _WX_XH_STATBAR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_radbt.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_radbt.h
// Purpose: XML resource handler for wxRadioButton
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_RADBT_H_
#define _WX_XH_RADBT_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_RADIOBTN
class WXDLLIMPEXP_XRC wxRadioButtonXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxRadioButtonXmlHandler);
public:
wxRadioButtonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_RADIOBOX
#endif // _WX_XH_RADBT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_spin.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_spin.h
// Purpose: XML resource handler for wxSpinButton, wxSpinCtrl, wxSpinCtrlDouble
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SPIN_H_
#define _WX_XH_SPIN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
#if wxUSE_SPINBTN
class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler
{
public:
wxSpinButtonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler);
};
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxSpinCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler);
};
class WXDLLIMPEXP_XRC wxSpinCtrlDoubleXmlHandler : public wxXmlResourceHandler
{
public:
wxSpinCtrlDoubleXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxSpinCtrlDoubleXmlHandler);
};
#endif // wxUSE_SPINCTRL
#endif // wxUSE_XRC
#endif // _WX_XH_SPIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_clrpicker.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_clrpicker.h
// Purpose: XML resource handler for wxColourPickerCtrl
// Author: Francesco Montorsi
// Created: 2006-04-17
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_CLRPICKERCTRL_H_
#define _WX_XH_CLRPICKERCTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_COLOURPICKERCTRL
class WXDLLIMPEXP_XRC wxColourPickerCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler);
public:
wxColourPickerCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL
#endif // _WX_XH_CLRPICKERCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_gauge.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_gauge.h
// Purpose: XML resource handler for wxGauge
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_GAUGE_H_
#define _WX_XH_GAUGE_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_GAUGE
class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler
{
public:
wxGaugeXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_GAUGE
#endif // _WX_XH_GAUGE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xmlreshandler.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xmlreshandler.cpp
// Purpose: XML resource handler
// Author: Steven Lamerton
// Created: 2011/01/26
// Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XRC_XMLRESHANDLER_H_
#define _WX_XRC_XMLRESHANDLER_H_
#include "wx/defs.h"
#if wxUSE_XRC
#include "wx/string.h"
#include "wx/artprov.h"
#include "wx/colour.h"
#include "wx/filesys.h"
#include "wx/imaglist.h"
#include "wx/window.h"
class WXDLLIMPEXP_FWD_CORE wxAnimation;
class WXDLLIMPEXP_FWD_XML wxXmlNode;
class WXDLLIMPEXP_FWD_XML wxXmlResource;
class WXDLLIMPEXP_FWD_CORE wxXmlResourceHandler;
// Helper macro used by the classes derived from wxXmlResourceHandler but also
// by wxXmlResourceHandler implementation itself.
#define XRC_ADD_STYLE(style) AddStyle(wxT(#style), style)
// Flags for GetNodeText().
enum
{
wxXRC_TEXT_NO_TRANSLATE = 1,
wxXRC_TEXT_NO_ESCAPE = 2
};
// Abstract base class for the implementation object used by
// wxXmlResourceHandlerImpl. The real implementation is in
// wxXmlResourceHandlerImpl class in the "xrc" library while this class is in
// the "core" itself -- but it is so small that it doesn't matter.
class WXDLLIMPEXP_CORE wxXmlResourceHandlerImplBase : public wxObject
{
public:
// Constructor.
wxXmlResourceHandlerImplBase(wxXmlResourceHandler *handler)
: m_handler(handler)
{}
// Destructor.
virtual ~wxXmlResourceHandlerImplBase() {}
virtual wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
wxObject *instance) = 0;
virtual bool IsOfClass(wxXmlNode *node, const wxString& classname) const = 0;
virtual bool IsObjectNode(const wxXmlNode *node) const = 0;
virtual wxString GetNodeContent(const wxXmlNode *node) = 0;
virtual wxXmlNode *GetNodeParent(const wxXmlNode *node) const = 0;
virtual wxXmlNode *GetNodeNext(const wxXmlNode *node) const = 0;
virtual wxXmlNode *GetNodeChildren(const wxXmlNode *node) const = 0;
virtual bool HasParam(const wxString& param) = 0;
virtual wxXmlNode *GetParamNode(const wxString& param) = 0;
virtual wxString GetParamValue(const wxString& param) = 0;
virtual wxString GetParamValue(const wxXmlNode* node) = 0;
virtual int GetStyle(const wxString& param = wxT("style"), int defaults = 0) = 0;
virtual wxString GetNodeText(const wxXmlNode *node, int flags = 0) = 0;
virtual int GetID() = 0;
virtual wxString GetName() = 0;
virtual bool GetBool(const wxString& param, bool defaultv = false) = 0;
virtual long GetLong(const wxString& param, long defaultv = 0) = 0;
virtual float GetFloat(const wxString& param, float defaultv = 0) = 0;
virtual wxColour GetColour(const wxString& param,
const wxColour& defaultv = wxNullColour) = 0;
virtual wxSize GetSize(const wxString& param = wxT("size"),
wxWindow *windowToUse = NULL) = 0;
virtual wxPoint GetPosition(const wxString& param = wxT("pos")) = 0;
virtual wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
wxWindow *windowToUse = NULL) = 0;
virtual wxSize GetPairInts(const wxString& param) = 0;
virtual wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT) = 0;
virtual wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) = 0;
virtual wxBitmap GetBitmap(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) = 0;
virtual wxIcon GetIcon(const wxString& param = wxT("icon"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) = 0;
virtual wxIcon GetIcon(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) = 0;
virtual wxIconBundle GetIconBundle(const wxString& param,
const wxArtClient& defaultArtClient = wxART_OTHER) = 0;
virtual wxImageList *GetImageList(const wxString& param = wxT("imagelist")) = 0;
#if wxUSE_ANIMATIONCTRL
virtual wxAnimation* GetAnimation(const wxString& param = wxT("animation")) = 0;
#endif
virtual wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL) = 0;
virtual bool GetBoolAttr(const wxString& attr, bool defaultv) = 0;
virtual void SetupWindow(wxWindow *wnd) = 0;
virtual void CreateChildren(wxObject *parent, bool this_hnd_only = false) = 0;
virtual void CreateChildrenPrivately(wxObject *parent,
wxXmlNode *rootnode = NULL) = 0;
virtual wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent,
wxObject *instance = NULL) = 0;
#if wxUSE_FILESYSTEM
virtual wxFileSystem& GetCurFileSystem() = 0;
#endif
virtual void ReportError(wxXmlNode *context, const wxString& message) = 0;
virtual void ReportError(const wxString& message) = 0;
virtual void ReportParamError(const wxString& param, const wxString& message) = 0;
wxXmlResourceHandler* GetHandler() { return m_handler; }
protected:
wxXmlResourceHandler *m_handler;
};
// Base class for all XRC handlers.
//
// Notice that this class is defined in the core library itself and so can be
// used as the base class by classes in any GUI library. However to actually be
// usable, it needs to be registered with wxXmlResource which implies linking
// the application with the xrc library.
//
// Also note that all the methods forwarding to GetImpl() are documented only
// in wxXmlResourceHandlerImpl in wx/xrc/xmlres.h to avoid duplication.
class WXDLLIMPEXP_CORE wxXmlResourceHandler : public wxObject
{
public:
// Constructor creates an unusable object, before anything can be done with
// it, SetImpl() needs to be called as done by wxXmlResource::AddHandler().
wxXmlResourceHandler()
{
m_node = NULL;
m_parent =
m_instance = NULL;
m_parentAsWindow = NULL;
m_resource = NULL;
m_impl = NULL;
}
// This should be called exactly once.
void SetImpl(wxXmlResourceHandlerImplBase* impl)
{
wxASSERT_MSG( !m_impl, wxS("Should be called exactly once") );
m_impl = impl;
}
// Destructor.
virtual ~wxXmlResourceHandler()
{
delete m_impl;
}
wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
wxObject *instance)
{
return GetImpl()->CreateResource(node, parent, instance);
}
// This one is called from CreateResource after variables
// were filled.
virtual wxObject *DoCreateResource() = 0;
// Returns true if it understands this node and can create
// a resource from it, false otherwise.
virtual bool CanHandle(wxXmlNode *node) = 0;
void SetParentResource(wxXmlResource *res)
{
m_resource = res;
}
// These methods are not forwarded to wxXmlResourceHandlerImpl because they
// are called from the derived classes ctors and so before SetImpl() can be
// called.
// Add a style flag (e.g. wxMB_DOCKABLE) to the list of flags
// understood by this handler.
void AddStyle(const wxString& name, int value);
// Add styles common to all wxWindow-derived classes.
void AddWindowStyles();
protected:
// Everything else is simply forwarded to wxXmlResourceHandlerImpl.
void ReportError(wxXmlNode *context, const wxString& message)
{
GetImpl()->ReportError(context, message);
}
void ReportError(const wxString& message)
{
GetImpl()->ReportError(message);
}
void ReportParamError(const wxString& param, const wxString& message)
{
GetImpl()->ReportParamError(param, message);
}
bool IsOfClass(wxXmlNode *node, const wxString& classname) const
{
return GetImpl()->IsOfClass(node, classname);
}
bool IsObjectNode(const wxXmlNode *node) const
{
return GetImpl()->IsObjectNode(node);
}
wxString GetNodeContent(const wxXmlNode *node)
{
return GetImpl()->GetNodeContent(node);
}
wxXmlNode *GetNodeParent(const wxXmlNode *node) const
{
return GetImpl()->GetNodeParent(node);
}
wxXmlNode *GetNodeNext(const wxXmlNode *node) const
{
return GetImpl()->GetNodeNext(node);
}
wxXmlNode *GetNodeChildren(const wxXmlNode *node) const
{
return GetImpl()->GetNodeChildren(node);
}
bool HasParam(const wxString& param)
{
return GetImpl()->HasParam(param);
}
wxXmlNode *GetParamNode(const wxString& param)
{
return GetImpl()->GetParamNode(param);
}
wxString GetParamValue(const wxString& param)
{
return GetImpl()->GetParamValue(param);
}
wxString GetParamValue(const wxXmlNode* node)
{
return GetImpl()->GetParamValue(node);
}
int GetStyle(const wxString& param = wxT("style"), int defaults = 0)
{
return GetImpl()->GetStyle(param, defaults);
}
wxString GetNodeText(const wxXmlNode *node, int flags = 0)
{
return GetImpl()->GetNodeText(node, flags);
}
wxString GetText(const wxString& param, bool translate = true)
{
return GetImpl()->GetNodeText(GetImpl()->GetParamNode(param),
translate ? 0 : wxXRC_TEXT_NO_TRANSLATE);
}
int GetID() const
{
return GetImpl()->GetID();
}
wxString GetName()
{
return GetImpl()->GetName();
}
bool GetBool(const wxString& param, bool defaultv = false)
{
return GetImpl()->GetBool(param, defaultv);
}
long GetLong(const wxString& param, long defaultv = 0)
{
return GetImpl()->GetLong(param, defaultv);
}
float GetFloat(const wxString& param, float defaultv = 0)
{
return GetImpl()->GetFloat(param, defaultv);
}
wxColour GetColour(const wxString& param,
const wxColour& defaultv = wxNullColour)
{
return GetImpl()->GetColour(param, defaultv);
}
wxSize GetSize(const wxString& param = wxT("size"),
wxWindow *windowToUse = NULL)
{
return GetImpl()->GetSize(param, windowToUse);
}
wxPoint GetPosition(const wxString& param = wxT("pos"))
{
return GetImpl()->GetPosition(param);
}
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
wxWindow *windowToUse = NULL)
{
return GetImpl()->GetDimension(param, defaultv, windowToUse);
}
wxSize GetPairInts(const wxString& param)
{
return GetImpl()->GetPairInts(param);
}
wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT)
{
return GetImpl()->GetDirection(param, dir);
}
wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{
return GetImpl()->GetBitmap(param, defaultArtClient, size);
}
wxBitmap GetBitmap(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{
return GetImpl()->GetBitmap(node, defaultArtClient, size);
}
wxIcon GetIcon(const wxString& param = wxT("icon"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{
return GetImpl()->GetIcon(param, defaultArtClient, size);
}
wxIcon GetIcon(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{
return GetImpl()->GetIcon(node, defaultArtClient, size);
}
wxIconBundle GetIconBundle(const wxString& param,
const wxArtClient& defaultArtClient = wxART_OTHER)
{
return GetImpl()->GetIconBundle(param, defaultArtClient);
}
wxImageList *GetImageList(const wxString& param = wxT("imagelist"))
{
return GetImpl()->GetImageList(param);
}
#if wxUSE_ANIMATIONCTRL
wxAnimation* GetAnimation(const wxString& param = wxT("animation"))
{
return GetImpl()->GetAnimation(param);
}
#endif
wxFont GetFont(const wxString& param = wxT("font"),
wxWindow* parent = NULL)
{
return GetImpl()->GetFont(param, parent);
}
bool GetBoolAttr(const wxString& attr, bool defaultv)
{
return GetImpl()->GetBoolAttr(attr, defaultv);
}
void SetupWindow(wxWindow *wnd)
{
GetImpl()->SetupWindow(wnd);
}
void CreateChildren(wxObject *parent, bool this_hnd_only = false)
{
GetImpl()->CreateChildren(parent, this_hnd_only);
}
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL)
{
GetImpl()->CreateChildrenPrivately(parent, rootnode);
}
wxObject *CreateResFromNode(wxXmlNode *node,
wxObject *parent, wxObject *instance = NULL)
{
return GetImpl()->CreateResFromNode(node, parent, instance);
}
#if wxUSE_FILESYSTEM
wxFileSystem& GetCurFileSystem()
{
return GetImpl()->GetCurFileSystem();
}
#endif
// Variables (filled by CreateResource)
wxXmlNode *m_node;
wxString m_class;
wxObject *m_parent, *m_instance;
wxWindow *m_parentAsWindow;
wxXmlResource *m_resource;
// provide method access to those member variables
wxXmlResource* GetResource() const { return m_resource; }
wxXmlNode* GetNode() const { return m_node; }
wxString GetClass() const { return m_class; }
wxObject* GetParent() const { return m_parent; }
wxObject* GetInstance() const { return m_instance; }
wxWindow* GetParentAsWindow() const { return m_parentAsWindow; }
wxArrayString m_styleNames;
wxArrayInt m_styleValues;
friend class wxXmlResourceHandlerImpl;
private:
// This is supposed to never return NULL because SetImpl() should have been
// called.
wxXmlResourceHandlerImplBase* GetImpl() const;
wxXmlResourceHandlerImplBase *m_impl;
wxDECLARE_ABSTRACT_CLASS(wxXmlResourceHandler);
};
#endif // wxUSE_XRC
#endif // _WX_XRC_XMLRESHANDLER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_bmpcbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_bmpcbox.h
// Purpose: XML resource handler for wxBitmapComboBox
// Author: Jaakko Salli
// Created: Sep-10-2006
// Copyright: (c) 2006 Jaakko Salli
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_BMPCBOX_H_
#define _WX_XH_BMPCBOX_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_BITMAPCOMBOBOX
class WXDLLIMPEXP_FWD_CORE wxBitmapComboBox;
class WXDLLIMPEXP_XRC wxBitmapComboBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxBitmapComboBoxXmlHandler);
public:
wxBitmapComboBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxBitmapComboBox* m_combobox;
bool m_isInside;
};
#endif // wxUSE_XRC && wxUSE_BITMAPCOMBOBOX
#endif // _WX_XH_BMPCBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/xrc/xh_htmllbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_htmllbox.h
// Purpose: XML resource handler for wxSimpleHtmlListBox
// Author: Francesco Montorsi
// Created: 2006/10/21
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SIMPLEHTMLLISTBOX_H_
#define _WX_XH_SIMPLEHTMLLISTBOX_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_HTML
class WXDLLIMPEXP_XRC wxSimpleHtmlListBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxSimpleHtmlListBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString strList;
wxDECLARE_DYNAMIC_CLASS(wxSimpleHtmlListBoxXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_HTML
#endif // _WX_XH_SIMPLEHTMLLISTBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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/Linux/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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.