repo_name
stringclasses 10
values | file_path
stringlengths 29
222
| content
stringlengths 24
926k
| extention
stringclasses 5
values |
---|---|---|---|
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/bmpcbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/bmpcbox.h
// Purpose: wxBitmapComboBox base header
// Author: Jaakko Salli
// Modified by:
// Created: Aug-31-2006
// Copyright: (c) Jaakko Salli
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPCBOX_H_BASE_
#define _WX_BMPCBOX_H_BASE_
#include "wx/defs.h"
#if wxUSE_BITMAPCOMBOBOX
#include "wx/bitmap.h"
#include "wx/dynarray.h"
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxItemContainer;
// Define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED for platforms which
// wxBitmapComboBox implementation utilizes ownerdrawn combobox
// (either native or generic).
#if !defined(__WXGTK20__) || defined(__WXUNIVERSAL__)
#define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
class WXDLLIMPEXP_FWD_CORE wxDC;
#endif
extern WXDLLIMPEXP_DATA_CORE(const char) wxBitmapComboBoxNameStr[];
class WXDLLIMPEXP_CORE wxBitmapComboBoxBase
{
public:
// ctors and such
wxBitmapComboBoxBase() { Init(); }
virtual ~wxBitmapComboBoxBase() { }
// Sets the image for the given item.
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
#if !defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED)
// Returns the image of the item with the given index.
virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
// Returns size of the image used in list
virtual wxSize GetBitmapSize() const = 0;
private:
void Init() {}
#else // wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
// Returns the image of the item with the given index.
virtual wxBitmap GetItemBitmap(unsigned int n) const;
// Returns size of the image used in list
virtual wxSize GetBitmapSize() const
{
return m_usedImgSize;
}
protected:
// Returns pointer to the combobox item container
virtual wxItemContainer* GetItemContainer() = 0;
// Return pointer to the owner-drawn combobox control
virtual wxWindow* GetControl() = 0;
// wxItemContainer functions
void BCBDoClear();
void BCBDoDeleteOneItem(unsigned int n);
void DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap);
void DrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const;
void DrawItem(wxDC& dc, const wxRect& rect, int item, const wxString& text,
int flags) const;
wxCoord MeasureItem(size_t item) const;
// Returns true if image size was affected
virtual bool OnAddBitmap(const wxBitmap& bitmap);
// Recalculates amount of empty space needed in front of text
// in control itself. Returns number that can be passed to
// wxOwnerDrawnComboBox::SetCustomPaintWidth() and similar
// functions.
virtual int DetermineIndent();
void UpdateInternals();
wxArrayPtrVoid m_bitmaps; // Images associated with items
wxSize m_usedImgSize; // Size of bitmaps
int m_imgAreaWidth; // Width and height of area next to text field
int m_fontHeight;
int m_indent;
private:
void Init();
#endif // !wxBITMAPCOMBOBOX_OWNERDRAWN_BASED/wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
};
#if defined(__WXUNIVERSAL__)
#include "wx/generic/bmpcbox.h"
#elif defined(__WXMSW__)
#include "wx/msw/bmpcbox.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/bmpcbox.h"
#else
#include "wx/generic/bmpcbox.h"
#endif
#endif // wxUSE_BITMAPCOMBOBOX
#endif // _WX_BMPCBOX_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/dataobj.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/dataobj.h
// Purpose: common data object classes
// Author: Vadim Zeitlin, Robert Roebling
// Modified by:
// Created: 26.05.99
// Copyright: (c) wxWidgets Team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DATAOBJ_H_BASE_
#define _WX_DATAOBJ_H_BASE_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_DATAOBJ
#include "wx/string.h"
#include "wx/bitmap.h"
#include "wx/list.h"
#include "wx/arrstr.h"
// ============================================================================
/*
Generic data transfer related classes. The class hierarchy is as follows:
- wxDataObject-
/ \
/ \
wxDataObjectSimple wxDataObjectComposite
/ | \
/ | \
wxTextDataObject | wxBitmapDataObject
|
wxCustomDataObject
*/
// ============================================================================
// ----------------------------------------------------------------------------
// wxDataFormat class is declared in platform-specific headers: it represents
// a format for data which may be either one of the standard ones (text,
// bitmap, ...) or a custom one which is then identified by a unique string.
// ----------------------------------------------------------------------------
/* the class interface looks like this (pseudo code):
class wxDataFormat
{
public:
typedef <integral type> NativeFormat;
wxDataFormat(NativeFormat format = wxDF_INVALID);
wxDataFormat(const wxString& format);
wxDataFormat& operator=(NativeFormat format);
wxDataFormat& operator=(const wxDataFormat& format);
bool operator==(NativeFormat format) const;
bool operator!=(NativeFormat format) const;
void SetType(NativeFormat format);
NativeFormat GetType() const;
wxString GetId() const;
void SetId(const wxString& format);
};
*/
#if defined(__WXMSW__)
#include "wx/msw/ole/dataform.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/dataform.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/dataform.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/dataform.h"
#elif defined(__WXX11__)
#include "wx/x11/dataform.h"
#elif defined(__WXMAC__)
#include "wx/osx/dataform.h"
#elif defined(__WXQT__)
#include "wx/qt/dataform.h"
#endif
// the value for default argument to some functions (corresponds to
// wxDF_INVALID)
extern WXDLLIMPEXP_CORE const wxDataFormat& wxFormatInvalid;
// ----------------------------------------------------------------------------
// wxDataObject represents a piece of data which knows which formats it
// supports and knows how to render itself in each of them - GetDataHere(),
// and how to restore data from the buffer (SetData()).
//
// Although this class may be used directly (i.e. custom classes may be
// derived from it), in many cases it might be simpler to use either
// wxDataObjectSimple or wxDataObjectComposite classes.
//
// A data object may be "read only", i.e. support only GetData() functions or
// "read-write", i.e. support both GetData() and SetData() (in principle, it
// might be "write only" too, but this is rare). Moreover, it doesn't have to
// support the same formats in Get() and Set() directions: for example, a data
// object containing JPEG image might accept BMPs in GetData() because JPEG
// image may be easily transformed into BMP but not in SetData(). Accordingly,
// all methods dealing with formats take an additional "direction" argument
// which is either SET or GET and which tells the function if the format needs
// to be supported by SetData() or GetDataHere().
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDataObjectBase
{
public:
enum Direction
{
Get = 0x01, // format is supported by GetDataHere()
Set = 0x02, // format is supported by SetData()
Both = 0x03 // format is supported by both (unused currently)
};
// this class is polymorphic, hence it needs a virtual dtor
virtual ~wxDataObjectBase();
// get the best suited format for rendering our data
virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const = 0;
// get the number of formats we support
virtual size_t GetFormatCount(Direction dir = Get) const = 0;
// return all formats in the provided array (of size GetFormatCount())
virtual void GetAllFormats(wxDataFormat *formats,
Direction dir = Get) const = 0;
// get the (total) size of data for the given format
virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
// copy raw data (in the specified format) to the provided buffer, return
// true if data copied successfully, false otherwise
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0;
// get data from the buffer of specified length (in the given format),
// return true if the data was read successfully, false otherwise
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
size_t WXUNUSED(len), const void * WXUNUSED(buf))
{
return false;
}
// returns true if this format is supported
bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
};
// ----------------------------------------------------------------------------
// include the platform-specific declarations of wxDataObject
// ----------------------------------------------------------------------------
#if defined(__WXMSW__)
#include "wx/msw/ole/dataobj.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/dataobj.h"
#elif defined(__WXX11__)
#include "wx/x11/dataobj.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/dataobj.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/dataobj.h"
#elif defined(__WXMAC__)
#include "wx/osx/dataobj.h"
#elif defined(__WXQT__)
#include "wx/qt/dataobj.h"
#endif
// ----------------------------------------------------------------------------
// wxDataObjectSimple is a wxDataObject which only supports one format (in
// both Get and Set directions, but you may return false from GetDataHere() or
// SetData() if one of them is not supported). This is the simplest possible
// wxDataObject implementation.
//
// This is still an "abstract base class" (although it doesn't have any pure
// virtual functions), to use it you should derive from it and implement
// GetDataSize(), GetDataHere() and SetData() functions because the base class
// versions don't do anything - they just return "not implemented".
//
// This class should be used when you provide data in only one format (no
// conversion to/from other formats), either a standard or a custom one.
// Otherwise, you should use wxDataObjectComposite or wxDataObject directly.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDataObjectSimple : public wxDataObject
{
public:
// ctor takes the format we support, but it can also be set later with
// SetFormat()
wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid)
: m_format(format)
{
}
// get/set the format we support
const wxDataFormat& GetFormat() const { return m_format; }
void SetFormat(const wxDataFormat& format) { m_format = format; }
// virtual functions to override in derived class (the base class versions
// just return "not implemented")
// -----------------------------------------------------------------------
// get the size of our data
virtual size_t GetDataSize() const
{ return 0; }
// copy our data to the buffer
virtual bool GetDataHere(void *WXUNUSED(buf)) const
{ return false; }
// copy data from buffer to our data
virtual bool SetData(size_t WXUNUSED(len), const void *WXUNUSED(buf))
{ return false; }
// implement base class pure virtuals
// ----------------------------------
virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const wxOVERRIDE
{ return m_format; }
virtual size_t GetFormatCount(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const wxOVERRIDE
{ return 1; }
virtual void GetAllFormats(wxDataFormat *formats,
wxDataObjectBase::Direction WXUNUSED(dir) = Get) const wxOVERRIDE
{ *formats = m_format; }
virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const wxOVERRIDE
{ return GetDataSize(); }
virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
void *buf) const wxOVERRIDE
{ return GetDataHere(buf); }
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
size_t len, const void *buf) wxOVERRIDE
{ return SetData(len, buf); }
private:
// the one and only format we support
wxDataFormat m_format;
wxDECLARE_NO_COPY_CLASS(wxDataObjectSimple);
};
// ----------------------------------------------------------------------------
// wxDataObjectComposite is the simplest way to implement wxDataObject
// supporting multiple formats. It contains several wxDataObjectSimple and
// supports all formats supported by any of them.
//
// This class shouldn't be (normally) derived from, but may be used directly.
// If you need more flexibility than what it provides, you should probably use
// wxDataObject directly.
// ----------------------------------------------------------------------------
WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
class WXDLLIMPEXP_CORE wxDataObjectComposite : public wxDataObject
{
public:
// ctor
wxDataObjectComposite();
virtual ~wxDataObjectComposite();
// add data object (it will be deleted by wxDataObjectComposite, hence it
// must be allocated on the heap) whose format will become the preferred
// one if preferred == true
void Add(wxDataObjectSimple *dataObject, bool preferred = false);
// Report the format passed to the SetData method. This should be the
// format of the data object within the composite that received data from
// the clipboard or the DnD operation. You can use this method to find
// out what kind of data object was received.
wxDataFormat GetReceivedFormat() const;
// Returns the pointer to the object which supports this format or NULL.
// The returned pointer is owned by wxDataObjectComposite and must
// therefore not be destroyed by the caller.
wxDataObjectSimple *GetObject(const wxDataFormat& format,
wxDataObjectBase::Direction dir = Get) const;
// implement base class pure virtuals
// ----------------------------------
virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction dir = Get) const wxOVERRIDE;
virtual size_t GetFormatCount(wxDataObjectBase::Direction dir = Get) const wxOVERRIDE;
virtual void GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir = Get) const wxOVERRIDE;
virtual size_t GetDataSize(const wxDataFormat& format) const wxOVERRIDE;
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const wxOVERRIDE;
virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf) wxOVERRIDE;
#if defined(__WXMSW__)
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
const wxDataFormat& format ) wxOVERRIDE;
virtual void* SetSizeInBuffer( void* buffer, size_t size,
const wxDataFormat& format ) wxOVERRIDE;
virtual size_t GetBufferOffset( const wxDataFormat& format ) wxOVERRIDE;
#endif
private:
// the list of all (simple) data objects whose formats we support
wxSimpleDataObjectList m_dataObjects;
// the index of the preferred one (0 initially, so by default the first
// one is the preferred)
size_t m_preferred;
wxDataFormat m_receivedFormat;
wxDECLARE_NO_COPY_CLASS(wxDataObjectComposite);
};
// ============================================================================
// Standard implementations of wxDataObjectSimple which can be used directly
// (i.e. without having to derive from them) for standard data type transfers.
//
// Note that although all of them can work with provided data, you can also
// override their virtual GetXXX() functions to only provide data on demand.
// ============================================================================
// ----------------------------------------------------------------------------
// wxTextDataObject contains text data
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE
#if defined(__WXGTK20__) || defined(__WXX11__)
#define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ
#elif defined(__WXMAC__)
#define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ
#endif
#endif // wxUSE_UNICODE
class WXDLLIMPEXP_CORE wxHTMLDataObject : public wxDataObjectSimple
{
public:
// ctor: you can specify the text here or in SetText(), or override
// GetText()
wxHTMLDataObject(const wxString& html = wxEmptyString)
: wxDataObjectSimple(wxDF_HTML),
m_html(html)
{
}
// virtual functions which you may override if you want to provide text on
// demand only - otherwise, the trivial default versions will be used
virtual size_t GetLength() const { return m_html.Len() + 1; }
virtual wxString GetHTML() const { return m_html; }
virtual void SetHTML(const wxString& html) { m_html = html; }
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const wxOVERRIDE
{
return GetDataSize();
}
virtual bool GetDataHere(const wxDataFormat&, void *buf) const wxOVERRIDE
{
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) wxOVERRIDE
{
return SetData(len, buf);
}
private:
wxString m_html;
};
class WXDLLIMPEXP_CORE wxTextDataObject : public wxDataObjectSimple
{
public:
// ctor: you can specify the text here or in SetText(), or override
// GetText()
wxTextDataObject(const wxString& text = wxEmptyString)
: wxDataObjectSimple(
#if wxUSE_UNICODE
wxDF_UNICODETEXT
#else
wxDF_TEXT
#endif
),
m_text(text)
{
}
// virtual functions which you may override if you want to provide text on
// demand only - otherwise, the trivial default versions will be used
virtual size_t GetTextLength() const { return m_text.Len() + 1; }
virtual wxString GetText() const { return m_text; }
virtual void SetText(const wxString& text) { m_text = text; }
// implement base class pure virtuals
// ----------------------------------
// some platforms have 2 and not 1 format for text data
#if defined(wxNEEDS_UTF8_FOR_TEXT_DATAOBJ) || defined(wxNEEDS_UTF16_FOR_TEXT_DATAOBJ)
virtual size_t GetFormatCount(Direction WXUNUSED(dir) = Get) const wxOVERRIDE { return 2; }
virtual void GetAllFormats(wxDataFormat *formats,
wxDataObjectBase::Direction WXUNUSED(dir) = Get) const wxOVERRIDE;
virtual size_t GetDataSize() const wxOVERRIDE { return GetDataSize(GetPreferredFormat()); }
virtual bool GetDataHere(void *buf) const wxOVERRIDE { return GetDataHere(GetPreferredFormat(), buf); }
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE { return SetData(GetPreferredFormat(), len, buf); }
size_t GetDataSize(const wxDataFormat& format) const wxOVERRIDE;
bool GetDataHere(const wxDataFormat& format, void *pBuf) const wxOVERRIDE;
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) wxOVERRIDE;
#else // !wxNEEDS_UTF{8,16}_FOR_TEXT_DATAOBJ
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const wxOVERRIDE
{
return GetDataSize();
}
virtual bool GetDataHere(const wxDataFormat&, void *buf) const wxOVERRIDE
{
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) wxOVERRIDE
{
return SetData(len, buf);
}
#endif // different wxTextDataObject implementations
private:
wxString m_text;
wxDECLARE_NO_COPY_CLASS(wxTextDataObject);
};
// ----------------------------------------------------------------------------
// wxBitmapDataObject contains a bitmap
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapDataObjectBase : public wxDataObjectSimple
{
public:
// ctor: you can specify the bitmap here or in SetBitmap(), or override
// GetBitmap()
wxBitmapDataObjectBase(const wxBitmap& bitmap = wxNullBitmap)
: wxDataObjectSimple(wxDF_BITMAP), m_bitmap(bitmap)
{
}
// virtual functions which you may override if you want to provide data on
// demand only - otherwise, the trivial default versions will be used
virtual wxBitmap GetBitmap() const { return m_bitmap; }
virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
protected:
wxBitmap m_bitmap;
wxDECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase);
};
// ----------------------------------------------------------------------------
// wxFileDataObject contains a list of filenames
//
// NB: notice that this is a "write only" object, it can only be filled with
// data from drag and drop operation.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFileDataObjectBase : public wxDataObjectSimple
{
public:
// ctor: use AddFile() later to fill the array
wxFileDataObjectBase() : wxDataObjectSimple(wxDF_FILENAME) { }
// get a reference to our array
const wxArrayString& GetFilenames() const { return m_filenames; }
protected:
wxArrayString m_filenames;
wxDECLARE_NO_COPY_CLASS(wxFileDataObjectBase);
};
// ----------------------------------------------------------------------------
// wxCustomDataObject contains arbitrary untyped user data.
//
// It is understood that this data can be copied bitwise.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxCustomDataObject : public wxDataObjectSimple
{
public:
// if you don't specify the format in the ctor, you can still use
// SetFormat() later
wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid);
// the dtor calls Free()
virtual ~wxCustomDataObject();
// you can call SetData() to set m_data: it will make a copy of the data
// you pass - or you can use TakeData() which won't copy anything, but
// will take ownership of data (i.e. will call Free() on it later)
void TakeData(size_t size, void *data);
// this function is called to allocate "size" bytes of memory from
// SetData(). The default version uses operator new[].
virtual void *Alloc(size_t size);
// this function is called when the data is freed, you may override it to
// anything you want (or may be nothing at all). The default version calls
// operator delete[] on m_data
virtual void Free();
// get data: you may override these functions if you wish to provide data
// only when it's requested
virtual size_t GetSize() const { return m_size; }
virtual void *GetData() const { return m_data; }
// implement base class pure virtuals
// ----------------------------------
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t size, const void *buf) wxOVERRIDE;
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const wxOVERRIDE
{
return GetDataSize();
}
virtual bool GetDataHere(const wxDataFormat&, void *buf) const wxOVERRIDE
{
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) wxOVERRIDE
{
return SetData(len, buf);
}
private:
size_t m_size;
void *m_data;
wxDECLARE_NO_COPY_CLASS(wxCustomDataObject);
};
// ----------------------------------------------------------------------------
// include platform-specific declarations of wxXXXBase classes
// ----------------------------------------------------------------------------
#if defined(__WXMSW__)
#include "wx/msw/ole/dataobj2.h"
// wxURLDataObject defined in msw/ole/dataobj2.h
#elif defined(__WXGTK20__)
#include "wx/gtk/dataobj2.h"
// wxURLDataObject defined in gtk/dataobj2.h
#else
#if defined(__WXGTK__)
#include "wx/gtk1/dataobj2.h"
#elif defined(__WXX11__)
#include "wx/x11/dataobj2.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/dataobj2.h"
#elif defined(__WXMAC__)
#include "wx/osx/dataobj2.h"
#elif defined(__WXQT__)
#include "wx/qt/dataobj2.h"
#endif
// wxURLDataObject is simply wxTextDataObject with a different name
class WXDLLIMPEXP_CORE wxURLDataObject : public wxTextDataObject
{
public:
wxURLDataObject(const wxString& url = wxEmptyString)
: wxTextDataObject(url)
{
}
wxString GetURL() const { return GetText(); }
void SetURL(const wxString& url) { SetText(url); }
};
#endif
#endif // wxUSE_DATAOBJ
#endif // _WX_DATAOBJ_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/power.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/power.h
// Purpose: functions and classes for system power management
// Author: Vadim Zeitlin
// Modified by:
// Created: 2006-05-27
// Copyright: (c) 2006 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_POWER_H_
#define _WX_POWER_H_
#include "wx/event.h"
// ----------------------------------------------------------------------------
// power management constants
// ----------------------------------------------------------------------------
enum wxPowerType
{
wxPOWER_SOCKET,
wxPOWER_BATTERY,
wxPOWER_UNKNOWN
};
enum wxBatteryState
{
wxBATTERY_NORMAL_STATE, // system is fully usable
wxBATTERY_LOW_STATE, // start to worry
wxBATTERY_CRITICAL_STATE, // save quickly
wxBATTERY_SHUTDOWN_STATE, // too late
wxBATTERY_UNKNOWN_STATE
};
// ----------------------------------------------------------------------------
// wxPowerEvent is generated when the system online status changes
// ----------------------------------------------------------------------------
// currently the power events are only available under Windows, to avoid
// compiling in the code for handling them which is never going to be invoked
// under the other platforms, we define wxHAS_POWER_EVENTS symbol if this event
// is available, it should be used to guard all code using wxPowerEvent
#ifdef __WINDOWS__
#define wxHAS_POWER_EVENTS
class WXDLLIMPEXP_BASE wxPowerEvent : public wxEvent
{
public:
wxPowerEvent() // just for use by wxRTTI
: m_veto(false) { }
wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType)
{
m_veto = false;
}
// Veto the operation (only makes sense with EVT_POWER_SUSPENDING)
void Veto() { m_veto = true; }
bool IsVetoed() const { return m_veto; }
// default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const wxOVERRIDE { return new wxPowerEvent(*this); }
private:
bool m_veto;
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPowerEvent);
};
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDING, wxPowerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDED, wxPowerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPEND_CANCEL, wxPowerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_RESUME, wxPowerEvent );
typedef void (wxEvtHandler::*wxPowerEventFunction)(wxPowerEvent&);
#define wxPowerEventHandler(func) \
wxEVENT_HANDLER_CAST(wxPowerEventFunction, func)
#define EVT_POWER_SUSPENDING(func) \
wx__DECLARE_EVT0(wxEVT_POWER_SUSPENDING, wxPowerEventHandler(func))
#define EVT_POWER_SUSPENDED(func) \
wx__DECLARE_EVT0(wxEVT_POWER_SUSPENDED, wxPowerEventHandler(func))
#define EVT_POWER_SUSPEND_CANCEL(func) \
wx__DECLARE_EVT0(wxEVT_POWER_SUSPEND_CANCEL, wxPowerEventHandler(func))
#define EVT_POWER_RESUME(func) \
wx__DECLARE_EVT0(wxEVT_POWER_RESUME, wxPowerEventHandler(func))
#else // no support for power events
#undef wxHAS_POWER_EVENTS
#endif // support for power events/no support
// ----------------------------------------------------------------------------
// wxPowerResourceBlocker
// ----------------------------------------------------------------------------
enum wxPowerResourceKind
{
wxPOWER_RESOURCE_SCREEN,
wxPOWER_RESOURCE_SYSTEM
};
class WXDLLIMPEXP_BASE wxPowerResource
{
public:
static bool Acquire(wxPowerResourceKind kind,
const wxString& reason = wxString());
static void Release(wxPowerResourceKind kind);
};
class wxPowerResourceBlocker
{
public:
explicit wxPowerResourceBlocker(wxPowerResourceKind kind,
const wxString& reason = wxString())
: m_kind(kind),
m_acquired(wxPowerResource::Acquire(kind, reason))
{
}
bool IsInEffect() const { return m_acquired; }
~wxPowerResourceBlocker()
{
if ( m_acquired )
wxPowerResource::Release(m_kind);
}
private:
const wxPowerResourceKind m_kind;
const bool m_acquired;
wxDECLARE_NO_COPY_CLASS(wxPowerResourceBlocker);
};
// ----------------------------------------------------------------------------
// power management functions
// ----------------------------------------------------------------------------
// return the current system power state: online or offline
WXDLLIMPEXP_BASE wxPowerType wxGetPowerType();
// return approximate battery state
WXDLLIMPEXP_BASE wxBatteryState wxGetBatteryState();
#endif // _WX_POWER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/statbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/statbox.h
// Purpose: wxStaticBox base header
// Author: Julian Smart
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_STATBOX_H_BASE_
#define _WX_STATBOX_H_BASE_
#include "wx/defs.h"
#if wxUSE_STATBOX
#include "wx/control.h"
#include "wx/containr.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
// ----------------------------------------------------------------------------
// wxStaticBox: a grouping box with a label
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
{
public:
wxStaticBoxBase();
// overridden base class virtuals
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
virtual bool Enable(bool enable = true) wxOVERRIDE;
// implementation only: this is used by wxStaticBoxSizer to account for the
// need for extra space taken by the static box
//
// the top border is the margin at the top (where the title is),
// borderOther is the margin on all other sides
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
// This is an internal function currently used by wxStaticBoxSizer only.
//
// Reparent all children of the static box under its parent and destroy the
// box itself.
void WXDestroyWithoutChildren();
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
// If non-null, the window used as our label. This window is owned by the
// static box and will be deleted when it is.
wxWindow* m_labelWin;
// For boxes with window label this member variable is used instead of
// m_isEnabled to remember the last value passed to Enable(). It is
// required because the box itself doesn't get disabled by Enable(false) in
// this case (see comments in Enable() implementation), and m_isEnabled
// must correspond to its real state.
bool m_areChildrenEnabled;
wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/statbox.h"
#elif defined(__WXMSW__)
#include "wx/msw/statbox.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/statbox.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/statbox.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/statbox.h"
#elif defined(__WXMAC__)
#include "wx/osx/statbox.h"
#elif defined(__WXQT__)
#include "wx/qt/statbox.h"
#endif
#endif // wxUSE_STATBOX
#endif
// _WX_STATBOX_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/arrimpl.cpp | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/arrimpl.cpp
// Purpose: helper file for implementation of dynamic lists
// Author: Vadim Zeitlin
// Modified by:
// Created: 16.10.97
// Copyright: (c) 1997 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
* Purpose: implements helper functions used by the template class used by *
* DECLARE_OBJARRAY macro and which couldn't be implemented inline *
* (because they need the full definition of type T in scope) *
* *
* Usage: 1) #include dynarray.h *
* 2) WX_DECLARE_OBJARRAY *
* 3) #include arrimpl.cpp *
* 4) WX_DEFINE_OBJARRAY *
*****************************************************************************/
#undef WX_DEFINE_OBJARRAY
#define WX_DEFINE_OBJARRAY(name) \
name::value_type* \
wxObjectArrayTraitsFor##name::Clone(const name::value_type& item) \
{ \
return new name::value_type(item); \
} \
\
void wxObjectArrayTraitsFor##name::Free(name::value_type* p) \
{ \
delete p; \
}
| cpp |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/utils.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/utils.h
// Purpose: Miscellaneous utilities
// Author: Julian Smart
// Modified by:
// Created: 29/01/98
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_UTILS_H_
#define _WX_UTILS_H_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/object.h"
#include "wx/list.h"
#include "wx/filefn.h"
#include "wx/hashmap.h"
#include "wx/versioninfo.h"
#include "wx/meta/implicitconversion.h"
#if wxUSE_GUI
#include "wx/gdicmn.h"
#include "wx/mousestate.h"
#endif
class WXDLLIMPEXP_FWD_BASE wxArrayString;
class WXDLLIMPEXP_FWD_BASE wxArrayInt;
// need this for wxGetDiskSpace() as we can't, unfortunately, forward declare
// wxLongLong
#include "wx/longlong.h"
// needed for wxOperatingSystemId, wxLinuxDistributionInfo
#include "wx/platinfo.h"
#if defined(__X__)
#include <dirent.h>
#include <unistd.h>
#endif
#include <stdio.h>
// ----------------------------------------------------------------------------
// Forward declaration
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxProcess;
class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class wxWindowList;
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
// ----------------------------------------------------------------------------
// Arithmetic functions
// ----------------------------------------------------------------------------
template<typename T1, typename T2>
inline typename wxImplicitConversionType<T1,T2>::value
wxMax(T1 a, T2 b)
{
typedef typename wxImplicitConversionType<T1,T2>::value ResultType;
// Cast both operands to the same type before comparing them to avoid
// warnings about signed/unsigned comparisons from some compilers:
return static_cast<ResultType>(a) > static_cast<ResultType>(b) ? a : b;
}
template<typename T1, typename T2>
inline typename wxImplicitConversionType<T1,T2>::value
wxMin(T1 a, T2 b)
{
typedef typename wxImplicitConversionType<T1,T2>::value ResultType;
return static_cast<ResultType>(a) < static_cast<ResultType>(b) ? a : b;
}
template<typename T1, typename T2, typename T3>
inline typename wxImplicitConversionType3<T1,T2,T3>::value
wxClip(T1 a, T2 b, T3 c)
{
typedef typename wxImplicitConversionType3<T1,T2,T3>::value ResultType;
if ( static_cast<ResultType>(a) < static_cast<ResultType>(b) )
return b;
if ( static_cast<ResultType>(a) > static_cast<ResultType>(c) )
return c;
return a;
}
// ----------------------------------------------------------------------------
// wxMemorySize
// ----------------------------------------------------------------------------
// wxGetFreeMemory can return huge amount of memory on 32-bit platforms as well
// so to always use long long for its result type on all platforms which
// support it
#if wxUSE_LONGLONG
typedef wxLongLong wxMemorySize;
#else
typedef long wxMemorySize;
#endif
// ----------------------------------------------------------------------------
// String functions (deprecated, use wxString)
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_8
// A shorter way of using strcmp
wxDEPRECATED_INLINE(inline bool wxStringEq(const char *s1, const char *s2),
return wxCRT_StrcmpA(s1, s2) == 0; )
#if wxUSE_UNICODE
wxDEPRECATED_INLINE(inline bool wxStringEq(const wchar_t *s1, const wchar_t *s2),
return wxCRT_StrcmpW(s1, s2) == 0; )
#endif // wxUSE_UNICODE
#endif // WXWIN_COMPATIBILITY_2_8
// ----------------------------------------------------------------------------
// Miscellaneous functions
// ----------------------------------------------------------------------------
// Sound the bell
WXDLLIMPEXP_CORE void wxBell();
#if wxUSE_MSGDLG
// Show wxWidgets information
WXDLLIMPEXP_CORE void wxInfoMessageBox(wxWindow* parent);
#endif // wxUSE_MSGDLG
WXDLLIMPEXP_CORE wxVersionInfo wxGetLibraryVersionInfo();
// Get OS description as a user-readable string
WXDLLIMPEXP_BASE wxString wxGetOsDescription();
// Get OS version
WXDLLIMPEXP_BASE wxOperatingSystemId wxGetOsVersion(int *verMaj = NULL,
int *verMin = NULL,
int *verMicro = NULL);
// Check is OS version is at least the specified major and minor version
WXDLLIMPEXP_BASE bool wxCheckOsVersion(int majorVsn, int minorVsn = 0, int microVsn = 0);
// Get platform endianness
WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian();
// Get platform architecture
WXDLLIMPEXP_BASE bool wxIsPlatform64Bit();
#ifdef __LINUX__
// Get linux-distro informations
WXDLLIMPEXP_BASE wxLinuxDistributionInfo wxGetLinuxDistributionInfo();
#endif
// Return a string with the current date/time
WXDLLIMPEXP_BASE wxString wxNow();
// Return path where wxWidgets is installed (mostly useful in Unices)
WXDLLIMPEXP_BASE const wxChar *wxGetInstallPrefix();
// Return path to wxWin data (/usr/share/wx/%{version}) (Unices)
WXDLLIMPEXP_BASE wxString wxGetDataDir();
#if wxUSE_GUI
// Get the state of a key (true if pressed, false if not)
// This is generally most useful getting the state of
// the modifier or toggle keys.
WXDLLIMPEXP_CORE bool wxGetKeyState(wxKeyCode key);
// Don't synthesize KeyUp events holding down a key and producing
// KeyDown events with autorepeat. On by default and always on
// in wxMSW.
WXDLLIMPEXP_CORE bool wxSetDetectableAutoRepeat( bool flag );
// Returns the current state of the mouse position, buttons and modifers
WXDLLIMPEXP_CORE wxMouseState wxGetMouseState();
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------
// wxPlatform
// ----------------------------------------------------------------------------
/*
* Class to make it easier to specify platform-dependent values
*
* Examples:
* long val = wxPlatform::If(wxMac, 1).ElseIf(wxGTK, 2).ElseIf(stPDA, 5).Else(3);
* wxString strVal = wxPlatform::If(wxMac, wxT("Mac")).ElseIf(wxMSW, wxT("MSW")).Else(wxT("Other"));
*
* A custom platform symbol:
*
* #define stPDA 100
* #ifdef __WXMSW__
* wxPlatform::AddPlatform(stPDA);
* #endif
*
* long windowStyle = wxCAPTION | (long) wxPlatform::IfNot(stPDA, wxRESIZE_BORDER);
*
*/
class WXDLLIMPEXP_BASE wxPlatform
{
public:
wxPlatform() { Init(); }
wxPlatform(const wxPlatform& platform) { Copy(platform); }
void operator = (const wxPlatform& platform) { if (&platform != this) Copy(platform); }
void Copy(const wxPlatform& platform);
// Specify an optional default value
wxPlatform(int defValue) { Init(); m_longValue = (long)defValue; }
wxPlatform(long defValue) { Init(); m_longValue = defValue; }
wxPlatform(const wxString& defValue) { Init(); m_stringValue = defValue; }
wxPlatform(double defValue) { Init(); m_doubleValue = defValue; }
static wxPlatform If(int platform, long value);
static wxPlatform IfNot(int platform, long value);
wxPlatform& ElseIf(int platform, long value);
wxPlatform& ElseIfNot(int platform, long value);
wxPlatform& Else(long value);
static wxPlatform If(int platform, int value) { return If(platform, (long)value); }
static wxPlatform IfNot(int platform, int value) { return IfNot(platform, (long)value); }
wxPlatform& ElseIf(int platform, int value) { return ElseIf(platform, (long) value); }
wxPlatform& ElseIfNot(int platform, int value) { return ElseIfNot(platform, (long) value); }
wxPlatform& Else(int value) { return Else((long) value); }
static wxPlatform If(int platform, double value);
static wxPlatform IfNot(int platform, double value);
wxPlatform& ElseIf(int platform, double value);
wxPlatform& ElseIfNot(int platform, double value);
wxPlatform& Else(double value);
static wxPlatform If(int platform, const wxString& value);
static wxPlatform IfNot(int platform, const wxString& value);
wxPlatform& ElseIf(int platform, const wxString& value);
wxPlatform& ElseIfNot(int platform, const wxString& value);
wxPlatform& Else(const wxString& value);
long GetInteger() const { return m_longValue; }
const wxString& GetString() const { return m_stringValue; }
double GetDouble() const { return m_doubleValue; }
operator int() const { return (int) GetInteger(); }
operator long() const { return GetInteger(); }
operator double() const { return GetDouble(); }
operator const wxString&() const { return GetString(); }
static void AddPlatform(int platform);
static bool Is(int platform);
static void ClearPlatforms();
private:
void Init() { m_longValue = 0; m_doubleValue = 0.0; }
long m_longValue;
double m_doubleValue;
wxString m_stringValue;
static wxArrayInt* sm_customPlatforms;
};
/// Function for testing current platform
inline bool wxPlatformIs(int platform) { return wxPlatform::Is(platform); }
// ----------------------------------------------------------------------------
// Window ID management
// ----------------------------------------------------------------------------
// Ensure subsequent IDs don't clash with this one
WXDLLIMPEXP_BASE void wxRegisterId(int id);
// Return the current ID
WXDLLIMPEXP_BASE int wxGetCurrentId();
// Generate a unique ID
WXDLLIMPEXP_BASE int wxNewId();
// ----------------------------------------------------------------------------
// Various conversions
// ----------------------------------------------------------------------------
// Convert 2-digit hex number to decimal
WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf);
// Convert 2-digit hex number to decimal
inline int wxHexToDec(const char* buf)
{
int firstDigit, secondDigit;
if (buf[0] >= 'A')
firstDigit = buf[0] - 'A' + 10;
else if (buf[0] >= '0')
firstDigit = buf[0] - '0';
else
firstDigit = -1;
wxCHECK_MSG( firstDigit >= 0 && firstDigit <= 15, -1, wxS("Invalid argument") );
if (buf[1] >= 'A')
secondDigit = buf[1] - 'A' + 10;
else if (buf[1] >= '0')
secondDigit = buf[1] - '0';
else
secondDigit = -1;
wxCHECK_MSG( secondDigit >= 0 && secondDigit <= 15, -1, wxS("Invalid argument") );
return firstDigit * 16 + secondDigit;
}
// Convert decimal integer to 2-character hex string
WXDLLIMPEXP_BASE void wxDecToHex(unsigned char dec, wxChar *buf);
WXDLLIMPEXP_BASE void wxDecToHex(unsigned char dec, char* ch1, char* ch2);
WXDLLIMPEXP_BASE wxString wxDecToHex(unsigned char dec);
// ----------------------------------------------------------------------------
// Process management
// ----------------------------------------------------------------------------
// NB: for backwards compatibility reasons the values of wxEXEC_[A]SYNC *must*
// be 0 and 1, don't change!
enum
{
// execute the process asynchronously
wxEXEC_ASYNC = 0,
// execute it synchronously, i.e. wait until it finishes
wxEXEC_SYNC = 1,
// under Windows, don't hide the child even if it's IO is redirected (this
// is done by default)
wxEXEC_SHOW_CONSOLE = 2,
// deprecated synonym for wxEXEC_SHOW_CONSOLE, use the new name as it's
// more clear
wxEXEC_NOHIDE = wxEXEC_SHOW_CONSOLE,
// under Unix, if the process is the group leader then passing wxKILL_CHILDREN to wxKill
// kills all children as well as pid
// under Windows (NT family only), sets the CREATE_NEW_PROCESS_GROUP flag,
// which allows to target Ctrl-Break signal to the spawned process.
// applies to console processes only.
wxEXEC_MAKE_GROUP_LEADER = 4,
// by default synchronous execution disables all program windows to avoid
// that the user interacts with the program while the child process is
// running, you can use this flag to prevent this from happening
wxEXEC_NODISABLE = 8,
// by default, the event loop is run while waiting for synchronous execution
// to complete and this flag can be used to simply block the main process
// until the child process finishes
wxEXEC_NOEVENTS = 16,
// under Windows, hide the console of the child process if it has one, even
// if its IO is not redirected
wxEXEC_HIDE_CONSOLE = 32,
// convenient synonym for flags given system()-like behaviour
wxEXEC_BLOCK = wxEXEC_SYNC | wxEXEC_NOEVENTS
};
// Map storing environment variables.
typedef wxStringToStringHashMap wxEnvVariableHashMap;
// Used to pass additional parameters for child process to wxExecute(). Could
// be extended with other fields later.
struct wxExecuteEnv
{
wxString cwd; // If empty, CWD is not changed.
wxEnvVariableHashMap env; // If empty, environment is unchanged.
};
// Execute another program.
//
// If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the
// process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on
// failure and the PID of the launched process if ok.
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
WXDLLIMPEXP_BASE long wxExecute(const char* const* argv,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
#if wxUSE_UNICODE
WXDLLIMPEXP_BASE long wxExecute(const wchar_t* const* argv,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
#endif // wxUSE_UNICODE
// execute the command capturing its output into an array line by line, this is
// always synchronous
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
wxArrayString& output,
int flags = 0,
const wxExecuteEnv *env = NULL);
// also capture stderr (also synchronous)
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
wxArrayString& output,
wxArrayString& error,
int flags = 0,
const wxExecuteEnv *env = NULL);
#if defined(__WINDOWS__) && wxUSE_IPC
// ask a DDE server to execute the DDE request with given parameters
WXDLLIMPEXP_BASE bool wxExecuteDDE(const wxString& ddeServer,
const wxString& ddeTopic,
const wxString& ddeCommand);
#endif // __WINDOWS__ && wxUSE_IPC
enum wxSignal
{
wxSIGNONE = 0, // verify if the process exists under Unix
wxSIGHUP,
wxSIGINT,
wxSIGQUIT,
wxSIGILL,
wxSIGTRAP,
wxSIGABRT,
wxSIGIOT = wxSIGABRT, // another name
wxSIGEMT,
wxSIGFPE,
wxSIGKILL,
wxSIGBUS,
wxSIGSEGV,
wxSIGSYS,
wxSIGPIPE,
wxSIGALRM,
wxSIGTERM
// further signals are different in meaning between different Unix systems
};
enum wxKillError
{
wxKILL_OK, // no error
wxKILL_BAD_SIGNAL, // no such signal
wxKILL_ACCESS_DENIED, // permission denied
wxKILL_NO_PROCESS, // no such process
wxKILL_ERROR // another, unspecified error
};
enum wxKillFlags
{
wxKILL_NOCHILDREN = 0, // don't kill children
wxKILL_CHILDREN = 1 // kill children
};
enum wxShutdownFlags
{
wxSHUTDOWN_FORCE = 1,// can be combined with other flags (MSW-only)
wxSHUTDOWN_POWEROFF = 2,// power off the computer
wxSHUTDOWN_REBOOT = 4,// shutdown and reboot
wxSHUTDOWN_LOGOFF = 8 // close session (currently MSW-only)
};
// Shutdown or reboot the PC
WXDLLIMPEXP_BASE bool wxShutdown(int flags = wxSHUTDOWN_POWEROFF);
// send the given signal to the process (only NONE and KILL are supported under
// Windows, all others mean TERM), return 0 if ok and -1 on error
//
// return detailed error in rc if not NULL
WXDLLIMPEXP_BASE int wxKill(long pid,
wxSignal sig = wxSIGTERM,
wxKillError *rc = NULL,
int flags = wxKILL_NOCHILDREN);
// Execute a command in an interactive shell window (always synchronously)
// If no command then just the shell
WXDLLIMPEXP_BASE bool wxShell(const wxString& command = wxEmptyString);
// As wxShell(), but must give a (non interactive) command and its output will
// be returned in output array
WXDLLIMPEXP_BASE bool wxShell(const wxString& command, wxArrayString& output);
// Sleep for nSecs seconds
WXDLLIMPEXP_BASE void wxSleep(int nSecs);
// Sleep for a given amount of milliseconds
WXDLLIMPEXP_BASE void wxMilliSleep(unsigned long milliseconds);
// Sleep for a given amount of microseconds
WXDLLIMPEXP_BASE void wxMicroSleep(unsigned long microseconds);
#if WXWIN_COMPATIBILITY_2_8
// Sleep for a given amount of milliseconds (old, bad name), use wxMilliSleep
wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) );
#endif
// Get the process id of the current process
WXDLLIMPEXP_BASE unsigned long wxGetProcessId();
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
WXDLLIMPEXP_BASE wxMemorySize wxGetFreeMemory();
#if wxUSE_ON_FATAL_EXCEPTION
// should wxApp::OnFatalException() be called?
WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true);
#endif // wxUSE_ON_FATAL_EXCEPTION
// ----------------------------------------------------------------------------
// Environment variables
// ----------------------------------------------------------------------------
// returns true if variable exists (value may be NULL if you just want to check
// for this)
WXDLLIMPEXP_BASE bool wxGetEnv(const wxString& var, wxString *value);
// set the env var name to the given value, return true on success
WXDLLIMPEXP_BASE bool wxSetEnv(const wxString& var, const wxString& value);
// remove the env var from environment
WXDLLIMPEXP_BASE bool wxUnsetEnv(const wxString& var);
#if WXWIN_COMPATIBILITY_2_8
inline bool wxSetEnv(const wxString& var, const char *value)
{ return wxSetEnv(var, wxString(value)); }
inline bool wxSetEnv(const wxString& var, const wchar_t *value)
{ return wxSetEnv(var, wxString(value)); }
template<typename T>
inline bool wxSetEnv(const wxString& var, const wxScopedCharTypeBuffer<T>& value)
{ return wxSetEnv(var, wxString(value)); }
inline bool wxSetEnv(const wxString& var, const wxCStrData& value)
{ return wxSetEnv(var, wxString(value)); }
// this one is for passing NULL directly - don't use it, use wxUnsetEnv instead
wxDEPRECATED( inline bool wxSetEnv(const wxString& var, int value) );
inline bool wxSetEnv(const wxString& var, int value)
{
wxASSERT_MSG( value == 0, "using non-NULL integer as string?" );
wxUnusedVar(value); // fix unused parameter warning in release build
return wxUnsetEnv(var);
}
#endif // WXWIN_COMPATIBILITY_2_8
// Retrieve the complete environment by filling specified map.
// Returns true on success or false if an error occurred.
WXDLLIMPEXP_BASE bool wxGetEnvMap(wxEnvVariableHashMap *map);
// ----------------------------------------------------------------------------
// Network and username functions.
// ----------------------------------------------------------------------------
// NB: "char *" functions are deprecated, use wxString ones!
// Get eMail address
WXDLLIMPEXP_BASE bool wxGetEmailAddress(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetEmailAddress();
// Get hostname.
WXDLLIMPEXP_BASE bool wxGetHostName(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetHostName();
// Get FQDN
WXDLLIMPEXP_BASE wxString wxGetFullHostName();
WXDLLIMPEXP_BASE bool wxGetFullHostName(wxChar *buf, int maxSize);
// Get user ID e.g. jacs (this is known as login name under Unix)
WXDLLIMPEXP_BASE bool wxGetUserId(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetUserId();
// Get user name e.g. Julian Smart
WXDLLIMPEXP_BASE bool wxGetUserName(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetUserName();
// Get current Home dir and copy to dest (returns pstr->c_str())
WXDLLIMPEXP_BASE wxString wxGetHomeDir();
WXDLLIMPEXP_BASE const wxChar* wxGetHomeDir(wxString *pstr);
// Get the user's (by default use the current user name) home dir,
// return empty string on error
WXDLLIMPEXP_BASE wxString wxGetUserHome(const wxString& user = wxEmptyString);
#if wxUSE_LONGLONG
typedef wxLongLong wxDiskspaceSize_t;
#else
typedef long wxDiskspaceSize_t;
#endif
// get number of total/free bytes on the disk where path belongs
WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path,
wxDiskspaceSize_t *pTotal = NULL,
wxDiskspaceSize_t *pFree = NULL);
typedef int (*wxSortCallback)(const void* pItem1,
const void* pItem2,
const void* user_data);
WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems,
size_t size, wxSortCallback cmp,
const void* user_data);
#if wxUSE_GUI // GUI only things from now on
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// flags for wxLaunchDefaultBrowser
enum
{
wxBROWSER_NEW_WINDOW = 0x01,
wxBROWSER_NOBUSYCURSOR = 0x02
};
// Launch url in the user's default internet browser
WXDLLIMPEXP_CORE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
// Launch document in the user's default application
WXDLLIMPEXP_CORE bool wxLaunchDefaultApplication(const wxString& path, int flags = 0);
// ----------------------------------------------------------------------------
// Menu accelerators related things
// ----------------------------------------------------------------------------
// flags for wxStripMenuCodes
enum
{
// strip '&' characters
wxStrip_Mnemonics = 1,
// strip everything after '\t'
wxStrip_Accel = 2,
// strip everything (this is the default)
wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel
};
// strip mnemonics and/or accelerators from the label
WXDLLIMPEXP_CORE wxString
wxStripMenuCodes(const wxString& str, int flags = wxStrip_All);
// ----------------------------------------------------------------------------
// Window search
// ----------------------------------------------------------------------------
// Returns menu item id or wxNOT_FOUND if none.
WXDLLIMPEXP_CORE int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString);
// Find the wxWindow at the given point. wxGenericFindWindowAtPoint
// is always present but may be less reliable than a native version.
WXDLLIMPEXP_CORE wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
// NB: this function is obsolete, use wxWindow::FindWindowByLabel() instead
//
// Find the window/widget with the given title or label.
// Pass a parent to begin the search from, or NULL to look through
// all windows.
WXDLLIMPEXP_CORE wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = NULL);
// NB: this function is obsolete, use wxWindow::FindWindowByName() instead
//
// Find window by name, and if that fails, by label.
WXDLLIMPEXP_CORE wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = NULL);
// ----------------------------------------------------------------------------
// Message/event queue helpers
// ----------------------------------------------------------------------------
// Yield to other apps/messages and disable user input
WXDLLIMPEXP_CORE bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = false);
// Enable or disable input to all top level windows
WXDLLIMPEXP_CORE void wxEnableTopLevelWindows(bool enable = true);
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
WXDLLIMPEXP_CORE bool wxCheckForInterrupt(wxWindow *wnd);
// Consume all events until no more left
WXDLLIMPEXP_CORE void wxFlushEvents();
// a class which disables all windows (except, may be, the given one) in its
// ctor and enables them back in its dtor
class WXDLLIMPEXP_CORE wxWindowDisabler
{
public:
// this ctor conditionally disables all windows: if the argument is false,
// it doesn't do anything
wxWindowDisabler(bool disable = true);
// ctor disables all windows except winToSkip
wxWindowDisabler(wxWindow *winToSkip);
// dtor enables back all windows disabled by the ctor
~wxWindowDisabler();
private:
// disable all windows except the given one (used by both ctors)
void DoDisable(wxWindow *winToSkip = NULL);
#if defined(__WXOSX__) && wxOSX_USE_COCOA
wxEventLoop* m_modalEventLoop;
#endif
wxWindowList *m_winDisabled;
bool m_disabled;
wxDECLARE_NO_COPY_CLASS(wxWindowDisabler);
};
// ----------------------------------------------------------------------------
// Cursors
// ----------------------------------------------------------------------------
// Set the cursor to the busy cursor for all windows
WXDLLIMPEXP_CORE void wxBeginBusyCursor(const wxCursor *cursor = wxHOURGLASS_CURSOR);
// Restore cursor to normal
WXDLLIMPEXP_CORE void wxEndBusyCursor();
// true if we're between the above two calls
WXDLLIMPEXP_CORE bool wxIsBusy();
// Convenience class so we can just create a wxBusyCursor object on the stack
class WXDLLIMPEXP_CORE wxBusyCursor
{
public:
wxBusyCursor(const wxCursor* cursor = wxHOURGLASS_CURSOR)
{ wxBeginBusyCursor(cursor); }
~wxBusyCursor()
{ wxEndBusyCursor(); }
// FIXME: These two methods are currently only implemented (and needed?)
// in wxGTK. BusyCursor handling should probably be moved to
// common code since the wxGTK and wxMSW implementations are very
// similar except for wxMSW using HCURSOR directly instead of
// wxCursor.. -- RL.
static const wxCursor &GetStoredCursor();
static const wxCursor GetBusyCursor();
};
void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y );
// ----------------------------------------------------------------------------
// X11 Display access
// ----------------------------------------------------------------------------
#if defined(__X__) || defined(__WXGTK__)
#ifdef __WXGTK__
WXDLLIMPEXP_CORE void *wxGetDisplay();
#endif
#ifdef __X__
WXDLLIMPEXP_CORE WXDisplay *wxGetDisplay();
WXDLLIMPEXP_CORE bool wxSetDisplay(const wxString& display_name);
WXDLLIMPEXP_CORE wxString wxGetDisplayName();
#endif // X or GTK+
// use this function instead of the functions above in implementation code
inline struct _XDisplay *wxGetX11Display()
{
return (_XDisplay *)wxGetDisplay();
}
#endif // X11 || wxGTK
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------
// wxYield(): these functions are obsolete, please use wxApp methods instead!
// ----------------------------------------------------------------------------
// avoid redeclaring this function here if it had been already declated by
// wx/app.h, this results in warnings from g++ with -Wredundant-decls
#ifndef wx_YIELD_DECLARED
#define wx_YIELD_DECLARED
// Yield to other apps/messages
WXDLLIMPEXP_CORE bool wxYield();
#endif // wx_YIELD_DECLARED
// Like wxYield, but fails silently if the yield is recursive.
WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
// ----------------------------------------------------------------------------
// Windows resources access
// ----------------------------------------------------------------------------
// Windows only: get user-defined resource from the .res file.
#ifdef __WINDOWS__
// default resource type for wxLoadUserResource()
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr;
// Return the pointer to the resource data. This pointer is read-only, use
// the overload below if you need to modify the data.
//
// Notice that the resource type can be either a real string or an integer
// produced by MAKEINTRESOURCE(). In particular, any standard resource type,
// i.e any RT_XXX constant, could be passed here.
//
// Returns true on success, false on failure. Doesn't log an error message
// if the resource is not found (because this could be expected) but does
// log one if any other error occurs.
WXDLLIMPEXP_BASE bool
wxLoadUserResource(const void **outData,
size_t *outLen,
const wxString& resourceName,
const wxChar* resourceType = wxUserResourceStr,
WXHINSTANCE module = 0);
// This function allocates a new buffer and makes a copy of the resource
// data, remember to delete[] the buffer. And avoid using it entirely if
// the overload above can be used.
//
// Returns NULL on failure.
WXDLLIMPEXP_BASE char*
wxLoadUserResource(const wxString& resourceName,
const wxChar* resourceType = wxUserResourceStr,
int* pLen = NULL,
WXHINSTANCE module = 0);
#endif // __WINDOWS__
#endif
// _WX_UTILSH__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/testing.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/testing.h
// Purpose: helpers for GUI testing
// Author: Vaclav Slavik
// Created: 2012-08-28
// Copyright: (c) 2012 Vaclav Slavik
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TESTING_H_
#define _WX_TESTING_H_
#include "wx/debug.h"
#include "wx/string.h"
#include "wx/modalhook.h"
class WXDLLIMPEXP_FWD_CORE wxMessageDialogBase;
class WXDLLIMPEXP_FWD_CORE wxFileDialogBase;
// ----------------------------------------------------------------------------
// testing API
// ----------------------------------------------------------------------------
// Don't include this code when building the library itself
#ifndef WXBUILDING
#include "wx/beforestd.h"
#include <algorithm>
#include <iterator>
#include <queue>
#include "wx/afterstd.h"
#include "wx/cpp.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/filedlg.h"
#include <typeinfo>
class wxTestingModalHook;
// This helper is used to construct the best possible name for the dialog of
// the given type using wxRTTI for this type, if any, and the C++ RTTI for
// either the type T statically or the dynamic type of "dlg" if it's non-null.
template <class T>
wxString wxGetDialogClassDescription(const wxClassInfo *ci, T* dlg = NULL)
{
// We prefer to use the name from wxRTTI as it's guaranteed to be readable,
// unlike the name returned by type_info::name() which may need to be
// demangled, but if wxRTTI macros were not used for this object, it's
// better to return a not-very-readable-but-informative mangled name rather
// than a readable but useless "wxDialog".
if ( ci == wxCLASSINFO(wxDialog) )
{
return wxString::Format("dialog of type \"%s\"",
(dlg ? typeid(*dlg) : typeid(T)).name());
}
// We consider that an unmangled name is clear enough to be used on its own.
return ci->GetClassName();
}
// Non-template base class for wxExpectModal<T> (via wxExpectModalBase).
// Only used internally.
class wxModalExpectation
{
public:
wxModalExpectation() : m_isOptional(false) {}
virtual ~wxModalExpectation() {}
wxString GetDescription() const
{
return m_description.empty() ? GetDefaultDescription() : m_description;
}
bool IsOptional() const { return m_isOptional; }
virtual int Invoke(wxDialog *dlg) const = 0;
protected:
// Override to return the default description of the expected dialog used
// if no specific description for this particular expectation is given.
virtual wxString GetDefaultDescription() const = 0;
// User-provided description of the dialog, may be empty.
wxString m_description;
// Is this dialog optional, i.e. not required to be shown?
bool m_isOptional;
};
// This template is specialized for some of the standard dialog classes and can
// also be specialized outside of the library for the custom dialogs.
//
// All specializations must derive from wxExpectModalBase<T>.
template<class T> class wxExpectModal;
/**
Base class for the expectation of a dialog of the given type T.
Test code can derive ad hoc classes from this class directly and implement
its OnInvoked() to perform the necessary actions or derive wxExpectModal<T>
and implement it once if the implementation of OnInvoked() is always the
same, i.e. depends just on the type T.
T must be a class derived from wxDialog and E is the derived class type,
i.e. this is an example of using CRTP. The default value of E is fine in
case you're using this class as a base for your wxExpectModal<>
specialization anyhow but also if you don't use neither Optional() nor
Describe() methods, as the derived class type is only needed for them.
*/
template<class T, class E = wxExpectModal<T> >
class wxExpectModalBase : public wxModalExpectation
{
public:
typedef T DialogType;
typedef E ExpectationType;
// A note about these "modifier" methods: they return copies of this object
// and not a reference to the object itself (after modifying it) because
// this object is likely to be temporary and will be destroyed soon, while
// the new temporary created by these objects is bound to a const reference
// inside WX_TEST_IMPL_ADD_EXPECTATION() macro ensuring that its lifetime
// is prolonged until we can check if the expectations were met.
//
// This is also the reason these methods must be in this class and use
// CRTP: a copy of this object can't be created in the base class, which is
// abstract, and the copy must have the same type as the derived object to
// avoid slicing.
//
// Make sure you understand this comment in its entirety before considering
// modifying this code.
/**
Returns a copy of the expectation where the expected dialog is marked
as optional.
Optional dialogs aren't required to appear, it's not an error if they
don't.
*/
ExpectationType Optional() const
{
ExpectationType e(*static_cast<const ExpectationType*>(this));
e.m_isOptional = true;
return e;
}
/**
Sets a description shown in the error message if the expectation fails.
Using this method with unique descriptions for the different dialogs is
recommended to make it easier to find out which one of the expected
dialogs exactly was not shown.
*/
ExpectationType Describe(const wxString& description) const
{
ExpectationType e(*static_cast<const ExpectationType*>(this));
e.m_description = description;
return e;
}
protected:
virtual int Invoke(wxDialog *dlg) const wxOVERRIDE
{
DialogType *t = dynamic_cast<DialogType*>(dlg);
if ( t )
return OnInvoked(t);
else
return wxID_NONE; // not handled
}
/// Returns description of the expected dialog (by default, its class).
virtual wxString GetDefaultDescription() const wxOVERRIDE
{
return wxGetDialogClassDescription<T>(wxCLASSINFO(T));
}
/**
This method is called when ShowModal() was invoked on a dialog of type T.
@return Return value is used as ShowModal()'s return value.
*/
virtual int OnInvoked(DialogType *dlg) const = 0;
};
// wxExpectModal<T> specializations for common dialogs:
template<class T>
class wxExpectDismissableModal
: public wxExpectModalBase<T, wxExpectDismissableModal<T> >
{
public:
explicit wxExpectDismissableModal(int id)
{
switch ( id )
{
case wxYES:
m_id = wxID_YES;
break;
case wxNO:
m_id = wxID_NO;
break;
case wxCANCEL:
m_id = wxID_CANCEL;
break;
case wxOK:
m_id = wxID_OK;
break;
case wxHELP:
m_id = wxID_HELP;
break;
default:
m_id = id;
break;
}
}
protected:
virtual int OnInvoked(T *WXUNUSED(dlg)) const wxOVERRIDE
{
return m_id;
}
int m_id;
};
template<>
class wxExpectModal<wxMessageDialog>
: public wxExpectDismissableModal<wxMessageDialog>
{
public:
explicit wxExpectModal(int id)
: wxExpectDismissableModal<wxMessageDialog>(id)
{
}
protected:
virtual wxString GetDefaultDescription() const wxOVERRIDE
{
// It can be useful to show which buttons the expected message box was
// supposed to have, in case there could have been several of them.
wxString details;
switch ( m_id )
{
case wxID_YES:
case wxID_NO:
details = "wxYES_NO style";
break;
case wxID_CANCEL:
details = "wxCANCEL style";
break;
case wxID_OK:
details = "wxOK style";
break;
default:
details.Printf("a button with ID=%d", m_id);
break;
}
return "wxMessageDialog with " + details;
}
};
class wxExpectAny : public wxExpectDismissableModal<wxDialog>
{
public:
explicit wxExpectAny(int id)
: wxExpectDismissableModal<wxDialog>(id)
{
}
};
#if wxUSE_FILEDLG
template<>
class wxExpectModal<wxFileDialog> : public wxExpectModalBase<wxFileDialog>
{
public:
wxExpectModal(const wxString& path, int id = wxID_OK)
: m_path(path), m_id(id)
{
}
protected:
virtual int OnInvoked(wxFileDialog *dlg) const wxOVERRIDE
{
dlg->SetPath(m_path);
return m_id;
}
wxString m_path;
int m_id;
};
#endif
// Implementation of wxModalDialogHook for use in testing, with
// wxExpectModal<T> and the wxTEST_DIALOG() macro. It is not intended for
// direct use, use the macro instead.
class wxTestingModalHook : public wxModalDialogHook
{
public:
// This object is created with the location of the macro containing it by
// wxTEST_DIALOG macro, otherwise it falls back to the location of this
// line itself, which is not very useful, so normally you should provide
// your own values.
wxTestingModalHook(const char* file = NULL,
int line = 0,
const char* func = NULL)
: m_file(file), m_line(line), m_func(func)
{
Register();
}
// Called to verify that all expectations were met. This cannot be done in
// the destructor, because ReportFailure() may throw (either because it's
// overriden or because wx's assertions handling is, globally). And
// throwing from the destructor would introduce all sort of problems,
// including messing up the order of errors in some cases.
void CheckUnmetExpectations()
{
while ( !m_expectations.empty() )
{
const wxModalExpectation *expect = m_expectations.front();
m_expectations.pop();
if ( expect->IsOptional() )
continue;
ReportFailure
(
wxString::Format
(
"Expected %s was not shown.",
expect->GetDescription()
)
);
break;
}
}
void AddExpectation(const wxModalExpectation& e)
{
m_expectations.push(&e);
}
protected:
virtual int Enter(wxDialog *dlg) wxOVERRIDE
{
while ( !m_expectations.empty() )
{
const wxModalExpectation *expect = m_expectations.front();
m_expectations.pop();
int ret = expect->Invoke(dlg);
if ( ret != wxID_NONE )
return ret; // dialog shown as expected
// not showing an optional dialog is OK, but showing an unexpected
// one definitely isn't:
if ( !expect->IsOptional() )
{
ReportFailure
(
wxString::Format
(
"%s was shown unexpectedly, expected %s.",
DescribeUnexpectedDialog(dlg),
expect->GetDescription()
)
);
return wxID_NONE;
}
// else: try the next expectation in the chain
}
ReportFailure
(
wxString::Format
(
"%s was shown unexpectedly.",
DescribeUnexpectedDialog(dlg)
)
);
return wxID_NONE;
}
protected:
// This method may be overridden to provide a better description of
// (unexpected) dialogs, e.g. add knowledge of custom dialogs used by the
// program here.
virtual wxString DescribeUnexpectedDialog(wxDialog* dlg) const
{
// Message boxes are handled specially here just because they are so
// ubiquitous.
if ( wxMessageDialog *msgdlg = dynamic_cast<wxMessageDialog*>(dlg) )
{
return wxString::Format
(
"A message box \"%s\"",
msgdlg->GetMessage()
);
}
return wxString::Format
(
"A %s with title \"%s\"",
wxGetDialogClassDescription(dlg->GetClassInfo(), dlg),
dlg->GetTitle()
);
}
// This method may be overridden to change the way test failures are
// handled. By default they result in an assertion failure which, of
// course, can itself be customized.
virtual void ReportFailure(const wxString& msg)
{
wxFAIL_MSG_AT( msg,
m_file ? m_file : __FILE__,
m_line ? m_line : __LINE__,
m_func ? m_func : __WXFUNCTION__ );
}
private:
const char* const m_file;
const int m_line;
const char* const m_func;
std::queue<const wxModalExpectation*> m_expectations;
wxDECLARE_NO_COPY_CLASS(wxTestingModalHook);
};
// Redefining this value makes it possible to customize the hook class,
// including e.g. its error reporting.
#ifndef wxTEST_DIALOG_HOOK_CLASS
#define wxTEST_DIALOG_HOOK_CLASS wxTestingModalHook
#endif
#define WX_TEST_IMPL_ADD_EXPECTATION(pos, expect) \
const wxModalExpectation& wx_exp##pos = expect; \
wx_hook.AddExpectation(wx_exp##pos);
/**
Runs given code with all modal dialogs redirected to wxExpectModal<T>
hooks, instead of being shown to the user.
The first argument is any valid expression, typically a function call. The
remaining arguments are wxExpectModal<T> instances defining the dialogs
that are expected to be shown, in order of appearance.
Some typical examples:
@code
wxTEST_DIALOG
(
rc = dlg.ShowModal(),
wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt")
);
@endcode
Sometimes, the code may show more than one dialog:
@code
wxTEST_DIALOG
(
RunSomeFunction(),
wxExpectModal<wxMessageDialog>(wxNO),
wxExpectModal<MyConfirmationDialog>(wxYES),
wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt")
);
@endcode
Notice that wxExpectModal<T> has some convenience methods for further
tweaking the expectations. For example, it's possible to mark an expected
dialog as @em optional for situations when a dialog may be shown, but isn't
required to, by calling the Optional() method:
@code
wxTEST_DIALOG
(
RunSomeFunction(),
wxExpectModal<wxMessageDialog>(wxNO),
wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional()
);
@endcode
@note By default, errors are reported with wxFAIL_MSG(). You may customize this by
implementing a class derived from wxTestingModalHook, overriding its
ReportFailure() method and redefining the wxTEST_DIALOG_HOOK_CLASS
macro to be the name of this class.
@note Custom dialogs are supported too. All you have to do is to specialize
wxExpectModal<> for your dialog type and implement its OnInvoked()
method.
*/
#ifdef HAVE_VARIADIC_MACROS
// See wx/cpp.h for the explanations of this hack.
#if defined(__GNUC__) && __GNUC__ == 3
#pragma GCC system_header
#endif /* gcc-3.x */
#define wxTEST_DIALOG(codeToRun, ...) \
{ \
wxTEST_DIALOG_HOOK_CLASS wx_hook(__FILE__, __LINE__, __WXFUNCTION__); \
wxCALL_FOR_EACH(WX_TEST_IMPL_ADD_EXPECTATION, __VA_ARGS__) \
codeToRun; \
wx_hook.CheckUnmetExpectations(); \
}
#endif /* HAVE_VARIADIC_MACROS */
#endif // !WXBUILDING
#endif // _WX_TESTING_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/richmsgdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/richmsgdlg.h
// Purpose: wxRichMessageDialogBase
// Author: Rickard Westerlund
// Created: 2010-07-03
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RICHMSGDLG_H_BASE_
#define _WX_RICHMSGDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_RICHMSGDLG
#include "wx/msgdlg.h"
// Extends a message dialog with an optional checkbox and user-expandable
// detailed text.
class WXDLLIMPEXP_CORE wxRichMessageDialogBase : public wxGenericMessageDialog
{
public:
wxRichMessageDialogBase( wxWindow *parent,
const wxString& message,
const wxString& caption,
long style )
: wxGenericMessageDialog( parent, message, caption, style ),
m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ),
m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ),
m_checkBoxValue( false ),
m_footerIcon( 0 )
{ }
void ShowCheckBox(const wxString& checkBoxText, bool checked = false)
{
m_checkBoxText = checkBoxText;
m_checkBoxValue = checked;
}
wxString GetCheckBoxText() const { return m_checkBoxText; }
void ShowDetailedText(const wxString& detailedText)
{ m_detailedText = detailedText; }
wxString GetDetailedText() const { return m_detailedText; }
virtual bool IsCheckBoxChecked() const { return m_checkBoxValue; }
void SetFooterText(const wxString& footerText)
{ m_footerText = footerText; }
wxString GetFooterText() const { return m_footerText; }
void SetFooterIcon(int icon)
{ m_footerIcon = icon; }
int GetFooterIcon() const { return m_footerIcon; }
protected:
const wxString m_detailsExpanderCollapsedLabel;
const wxString m_detailsExpanderExpandedLabel;
wxString m_checkBoxText;
bool m_checkBoxValue;
wxString m_detailedText;
wxString m_footerText;
int m_footerIcon;
private:
void ShowDetails(bool shown);
wxDECLARE_NO_COPY_CLASS(wxRichMessageDialogBase);
};
// Always include the generic version as it's currently used as the base class
// by the MSW native implementation too.
#include "wx/generic/richmsgdlgg.h"
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/richmsgdlg.h"
#else
class WXDLLIMPEXP_CORE wxRichMessageDialog
: public wxGenericRichMessageDialog
{
public:
wxRichMessageDialog( wxWindow *parent,
const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK | wxCENTRE )
: wxGenericRichMessageDialog( parent, message, caption, style )
{ }
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog);
};
#endif
#endif // wxUSE_RICHMSGDLG
#endif // _WX_RICHMSGDLG_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/tbarbase.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/tbarbase.h
// Purpose: Base class for toolbar classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TBARBASE_H_
#define _WX_TBARBASE_H_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_TOOLBAR
#include "wx/bitmap.h"
#include "wx/list.h"
#include "wx/control.h"
class WXDLLIMPEXP_FWD_CORE wxToolBarBase;
class WXDLLIMPEXP_FWD_CORE wxToolBarToolBase;
class WXDLLIMPEXP_FWD_CORE wxImage;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
extern WXDLLIMPEXP_DATA_CORE(const char) wxToolBarNameStr[];
extern WXDLLIMPEXP_DATA_CORE(const wxSize) wxDefaultSize;
extern WXDLLIMPEXP_DATA_CORE(const wxPoint) wxDefaultPosition;
enum wxToolBarToolStyle
{
wxTOOL_STYLE_BUTTON = 1,
wxTOOL_STYLE_SEPARATOR = 2,
wxTOOL_STYLE_CONTROL
};
// ----------------------------------------------------------------------------
// wxToolBarTool is a toolbar element.
//
// It has a unique id (except for the separators which always have id wxID_ANY), the
// style (telling whether it is a normal button, separator or a control), the
// state (toggled or not, enabled or not) and short and long help strings. The
// default implementations use the short help string for the tooltip text which
// is popped up when the mouse pointer enters the tool and the long help string
// for the applications status bar.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxToolBarToolBase : public wxObject
{
public:
// ctors & dtor
// ------------
// generic ctor for any kind of tool
wxToolBarToolBase(wxToolBarBase *tbar = NULL,
int toolid = wxID_SEPARATOR,
const wxString& label = wxEmptyString,
const wxBitmap& bmpNormal = wxNullBitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
wxItemKind kind = wxITEM_NORMAL,
wxObject *clientData = NULL,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
: m_label(label),
m_shortHelpString(shortHelpString),
m_longHelpString(longHelpString)
{
Init
(
tbar,
toolid == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR
: wxTOOL_STYLE_BUTTON,
toolid == wxID_ANY ? wxWindow::NewControlId()
: toolid,
kind
);
m_clientData = clientData;
m_bmpNormal = bmpNormal;
m_bmpDisabled = bmpDisabled;
}
// ctor for controls only
wxToolBarToolBase(wxToolBarBase *tbar,
wxControl *control,
const wxString& label)
: m_label(label)
{
Init(tbar, wxTOOL_STYLE_CONTROL, control->GetId(), wxITEM_MAX);
m_control = control;
}
virtual ~wxToolBarToolBase();
// accessors
// ---------
// general
int GetId() const { return m_id; }
wxControl *GetControl() const
{
wxASSERT_MSG( IsControl(), wxT("this toolbar tool is not a control") );
return m_control;
}
wxToolBarBase *GetToolBar() const { return m_tbar; }
// style/kind
bool IsStretchable() const { return m_stretchable; }
bool IsButton() const { return m_toolStyle == wxTOOL_STYLE_BUTTON; }
bool IsControl() const { return m_toolStyle == wxTOOL_STYLE_CONTROL; }
bool IsSeparator() const { return m_toolStyle == wxTOOL_STYLE_SEPARATOR; }
bool IsStretchableSpace() const { return IsSeparator() && IsStretchable(); }
int GetStyle() const { return m_toolStyle; }
wxItemKind GetKind() const
{
wxASSERT_MSG( IsButton(), wxT("only makes sense for buttons") );
return m_kind;
}
void MakeStretchable()
{
wxASSERT_MSG( IsSeparator(), "only separators can be stretchable" );
m_stretchable = true;
}
// state
bool IsEnabled() const { return m_enabled; }
bool IsToggled() const { return m_toggled; }
bool CanBeToggled() const
{ return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; }
// attributes
const wxBitmap& GetNormalBitmap() const { return m_bmpNormal; }
const wxBitmap& GetDisabledBitmap() const { return m_bmpDisabled; }
const wxBitmap& GetBitmap() const
{ return IsEnabled() ? GetNormalBitmap() : GetDisabledBitmap(); }
const wxString& GetLabel() const { return m_label; }
const wxString& GetShortHelp() const { return m_shortHelpString; }
const wxString& GetLongHelp() const { return m_longHelpString; }
wxObject *GetClientData() const
{
if ( m_toolStyle == wxTOOL_STYLE_CONTROL )
{
return (wxObject*)m_control->GetClientData();
}
else
{
return m_clientData;
}
}
// modifiers: return true if the state really changed
virtual bool Enable(bool enable);
virtual bool Toggle(bool toggle);
virtual bool SetToggle(bool toggle);
virtual bool SetShortHelp(const wxString& help);
virtual bool SetLongHelp(const wxString& help);
void Toggle() { Toggle(!IsToggled()); }
void SetNormalBitmap(const wxBitmap& bmp) { m_bmpNormal = bmp; }
void SetDisabledBitmap(const wxBitmap& bmp) { m_bmpDisabled = bmp; }
virtual void SetLabel(const wxString& label) { m_label = label; }
void SetClientData(wxObject *clientData)
{
if ( m_toolStyle == wxTOOL_STYLE_CONTROL )
{
m_control->SetClientData(clientData);
}
else
{
m_clientData = clientData;
}
}
// add tool to/remove it from a toolbar
virtual void Detach() { m_tbar = NULL; }
virtual void Attach(wxToolBarBase *tbar) { m_tbar = tbar; }
#if wxUSE_MENUS
// these methods are only for tools of wxITEM_DROPDOWN kind (but even such
// tools can have a NULL associated menu)
virtual void SetDropdownMenu(wxMenu *menu);
wxMenu *GetDropdownMenu() const { return m_dropdownMenu; }
#endif
protected:
// common part of all ctors
void Init(wxToolBarBase *tbar,
wxToolBarToolStyle style,
int toolid,
wxItemKind kind)
{
m_tbar = tbar;
m_toolStyle = style;
m_id = toolid;
m_kind = kind;
m_clientData = NULL;
m_stretchable = false;
m_toggled = false;
m_enabled = true;
#if wxUSE_MENUS
m_dropdownMenu = NULL;
#endif
}
wxToolBarBase *m_tbar; // the toolbar to which we belong (may be NULL)
// tool parameters
wxToolBarToolStyle m_toolStyle;
wxWindowIDRef m_id; // the tool id, wxID_SEPARATOR for separator
wxItemKind m_kind; // for normal buttons may be wxITEM_NORMAL/CHECK/RADIO
// as controls have their own client data, no need to waste memory
union
{
wxObject *m_clientData;
wxControl *m_control;
};
// true if this tool is stretchable: currently is only value for separators
bool m_stretchable;
// tool state
bool m_toggled;
bool m_enabled;
// normal and disabled bitmaps for the tool, both can be invalid
wxBitmap m_bmpNormal;
wxBitmap m_bmpDisabled;
// the button label
wxString m_label;
// short and long help strings
wxString m_shortHelpString;
wxString m_longHelpString;
#if wxUSE_MENUS
wxMenu *m_dropdownMenu;
#endif
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarToolBase);
};
// a list of toolbar tools
WX_DECLARE_EXPORTED_LIST(wxToolBarToolBase, wxToolBarToolsList);
// ----------------------------------------------------------------------------
// the base class for all toolbars
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxToolBarBase : public wxControl
{
public:
wxToolBarBase();
virtual ~wxToolBarBase();
// toolbar construction
// --------------------
// the full AddTool() function
//
// If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap
// is created and used as the disabled image.
wxToolBarToolBase *AddTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
wxItemKind kind = wxITEM_NORMAL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return DoAddTool(toolid, label, bitmap, bmpDisabled, kind,
shortHelp, longHelp, data);
}
// the most common AddTool() version
wxToolBarToolBase *AddTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxString& shortHelp = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL)
{
return AddTool(toolid, label, bitmap, wxNullBitmap, kind, shortHelp);
}
// add a check tool, i.e. a tool which can be toggled
wxToolBarToolBase *AddCheckTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_CHECK,
shortHelp, longHelp, data);
}
// add a radio tool, i.e. a tool which can be toggled and releases any
// other toggled radio tools in the same group when it happens
wxToolBarToolBase *AddRadioTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_RADIO,
shortHelp, longHelp, data);
}
// insert the new tool at the given position, if pos == GetToolsCount(), it
// is equivalent to AddTool()
virtual wxToolBarToolBase *InsertTool
(
size_t pos,
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
wxItemKind kind = wxITEM_NORMAL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *clientData = NULL
);
virtual wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
virtual wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
// add an arbitrary control to the toolbar (notice that the control will be
// deleted by the toolbar and that it will also adjust its position/size)
//
// the label is optional and, if specified, will be shown near the control
// NB: the control should have toolbar as its parent
virtual wxToolBarToolBase *
AddControl(wxControl *control, const wxString& label = wxEmptyString);
virtual wxToolBarToolBase *
InsertControl(size_t pos, wxControl *control,
const wxString& label = wxEmptyString);
// get the control with the given id or return NULL
virtual wxControl *FindControl( int toolid );
// add a separator to the toolbar
virtual wxToolBarToolBase *AddSeparator();
virtual wxToolBarToolBase *InsertSeparator(size_t pos);
// add a stretchable space to the toolbar: this is similar to a separator
// except that it's always blank and that all the extra space the toolbar
// has is [equally] distributed among the stretchable spaces in it
virtual wxToolBarToolBase *AddStretchableSpace();
virtual wxToolBarToolBase *InsertStretchableSpace(size_t pos);
// remove the tool from the toolbar: the caller is responsible for actually
// deleting the pointer
virtual wxToolBarToolBase *RemoveTool(int toolid);
// delete tool either by index or by position
virtual bool DeleteToolByPos(size_t pos);
virtual bool DeleteTool(int toolid);
// delete all tools
virtual void ClearTools();
// must be called after all buttons have been created to finish toolbar
// initialisation
//
// derived class versions should call the base one first, before doing
// platform-specific stuff
virtual bool Realize();
// tools state
// -----------
virtual void EnableTool(int toolid, bool enable);
virtual void ToggleTool(int toolid, bool toggle);
// Set this to be togglable (or not)
virtual void SetToggle(int toolid, bool toggle);
// set/get tools client data (not for controls)
virtual wxObject *GetToolClientData(int toolid) const;
virtual void SetToolClientData(int toolid, wxObject *clientData);
// returns tool pos, or wxNOT_FOUND if tool isn't found
virtual int GetToolPos(int id) const;
// return true if the tool is toggled
virtual bool GetToolState(int toolid) const;
virtual bool GetToolEnabled(int toolid) const;
virtual void SetToolShortHelp(int toolid, const wxString& helpString);
virtual wxString GetToolShortHelp(int toolid) const;
virtual void SetToolLongHelp(int toolid, const wxString& helpString);
virtual wxString GetToolLongHelp(int toolid) const;
virtual void SetToolNormalBitmap(int WXUNUSED(id),
const wxBitmap& WXUNUSED(bitmap)) {}
virtual void SetToolDisabledBitmap(int WXUNUSED(id),
const wxBitmap& WXUNUSED(bitmap)) {}
// margins/packing/separation
// --------------------------
virtual void SetMargins(int x, int y);
void SetMargins(const wxSize& size)
{ SetMargins((int) size.x, (int) size.y); }
virtual void SetToolPacking(int packing)
{ m_toolPacking = packing; }
virtual void SetToolSeparation(int separation)
{ m_toolSeparation = separation; }
virtual wxSize GetToolMargins() const { return wxSize(m_xMargin, m_yMargin); }
virtual int GetToolPacking() const { return m_toolPacking; }
virtual int GetToolSeparation() const { return m_toolSeparation; }
// toolbar geometry
// ----------------
// set the number of toolbar rows
virtual void SetRows(int nRows);
// the toolbar can wrap - limit the number of columns or rows it may take
void SetMaxRowsCols(int rows, int cols)
{ m_maxRows = rows; m_maxCols = cols; }
int GetMaxRows() const { return m_maxRows; }
int GetMaxCols() const { return m_maxCols; }
// get/set the size of the bitmaps used by the toolbar: should be called
// before adding any tools to the toolbar
virtual void SetToolBitmapSize(const wxSize& size)
{ m_defaultWidth = size.x; m_defaultHeight = size.y; }
virtual wxSize GetToolBitmapSize() const
{ return wxSize(m_defaultWidth, m_defaultHeight); }
// the button size in some implementations is bigger than the bitmap size:
// get the total button size (by default the same as bitmap size)
virtual wxSize GetToolSize() const
{ return GetToolBitmapSize(); }
// returns a (non separator) tool containing the point (x, y) or NULL if
// there is no tool at this point (coordinates are client)
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x,
wxCoord y) const = 0;
// find the tool by id
wxToolBarToolBase *FindById(int toolid) const;
// return true if this is a vertical toolbar, otherwise false
bool IsVertical() const;
// these methods allow to access tools by their index in the toolbar
size_t GetToolsCount() const { return m_tools.GetCount(); }
wxToolBarToolBase *GetToolByPos(int pos) { return m_tools[pos]; }
const wxToolBarToolBase *GetToolByPos(int pos) const { return m_tools[pos]; }
#if WXWIN_COMPATIBILITY_2_8
// the old versions of the various methods kept for compatibility
// don't use in the new code!
// --------------------------------------------------------------
wxDEPRECATED_INLINE(
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
bool toggle = false,
wxObject *clientData = NULL,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
,
return AddTool(toolid, wxEmptyString,
bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelpString, longHelpString, clientData);
)
wxDEPRECATED_INLINE(
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
,
return AddTool(toolid, wxEmptyString,
bitmap, wxNullBitmap, wxITEM_NORMAL,
shortHelpString, longHelpString, NULL);
)
wxDEPRECATED_INLINE(
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
bool toggle,
wxCoord xPos,
wxCoord yPos = wxDefaultCoord,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
,
return DoAddTool(toolid, wxEmptyString, bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelp, longHelp, clientData, xPos, yPos);
)
wxDEPRECATED_INLINE(
wxToolBarToolBase *InsertTool(size_t pos,
int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
bool toggle = false,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
,
return InsertTool(pos, toolid, wxEmptyString, bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelp, longHelp, clientData);
)
#endif // WXWIN_COMPATIBILITY_2_8
// event handlers
// --------------
// NB: these functions are deprecated, use EVT_TOOL_XXX() instead!
// Only allow toggle if returns true. Call when left button up.
virtual bool OnLeftClick(int toolid, bool toggleDown);
// Call when right button down.
virtual void OnRightClick(int toolid, long x, long y);
// Called when the mouse cursor enters a tool bitmap.
// Argument is wxID_ANY if mouse is exiting the toolbar.
virtual void OnMouseEnter(int toolid);
// more deprecated functions
// -------------------------
// use GetToolMargins() instead
wxSize GetMargins() const { return GetToolMargins(); }
// Tool factories,
// helper functions to create toolbar tools
// -------------------------
virtual wxToolBarToolBase *CreateTool(int toolid,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled = wxNullBitmap,
wxItemKind kind = wxITEM_NORMAL,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString) = 0;
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label) = 0;
// this one is not virtual but just a simple helper/wrapper around
// CreateTool() for separators
wxToolBarToolBase *CreateSeparator()
{
return CreateTool(wxID_SEPARATOR,
wxEmptyString,
wxNullBitmap, wxNullBitmap,
wxITEM_SEPARATOR, NULL,
wxEmptyString, wxEmptyString);
}
// implementation only from now on
// -------------------------------
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE) wxOVERRIDE ;
// don't want toolbars to accept the focus
virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
#if wxUSE_MENUS
// Set dropdown menu
bool SetDropdownMenu(int toolid, wxMenu *menu);
#endif
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
// to implement in derived classes
// -------------------------------
// create a new toolbar tool and add it to the toolbar, this is typically
// implemented by just calling InsertTool()
virtual wxToolBarToolBase *DoAddTool
(
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
wxItemKind kind,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *clientData = NULL,
wxCoord xPos = wxDefaultCoord,
wxCoord yPos = wxDefaultCoord
);
// the tool is not yet inserted into m_tools list when this function is
// called and will only be added to it if this function succeeds
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) = 0;
// the tool is still in m_tools list when this function is called, it will
// only be deleted from it if it succeeds
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) = 0;
// called when the tools enabled flag changes
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) = 0;
// called when the tool is toggled
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) = 0;
// called when the tools "can be toggled" flag changes
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) = 0;
// helper functions
// ----------------
// call this from derived class ctor/Create() to ensure that we have either
// wxTB_HORIZONTAL or wxTB_VERTICAL style, there is a lot of existing code
// which randomly checks either one or the other of them and gets confused
// if neither is set (and making one of them 0 is not an option neither as
// then the existing tests would break down)
void FixupStyle();
// un-toggle all buttons in the same radio group
void UnToggleRadioGroup(wxToolBarToolBase *tool);
// make the size of the buttons big enough to fit the largest bitmap size
void AdjustToolBitmapSize();
// calls InsertTool() and deletes the tool if inserting it failed
wxToolBarToolBase *DoInsertNewTool(size_t pos, wxToolBarToolBase *tool)
{
if ( !InsertTool(pos, tool) )
{
delete tool;
return NULL;
}
return tool;
}
// the list of all our tools
wxToolBarToolsList m_tools;
// the offset of the first tool
int m_xMargin;
int m_yMargin;
// the maximum number of toolbar rows/columns
int m_maxRows;
int m_maxCols;
// the tool packing and separation
int m_toolPacking,
m_toolSeparation;
// the size of the toolbar bitmaps
wxCoord m_defaultWidth, m_defaultHeight;
private:
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxToolBarBase);
};
// deprecated function for creating the image for disabled buttons, use
// wxImage::ConvertToGreyscale() instead
#if WXWIN_COMPATIBILITY_2_8
wxDEPRECATED( bool wxCreateGreyedImage(const wxImage& in, wxImage& out) );
#endif // WXWIN_COMPATIBILITY_2_8
#endif // wxUSE_TOOLBAR
#endif
// _WX_TBARBASE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/control.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/control.h
// Purpose: wxControl common interface
// Author: Vadim Zeitlin
// Modified by:
// Created: 26.07.99
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONTROL_H_BASE_
#define _WX_CONTROL_H_BASE_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_CONTROLS
#include "wx/window.h" // base class
#include "wx/gdicmn.h" // wxEllipsize...
extern WXDLLIMPEXP_DATA_CORE(const char) wxControlNameStr[];
// ----------------------------------------------------------------------------
// wxControl is the base class for all controls
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxControlBase : public wxWindow
{
public:
wxControlBase() { }
virtual ~wxControlBase();
// Create() function adds the validator parameter
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr);
// get the control alignment (left/right/centre, top/bottom/centre)
int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
// set label with mnemonics
virtual void SetLabel(const wxString& label) wxOVERRIDE
{
m_labelOrig = label;
InvalidateBestSize();
wxWindow::SetLabel(label);
}
// return the original string, as it was passed to SetLabel()
// (i.e. with wx-style mnemonics)
virtual wxString GetLabel() const wxOVERRIDE { return m_labelOrig; }
// set label text (mnemonics will be escaped)
virtual void SetLabelText(const wxString& text)
{
SetLabel(EscapeMnemonics(text));
}
// get just the text of the label, without mnemonic characters ('&')
virtual wxString GetLabelText() const { return GetLabelText(GetLabel()); }
#if wxUSE_MARKUP
// Set the label with markup (and mnemonics). Markup is a simple subset of
// HTML with tags such as <b>, <i> and <span>. By default it is not
// supported i.e. all the markup is simply stripped and SetLabel() is
// called but some controls in some ports do support this already and in
// the future most of them should.
//
// Notice that, being HTML-like, markup also supports XML entities so '<'
// should be encoded as "<" and so on, a bare '<' in the input will
// likely result in an error. As an exception, a bare '&' is allowed and
// indicates that the next character is a mnemonic. To insert a literal '&'
// in the control you need to use "&" in the input string.
//
// Returns true if the label was set, even if the markup in it was ignored.
// False is only returned if we failed to parse the label.
bool SetLabelMarkup(const wxString& markup)
{
return DoSetLabelMarkup(markup);
}
#endif // wxUSE_MARKUP
// controls by default inherit the colours of their parents, if a
// particular control class doesn't want to do it, it can override
// ShouldInheritColours() to return false
virtual bool ShouldInheritColours() const wxOVERRIDE { return true; }
// WARNING: this doesn't work for all controls nor all platforms!
//
// simulates the event of given type (i.e. wxButton::Command() is just as
// if the button was clicked)
virtual void Command(wxCommandEvent &event);
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
// wxControl-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) wxOVERRIDE;
wxSize GetSizeFromTextSize(int xlen, int ylen = -1) const
{ return DoGetSizeFromTextSize(xlen, ylen); }
wxSize GetSizeFromTextSize(const wxSize& tsize) const
{ return DoGetSizeFromTextSize(tsize.x, tsize.y); }
// static utilities for mnemonics char (&) handling
// ------------------------------------------------
// returns the given string without mnemonic characters ('&')
static wxString GetLabelText(const wxString& label);
// returns the given string without mnemonic characters ('&')
// this function is identic to GetLabelText() and is provided for clarity
// and for symmetry with the wxStaticText::RemoveMarkup() function.
static wxString RemoveMnemonics(const wxString& str);
// escapes (by doubling them) the mnemonics
static wxString EscapeMnemonics(const wxString& str);
// miscellaneous static utilities
// ------------------------------
// replaces parts of the given (multiline) string with an ellipsis if needed
static wxString Ellipsize(const wxString& label, const wxDC& dc,
wxEllipsizeMode mode, int maxWidth,
int flags = wxELLIPSIZE_FLAGS_DEFAULT);
// return the accel index in the string or -1 if none and puts the modified
// string into second parameter if non NULL
static int FindAccelIndex(const wxString& label,
wxString *labelOnly = NULL);
// this is a helper for the derived class GetClassDefaultAttributes()
// implementation: it returns the right colours for the classes which
// contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of
// being simple controls (such as wxButton, wxCheckBox, ...)
static wxVisualAttributes
GetCompositeControlsDefaultAttributes(wxWindowVariant variant);
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE;
// creates the control (calls wxWindowBase::CreateBase inside) and adds it
// to the list of parents children
bool CreateControl(wxWindowBase *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name);
#if wxUSE_MARKUP
// This function may be overridden in the derived classes to implement
// support for labels with markup. The base class version simply strips the
// markup and calls SetLabel() with the remaining text.
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP
// override this to return the total control's size from a string size
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
// initialize the common fields of wxCommandEvent
void InitCommandEvent(wxCommandEvent& event) const;
// Ellipsize() helper:
static wxString DoEllipsizeSingleLine(const wxString& label, const wxDC& dc,
wxEllipsizeMode mode, int maxWidth,
int replacementWidth);
#if wxUSE_MARKUP
// Remove markup from the given string, returns empty string on error i.e.
// if markup was syntactically invalid.
static wxString RemoveMarkup(const wxString& markup);
#endif // wxUSE_MARKUP
// this field contains the label in wx format, i.e. with '&' mnemonics,
// as it was passed to the last SetLabel() call
wxString m_labelOrig;
wxDECLARE_NO_COPY_CLASS(wxControlBase);
};
// ----------------------------------------------------------------------------
// include platform-dependent wxControl declarations
// ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__)
#include "wx/univ/control.h"
#elif defined(__WXMSW__)
#include "wx/msw/control.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/control.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/control.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/control.h"
#elif defined(__WXMAC__)
#include "wx/osx/control.h"
#elif defined(__WXQT__)
#include "wx/qt/control.h"
#endif
#endif // wxUSE_CONTROLS
#endif
// _WX_CONTROL_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/time.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/time.h
// Purpose: Miscellaneous time-related functions.
// Author: Vadim Zeitlin
// Created: 2011-11-26
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TIME_H_
#define _WX_TIME_H_
#include "wx/longlong.h"
// Returns the difference between UTC and local time in seconds.
WXDLLIMPEXP_BASE int wxGetTimeZone();
// Get number of seconds since local time 00:00:00 Jan 1st 1970.
extern long WXDLLIMPEXP_BASE wxGetLocalTime();
// Get number of seconds since GMT 00:00:00, Jan 1st 1970.
extern long WXDLLIMPEXP_BASE wxGetUTCTime();
#if wxUSE_LONGLONG
typedef wxLongLong wxMilliClock_t;
inline long wxMilliClockToLong(wxLongLong ll) { return ll.ToLong(); }
#else
typedef double wxMilliClock_t;
inline long wxMilliClockToLong(double d) { return wx_truncate_cast(long, d); }
#endif // wxUSE_LONGLONG
// Get number of milliseconds since local time 00:00:00 Jan 1st 1970
extern wxMilliClock_t WXDLLIMPEXP_BASE wxGetLocalTimeMillis();
#if wxUSE_LONGLONG
// Get the number of milliseconds or microseconds since the Epoch.
wxLongLong WXDLLIMPEXP_BASE wxGetUTCTimeMillis();
wxLongLong WXDLLIMPEXP_BASE wxGetUTCTimeUSec();
#endif // wxUSE_LONGLONG
#define wxGetCurrentTime() wxGetLocalTime()
// on some really old systems gettimeofday() doesn't have the second argument,
// define wxGetTimeOfDay() to hide this difference
#ifdef HAVE_GETTIMEOFDAY
#ifdef WX_GETTIMEOFDAY_NO_TZ
#define wxGetTimeOfDay(tv) gettimeofday(tv)
#else
#define wxGetTimeOfDay(tv) gettimeofday((tv), NULL)
#endif
#endif // HAVE_GETTIMEOFDAY
/* Two wrapper functions for thread safety */
#ifdef HAVE_LOCALTIME_R
#define wxLocaltime_r localtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__)
// On Windows, localtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
#endif
#endif
#ifdef HAVE_GMTIME_R
#define wxGmtime_r gmtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__)
// On Windows, gmtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
#endif
#endif
#endif // _WX_TIME_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/fdrepdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/fdrepdlg.h
// Purpose: wxFindReplaceDialog class
// Author: Markus Greither and Vadim Zeitlin
// Modified by:
// Created: 23/03/2001
// Copyright: (c) Markus Greither
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FINDREPLACEDLG_H_
#define _WX_FINDREPLACEDLG_H_
#include "wx/defs.h"
#if wxUSE_FINDREPLDLG
#include "wx/dialog.h"
class WXDLLIMPEXP_FWD_CORE wxFindDialogEvent;
class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialog;
class WXDLLIMPEXP_FWD_CORE wxFindReplaceData;
class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialogImpl;
// ----------------------------------------------------------------------------
// Flags for wxFindReplaceData.Flags
// ----------------------------------------------------------------------------
// flages used by wxFindDialogEvent::GetFlags()
enum wxFindReplaceFlags
{
// downward search/replace selected (otherwise - upwards)
wxFR_DOWN = 1,
// whole word search/replace selected
wxFR_WHOLEWORD = 2,
// case sensitive search/replace selected (otherwise - case insensitive)
wxFR_MATCHCASE = 4
};
// these flags can be specified in wxFindReplaceDialog ctor or Create()
enum wxFindReplaceDialogStyles
{
// replace dialog (otherwise find dialog)
wxFR_REPLACEDIALOG = 1,
// don't allow changing the search direction
wxFR_NOUPDOWN = 2,
// don't allow case sensitive searching
wxFR_NOMATCHCASE = 4,
// don't allow whole word searching
wxFR_NOWHOLEWORD = 8
};
// ----------------------------------------------------------------------------
// wxFindReplaceData: holds Setup Data/Feedback Data for wxFindReplaceDialog
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFindReplaceData : public wxObject
{
public:
wxFindReplaceData() { Init(); }
wxFindReplaceData(wxUint32 flags) { Init(); SetFlags(flags); }
// accessors
const wxString& GetFindString() const { return m_FindWhat; }
const wxString& GetReplaceString() const { return m_ReplaceWith; }
int GetFlags() const { return m_Flags; }
// setters: may only be called before showing the dialog, no effect later
void SetFlags(wxUint32 flags) { m_Flags = flags; }
void SetFindString(const wxString& str) { m_FindWhat = str; }
void SetReplaceString(const wxString& str) { m_ReplaceWith = str; }
protected:
void Init();
private:
wxUint32 m_Flags;
wxString m_FindWhat,
m_ReplaceWith;
friend class wxFindReplaceDialogBase;
};
// ----------------------------------------------------------------------------
// wxFindReplaceDialogBase
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFindReplaceDialogBase : public wxDialog
{
public:
// ctors and such
wxFindReplaceDialogBase() { m_FindReplaceData = NULL; }
wxFindReplaceDialogBase(wxWindow * WXUNUSED(parent),
wxFindReplaceData *data,
const wxString& WXUNUSED(title),
int WXUNUSED(style) = 0)
{
m_FindReplaceData = data;
}
virtual ~wxFindReplaceDialogBase();
// find dialog data access
const wxFindReplaceData *GetData() const { return m_FindReplaceData; }
void SetData(wxFindReplaceData *data) { m_FindReplaceData = data; }
// implementation only, don't use
void Send(wxFindDialogEvent& event);
protected:
wxFindReplaceData *m_FindReplaceData;
// the last string we searched for
wxString m_lastSearch;
wxDECLARE_NO_COPY_CLASS(wxFindReplaceDialogBase);
};
// include wxFindReplaceDialog declaration
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/fdrepdlg.h"
#else
#define wxGenericFindReplaceDialog wxFindReplaceDialog
#include "wx/generic/fdrepdlg.h"
#endif
// ----------------------------------------------------------------------------
// wxFindReplaceDialog events
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFindDialogEvent : public wxCommandEvent
{
public:
wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
: wxCommandEvent(commandType, id) { }
wxFindDialogEvent(const wxFindDialogEvent& event)
: wxCommandEvent(event), m_strReplace(event.m_strReplace) { }
int GetFlags() const { return GetInt(); }
wxString GetFindString() const { return GetString(); }
const wxString& GetReplaceString() const { return m_strReplace; }
wxFindReplaceDialog *GetDialog() const
{ return wxStaticCast(GetEventObject(), wxFindReplaceDialog); }
// implementation only
void SetFlags(int flags) { SetInt(flags); }
void SetFindString(const wxString& str) { SetString(str); }
void SetReplaceString(const wxString& str) { m_strReplace = str; }
virtual wxEvent *Clone() const wxOVERRIDE { return new wxFindDialogEvent(*this); }
private:
wxString m_strReplace;
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFindDialogEvent);
};
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND, wxFindDialogEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_NEXT, wxFindDialogEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE, wxFindDialogEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE_ALL, wxFindDialogEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_CLOSE, wxFindDialogEvent );
typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&);
#define wxFindDialogEventHandler(func) \
wxEVENT_HANDLER_CAST(wxFindDialogEventFunction, func)
#define EVT_FIND(id, fn) \
wx__DECLARE_EVT1(wxEVT_FIND, id, wxFindDialogEventHandler(fn))
#define EVT_FIND_NEXT(id, fn) \
wx__DECLARE_EVT1(wxEVT_FIND_NEXT, id, wxFindDialogEventHandler(fn))
#define EVT_FIND_REPLACE(id, fn) \
wx__DECLARE_EVT1(wxEVT_FIND_REPLACE, id, wxFindDialogEventHandler(fn))
#define EVT_FIND_REPLACE_ALL(id, fn) \
wx__DECLARE_EVT1(wxEVT_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn))
#define EVT_FIND_CLOSE(id, fn) \
wx__DECLARE_EVT1(wxEVT_FIND_CLOSE, id, wxFindDialogEventHandler(fn))
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_FIND wxEVT_FIND
#define wxEVT_COMMAND_FIND_NEXT wxEVT_FIND_NEXT
#define wxEVT_COMMAND_FIND_REPLACE wxEVT_FIND_REPLACE
#define wxEVT_COMMAND_FIND_REPLACE_ALL wxEVT_FIND_REPLACE_ALL
#define wxEVT_COMMAND_FIND_CLOSE wxEVT_FIND_CLOSE
#endif // wxUSE_FINDREPLDLG
#endif
// _WX_FDREPDLG_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/chkconf.h | /*
* Name: wx/chkconf.h
* Purpose: check the config settings for consistency
* Author: Vadim Zeitlin
* Modified by:
* Created: 09.08.00
* Copyright: (c) 2000 Vadim Zeitlin <[email protected]>
* Licence: wxWindows licence
*/
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
#ifndef _WX_CHKCONF_H_
#define _WX_CHKCONF_H_
/*
**************************************************
PLEASE READ THIS IF YOU GET AN ERROR IN THIS FILE!
**************************************************
If you get an error saying "wxUSE_FOO must be defined", it means that you
are not using the correct up-to-date version of setup.h. This happens most
often when using git or snapshots and a new symbol was added to setup0.h
and you haven't updated your local setup.h to reflect it. If this is the
case, you need to propagate the changes from setup0.h to your setup.h and,
if using makefiles under MSW, also remove setup.h under the build directory
(lib/$(COMPILER)_{lib,dll}/msw[u][d][dll]/wx) so that the new setup.h is
copied there.
If you get an error of the form "wxFoo requires wxBar", then the settings
in your setup.h are inconsistent. You have the choice between correcting
them manually or commenting out #define wxABORT_ON_CONFIG_ERROR below to
try to correct the problems automatically (not really recommended but
might work).
*/
/*
This file has the following sections:
1. checks that all wxUSE_XXX symbols we use are defined
a) first the non-GUI ones
b) then the GUI-only ones
2. platform-specific checks done in the platform headers
3. generic consistency checks
a) first the non-GUI ones
b) then the GUI-only ones
*/
/*
this global setting determines what should we do if the setting FOO
requires BAR and BAR is not set: we can either silently unset FOO as well
(do this if you're trying to build the smallest possible library) or give an
error and abort (default as leads to least surprising behaviour)
*/
#define wxABORT_ON_CONFIG_ERROR
/*
global features
*/
/*
If we're compiling without support for threads/exceptions we have to
disable the corresponding features.
*/
#ifdef wxNO_THREADS
# undef wxUSE_THREADS
# define wxUSE_THREADS 0
#endif /* wxNO_THREADS */
#ifdef wxNO_EXCEPTIONS
# undef wxUSE_EXCEPTIONS
# define wxUSE_EXCEPTIONS 0
#endif /* wxNO_EXCEPTIONS */
/* we also must disable exceptions if compiler doesn't support them */
#if defined(_MSC_VER) && !defined(_CPPUNWIND)
# undef wxUSE_EXCEPTIONS
# define wxUSE_EXCEPTIONS 0
#endif /* VC++ without exceptions support */
/*
Section 1a: tests for non GUI features.
please keep the options in alphabetical order!
*/
#ifndef wxUSE_ANY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ANY must be defined, please read comment near the top of this file."
# else
# define wxUSE_ANY 0
# endif
#endif /* wxUSE_ANY */
#ifndef wxUSE_COMPILER_TLS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
# else
# define wxUSE_COMPILER_TLS 0
# endif
#endif /* !defined(wxUSE_COMPILER_TLS) */
#ifndef wxUSE_CONSOLE_EVENTLOOP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
# else
# define wxUSE_CONSOLE_EVENTLOOP 0
# endif
#endif /* !defined(wxUSE_CONSOLE_EVENTLOOP) */
#ifndef wxUSE_DYNLIB_CLASS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
# else
# define wxUSE_DYNLIB_CLASS 0
# endif
#endif /* !defined(wxUSE_DYNLIB_CLASS) */
#ifndef wxUSE_EXCEPTIONS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
# else
# define wxUSE_EXCEPTIONS 0
# endif
#endif /* !defined(wxUSE_EXCEPTIONS) */
#ifndef wxUSE_FILE_HISTORY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
# else
# define wxUSE_FILE_HISTORY 0
# endif
#endif /* !defined(wxUSE_FILE_HISTORY) */
#ifndef wxUSE_FILESYSTEM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
# else
# define wxUSE_FILESYSTEM 0
# endif
#endif /* !defined(wxUSE_FILESYSTEM) */
#ifndef wxUSE_FS_ARCHIVE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
# else
# define wxUSE_FS_ARCHIVE 0
# endif
#endif /* !defined(wxUSE_FS_ARCHIVE) */
#ifndef wxUSE_FSVOLUME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
# else
# define wxUSE_FSVOLUME 0
# endif
#endif /* !defined(wxUSE_FSVOLUME) */
#ifndef wxUSE_FSWATCHER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
# else
# define wxUSE_FSWATCHER 0
# endif
#endif /* !defined(wxUSE_FSWATCHER) */
#ifndef wxUSE_DYNAMIC_LOADER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
# else
# define wxUSE_DYNAMIC_LOADER 0
# endif
#endif /* !defined(wxUSE_DYNAMIC_LOADER) */
#ifndef wxUSE_INTL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_INTL must be defined, please read comment near the top of this file."
# else
# define wxUSE_INTL 0
# endif
#endif /* !defined(wxUSE_INTL) */
#ifndef wxUSE_IPV6
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
# else
# define wxUSE_IPV6 0
# endif
#endif /* !defined(wxUSE_IPV6) */
#ifndef wxUSE_LOG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOG must be defined, please read comment near the top of this file."
# else
# define wxUSE_LOG 0
# endif
#endif /* !defined(wxUSE_LOG) */
#ifndef wxUSE_LONGLONG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
# else
# define wxUSE_LONGLONG 0
# endif
#endif /* !defined(wxUSE_LONGLONG) */
#ifndef wxUSE_MIMETYPE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
# else
# define wxUSE_MIMETYPE 0
# endif
#endif /* !defined(wxUSE_MIMETYPE) */
#ifndef wxUSE_ON_FATAL_EXCEPTION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
# else
# define wxUSE_ON_FATAL_EXCEPTION 0
# endif
#endif /* !defined(wxUSE_ON_FATAL_EXCEPTION) */
#ifndef wxUSE_PRINTF_POS_PARAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
# else
# define wxUSE_PRINTF_POS_PARAMS 0
# endif
#endif /* !defined(wxUSE_PRINTF_POS_PARAMS) */
#ifndef wxUSE_PROTOCOL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
# else
# define wxUSE_PROTOCOL 0
# endif
#endif /* !defined(wxUSE_PROTOCOL) */
/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
#if !wxUSE_PROTOCOL
# undef wxUSE_PROTOCOL_HTTP
# undef wxUSE_PROTOCOL_FTP
# undef wxUSE_PROTOCOL_FILE
# define wxUSE_PROTOCOL_HTTP 0
# define wxUSE_PROTOCOL_FTP 0
# define wxUSE_PROTOCOL_FILE 0
#endif /* wxUSE_PROTOCOL */
#ifndef wxUSE_PROTOCOL_HTTP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL_HTTP must be defined, please read comment near the top of this file."
# else
# define wxUSE_PROTOCOL_HTTP 0
# endif
#endif /* !defined(wxUSE_PROTOCOL_HTTP) */
#ifndef wxUSE_PROTOCOL_FTP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL_FTP must be defined, please read comment near the top of this file."
# else
# define wxUSE_PROTOCOL_FTP 0
# endif
#endif /* !defined(wxUSE_PROTOCOL_FTP) */
#ifndef wxUSE_PROTOCOL_FILE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL_FILE must be defined, please read comment near the top of this file."
# else
# define wxUSE_PROTOCOL_FILE 0
# endif
#endif /* !defined(wxUSE_PROTOCOL_FILE) */
#ifndef wxUSE_REGEX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_REGEX must be defined, please read comment near the top of this file."
# else
# define wxUSE_REGEX 0
# endif
#endif /* !defined(wxUSE_REGEX) */
#ifndef wxUSE_SECRETSTORE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SECRETSTORE must be defined, please read comment near the top of this file."
# else
# define wxUSE_SECRETSTORE 1
# endif
#endif /* !defined(wxUSE_SECRETSTORE) */
#ifndef wxUSE_STDPATHS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
# else
# define wxUSE_STDPATHS 1
# endif
#endif /* !defined(wxUSE_STDPATHS) */
#ifndef wxUSE_XML
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_XML must be defined, please read comment near the top of this file."
# else
# define wxUSE_XML 0
# endif
#endif /* !defined(wxUSE_XML) */
#ifndef wxUSE_SOCKETS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
# else
# define wxUSE_SOCKETS 0
# endif
#endif /* !defined(wxUSE_SOCKETS) */
#ifndef wxUSE_STD_CONTAINERS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_CONTAINERS 0
# endif
#endif /* !defined(wxUSE_STD_CONTAINERS) */
#ifndef wxUSE_STD_CONTAINERS_COMPATIBLY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_CONTAINERS_COMPATIBLY must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_CONTAINERS_COMPATIBLY 0
# endif
#endif /* !defined(wxUSE_STD_CONTAINERS_COMPATIBLY) */
#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_STRING_CONV_IN_WXSTRING 0
# endif
#endif /* !defined(wxUSE_STD_STRING_CONV_IN_WXSTRING) */
#ifndef wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
# else
# define wxUSE_STREAMS 0
# endif
#endif /* !defined(wxUSE_STREAMS) */
#ifndef wxUSE_STOPWATCH
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
# else
# define wxUSE_STOPWATCH 0
# endif
#endif /* !defined(wxUSE_STOPWATCH) */
#ifndef wxUSE_TEXTBUFFER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
# else
# define wxUSE_TEXTBUFFER 0
# endif
#endif /* !defined(wxUSE_TEXTBUFFER) */
#ifndef wxUSE_TEXTFILE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
# else
# define wxUSE_TEXTFILE 0
# endif
#endif /* !defined(wxUSE_TEXTFILE) */
#ifndef wxUSE_UNICODE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UNICODE must be defined, please read comment near the top of this file."
# else
# define wxUSE_UNICODE 0
# endif
#endif /* !defined(wxUSE_UNICODE) */
#ifndef wxUSE_UNSAFE_WXSTRING_CONV
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UNSAFE_WXSTRING_CONV must be defined, please read comment near the top of this file."
# else
# define wxUSE_UNSAFE_WXSTRING_CONV 0
# endif
#endif /* !defined(wxUSE_UNSAFE_WXSTRING_CONV) */
#ifndef wxUSE_URL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_URL must be defined, please read comment near the top of this file."
# else
# define wxUSE_URL 0
# endif
#endif /* !defined(wxUSE_URL) */
#ifndef wxUSE_VARIANT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
# else
# define wxUSE_VARIANT 0
# endif
#endif /* wxUSE_VARIANT */
#ifndef wxUSE_XLOCALE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
# else
# define wxUSE_XLOCALE 0
# endif
#endif /* !defined(wxUSE_XLOCALE) */
/*
Section 1b: all these tests are for GUI only.
please keep the options in alphabetical order!
*/
#if wxUSE_GUI
/*
all of the settings tested below must be defined or we'd get an error from
preprocessor about invalid integer expression
*/
#ifndef wxUSE_ABOUTDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ABOUTDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_ABOUTDLG 0
# endif
#endif /* !defined(wxUSE_ABOUTDLG) */
#ifndef wxUSE_ACCEL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACCEL must be defined, please read comment near the top of this file."
# else
# define wxUSE_ACCEL 0
# endif
#endif /* !defined(wxUSE_ACCEL) */
#ifndef wxUSE_ACCESSIBILITY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACCESSIBILITY must be defined, please read comment near the top of this file."
# else
# define wxUSE_ACCESSIBILITY 0
# endif
#endif /* !defined(wxUSE_ACCESSIBILITY) */
#ifndef wxUSE_ADDREMOVECTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ADDREMOVECTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_ADDREMOVECTRL 0
# endif
#endif /* !defined(wxUSE_ADDREMOVECTRL) */
#ifndef wxUSE_ACTIVITYINDICATOR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACTIVITYINDICATOR must be defined, please read comment near the top of this file."
# else
# define wxUSE_ACTIVITYINDICATOR 0
# endif
#endif /* !defined(wxUSE_ACTIVITYINDICATOR) */
#ifndef wxUSE_ANIMATIONCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ANIMATIONCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_ANIMATIONCTRL 0
# endif
#endif /* !defined(wxUSE_ANIMATIONCTRL) */
#ifndef wxUSE_ARTPROVIDER_STD
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ARTPROVIDER_STD must be defined, please read comment near the top of this file."
# else
# define wxUSE_ARTPROVIDER_STD 0
# endif
#endif /* !defined(wxUSE_ARTPROVIDER_STD) */
#ifndef wxUSE_ARTPROVIDER_TANGO
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ARTPROVIDER_TANGO must be defined, please read comment near the top of this file."
# else
# define wxUSE_ARTPROVIDER_TANGO 0
# endif
#endif /* !defined(wxUSE_ARTPROVIDER_TANGO) */
#ifndef wxUSE_AUTOID_MANAGEMENT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_AUTOID_MANAGEMENT must be defined, please read comment near the top of this file."
# else
# define wxUSE_AUTOID_MANAGEMENT 0
# endif
#endif /* !defined(wxUSE_AUTOID_MANAGEMENT) */
#ifndef wxUSE_BITMAPCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_BITMAPCOMBOBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_BITMAPCOMBOBOX 0
# endif
#endif /* !defined(wxUSE_BITMAPCOMBOBOX) */
#ifndef wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_BMPBUTTON must be defined, please read comment near the top of this file."
# else
# define wxUSE_BMPBUTTON 0
# endif
#endif /* !defined(wxUSE_BMPBUTTON) */
#ifndef wxUSE_BUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_BUTTON must be defined, please read comment near the top of this file."
# else
# define wxUSE_BUTTON 0
# endif
#endif /* !defined(wxUSE_BUTTON) */
#ifndef wxUSE_CAIRO
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CAIRO must be defined, please read comment near the top of this file."
# else
# define wxUSE_CAIRO 0
# endif
#endif /* !defined(wxUSE_CAIRO) */
#ifndef wxUSE_CALENDARCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CALENDARCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_CALENDARCTRL 0
# endif
#endif /* !defined(wxUSE_CALENDARCTRL) */
#ifndef wxUSE_CARET
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CARET must be defined, please read comment near the top of this file."
# else
# define wxUSE_CARET 0
# endif
#endif /* !defined(wxUSE_CARET) */
#ifndef wxUSE_CHECKBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CHECKBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_CHECKBOX 0
# endif
#endif /* !defined(wxUSE_CHECKBOX) */
#ifndef wxUSE_CHECKLISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CHECKLISTBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_CHECKLISTBOX 0
# endif
#endif /* !defined(wxUSE_CHECKLISTBOX) */
#ifndef wxUSE_CHOICE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CHOICE must be defined, please read comment near the top of this file."
# else
# define wxUSE_CHOICE 0
# endif
#endif /* !defined(wxUSE_CHOICE) */
#ifndef wxUSE_CHOICEBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CHOICEBOOK must be defined, please read comment near the top of this file."
# else
# define wxUSE_CHOICEBOOK 0
# endif
#endif /* !defined(wxUSE_CHOICEBOOK) */
#ifndef wxUSE_CHOICEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CHOICEDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_CHOICEDLG 0
# endif
#endif /* !defined(wxUSE_CHOICEDLG) */
#ifndef wxUSE_CLIPBOARD
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CLIPBOARD must be defined, please read comment near the top of this file."
# else
# define wxUSE_CLIPBOARD 0
# endif
#endif /* !defined(wxUSE_CLIPBOARD) */
#ifndef wxUSE_COLLPANE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COLLPANE must be defined, please read comment near the top of this file."
# else
# define wxUSE_COLLPANE 0
# endif
#endif /* !defined(wxUSE_COLLPANE) */
#ifndef wxUSE_COLOURDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COLOURDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_COLOURDLG 0
# endif
#endif /* !defined(wxUSE_COLOURDLG) */
#ifndef wxUSE_COLOURPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COLOURPICKERCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_COLOURPICKERCTRL 0
# endif
#endif /* !defined(wxUSE_COLOURPICKERCTRL) */
#ifndef wxUSE_COMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMBOBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_COMBOBOX 0
# endif
#endif /* !defined(wxUSE_COMBOBOX) */
#ifndef wxUSE_COMMANDLINKBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMMANDLINKBUTTON must be defined, please read comment near the top of this file."
# else
# define wxUSE_COMMANDLINKBUTTON 0
# endif
#endif /* !defined(wxUSE_COMMANDLINKBUTTON) */
#ifndef wxUSE_COMBOCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMBOCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_COMBOCTRL 0
# endif
#endif /* !defined(wxUSE_COMBOCTRL) */
#ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DATAOBJ must be defined, please read comment near the top of this file."
# else
# define wxUSE_DATAOBJ 0
# endif
#endif /* !defined(wxUSE_DATAOBJ) */
#ifndef wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DATAVIEWCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_DATAVIEWCTRL 0
# endif
#endif /* !defined(wxUSE_DATAVIEWCTRL) */
#ifndef wxUSE_DATEPICKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DATEPICKCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_DATEPICKCTRL 0
# endif
#endif /* !defined(wxUSE_DATEPICKCTRL) */
#ifndef wxUSE_DC_TRANSFORM_MATRIX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX must be defined, please read comment near the top of this file."
# else
# define wxUSE_DC_TRANSFORM_MATRIX 1
# endif
#endif /* wxUSE_DC_TRANSFORM_MATRIX */
#ifndef wxUSE_DIRPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_DIRPICKERCTRL 0
# endif
#endif /* !defined(wxUSE_DIRPICKERCTRL) */
#ifndef wxUSE_DISPLAY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DISPLAY must be defined, please read comment near the top of this file."
# else
# define wxUSE_DISPLAY 0
# endif
#endif /* !defined(wxUSE_DISPLAY) */
#ifndef wxUSE_DOC_VIEW_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined, please read comment near the top of this file."
# else
# define wxUSE_DOC_VIEW_ARCHITECTURE 0
# endif
#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
#ifndef wxUSE_FILECTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILECTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_FILECTRL 0
# endif
#endif /* !defined(wxUSE_FILECTRL) */
#ifndef wxUSE_FILEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILEDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_FILEDLG 0
# endif
#endif /* !defined(wxUSE_FILEDLG) */
#ifndef wxUSE_FILEPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILEPICKERCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_FILEPICKERCTRL 0
# endif
#endif /* !defined(wxUSE_FILEPICKERCTRL) */
#ifndef wxUSE_FONTDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FONTDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_FONTDLG 0
# endif
#endif /* !defined(wxUSE_FONTDLG) */
#ifndef wxUSE_FONTMAP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FONTMAP must be defined, please read comment near the top of this file."
# else
# define wxUSE_FONTMAP 0
# endif
#endif /* !defined(wxUSE_FONTMAP) */
#ifndef wxUSE_FONTPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FONTPICKERCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_FONTPICKERCTRL 0
# endif
#endif /* !defined(wxUSE_FONTPICKERCTRL) */
#ifndef wxUSE_GAUGE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_GAUGE must be defined, please read comment near the top of this file."
# else
# define wxUSE_GAUGE 0
# endif
#endif /* !defined(wxUSE_GAUGE) */
#ifndef wxUSE_GRAPHICS_CONTEXT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_GRAPHICS_CONTEXT must be defined, please read comment near the top of this file."
# else
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#endif /* !defined(wxUSE_GRAPHICS_CONTEXT) */
#ifndef wxUSE_GRID
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_GRID must be defined, please read comment near the top of this file."
# else
# define wxUSE_GRID 0
# endif
#endif /* !defined(wxUSE_GRID) */
#ifndef wxUSE_HEADERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HEADERCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_HEADERCTRL 0
# endif
#endif /* !defined(wxUSE_HEADERCTRL) */
#ifndef wxUSE_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HELP must be defined, please read comment near the top of this file."
# else
# define wxUSE_HELP 0
# endif
#endif /* !defined(wxUSE_HELP) */
#ifndef wxUSE_HYPERLINKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HYPERLINKCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_HYPERLINKCTRL 0
# endif
#endif /* !defined(wxUSE_HYPERLINKCTRL) */
#ifndef wxUSE_HTML
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HTML must be defined, please read comment near the top of this file."
# else
# define wxUSE_HTML 0
# endif
#endif /* !defined(wxUSE_HTML) */
#ifndef wxUSE_LIBMSPACK
# if !defined(__UNIX__)
/* set to 0 on platforms that don't have libmspack */
# define wxUSE_LIBMSPACK 0
# else
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LIBMSPACK must be defined, please read comment near the top of this file."
# else
# define wxUSE_LIBMSPACK 0
# endif
# endif
#endif /* !defined(wxUSE_LIBMSPACK) */
#ifndef wxUSE_ICO_CUR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ICO_CUR must be defined, please read comment near the top of this file."
# else
# define wxUSE_ICO_CUR 0
# endif
#endif /* !defined(wxUSE_ICO_CUR) */
#ifndef wxUSE_IFF
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_IFF must be defined, please read comment near the top of this file."
# else
# define wxUSE_IFF 0
# endif
#endif /* !defined(wxUSE_IFF) */
#ifndef wxUSE_IMAGLIST
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_IMAGLIST must be defined, please read comment near the top of this file."
# else
# define wxUSE_IMAGLIST 0
# endif
#endif /* !defined(wxUSE_IMAGLIST) */
#ifndef wxUSE_INFOBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_INFOBAR must be defined, please read comment near the top of this file."
# else
# define wxUSE_INFOBAR 0
# endif
#endif /* !defined(wxUSE_INFOBAR) */
#ifndef wxUSE_JOYSTICK
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_JOYSTICK must be defined, please read comment near the top of this file."
# else
# define wxUSE_JOYSTICK 0
# endif
#endif /* !defined(wxUSE_JOYSTICK) */
#ifndef wxUSE_LISTBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LISTBOOK must be defined, please read comment near the top of this file."
# else
# define wxUSE_LISTBOOK 0
# endif
#endif /* !defined(wxUSE_LISTBOOK) */
#ifndef wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LISTBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_LISTBOX 0
# endif
#endif /* !defined(wxUSE_LISTBOX) */
#ifndef wxUSE_LISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LISTCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_LISTCTRL 0
# endif
#endif /* !defined(wxUSE_LISTCTRL) */
#ifndef wxUSE_LOGGUI
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOGGUI must be defined, please read comment near the top of this file."
# else
# define wxUSE_LOGGUI 0
# endif
#endif /* !defined(wxUSE_LOGGUI) */
#ifndef wxUSE_LOGWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOGWINDOW must be defined, please read comment near the top of this file."
# else
# define wxUSE_LOGWINDOW 0
# endif
#endif /* !defined(wxUSE_LOGWINDOW) */
#ifndef wxUSE_LOG_DIALOG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOG_DIALOG must be defined, please read comment near the top of this file."
# else
# define wxUSE_LOG_DIALOG 0
# endif
#endif /* !defined(wxUSE_LOG_DIALOG) */
#ifndef wxUSE_MARKUP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MARKUP must be defined, please read comment near the top of this file."
# else
# define wxUSE_MARKUP 0
# endif
#endif /* !defined(wxUSE_MARKUP) */
#ifndef wxUSE_MDI
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MDI must be defined, please read comment near the top of this file."
# else
# define wxUSE_MDI 0
# endif
#endif /* !defined(wxUSE_MDI) */
#ifndef wxUSE_MDI_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MDI_ARCHITECTURE must be defined, please read comment near the top of this file."
# else
# define wxUSE_MDI_ARCHITECTURE 0
# endif
#endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
#ifndef wxUSE_MENUS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MENUS must be defined, please read comment near the top of this file."
# else
# define wxUSE_MENUS 0
# endif
#endif /* !defined(wxUSE_MENUS) */
#ifndef wxUSE_MSGDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MSGDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_MSGDLG 0
# endif
#endif /* !defined(wxUSE_MSGDLG) */
#ifndef wxUSE_NOTEBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_NOTEBOOK must be defined, please read comment near the top of this file."
# else
# define wxUSE_NOTEBOOK 0
# endif
#endif /* !defined(wxUSE_NOTEBOOK) */
#ifndef wxUSE_NOTIFICATION_MESSAGE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_NOTIFICATION_MESSAGE must be defined, please read comment near the top of this file."
# else
# define wxUSE_NOTIFICATION_MESSAGE 0
# endif
#endif /* !defined(wxUSE_NOTIFICATION_MESSAGE) */
#ifndef wxUSE_ODCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ODCOMBOBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_ODCOMBOBOX 0
# endif
#endif /* !defined(wxUSE_ODCOMBOBOX) */
#ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PALETTE must be defined, please read comment near the top of this file."
# else
# define wxUSE_PALETTE 0
# endif
#endif /* !defined(wxUSE_PALETTE) */
#ifndef wxUSE_POPUPWIN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_POPUPWIN must be defined, please read comment near the top of this file."
# else
# define wxUSE_POPUPWIN 0
# endif
#endif /* !defined(wxUSE_POPUPWIN) */
#ifndef wxUSE_PREFERENCES_EDITOR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PREFERENCES_EDITOR must be defined, please read comment near the top of this file."
# else
# define wxUSE_PREFERENCES_EDITOR 0
# endif
#endif /* !defined(wxUSE_PREFERENCES_EDITOR) */
#ifndef wxUSE_PRIVATE_FONTS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PRIVATE_FONTS must be defined, please read comment near the top of this file."
# else
# define wxUSE_PRIVATE_FONTS 0
# endif
#endif /* !defined(wxUSE_PRIVATE_FONTS) */
#ifndef wxUSE_PRINTING_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PRINTING_ARCHITECTURE must be defined, please read comment near the top of this file."
# else
# define wxUSE_PRINTING_ARCHITECTURE 0
# endif
#endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
#ifndef wxUSE_RADIOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_RADIOBOX 0
# endif
#endif /* !defined(wxUSE_RADIOBOX) */
#ifndef wxUSE_RADIOBTN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBTN must be defined, please read comment near the top of this file."
# else
# define wxUSE_RADIOBTN 0
# endif
#endif /* !defined(wxUSE_RADIOBTN) */
#ifndef wxUSE_REARRANGECTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_REARRANGECTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_REARRANGECTRL 0
# endif
#endif /* !defined(wxUSE_REARRANGECTRL) */
#ifndef wxUSE_RIBBON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RIBBON must be defined, please read comment near the top of this file."
# else
# define wxUSE_RIBBON 0
# endif
#endif /* !defined(wxUSE_RIBBON) */
#ifndef wxUSE_RICHMSGDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RICHMSGDLG must be defined, please read comment near the top of this file."
# else
# define wxUSE_RICHMSGDLG 0
# endif
#endif /* !defined(wxUSE_RICHMSGDLG) */
#ifndef wxUSE_RICHTOOLTIP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RICHTOOLTIP must be defined, please read comment near the top of this file."
# else
# define wxUSE_RICHTOOLTIP 0
# endif
#endif /* !defined(wxUSE_RICHTOOLTIP) */
#ifndef wxUSE_SASH
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SASH must be defined, please read comment near the top of this file."
# else
# define wxUSE_SASH 0
# endif
#endif /* !defined(wxUSE_SASH) */
#ifndef wxUSE_SCROLLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SCROLLBAR must be defined, please read comment near the top of this file."
# else
# define wxUSE_SCROLLBAR 0
# endif
#endif /* !defined(wxUSE_SCROLLBAR) */
#ifndef wxUSE_SLIDER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SLIDER must be defined, please read comment near the top of this file."
# else
# define wxUSE_SLIDER 0
# endif
#endif /* !defined(wxUSE_SLIDER) */
#ifndef wxUSE_SOUND
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SOUND must be defined, please read comment near the top of this file."
# else
# define wxUSE_SOUND 0
# endif
#endif /* !defined(wxUSE_SOUND) */
#ifndef wxUSE_SPINBTN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SPINBTN must be defined, please read comment near the top of this file."
# else
# define wxUSE_SPINBTN 0
# endif
#endif /* !defined(wxUSE_SPINBTN) */
#ifndef wxUSE_SPINCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SPINCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_SPINCTRL 0
# endif
#endif /* !defined(wxUSE_SPINCTRL) */
#ifndef wxUSE_SPLASH
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SPLASH must be defined, please read comment near the top of this file."
# else
# define wxUSE_SPLASH 0
# endif
#endif /* !defined(wxUSE_SPLASH) */
#ifndef wxUSE_SPLITTER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SPLITTER must be defined, please read comment near the top of this file."
# else
# define wxUSE_SPLITTER 0
# endif
#endif /* !defined(wxUSE_SPLITTER) */
#ifndef wxUSE_STATBMP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STATBMP must be defined, please read comment near the top of this file."
# else
# define wxUSE_STATBMP 0
# endif
#endif /* !defined(wxUSE_STATBMP) */
#ifndef wxUSE_STATBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STATBOX must be defined, please read comment near the top of this file."
# else
# define wxUSE_STATBOX 0
# endif
#endif /* !defined(wxUSE_STATBOX) */
#ifndef wxUSE_STATLINE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STATLINE must be defined, please read comment near the top of this file."
# else
# define wxUSE_STATLINE 0
# endif
#endif /* !defined(wxUSE_STATLINE) */
#ifndef wxUSE_STATTEXT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STATTEXT must be defined, please read comment near the top of this file."
# else
# define wxUSE_STATTEXT 0
# endif
#endif /* !defined(wxUSE_STATTEXT) */
#ifndef wxUSE_STATUSBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STATUSBAR must be defined, please read comment near the top of this file."
# else
# define wxUSE_STATUSBAR 0
# endif
#endif /* !defined(wxUSE_STATUSBAR) */
#ifndef wxUSE_TASKBARICON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TASKBARICON must be defined, please read comment near the top of this file."
# else
# define wxUSE_TASKBARICON 0
# endif
#endif /* !defined(wxUSE_TASKBARICON) */
#ifndef wxUSE_TEXTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TEXTCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TEXTCTRL 0
# endif
#endif /* !defined(wxUSE_TEXTCTRL) */
#ifndef wxUSE_TIMEPICKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TIMEPICKCTRL 0
# endif
#endif /* !defined(wxUSE_TIMEPICKCTRL) */
#ifndef wxUSE_TIPWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file."
# else
# define wxUSE_TIPWINDOW 0
# endif
#endif /* !defined(wxUSE_TIPWINDOW) */
#ifndef wxUSE_TOOLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TOOLBAR must be defined, please read comment near the top of this file."
# else
# define wxUSE_TOOLBAR 0
# endif
#endif /* !defined(wxUSE_TOOLBAR) */
#ifndef wxUSE_TOOLTIPS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TOOLTIPS must be defined, please read comment near the top of this file."
# else
# define wxUSE_TOOLTIPS 0
# endif
#endif /* !defined(wxUSE_TOOLTIPS) */
#ifndef wxUSE_TREECTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREECTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TREECTRL 0
# endif
#endif /* !defined(wxUSE_TREECTRL) */
#ifndef wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* !defined(wxUSE_TREELISTCTRL) */
#ifndef wxUSE_UIACTIONSIMULATOR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file."
# else
# define wxUSE_UIACTIONSIMULATOR 0
# endif
#endif /* !defined(wxUSE_UIACTIONSIMULATOR) */
#ifndef wxUSE_VALIDATORS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_VALIDATORS must be defined, please read comment near the top of this file."
# else
# define wxUSE_VALIDATORS 0
# endif
#endif /* !defined(wxUSE_VALIDATORS) */
#ifndef wxUSE_WEBVIEW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW must be defined, please read comment near the top of this file."
# else
# define wxUSE_WEBVIEW 0
# endif
#endif /* !defined(wxUSE_WEBVIEW) */
#ifndef wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file."
# else
# define wxUSE_WXHTML_HELP 0
# endif
#endif /* !defined(wxUSE_WXHTML_HELP) */
#ifndef wxUSE_XRC
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_XRC must be defined, please read comment near the top of this file."
# else
# define wxUSE_XRC 0
# endif
#endif /* !defined(wxUSE_XRC) */
#endif /* wxUSE_GUI */
/*
Section 2: platform-specific checks.
This must be done after checking that everything is defined as the platform
checks use wxUSE_XXX symbols in #if tests.
*/
#if defined(__WINDOWS__)
# include "wx/msw/chkconf.h"
# if defined(__WXGTK__)
# include "wx/gtk/chkconf.h"
# endif
#elif defined(__WXGTK__)
# include "wx/gtk/chkconf.h"
#elif defined(__WXMAC__)
# include "wx/osx/chkconf.h"
#elif defined(__WXDFB__)
# include "wx/dfb/chkconf.h"
#elif defined(__WXMOTIF__)
# include "wx/motif/chkconf.h"
#elif defined(__WXX11__)
# include "wx/x11/chkconf.h"
#elif defined(__WXANDROID__)
# include "wx/android/chkconf.h"
#endif
/*
__UNIX__ is also defined under Cygwin but we shouldn't perform these checks
there if we're building Windows ports.
*/
#if defined(__UNIX__) && !defined(__WINDOWS__)
# include "wx/unix/chkconf.h"
#endif
#ifdef __WXUNIVERSAL__
# include "wx/univ/chkconf.h"
#endif
/*
Section 3a: check consistency of the non-GUI settings.
*/
#if WXWIN_COMPATIBILITY_2_8
# if !WXWIN_COMPATIBILITY_3_0
# ifdef wxABORT_ON_CONFIG_ERROR
# error "2.8.X compatibility requires 3.0.X compatibility"
# else
# undef WXWIN_COMPATIBILITY_3_0
# define WXWIN_COMPATIBILITY_3_0 1
# endif
# endif
#endif /* WXWIN_COMPATIBILITY_2_8 */
#if wxUSE_ARCHIVE_STREAMS
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxArchive requires wxUSE_DATETIME"
# else
# undef wxUSE_ARCHIVE_STREAMS
# define wxUSE_ARCHIVE_STREAMS 0
# endif
# endif
#endif /* wxUSE_ARCHIVE_STREAMS */
#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
# if !wxUSE_PROTOCOL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
# else
# undef wxUSE_PROTOCOL
# define wxUSE_PROTOCOL 1
# endif
# endif
#endif /* wxUSE_PROTOCOL_XXX */
#if wxUSE_URL
# if !wxUSE_PROTOCOL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_URL requires wxUSE_PROTOCOL"
# else
# undef wxUSE_PROTOCOL
# define wxUSE_PROTOCOL 1
# endif
# endif
#endif /* wxUSE_URL */
#if wxUSE_PROTOCOL
# if !wxUSE_SOCKETS
# if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
# else
# undef wxUSE_SOCKETS
# define wxUSE_SOCKETS 1
# endif
# endif
# endif
# if !wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
# else
# undef wxUSE_STREAMS
# define wxUSE_STREAMS 1
# endif
# endif
#endif /* wxUSE_PROTOCOL */
/* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
#if wxUSE_HTML
# if !wxUSE_FILESYSTEM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxHTML requires wxFileSystem"
# else
# undef wxUSE_FILESYSTEM
# define wxUSE_FILESYSTEM 1
# endif
# endif
#endif /* wxUSE_HTML */
#if wxUSE_FS_ARCHIVE
# if !wxUSE_FILESYSTEM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxArchiveFSHandler requires wxFileSystem"
# else
# undef wxUSE_FILESYSTEM
# define wxUSE_FILESYSTEM 1
# endif
# endif
# if !wxUSE_ARCHIVE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxArchiveFSHandler requires wxArchive"
# else
# undef wxUSE_ARCHIVE_STREAMS
# define wxUSE_ARCHIVE_STREAMS 1
# endif
# endif
#endif /* wxUSE_FS_ARCHIVE */
#if wxUSE_FILESYSTEM
# if !wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
# else
# undef wxUSE_STREAMS
# define wxUSE_STREAMS 1
# endif
# endif
# if !wxUSE_FILE && !wxUSE_FFILE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILESYSTEM requires either wxUSE_FILE or wxUSE_FFILE"
# else
# undef wxUSE_FILE
# define wxUSE_FILE 1
# undef wxUSE_FFILE
# define wxUSE_FFILE 1
# endif
# endif
#endif /* wxUSE_FILESYSTEM */
#if wxUSE_FS_INET
# if !wxUSE_PROTOCOL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
# else
# undef wxUSE_PROTOCOL
# define wxUSE_PROTOCOL 1
# endif
# endif
#endif /* wxUSE_FS_INET */
#if wxUSE_STOPWATCH || wxUSE_DATETIME
# if !wxUSE_LONGLONG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
# else
# undef wxUSE_LONGLONG
# define wxUSE_LONGLONG 1
# endif
# endif
#endif /* wxUSE_STOPWATCH */
#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
# else
# undef wxUSE_TEXTFILE
# define wxUSE_TEXTFILE 1
# endif
#endif /* wxUSE_MIMETYPE */
#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
# else
# undef wxUSE_TEXTBUFFER
# define wxUSE_TEXTBUFFER 1
# endif
#endif /* wxUSE_TEXTFILE */
#if wxUSE_TEXTFILE && !wxUSE_FILE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TEXTFILE requires wxUSE_FILE"
# else
# undef wxUSE_FILE
# define wxUSE_FILE 1
# endif
#endif /* wxUSE_TEXTFILE */
#if !wxUSE_DYNLIB_CLASS
# if wxUSE_DYNAMIC_LOADER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
# else
# define wxUSE_DYNLIB_CLASS 1
# endif
# endif
#endif /* wxUSE_DYNLIB_CLASS */
#if wxUSE_ZIPSTREAM
# if !wxUSE_ZLIB
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxZip requires wxZlib"
# else
# undef wxUSE_ZLIB
# define wxUSE_ZLIB 1
# endif
# endif
# if !wxUSE_ARCHIVE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxZip requires wxArchive"
# else
# undef wxUSE_ARCHIVE_STREAMS
# define wxUSE_ARCHIVE_STREAMS 1
# endif
# endif
#endif /* wxUSE_ZIPSTREAM */
#if wxUSE_TARSTREAM
# if !wxUSE_ARCHIVE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxTar requires wxArchive"
# else
# undef wxUSE_ARCHIVE_STREAMS
# define wxUSE_ARCHIVE_STREAMS 1
# endif
# endif
#endif /* wxUSE_TARSTREAM */
/*
Section 3b: the tests for the GUI settings only.
*/
#if wxUSE_GUI
#if wxUSE_ACCESSIBILITY && !defined(__WXMSW__)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACCESSIBILITY is currently only supported under wxMSW"
# else
# undef wxUSE_ACCESSIBILITY
# define wxUSE_ACCESSIBILITY 0
# endif
#endif /* wxUSE_ACCESSIBILITY */
#if wxUSE_BUTTON || \
wxUSE_CALENDARCTRL || \
wxUSE_CARET || \
wxUSE_COMBOBOX || \
wxUSE_BMPBUTTON || \
wxUSE_CHECKBOX || \
wxUSE_CHECKLISTBOX || \
wxUSE_CHOICE || \
wxUSE_GAUGE || \
wxUSE_GRID || \
wxUSE_HEADERCTRL || \
wxUSE_LISTBOX || \
wxUSE_LISTCTRL || \
wxUSE_NOTEBOOK || \
wxUSE_RADIOBOX || \
wxUSE_RADIOBTN || \
wxUSE_REARRANGECTRL || \
wxUSE_SCROLLBAR || \
wxUSE_SLIDER || \
wxUSE_SPINBTN || \
wxUSE_SPINCTRL || \
wxUSE_STATBMP || \
wxUSE_STATBOX || \
wxUSE_STATLINE || \
wxUSE_STATTEXT || \
wxUSE_STATUSBAR || \
wxUSE_TEXTCTRL || \
wxUSE_TOOLBAR || \
wxUSE_TREECTRL || \
wxUSE_TREELISTCTRL
# if !wxUSE_CONTROLS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CONTROLS unset but some controls used"
# else
# undef wxUSE_CONTROLS
# define wxUSE_CONTROLS 1
# endif
# endif
#endif /* controls */
#if wxUSE_ADDREMOVECTRL
# if !wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ADDREMOVECTRL requires wxUSE_BMPBUTTON"
# else
# undef wxUSE_ADDREMOVECTRL
# define wxUSE_ADDREMOVECTRL 0
# endif
# endif
#endif /* wxUSE_ADDREMOVECTRL */
#if wxUSE_ANIMATIONCTRL
# if !wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ANIMATIONCTRL requires wxUSE_STREAMS"
# else
# undef wxUSE_ANIMATIONCTRL
# define wxUSE_ANIMATIONCTRL 0
# endif
# endif
#endif /* wxUSE_ANIMATIONCTRL */
#if wxUSE_BMPBUTTON
# if !wxUSE_BUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
# else
# undef wxUSE_BUTTON
# define wxUSE_BUTTON 1
# endif
# endif
#endif /* wxUSE_BMPBUTTON */
#if wxUSE_COMMANDLINKBUTTON
# if !wxUSE_BUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COMMANDLINKBUTTON requires wxUSE_BUTTON"
# else
# undef wxUSE_BUTTON
# define wxUSE_BUTTON 1
# endif
# endif
#endif /* wxUSE_COMMANDLINKBUTTON */
/*
wxUSE_BOOKCTRL should be only used if any of the controls deriving from it
are used
*/
#ifdef wxUSE_BOOKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_BOOKCTRL is defined automatically, don't define it"
# else
# undef wxUSE_BOOKCTRL
# endif
#endif
#define wxUSE_BOOKCTRL (wxUSE_AUI || \
wxUSE_NOTEBOOK || \
wxUSE_LISTBOOK || \
wxUSE_CHOICEBOOK || \
wxUSE_TOOLBOOK || \
wxUSE_TREEBOOK)
#if wxUSE_COLLPANE
# if !wxUSE_BUTTON || !wxUSE_STATLINE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_COLLPANE requires wxUSE_BUTTON and wxUSE_STATLINE"
# else
# undef wxUSE_COLLPANE
# define wxUSE_COLLPANE 0
# endif
# endif
#endif /* wxUSE_COLLPANE */
#if wxUSE_LISTBOOK
# if !wxUSE_LISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxListbook requires wxListCtrl"
# else
# undef wxUSE_LISTCTRL
# define wxUSE_LISTCTRL 1
# endif
# endif
#endif /* wxUSE_LISTBOOK */
#if wxUSE_CHOICEBOOK
# if !wxUSE_CHOICE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxChoicebook requires wxChoice"
# else
# undef wxUSE_CHOICE
# define wxUSE_CHOICE 1
# endif
# endif
#endif /* wxUSE_CHOICEBOOK */
#if wxUSE_TOOLBOOK
# if !wxUSE_TOOLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxToolbook requires wxToolBar"
# else
# undef wxUSE_TOOLBAR
# define wxUSE_TOOLBAR 1
# endif
# endif
#endif /* wxUSE_TOOLBOOK */
#if !wxUSE_ODCOMBOBOX
# if wxUSE_BITMAPCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
# else
# undef wxUSE_BITMAPCOMBOBOX
# define wxUSE_BITMAPCOMBOBOX 0
# endif
# endif
#endif /* !wxUSE_ODCOMBOBOX */
#if !wxUSE_HEADERCTRL
# if wxUSE_DATAVIEWCTRL || wxUSE_GRID
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDataViewCtrl and wxGrid require wxHeaderCtrl"
# else
# undef wxUSE_HEADERCTRL
# define wxUSE_HEADERCTRL 1
# endif
# endif
#endif /* !wxUSE_HEADERCTRL */
#if wxUSE_REARRANGECTRL
# if !wxUSE_CHECKLISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxRearrangeCtrl requires wxCheckListBox"
# else
# undef wxUSE_REARRANGECTRL
# define wxUSE_REARRANGECTRL 0
# endif
# endif
#endif /* wxUSE_REARRANGECTRL */
#if wxUSE_RICHMSGDLG
# if !wxUSE_MSGDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RICHMSGDLG requires wxUSE_MSGDLG"
# else
# undef wxUSE_MSGDLG
# define wxUSE_MSGDLG 1
# endif
# endif
#endif /* wxUSE_RICHMSGDLG */
/* don't attempt to use native status bar on the platforms not having it */
#ifndef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0
#elif wxUSE_NATIVE_STATUSBAR
# if defined(__WXUNIVERSAL__) || !(defined(__WXMSW__) || defined(__WXMAC__))
# undef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0
# endif
#endif
#if wxUSE_ACTIVITYINDICATOR && !wxUSE_GRAPHICS_CONTEXT
# undef wxUSE_ACTIVITYINDICATOR
# define wxUSE_ACTIVITYINDICATOR 0
#endif /* wxUSE_ACTIVITYINDICATOR */
#if wxUSE_GRAPHICS_CONTEXT && !wxUSE_GEOMETRY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GEOMETRY"
# else
# undef wxUSE_GRAPHICS_CONTEXT
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#endif /* wxUSE_GRAPHICS_CONTEXT */
#if wxUSE_DC_TRANSFORM_MATRIX && !wxUSE_GEOMETRY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_GEOMETRY"
# else
# undef wxUSE_DC_TRANSFORM_MATRIX
# define wxUSE_DC_TRANSFORM_MATRIX 0
# endif
#endif /* wxUSE_DC_TRANSFORM_MATRIX */
/* generic controls dependencies */
#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
/* all common controls are needed by these dialogs */
# if !defined(wxUSE_CHOICE) || \
!defined(wxUSE_TEXTCTRL) || \
!defined(wxUSE_BUTTON) || \
!defined(wxUSE_CHECKBOX) || \
!defined(wxUSE_STATTEXT)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "These common controls are needed by common dialogs"
# else
# undef wxUSE_CHOICE
# define wxUSE_CHOICE 1
# undef wxUSE_TEXTCTRL
# define wxUSE_TEXTCTRL 1
# undef wxUSE_BUTTON
# define wxUSE_BUTTON 1
# undef wxUSE_CHECKBOX
# define wxUSE_CHECKBOX 1
# undef wxUSE_STATTEXT
# define wxUSE_STATTEXT 1
# endif
# endif
# endif
#endif /* !wxMSW || wxUniv */
/* generic file dialog depends on (generic) file control */
#if wxUSE_FILEDLG && !wxUSE_FILECTRL && \
(defined(__WXUNIVERSAL__) || defined(__WXGTK__))
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Generic wxFileDialog requires wxFileCtrl"
# else
# undef wxUSE_FILECTRL
# define wxUSE_FILECTRL 1
# endif
#endif /* wxUSE_FILEDLG */
/* common dependencies */
#if wxUSE_ARTPROVIDER_TANGO
# if !(wxUSE_STREAMS && wxUSE_IMAGE && wxUSE_LIBPNG)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Tango art provider requires wxImage with streams and PNG support"
# else
# undef wxUSE_ARTPROVIDER_TANGO
# define wxUSE_ARTPROVIDER_TANGO 0
# endif
# endif
#endif /* wxUSE_ARTPROVIDER_TANGO */
#if wxUSE_CALENDARCTRL
# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
# else
# undef wxUSE_SPINBTN
# undef wxUSE_COMBOBOX
# define wxUSE_SPINBTN 1
# define wxUSE_COMBOBOX 1
# endif
# endif
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxCalendarCtrl requires wxUSE_DATETIME"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_CALENDARCTRL */
#if wxUSE_DATEPICKCTRL
/* Only the generic implementation, not used under MSW and OSX, needs
* wxComboCtrl. */
# if !wxUSE_COMBOCTRL && (defined(__WXUNIVERSAL__) || \
!(defined(__WXMSW__) || defined(__WXOSX_COCOA__)))
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDatePickerCtrl requires wxUSE_COMBOCTRL"
# else
# undef wxUSE_COMBOCTRL
# define wxUSE_COMBOCTRL 1
# endif
# endif
#endif /* wxUSE_DATEPICKCTRL */
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */
#if wxUSE_CHECKLISTBOX
# if !wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxCheckListBox requires wxListBox"
# else
# undef wxUSE_LISTBOX
# define wxUSE_LISTBOX 1
# endif
# endif
#endif /* wxUSE_CHECKLISTBOX */
#if wxUSE_CHOICEDLG
# if !wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Choice dialogs requires wxListBox"
# else
# undef wxUSE_LISTBOX
# define wxUSE_LISTBOX 1
# endif
# endif
#endif /* wxUSE_CHOICEDLG */
#if wxUSE_FILECTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxFileCtrl requires wxDateTime"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_FILECTRL */
#if wxUSE_HELP
# if !wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HELP requires wxUSE_BMPBUTTON"
# else
# undef wxUSE_BMPBUTTON
# define wxUSE_BMPBUTTON 1
# endif
# endif
# if !wxUSE_CHOICEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_HELP requires wxUSE_CHOICEDLG"
# else
# undef wxUSE_CHOICEDLG
# define wxUSE_CHOICEDLG 1
# endif
# endif
#endif /* wxUSE_HELP */
#if wxUSE_MS_HTML_HELP
/*
this doesn't make sense for platforms other than MSW but we still
define it in wx/setup_inc.h so don't complain if it happens to be
defined under another platform but just silently fix it.
*/
# ifndef __WXMSW__
# undef wxUSE_MS_HTML_HELP
# define wxUSE_MS_HTML_HELP 0
# endif
#endif /* wxUSE_MS_HTML_HELP */
#if wxUSE_WXHTML_HELP
# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Built in help controller can't be compiled"
# else
# undef wxUSE_HELP
# define wxUSE_HELP 1
# undef wxUSE_HTML
# define wxUSE_HTML 1
# undef wxUSE_COMBOBOX
# define wxUSE_COMBOBOX 1
# undef wxUSE_NOTEBOOK
# define wxUSE_NOTEBOOK 1
# undef wxUSE_SPINCTRL
# define wxUSE_SPINCTRL 1
# endif
# endif
#endif /* wxUSE_WXHTML_HELP */
#if !wxUSE_IMAGE
/*
The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
user explicitly wants this and disable all other features that require
wxUSE_IMAGE.
*/
# if wxUSE_DRAGIMAGE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
# else
# undef wxUSE_DRAGIMAGE
# define wxUSE_DRAGIMAGE 0
# endif
# endif
# if wxUSE_LIBPNG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LIBPNG requires wxUSE_IMAGE"
# else
# undef wxUSE_LIBPNG
# define wxUSE_LIBPNG 0
# endif
# endif
# if wxUSE_LIBJPEG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
# else
# undef wxUSE_LIBJPEG
# define wxUSE_LIBJPEG 0
# endif
# endif
# if wxUSE_LIBTIFF
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
# else
# undef wxUSE_LIBTIFF
# define wxUSE_LIBTIFF 0
# endif
# endif
# if wxUSE_GIF
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_GIF requires wxUSE_IMAGE"
# else
# undef wxUSE_GIF
# define wxUSE_GIF 0
# endif
# endif
# if wxUSE_PNM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PNM requires wxUSE_IMAGE"
# else
# undef wxUSE_PNM
# define wxUSE_PNM 0
# endif
# endif
# if wxUSE_PCX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PCX requires wxUSE_IMAGE"
# else
# undef wxUSE_PCX
# define wxUSE_PCX 0
# endif
# endif
# if wxUSE_IFF
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_IFF requires wxUSE_IMAGE"
# else
# undef wxUSE_IFF
# define wxUSE_IFF 0
# endif
# endif
# if wxUSE_TOOLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
# else
# undef wxUSE_TOOLBAR
# define wxUSE_TOOLBAR 0
# endif
# endif
# if wxUSE_XPM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_XPM requires wxUSE_IMAGE"
# else
# undef wxUSE_XPM
# define wxUSE_XPM 0
# endif
# endif
#endif /* !wxUSE_IMAGE */
#if wxUSE_DOC_VIEW_ARCHITECTURE
# if !wxUSE_MENUS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "DocView requires wxUSE_MENUS"
# else
# undef wxUSE_MENUS
# define wxUSE_MENUS 1
# endif
# endif
# if !wxUSE_CHOICEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "DocView requires wxUSE_CHOICEDLG"
# else
# undef wxUSE_CHOICEDLG
# define wxUSE_CHOICEDLG 1
# endif
# endif
# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
# else
# undef wxUSE_STREAMS
# define wxUSE_STREAMS 1
# endif
# endif
# if !wxUSE_FILE_HISTORY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "DocView requires wxUSE_FILE_HISTORY"
# else
# undef wxUSE_FILE_HISTORY
# define wxUSE_FILE_HISTORY 1
# endif
# endif
#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
#if wxUSE_PRINTING_ARCHITECTURE
# if !wxUSE_COMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Print dialog requires wxUSE_COMBOBOX"
# else
# undef wxUSE_COMBOBOX
# define wxUSE_COMBOBOX 1
# endif
# endif
#endif /* wxUSE_PRINTING_ARCHITECTURE */
#if wxUSE_MDI_ARCHITECTURE
# if !wxUSE_MDI
# ifdef wxABORT_ON_CONFIG_ERROR
# error "MDI requires wxUSE_MDI"
# else
# undef wxUSE_MDI
# define wxUSE_MDI 1
# endif
# endif
# if !wxUSE_DOC_VIEW_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE"
# else
# undef wxUSE_DOC_VIEW_ARCHITECTURE
# define wxUSE_DOC_VIEW_ARCHITECTURE 1
# endif
# endif
#endif /* wxUSE_MDI_ARCHITECTURE */
#if !wxUSE_FILEDLG
# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!"
# else
# undef wxUSE_FILEDLG
# define wxUSE_FILEDLG 1
# endif
# endif
#endif /* wxUSE_FILEDLG */
#if !wxUSE_GAUGE || !wxUSE_BUTTON
# if wxUSE_PROGRESSDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
# else
# undef wxUSE_GAUGE
# undef wxUSE_BUTTON
# define wxUSE_GAUGE 1
# define wxUSE_BUTTON 1
# endif
# endif
#endif /* !wxUSE_GAUGE */
#if !wxUSE_BUTTON
# if wxUSE_FONTDLG || \
wxUSE_FILEDLG || \
wxUSE_CHOICEDLG || \
wxUSE_NUMBERDLG || \
wxUSE_TEXTDLG || \
wxUSE_DIRDLG || \
wxUSE_STARTUP_TIPS || \
wxUSE_WIZARDDLG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Common and generic dialogs require wxUSE_BUTTON"
# else
# undef wxUSE_BUTTON
# define wxUSE_BUTTON 1
# endif
# endif
#endif /* !wxUSE_BUTTON */
#if !wxUSE_TOOLBAR
# if wxUSE_TOOLBAR_NATIVE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
# else
# undef wxUSE_TOOLBAR_NATIVE
# define wxUSE_TOOLBAR_NATIVE 0
# endif
# endif
#endif
#if !wxUSE_IMAGLIST
# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL || wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxImageList must be compiled as well"
# else
# undef wxUSE_IMAGLIST
# define wxUSE_IMAGLIST 1
# endif
# endif
#endif /* !wxUSE_IMAGLIST */
#if wxUSE_RADIOBOX
# if !wxUSE_RADIOBTN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN"
# else
# undef wxUSE_RADIOBTN
# define wxUSE_RADIOBTN 1
# endif
# endif
# if !wxUSE_STATBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
# else
# undef wxUSE_STATBOX
# define wxUSE_STATBOX 1
# endif
# endif
#endif /* wxUSE_RADIOBOX */
#if wxUSE_LOGWINDOW
# if !wxUSE_TEXTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
# else
# undef wxUSE_TEXTCTRL
# define wxUSE_TEXTCTRL 1
# endif
# endif
#endif /* wxUSE_LOGWINDOW */
#if wxUSE_LOG_DIALOG
# if !wxUSE_LISTCTRL || !wxUSE_BUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
# else
# undef wxUSE_LISTCTRL
# define wxUSE_LISTCTRL 1
# undef wxUSE_BUTTON
# define wxUSE_BUTTON 1
# endif
# endif
#endif /* wxUSE_LOG_DIALOG */
#if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxClipboard requires wxDataObject"
# else
# undef wxUSE_DATAOBJ
# define wxUSE_DATAOBJ 1
# endif
#endif /* wxUSE_CLIPBOARD */
#if wxUSE_XRC && !wxUSE_XML
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_XRC requires wxUSE_XML"
# else
# undef wxUSE_XRC
# define wxUSE_XRC 0
# endif
#endif /* wxUSE_XRC */
#if wxUSE_SOCKETS && !wxUSE_STOPWATCH
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SOCKETS requires wxUSE_STOPWATCH"
# else
# undef wxUSE_SOCKETS
# define wxUSE_SOCKETS 0
# endif
#endif /* wxUSE_SOCKETS */
#if wxUSE_SVG && !wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SVG requires wxUSE_STREAMS"
# else
# undef wxUSE_SVG
# define wxUSE_SVG 0
# endif
#endif /* wxUSE_SVG */
#if wxUSE_SVG && !wxUSE_IMAGE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SVG requires wxUSE_IMAGE"
# else
# undef wxUSE_SVG
# define wxUSE_SVG 0
# endif
#endif /* wxUSE_SVG */
#if wxUSE_SVG && !wxUSE_LIBPNG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_SVG requires wxUSE_LIBPNG"
# else
# undef wxUSE_SVG
# define wxUSE_SVG 0
# endif
#endif /* wxUSE_SVG */
#if wxUSE_TASKBARICON && !wxUSE_MENUS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TASKBARICON requires wxUSE_MENUS"
# else
# undef wxUSE_TASKBARICON
# define wxUSE_TASKBARICON 0
# endif
#endif /* wxUSE_TASKBARICON */
#if !wxUSE_VARIANT
# if wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDataViewCtrl requires wxVariant"
# else
# undef wxUSE_DATAVIEWCTRL
# define wxUSE_DATAVIEWCTRL 0
# endif
# endif
#endif /* wxUSE_VARIANT */
#if wxUSE_TREELISTCTRL && !wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL requires wxDataViewCtrl"
# else
# undef wxUSE_TREELISTCTRL
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* wxUSE_TREELISTCTRL */
#if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_WEBKIT2 || wxUSE_WEBVIEW_IE)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW requires at least one backend"
# else
# undef wxUSE_WEBVIEW
# define wxUSE_WEBVIEW 0
# endif
#endif /* wxUSE_WEBVIEW && !any web view backend */
#if wxUSE_PREFERENCES_EDITOR
/*
We can use either a generic implementation, using wxNotebook, or a
native one under wxOSX/Cocoa but then we must be using the native
toolbar.
*/
# if !wxUSE_NOTEBOOK
# ifdef __WXOSX_COCOA__
# if !wxUSE_TOOLBAR || !wxOSX_USE_NATIVE_TOOLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PREFERENCES_EDITOR requires native toolbar in wxOSX"
# else
# undef wxUSE_PREFERENCES_EDITOR
# define wxUSE_PREFERENCES_EDITOR 0
# endif
# endif
# else
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_PREFERENCES_EDITOR requires wxNotebook"
# else
# undef wxUSE_PREFERENCES_EDITOR
# define wxUSE_PREFERENCES_EDITOR 0
# endif
# endif
# endif
#endif /* wxUSE_PREFERENCES_EDITOR */
#if wxUSE_PRIVATE_FONTS
# if !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXOSX__)
# undef wxUSE_PRIVATE_FONTS
# define wxUSE_PRIVATE_FONTS 0
# endif
#endif /* wxUSE_PRIVATE_FONTS */
#if wxUSE_MEDIACTRL
# if !wxUSE_LONGLONG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxMediaCtrl requires wxUSE_LONLONG"
# else
# undef wxUSE_LONLONG
# define wxUSE_LONLONG 1
# endif
# endif
#endif /* wxUSE_MEDIACTRL */
#if wxUSE_STC
# if !wxUSE_STOPWATCH
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxStyledTextCtrl requires wxUSE_STOPWATCH"
# else
# undef wxUSE_STC
# define wxUSE_STC 0
# endif
# endif
# if !wxUSE_SCROLLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxStyledTextCtrl requires wxUSE_SCROLLBAR"
# else
# undef wxUSE_STC
# define wxUSE_STC 0
# endif
# endif
#endif /* wxUSE_STC */
#if wxUSE_RICHTEXT
# if !wxUSE_HTML
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxRichTextCtrl requires wxUSE_HTML"
# else
# undef wxUSE_RICHTEXT
# define wxUSE_RICHTEXT 0
# endif
# endif
# if !wxUSE_LONGLONG
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxRichTextCtrl requires wxUSE_LONLONG"
# else
# undef wxUSE_LONLONG
# define wxUSE_LONLONG 1
# endif
# endif
#endif /* wxUSE_RICHTEXT */
#endif /* wxUSE_GUI */
#endif /* _WX_CHKCONF_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xtistrm.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xtistrm.h
// Purpose: streaming runtime metadata information (extended class info)
// Author: Stefan Csomor
// Modified by:
// Created: 27/07/03
// Copyright: (c) 2003 Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XTISTRMH__
#define _WX_XTISTRMH__
#include "wx/defs.h"
#if wxUSE_EXTENDED_RTTI
#include "wx/object.h"
const int wxInvalidObjectID = -2;
const int wxNullObjectID = -3;
// Filer contains the interfaces for streaming objects in and out of XML,
// rendering them either to objects in memory, or to code. Note: We
// consider the process of generating code to be one of *depersisting* the
// object from xml, *not* of persisting the object to code from an object
// in memory. This distinction can be confusing, and should be kept
// in mind when looking at the property streamers and callback interfaces
// listed below.
// ----------------------------------------------------------------------------
// wxObjectWriterCallback
//
// This class will be asked during the streaming-out process about every single
// property or object instance. It can veto streaming out by returning false
// or modify the value before it is streamed-out.
// ----------------------------------------------------------------------------
/*
class WXDLLIMPEXP_BASE wxClassInfo;
class WXDLLIMPEXP_BASE wxAnyList;
class WXDLLIMPEXP_BASE wxPropertyInfo;
class WXDLLIMPEXP_BASE wxAny;
class WXDLLIMPEXP_BASE wxHandlerInfo;
*/
class WXDLLIMPEXP_BASE wxObjectWriter;
class WXDLLIMPEXP_BASE wxObjectReader;
class WXDLLIMPEXP_BASE wxObjectWriterCallback
{
public:
virtual ~wxObjectWriterCallback() {}
// will be called before an object is written, may veto by returning false
virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo *WXUNUSED(classInfo),
const wxStringToAnyHashMap &WXUNUSED(metadata))
{ return true; }
// will be called after this object has been written, may be
// needed for adjusting stacks
virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo *WXUNUSED(classInfo) )
{}
// will be called before a property gets written, may change the value,
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxAny &WXUNUSED(value) )
{ return true; }
// will be called before a property gets written, may change the value,
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxAnyList &WXUNUSED(value) )
{ return true; }
// will be called after a property has been written out, may be needed
// for adjusting stacks
virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
const wxPropertyInfo *WXUNUSED(propInfo) )
{}
// will be called before this delegate gets written
virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxObject *&WXUNUSED(eventSink),
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ return true; }
virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
const wxObject *WXUNUSED(object),
const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
const wxObject *&WXUNUSED(eventSink),
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ }
};
class WXDLLIMPEXP_BASE wxObjectWriterFunctor: public wxObjectFunctor
{
};
class WXDLLIMPEXP_BASE wxObjectWriter: public wxObject
{
friend class wxObjectWriterFunctor;
public:
wxObjectWriter();
virtual ~wxObjectWriter();
// with this call you start writing out a new top-level object
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
wxObjectWriterCallback *writercallback, const wxString &name,
const wxStringToAnyHashMap &metadata);
// Managing the object identity table a.k.a context
//
// these methods make sure that no object gets written twice,
// because sometimes multiple calls to the WriteObject will be
// made without wanting to have duplicate objects written, the
// object identity table will be reset manually
virtual void ClearObjectContext();
// gets the object Id for a passed in object in the context
int GetObjectID(const wxObject *obj);
// returns true if this object has already been written in this context
bool IsObjectKnown( const wxObject *obj );
//
// streaming callbacks
//
// these callbacks really write out the values in the stream format
// begins writing out a new toplevel entry which has the indicated unique name
virtual void DoBeginWriteTopLevelEntry( const wxString &name ) = 0;
// ends writing out a new toplevel entry which has the indicated unique name
virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0;
// start of writing an object having the passed in ID
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
int objectID, const wxStringToAnyHashMap &metadata ) = 0;
// end of writing an toplevel object name param is used for unique
// identification within the container
virtual void DoEndWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID ) = 0;
// writes a simple property in the stream format
virtual void DoWriteSimpleType( const wxAny &value ) = 0;
// start of writing a complex property into the stream (
virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ) = 0;
// end of writing a complex property into the stream
virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo ) = 0;
virtual void DoBeginWriteElement() = 0;
virtual void DoEndWriteElement() = 0;
// insert an object reference to an already written object
virtual void DoWriteRepeatedObject( int objectID ) = 0;
// insert a null reference
virtual void DoWriteNullObject() = 0;
// writes a delegate in the stream format
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
const wxPropertyInfo *propInfo, const wxObject *eventSink,
int sinkObjectID, const wxClassInfo* eventSinkClassInfo,
const wxHandlerInfo* handlerIndo ) = 0;
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
wxObjectWriterCallback *writercallback, bool isEmbedded, const wxStringToAnyHashMap &metadata );
protected:
struct wxObjectWriterInternal;
wxObjectWriterInternal* m_data;
struct wxObjectWriterInternalPropertiesData;
void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData * data );
void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData *data );
void FindConnectEntry(const wxEvtHandler * evSource,
const wxEventSourceTypeInfo* dti, const wxObject* &sink,
const wxHandlerInfo *&handler);
};
/*
Streaming callbacks for depersisting XML to code, or running objects
*/
class WXDLLIMPEXP_BASE wxObjectReaderCallback;
/*
wxObjectReader handles streaming in a class from a arbitrary format.
While walking through it issues calls out to interfaces to readercallback
the guts from the underlying storage format.
*/
class WXDLLIMPEXP_BASE wxObjectReader: public wxObject
{
public:
wxObjectReader();
virtual ~wxObjectReader();
// the only thing wxObjectReader knows about is the class info by object ID
wxClassInfo *GetObjectClassInfo(int objectID);
bool HasObjectClassInfo( int objectID );
void SetObjectClassInfo(int objectID, wxClassInfo* classInfo);
// Reads the component the reader is pointed at from the underlying format.
// The return value is the root object ID, which can
// then be used to ask the depersister about that object
// if there was a problem you will get back wxInvalidObjectID and the current
// error log will carry the problems encoutered
virtual int ReadObject( const wxString &name, wxObjectReaderCallback *readercallback ) = 0;
private:
struct wxObjectReaderInternal;
wxObjectReaderInternal *m_data;
};
// This abstract class matches the allocate-init/create model of creation of objects.
// At runtime, these will create actual instances, and manipulate them.
// When generating code, these will just create statements of C++
// code to create the objects.
class WXDLLIMPEXP_BASE wxObjectReaderCallback
{
public:
virtual ~wxObjectReaderCallback() {}
// allocate the new object on the heap, that object will have the passed in ID
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxStringToAnyHashMap &metadata) = 0;
// initialize the already allocated object having the ID objectID with the Create method
// creation parameters which are objects are having their Ids passed in objectIDValues
// having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxAny *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata) = 0;
// construct the new object on the heap, that object will have the passed in ID
// (for objects that don't support allocate-create type of creation)
// creation parameters which are objects are having their Ids passed in
// objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxAny *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata) = 0;
// destroy the heap-allocated object having the ID objectID, this may be used
// if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0;
// set the corresponding property
virtual void SetProperty(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
const wxAny &VariantValue) = 0;
// sets the corresponding property (value is an object)
virtual void SetPropertyAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
int valueObjectId) = 0;
// adds an element to a property collection
virtual void AddToPropertyCollection( int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
const wxAny &VariantValue) = 0;
// sets the corresponding property (value is an object)
virtual void AddToPropertyCollectionAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
int valueObjectId) = 0;
// sets the corresponding event handler
virtual void SetConnect(int EventSourceObjectID,
const wxClassInfo *EventSourceClassInfo,
const wxPropertyInfo *delegateInfo,
const wxClassInfo *EventSinkClassInfo,
const wxHandlerInfo* handlerInfo,
int EventSinkObjectID ) = 0;
};
/*
wxObjectRuntimeReaderCallback implements the callbacks that will bring back
an object into a life memory instance
*/
class WXDLLIMPEXP_BASE wxObjectRuntimeReaderCallback: public wxObjectReaderCallback
{
struct wxObjectRuntimeReaderCallbackInternal;
wxObjectRuntimeReaderCallbackInternal * m_data;
public:
wxObjectRuntimeReaderCallback();
virtual ~wxObjectRuntimeReaderCallback();
// returns the object having the corresponding ID fully constructed
wxObject *GetObject(int objectID);
// allocate the new object on the heap, that object will have the passed in ID
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxStringToAnyHashMap &metadata);
// initialize the already allocated object having the ID objectID with
// the Create method creation parameters which are objects are having
// their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxAny *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata
);
// construct the new object on the heap, that object will have the
// passed in ID (for objects that don't support allocate-create type of
// creation) creation parameters which are objects are having their Ids
// passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
const wxClassInfo *classInfo,
int paramCount,
wxAny *VariantValues,
int *objectIDValues,
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata);
// destroy the heap-allocated object having the ID objectID, this may be
// used if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
// set the corresponding property
virtual void SetProperty(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
const wxAny &variantValue);
// sets the corresponding property (value is an object)
virtual void SetPropertyAsObject(int objectId,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
int valueObjectId);
// adds an element to a property collection
virtual void AddToPropertyCollection( int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
const wxAny &VariantValue);
// sets the corresponding property (value is an object)
virtual void AddToPropertyCollectionAsObject(int objectID,
const wxClassInfo *classInfo,
const wxPropertyInfo* propertyInfo,
int valueObjectId);
// sets the corresponding event handler
virtual void SetConnect(int eventSourceObjectID,
const wxClassInfo *eventSourceClassInfo,
const wxPropertyInfo *delegateInfo,
const wxClassInfo *eventSinkClassInfo,
const wxHandlerInfo* handlerInfo,
int eventSinkObjectID );
};
#endif // wxUSE_EXTENDED_RTTI
#endif
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/dcprint.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/dcprint.h
// Purpose: wxPrinterDC base header
// Author: Julian Smart
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCPRINT_H_BASE_
#define _WX_DCPRINT_H_BASE_
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/dc.h"
//-----------------------------------------------------------------------------
// wxPrinterDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrinterDC : public wxDC
{
public:
wxPrinterDC();
wxPrinterDC(const wxPrintData& data);
wxRect GetPaperRect() const;
int GetResolution() const wxOVERRIDE;
protected:
wxPrinterDC(wxDCImpl *impl) : wxDC(impl) { }
private:
wxDECLARE_DYNAMIC_CLASS(wxPrinterDC);
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif // _WX_DCPRINT_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/printdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/printdlg.h
// Purpose: Base header and class for print dialogs
// Author: Julian Smart
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINTDLG_H_BASE_
#define _WX_PRINTDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/event.h"
#include "wx/dialog.h"
#include "wx/intl.h"
#include "wx/cmndata.h"
// ---------------------------------------------------------------------------
// wxPrintDialogBase: interface for the dialog for printing
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintDialogBase : public wxDialog
{
public:
wxPrintDialogBase() { }
wxPrintDialogBase(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString &title = wxEmptyString,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual wxPrintDialogData& GetPrintDialogData() = 0;
virtual wxPrintData& GetPrintData() = 0;
virtual wxDC *GetPrintDC() = 0;
private:
wxDECLARE_ABSTRACT_CLASS(wxPrintDialogBase);
wxDECLARE_NO_COPY_CLASS(wxPrintDialogBase);
};
// ---------------------------------------------------------------------------
// wxPrintDialog: the dialog for printing.
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintDialog : public wxObject
{
public:
wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
wxPrintDialog(wxWindow *parent, wxPrintData* data);
virtual ~wxPrintDialog();
virtual int ShowModal();
virtual wxPrintDialogData& GetPrintDialogData();
virtual wxPrintData& GetPrintData();
virtual wxDC *GetPrintDC();
private:
wxPrintDialogBase *m_pimpl;
private:
wxDECLARE_DYNAMIC_CLASS(wxPrintDialog);
wxDECLARE_NO_COPY_CLASS(wxPrintDialog);
};
// ---------------------------------------------------------------------------
// wxPageSetupDialogBase: interface for the page setup dialog
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPageSetupDialogBase: public wxDialog
{
public:
wxPageSetupDialogBase() { }
wxPageSetupDialogBase(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString &title = wxEmptyString,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual wxPageSetupDialogData& GetPageSetupDialogData() = 0;
private:
wxDECLARE_ABSTRACT_CLASS(wxPageSetupDialogBase);
wxDECLARE_NO_COPY_CLASS(wxPageSetupDialogBase);
};
// ---------------------------------------------------------------------------
// wxPageSetupDialog: the page setup dialog
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPageSetupDialog: public wxObject
{
public:
wxPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
virtual ~wxPageSetupDialog();
int ShowModal();
wxPageSetupDialogData& GetPageSetupDialogData();
// old name
wxPageSetupDialogData& GetPageSetupData();
private:
wxPageSetupDialogBase *m_pimpl;
private:
wxDECLARE_DYNAMIC_CLASS(wxPageSetupDialog);
wxDECLARE_NO_COPY_CLASS(wxPageSetupDialog);
};
#endif
#endif
// _WX_PRINTDLG_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/fs_inet.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/fs_inet.h
// Purpose: HTTP and FTP file system
// Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FS_INET_H_
#define _WX_FS_INET_H_
#include "wx/defs.h"
#if wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
#include "wx/filesys.h"
// ----------------------------------------------------------------------------
// wxInternetFSHandler
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_NET wxInternetFSHandler : public wxFileSystemHandler
{
public:
virtual bool CanOpen(const wxString& location) wxOVERRIDE;
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) wxOVERRIDE;
};
#endif
// wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
#endif // _WX_FS_INET_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/config.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/config.h
// Purpose: wxConfig base header
// Author: Julian Smart
// Modified by:
// Created:
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONFIG_H_BASE_
#define _WX_CONFIG_H_BASE_
#include "wx/confbase.h"
#if wxUSE_CONFIG
// ----------------------------------------------------------------------------
// define the native wxConfigBase implementation
// ----------------------------------------------------------------------------
// under Windows we prefer to use the native implementation but can be forced
// to use the file-based one
#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
#include "wx/msw/regconf.h"
#define wxConfig wxRegConfig
#else // either we're under Unix or wish to always use config files
#include "wx/fileconf.h"
#define wxConfig wxFileConfig
#endif
#endif // wxUSE_CONFIG
#endif // _WX_CONFIG_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/confbase.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/confbase.h
// Purpose: declaration of the base class of all config implementations
// (see also: fileconf.h and msw/regconf.h and iniconf.h)
// Author: Karsten Ballueder & Vadim Zeitlin
// Modified by:
// Created: 07.04.98 (adapted from appconf.h)
// Copyright: (c) 1997 Karsten Ballueder [email protected]
// Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONFBASE_H_
#define _WX_CONFBASE_H_
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/object.h"
#include "wx/base64.h"
class WXDLLIMPEXP_FWD_BASE wxArrayString;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
/// shall we be case sensitive in parsing variable names?
#ifndef wxCONFIG_CASE_SENSITIVE
#define wxCONFIG_CASE_SENSITIVE 0
#endif
/// separates group and entry names (probably shouldn't be changed)
#ifndef wxCONFIG_PATH_SEPARATOR
#define wxCONFIG_PATH_SEPARATOR wxT('/')
#endif
/// introduces immutable entries
// (i.e. the ones which can't be changed from the local config file)
#ifndef wxCONFIG_IMMUTABLE_PREFIX
#define wxCONFIG_IMMUTABLE_PREFIX wxT('!')
#endif
#if wxUSE_CONFIG
/// should we use registry instead of configuration files under Windows?
// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
// false) or wxRegConfig (if it's true and we're under Win32))
#ifndef wxUSE_CONFIG_NATIVE
#define wxUSE_CONFIG_NATIVE 1
#endif
// not all compilers can deal with template Read/Write() methods, define this
// symbol if the template functions are available
#if !defined( __VMS ) && \
!(defined(__HP_aCC) && defined(__hppa))
#define wxHAS_CONFIG_TEMPLATE_RW
#endif
// Style flags for constructor style parameter
enum
{
wxCONFIG_USE_LOCAL_FILE = 1,
wxCONFIG_USE_GLOBAL_FILE = 2,
wxCONFIG_USE_RELATIVE_PATH = 4,
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
wxCONFIG_USE_SUBDIR = 16
};
// ----------------------------------------------------------------------------
// abstract base class wxConfigBase which defines the interface for derived
// classes
//
// wxConfig organizes the items in a tree-like structure (modelled after the
// Unix/Dos filesystem). There are groups (directories) and keys (files).
// There is always one current group given by the current path.
//
// Keys are pairs "key_name = value" where value may be of string or integer
// (long) type (TODO doubles and other types such as wxDate coming soon).
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxConfigBase : public wxObject
{
public:
// constants
// the type of an entry
enum EntryType
{
Type_Unknown,
Type_String,
Type_Boolean,
Type_Integer, // use Read(long *)
Type_Float // use Read(double *)
};
// static functions
// sets the config object, returns the previous pointer
static wxConfigBase *Set(wxConfigBase *pConfig);
// get the config object, creates it on demand unless DontCreateOnDemand
// was called
static wxConfigBase *Get(bool createOnDemand = true)
{ if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; }
// create a new config object: this function will create the "best"
// implementation of wxConfig available for the current platform, see
// comments near definition wxUSE_CONFIG_NATIVE for details. It returns
// the created object and also sets it as ms_pConfig.
static wxConfigBase *Create();
// should Get() try to create a new log object if the current one is NULL?
static void DontCreateOnDemand() { ms_bAutoCreate = false; }
// ctor & virtual dtor
// ctor (can be used as default ctor too)
//
// Not all args will always be used by derived classes, but including
// them all in each class ensures compatibility. If appName is empty,
// uses wxApp name
wxConfigBase(const wxString& appName = wxEmptyString,
const wxString& vendorName = wxEmptyString,
const wxString& localFilename = wxEmptyString,
const wxString& globalFilename = wxEmptyString,
long style = 0);
// empty but ensures that dtor of all derived classes is virtual
virtual ~wxConfigBase();
// path management
// set current path: if the first character is '/', it's the absolute path,
// otherwise it's a relative path. '..' is supported. If the strPath
// doesn't exist it is created.
virtual void SetPath(const wxString& strPath) = 0;
// retrieve the current path (always as absolute path)
virtual const wxString& GetPath() const = 0;
// enumeration: all functions here return false when there are no more items.
// you must pass the same lIndex to GetNext and GetFirst (don't modify it)
// enumerate subgroups
virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0;
virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0;
// enumerate entries
virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
// get number of entries/subgroups in the current group, with or without
// it's subgroups
virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0;
virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0;
// tests of existence
// returns true if the group by this name exists
virtual bool HasGroup(const wxString& strName) const = 0;
// same as above, but for an entry
virtual bool HasEntry(const wxString& strName) const = 0;
// returns true if either a group or an entry with a given name exist
bool Exists(const wxString& strName) const
{ return HasGroup(strName) || HasEntry(strName); }
// get the entry type
virtual EntryType GetEntryType(const wxString& name) const
{
// by default all entries are strings
return HasEntry(name) ? Type_String : Type_Unknown;
}
// key access: returns true if value was really read, false if default used
// (and if the key is not found the default value is returned.)
// read a string from the key
bool Read(const wxString& key, wxString *pStr) const;
bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
// read a number (long)
bool Read(const wxString& key, long *pl) const;
bool Read(const wxString& key, long *pl, long defVal) const;
// read an int (wrapper around `long' version)
bool Read(const wxString& key, int *pi) const;
bool Read(const wxString& key, int *pi, int defVal) const;
// read a double
bool Read(const wxString& key, double* val) const;
bool Read(const wxString& key, double* val, double defVal) const;
// read a float
bool Read(const wxString& key, float* val) const;
bool Read(const wxString& key, float* val, float defVal) const;
// read a bool
bool Read(const wxString& key, bool* val) const;
bool Read(const wxString& key, bool* val, bool defVal) const;
#if wxUSE_BASE64
// read a binary data block
bool Read(const wxString& key, wxMemoryBuffer* data) const
{ return DoReadBinary(key, data); }
// no default version since it does not make sense for binary data
#endif // wxUSE_BASE64
#ifdef wxHAS_CONFIG_TEMPLATE_RW
// read other types, for which wxFromString is defined
template <typename T>
bool Read(const wxString& key, T* value) const
{
wxString s;
if ( !Read(key, &s) )
return false;
return wxFromString(s, value);
}
template <typename T>
bool Read(const wxString& key, T* value, const T& defVal) const
{
const bool found = Read(key, value);
if ( !found )
{
if (IsRecordingDefaults())
((wxConfigBase *)this)->Write(key, defVal);
*value = defVal;
}
return found;
}
#endif // wxHAS_CONFIG_TEMPLATE_RW
// convenience functions returning directly the value
wxString Read(const wxString& key,
const wxString& defVal = wxEmptyString) const
{ wxString s; (void)Read(key, &s, defVal); return s; }
// we have to provide a separate version for C strings as otherwise the
// template Read() would be used
wxString Read(const wxString& key, const char* defVal) const
{ return Read(key, wxString(defVal)); }
wxString Read(const wxString& key, const wchar_t* defVal) const
{ return Read(key, wxString(defVal)); }
long ReadLong(const wxString& key, long defVal) const
{ long l; (void)Read(key, &l, defVal); return l; }
double ReadDouble(const wxString& key, double defVal) const
{ double d; (void)Read(key, &d, defVal); return d; }
bool ReadBool(const wxString& key, bool defVal) const
{ bool b; (void)Read(key, &b, defVal); return b; }
template <typename T>
T ReadObject(const wxString& key, T const& defVal) const
{ T t; (void)Read(key, &t, defVal); return t; }
// for compatibility with wx 2.8
long Read(const wxString& key, long defVal) const
{ return ReadLong(key, defVal); }
// write the value (return true on success)
bool Write(const wxString& key, const wxString& value)
{ return DoWriteString(key, value); }
bool Write(const wxString& key, long value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, double value)
{ return DoWriteDouble(key, value); }
bool Write(const wxString& key, bool value)
{ return DoWriteBool(key, value); }
#if wxUSE_BASE64
bool Write(const wxString& key, const wxMemoryBuffer& buf)
{ return DoWriteBinary(key, buf); }
#endif // wxUSE_BASE64
// we have to provide a separate version for C strings as otherwise they
// would be converted to bool and not to wxString as expected!
bool Write(const wxString& key, const char *value)
{ return Write(key, wxString(value)); }
bool Write(const wxString& key, const unsigned char *value)
{ return Write(key, wxString(value)); }
bool Write(const wxString& key, const wchar_t *value)
{ return Write(key, wxString(value)); }
// we also have to provide specializations for other types which we want to
// handle using the specialized DoWriteXXX() instead of the generic template
// version below
bool Write(const wxString& key, char value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned char value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, short value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned short value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned int value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, int value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned long value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, float value)
{ return DoWriteDouble(key, value); }
// Causes ambiguities in under OpenVMS
#if !defined( __VMS )
// for other types, use wxToString()
template <typename T>
bool Write(const wxString& key, T const& value)
{ return Write(key, wxToString(value)); }
#endif
// permanently writes all changes
virtual bool Flush(bool bCurrentOnly = false) = 0;
// renaming, all functions return false on failure (probably because the new
// name is already taken by an existing entry)
// rename an entry
virtual bool RenameEntry(const wxString& oldName,
const wxString& newName) = 0;
// rename a group
virtual bool RenameGroup(const wxString& oldName,
const wxString& newName) = 0;
// delete entries/groups
// deletes the specified entry and the group it belongs to if
// it was the last key in it and the second parameter is true
virtual bool DeleteEntry(const wxString& key,
bool bDeleteGroupIfEmpty = true) = 0;
// delete the group (with all subgroups)
virtual bool DeleteGroup(const wxString& key) = 0;
// delete the whole underlying object (disk file, registry key, ...)
// primarily for use by uninstallation routine.
virtual bool DeleteAll() = 0;
// options
// we can automatically expand environment variables in the config entries
// (this option is on by default, you can turn it on/off at any time)
bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; }
// recording of default values
void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; }
bool IsRecordingDefaults() const { return m_bRecordDefaults; }
// does expansion only if needed
wxString ExpandEnvVars(const wxString& str) const;
// misc accessors
wxString GetAppName() const { return m_appName; }
wxString GetVendorName() const { return m_vendorName; }
// Used wxIniConfig to set members in constructor
void SetAppName(const wxString& appName) { m_appName = appName; }
void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }
void SetStyle(long style) { m_style = style; }
long GetStyle() const { return m_style; }
protected:
static bool IsImmutable(const wxString& key)
{ return !key.IsEmpty() && key[0] == wxCONFIG_IMMUTABLE_PREFIX; }
// return the path without trailing separator, if any: this should be called
// to sanitize paths referring to the group names before passing them to
// wxConfigPathChanger as "/foo/bar/" should be the same as "/foo/bar" and it
// isn't interpreted in the same way by it (and this can't be changed there
// as it's not the same for the entries names)
static wxString RemoveTrailingSeparator(const wxString& key);
// do read/write the values of different types
virtual bool DoReadString(const wxString& key, wxString *pStr) const = 0;
virtual bool DoReadLong(const wxString& key, long *pl) const = 0;
virtual bool DoReadDouble(const wxString& key, double* val) const;
virtual bool DoReadBool(const wxString& key, bool* val) const;
#if wxUSE_BASE64
virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const = 0;
#endif // wxUSE_BASE64
virtual bool DoWriteString(const wxString& key, const wxString& value) = 0;
virtual bool DoWriteLong(const wxString& key, long value) = 0;
virtual bool DoWriteDouble(const wxString& key, double value);
virtual bool DoWriteBool(const wxString& key, bool value);
#if wxUSE_BASE64
virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) = 0;
#endif // wxUSE_BASE64
private:
// are we doing automatic environment variable expansion?
bool m_bExpandEnvVars;
// do we record default values?
bool m_bRecordDefaults;
// static variables
static wxConfigBase *ms_pConfig;
static bool ms_bAutoCreate;
// Application name and organisation name
wxString m_appName;
wxString m_vendorName;
// Style flag
long m_style;
wxDECLARE_ABSTRACT_CLASS(wxConfigBase);
};
// a handy little class which changes current path to the path of given entry
// and restores it in dtor: so if you declare a local variable of this type,
// you work in the entry directory and the path is automatically restored
// when the function returns
// Taken out of wxConfig since not all compilers can cope with nested classes.
class WXDLLIMPEXP_BASE wxConfigPathChanger
{
public:
// ctor/dtor do path changing/restoring of the path
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
~wxConfigPathChanger();
// get the key name
const wxString& Name() const { return m_strName; }
// this method must be called if the original path (i.e. the current path at
// the moment of creation of this object) could have been deleted to prevent
// us from restoring the not existing (any more) path
//
// if the original path doesn't exist any more, the path will be restored to
// the deepest still existing component of the old path
void UpdateIfDeleted();
private:
wxConfigBase *m_pContainer; // object we live in
wxString m_strName, // name of entry (i.e. name only)
m_strOldPath; // saved path
bool m_bChanged; // was the path changed?
wxDECLARE_NO_COPY_CLASS(wxConfigPathChanger);
};
#endif // wxUSE_CONFIG
/*
Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
*/
WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxString& path);
#endif // _WX_CONFBASE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/pickerbase.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/pickerbase.h
// Purpose: wxPickerBase definition
// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
// Modified by:
// Created: 14/4/2006
// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PICKERBASE_H_BASE_
#define _WX_PICKERBASE_H_BASE_
#include "wx/control.h"
#include "wx/sizer.h"
#include "wx/containr.h"
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
class WXDLLIMPEXP_FWD_CORE wxToolTip;
extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
// ----------------------------------------------------------------------------
// wxPickerBase is the base class for the picker controls which support
// a wxPB_USE_TEXTCTRL style; i.e. for those pickers which can use an auxiliary
// text control next to the 'real' picker.
//
// The wxTextPickerHelper class manages enabled/disabled state of the text control,
// its sizing and positioning.
// ----------------------------------------------------------------------------
#define wxPB_USE_TEXTCTRL 0x0002
#define wxPB_SMALL 0x8000
class WXDLLIMPEXP_CORE wxPickerBase : public wxNavigationEnabled<wxControl>
{
public:
// ctor: text is the associated text control
wxPickerBase() : m_text(NULL), m_picker(NULL), m_sizer(NULL)
{ }
virtual ~wxPickerBase() {}
// if present, intercepts wxPB_USE_TEXTCTRL style and creates the text control
// The 3rd argument is the initial wxString to display in the text control
bool CreateBase(wxWindow *parent,
wxWindowID id,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
public: // public API
// margin between the text control and the picker
void SetInternalMargin(int newmargin)
{ GetTextCtrlItem()->SetBorder(newmargin); m_sizer->Layout(); }
int GetInternalMargin() const
{ return GetTextCtrlItem()->GetBorder(); }
// proportion of the text control
void SetTextCtrlProportion(int prop)
{ GetTextCtrlItem()->SetProportion(prop); m_sizer->Layout(); }
int GetTextCtrlProportion() const
{ return GetTextCtrlItem()->GetProportion(); }
// proportion of the picker control
void SetPickerCtrlProportion(int prop)
{ GetPickerCtrlItem()->SetProportion(prop); m_sizer->Layout(); }
int GetPickerCtrlProportion() const
{ return GetPickerCtrlItem()->GetProportion(); }
bool IsTextCtrlGrowable() const
{ return (GetTextCtrlItem()->GetFlag() & wxGROW) != 0; }
void SetTextCtrlGrowable(bool grow = true)
{
DoSetGrowableFlagFor(GetTextCtrlItem(), grow);
}
bool IsPickerCtrlGrowable() const
{ return (GetPickerCtrlItem()->GetFlag() & wxGROW) != 0; }
void SetPickerCtrlGrowable(bool grow = true)
{
DoSetGrowableFlagFor(GetPickerCtrlItem(), grow);
}
bool HasTextCtrl() const
{ return m_text != NULL; }
wxTextCtrl *GetTextCtrl()
{ return m_text; }
wxControl *GetPickerCtrl()
{ return m_picker; }
void SetTextCtrl(wxTextCtrl* text)
{ m_text = text; }
void SetPickerCtrl(wxControl* picker)
{ m_picker = picker; }
// methods that derived class must/may override
virtual void UpdatePickerFromTextCtrl() = 0;
virtual void UpdateTextCtrlFromPicker() = 0;
protected:
// overridden base class methods
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip(wxToolTip *tip) wxOVERRIDE;
#endif // wxUSE_TOOLTIPS
// event handlers
void OnTextCtrlDelete(wxWindowDestroyEvent &);
void OnTextCtrlUpdate(wxCommandEvent &);
void OnTextCtrlKillFocus(wxFocusEvent &);
// returns the set of styles for the attached wxTextCtrl
// from given wxPickerBase's styles
virtual long GetTextCtrlStyle(long style) const
{ return (style & wxWINDOW_STYLE_MASK); }
// returns the set of styles for the m_picker
virtual long GetPickerStyle(long style) const
{ return (style & wxWINDOW_STYLE_MASK); }
wxSizerItem *GetPickerCtrlItem() const
{
if (this->HasTextCtrl())
return m_sizer->GetItem((size_t)1);
return m_sizer->GetItem((size_t)0);
}
wxSizerItem *GetTextCtrlItem() const
{
wxASSERT(this->HasTextCtrl());
return m_sizer->GetItem((size_t)0);
}
#if WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_MSG("useless and will be removed in the future")
int GetDefaultPickerCtrlFlag() const
{
return wxALIGN_CENTER_VERTICAL;
}
wxDEPRECATED_MSG("useless and will be removed in the future")
int GetDefaultTextCtrlFlag() const
{
return wxALIGN_CENTER_VERTICAL | wxRIGHT;
}
#endif // WXWIN_COMPATIBILITY_3_0
void PostCreation();
protected:
wxTextCtrl *m_text; // can be NULL
wxControl *m_picker;
wxBoxSizer *m_sizer;
private:
// Common implementation of Set{Text,Picker}CtrlGrowable().
void DoSetGrowableFlagFor(wxSizerItem* item, bool grow);
wxDECLARE_ABSTRACT_CLASS(wxPickerBase);
};
#endif
// _WX_PICKERBASE_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/mimetype.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/mimetype.h
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
// Chris Elliott ([email protected]) 5 Dec 00: write support for Win32
// Created: 23.09.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence (part of wxExtra library)
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MIMETYPE_H_
#define _WX_MIMETYPE_H_
// ----------------------------------------------------------------------------
// headers and such
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_MIMETYPE
// the things we really need
#include "wx/string.h"
#include "wx/dynarray.h"
#include "wx/arrstr.h"
#include <stdarg.h>
// fwd decls
class WXDLLIMPEXP_FWD_BASE wxIconLocation;
class WXDLLIMPEXP_FWD_BASE wxFileTypeImpl;
class WXDLLIMPEXP_FWD_BASE wxMimeTypesManagerImpl;
// these constants define the MIME informations source under UNIX and are used
// by wxMimeTypesManager::Initialize()
enum wxMailcapStyle
{
wxMAILCAP_STANDARD = 1,
wxMAILCAP_NETSCAPE = 2,
wxMAILCAP_KDE = 4,
wxMAILCAP_GNOME = 8,
wxMAILCAP_ALL = 15
};
/*
TODO: would it be more convenient to have this class?
class WXDLLIMPEXP_BASE wxMimeType : public wxString
{
public:
// all string ctors here
wxString GetType() const { return BeforeFirst(wxT('/')); }
wxString GetSubType() const { return AfterFirst(wxT('/')); }
void SetSubType(const wxString& subtype)
{
*this = GetType() + wxT('/') + subtype;
}
bool Matches(const wxMimeType& wildcard)
{
// implement using wxMimeTypesManager::IsOfType()
}
};
*/
// wxMimeTypeCommands stores the verbs defined for the given MIME type with
// their values
class WXDLLIMPEXP_BASE wxMimeTypeCommands
{
public:
wxMimeTypeCommands() {}
wxMimeTypeCommands(const wxArrayString& verbs,
const wxArrayString& commands)
: m_verbs(verbs),
m_commands(commands)
{
}
// add a new verb with the command or replace the old value
void AddOrReplaceVerb(const wxString& verb, const wxString& cmd);
void Add(const wxString& s)
{
m_verbs.Add(s.BeforeFirst(wxT('=')));
m_commands.Add(s.AfterFirst(wxT('=')));
}
// access the commands
size_t GetCount() const { return m_verbs.GetCount(); }
const wxString& GetVerb(size_t n) const { return m_verbs[n]; }
const wxString& GetCmd(size_t n) const { return m_commands[n]; }
bool HasVerb(const wxString& verb) const
{ return m_verbs.Index(verb) != wxNOT_FOUND; }
// returns empty string and wxNOT_FOUND in idx if no such verb
wxString GetCommandForVerb(const wxString& verb, size_t *idx = NULL) const;
// get a "verb=command" string
wxString GetVerbCmd(size_t n) const;
private:
wxArrayString m_verbs;
wxArrayString m_commands;
};
// ----------------------------------------------------------------------------
// wxFileTypeInfo: static container of information accessed via wxFileType.
//
// This class is used with wxMimeTypesManager::AddFallbacks() and Associate()
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxFileTypeInfo
{
private:
void DoVarArgInit(const wxString& mimeType,
const wxString& openCmd,
const wxString& printCmd,
const wxString& desc,
va_list argptr);
void VarArgInit(const wxString *mimeType,
const wxString *openCmd,
const wxString *printCmd,
const wxString *desc,
// the other parameters form a NULL terminated list of
// extensions
...);
public:
// NB: This is a helper to get implicit conversion of variadic ctor's
// fixed arguments into something that can be passed to VarArgInit().
// Do not use, it's used by the ctor only.
struct CtorString
{
CtorString(const char *str) : m_str(str) {}
CtorString(const wchar_t *str) : m_str(str) {}
CtorString(const wxString& str) : m_str(str) {}
CtorString(const wxCStrData& str) : m_str(str) {}
CtorString(const wxScopedCharBuffer& str) : m_str(str) {}
CtorString(const wxScopedWCharBuffer& str) : m_str(str) {}
operator const wxString*() const { return &m_str; }
wxString m_str;
};
// ctors
// Ctor specifying just the MIME type (which is mandatory), the other
// fields can be set later if needed.
wxFileTypeInfo(const wxString& mimeType)
: m_mimeType(mimeType)
{
}
// Ctor allowing to specify the values of all fields at once:
//
// wxFileTypeInfo(const wxString& mimeType,
// const wxString& openCmd,
// const wxString& printCmd,
// const wxString& desc,
// // the other parameters form a list of extensions for this
// // file type and should be terminated with wxNullPtr (not
// // just NULL!)
// ...);
WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo,
4, (const CtorString&,
const CtorString&,
const CtorString&,
const CtorString&),
VarArgInit, VarArgInit)
// the array elements correspond to the parameters of the ctor above in
// the same order
wxFileTypeInfo(const wxArrayString& sArray);
// invalid item - use this to terminate the array passed to
// wxMimeTypesManager::AddFallbacks
wxFileTypeInfo() { }
// test if this object can be used
bool IsValid() const { return !m_mimeType.empty(); }
// setters
// set the open/print commands
void SetOpenCommand(const wxString& command) { m_openCmd = command; }
void SetPrintCommand(const wxString& command) { m_printCmd = command; }
// set the description
void SetDescription(const wxString& desc) { m_desc = desc; }
// add another extension corresponding to this file type
void AddExtension(const wxString& ext) { m_exts.push_back(ext); }
// set the icon info
void SetIcon(const wxString& iconFile, int iconIndex = 0)
{
m_iconFile = iconFile;
m_iconIndex = iconIndex;
}
// set the short desc
void SetShortDesc(const wxString& shortDesc) { m_shortDesc = shortDesc; }
// accessors
// get the MIME type
const wxString& GetMimeType() const { return m_mimeType; }
// get the open command
const wxString& GetOpenCommand() const { return m_openCmd; }
// get the print command
const wxString& GetPrintCommand() const { return m_printCmd; }
// get the short description (only used under Win32 so far)
const wxString& GetShortDesc() const { return m_shortDesc; }
// get the long, user visible description
const wxString& GetDescription() const { return m_desc; }
// get the array of all extensions
const wxArrayString& GetExtensions() const { return m_exts; }
size_t GetExtensionsCount() const {return m_exts.GetCount(); }
// get the icon info
const wxString& GetIconFile() const { return m_iconFile; }
int GetIconIndex() const { return m_iconIndex; }
private:
wxString m_mimeType, // the MIME type in "type/subtype" form
m_openCmd, // command to use for opening the file (%s allowed)
m_printCmd, // command to use for printing the file (%s allowed)
m_shortDesc, // a short string used in the registry
m_desc; // a free form description of this file type
// icon stuff
wxString m_iconFile; // the file containing the icon
int m_iconIndex; // icon index in this file
wxArrayString m_exts; // the extensions which are mapped on this filetype
#if 0 // TODO
// the additional (except "open" and "print") command names and values
wxArrayString m_commandNames,
m_commandValues;
#endif // 0
};
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo,
WXDLLIMPEXP_BASE);
// ----------------------------------------------------------------------------
// wxFileType: gives access to all information about the files of given type.
//
// This class holds information about a given "file type". File type is the
// same as MIME type under Unix, but under Windows it corresponds more to an
// extension than to MIME type (in fact, several extensions may correspond to a
// file type). This object may be created in many different ways and depending
// on how it was created some fields may be unknown so the return value of all
// the accessors *must* be checked!
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxFileType
{
friend class WXDLLIMPEXP_FWD_BASE wxMimeTypesManagerImpl; // it has access to m_impl
public:
// An object of this class must be passed to Get{Open|Print}Command. The
// default implementation is trivial and doesn't know anything at all about
// parameters, only filename and MIME type are used (so it's probably ok for
// Windows where %{param} is not used anyhow)
class MessageParameters
{
public:
// ctors
MessageParameters() { }
MessageParameters(const wxString& filename,
const wxString& mimetype = wxEmptyString)
: m_filename(filename), m_mimetype(mimetype) { }
// accessors (called by GetOpenCommand)
// filename
const wxString& GetFileName() const { return m_filename; }
// mime type
const wxString& GetMimeType() const { return m_mimetype; }
// override this function in derived class
virtual wxString GetParamValue(const wxString& WXUNUSED(name)) const
{ return wxEmptyString; }
// virtual dtor as in any base class
virtual ~MessageParameters() { }
protected:
wxString m_filename, m_mimetype;
};
// ctor from static data
wxFileType(const wxFileTypeInfo& ftInfo);
// accessors: all of them return true if the corresponding information
// could be retrieved/found, false otherwise (and in this case all [out]
// parameters are unchanged)
// return the MIME type for this file type
bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;
// fill passed in array with all extensions associated with this file
// type
bool GetExtensions(wxArrayString& extensions);
// get the icon corresponding to this file type and of the given size
bool GetIcon(wxIconLocation *iconloc) const;
bool GetIcon(wxIconLocation *iconloc,
const MessageParameters& params) const;
// get a brief file type description ("*.txt" => "text document")
bool GetDescription(wxString *desc) const;
// get the command to be used to open/print the given file.
// get the command to execute the file of given type
bool GetOpenCommand(wxString *openCmd,
const MessageParameters& params) const;
// a simpler to use version of GetOpenCommand() -- it only takes the
// filename and returns an empty string on failure
wxString GetOpenCommand(const wxString& filename) const;
// get the command to print the file of given type
bool GetPrintCommand(wxString *printCmd,
const MessageParameters& params) const;
// return the number of commands defined for this file type, 0 if none
size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands,
const wxFileType::MessageParameters& params) const;
// set an arbitrary command, ask confirmation if it already exists and
// overwriteprompt is true
bool SetCommand(const wxString& cmd, const wxString& verb,
bool overwriteprompt = true);
bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0);
// remove the association for this filetype from the system MIME database:
// notice that it will only work if the association is defined in the user
// file/registry part, we will never modify the system-wide settings
bool Unassociate();
// operations
// expand a string in the format of GetOpenCommand (which may contain
// '%s' and '%t' format specifiers for the file name and mime type
// and %{param} constructions).
static wxString ExpandCommand(const wxString& command,
const MessageParameters& params);
// dtor (not virtual, shouldn't be derived from)
~wxFileType();
wxString
GetExpandedCommand(const wxString& verb,
const wxFileType::MessageParameters& params) const;
private:
// default ctor is private because the user code never creates us
wxFileType();
// no copy ctor/assignment operator
wxFileType(const wxFileType&);
wxFileType& operator=(const wxFileType&);
// the static container of wxFileType data: if it's not NULL, it means that
// this object is used as fallback only
const wxFileTypeInfo *m_info;
// the object which implements the real stuff like reading and writing
// to/from system MIME database
wxFileTypeImpl *m_impl;
};
//----------------------------------------------------------------------------
// wxMimeTypesManagerFactory
//----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxMimeTypesManagerFactory
{
public:
wxMimeTypesManagerFactory() {}
virtual ~wxMimeTypesManagerFactory() {}
virtual wxMimeTypesManagerImpl *CreateMimeTypesManagerImpl();
static void Set( wxMimeTypesManagerFactory *factory );
static wxMimeTypesManagerFactory *Get();
private:
static wxMimeTypesManagerFactory *m_factory;
};
// ----------------------------------------------------------------------------
// wxMimeTypesManager: interface to system MIME database.
//
// This class accesses the information about all known MIME types and allows
// the application to retrieve information (including how to handle data of
// given type) about them.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxMimeTypesManager
{
public:
// static helper functions
// -----------------------
// check if the given MIME type is the same as the other one: the
// second argument may contain wildcards ('*'), but not the first. If
// the types are equal or if the mimeType matches wildcard the function
// returns true, otherwise it returns false
static bool IsOfType(const wxString& mimeType, const wxString& wildcard);
// ctor
wxMimeTypesManager();
// NB: the following 2 functions are for Unix only and don't do anything
// elsewhere
// loads data from standard files according to the mailcap styles
// specified: this is a bitwise OR of wxMailcapStyle values
//
// use the extraDir parameter if you want to look for files in another
// directory
void Initialize(int mailcapStyle = wxMAILCAP_ALL,
const wxString& extraDir = wxEmptyString);
// and this function clears all the data from the manager
void ClearData();
// Database lookup: all functions return a pointer to wxFileType object
// whose methods may be used to query it for the information you're
// interested in. If the return value is !NULL, caller is responsible for
// deleting it.
// get file type from file extension
wxFileType *GetFileTypeFromExtension(const wxString& ext);
// get file type from MIME type (in format <category>/<format>)
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
// enumerate all known MIME types
//
// returns the number of retrieved file types
size_t EnumAllFileTypes(wxArrayString& mimetypes);
// these functions can be used to provide default values for some of the
// MIME types inside the program itself
//
// The filetypes array should be terminated by either NULL entry or an
// invalid wxFileTypeInfo (i.e. the one created with default ctor)
void AddFallbacks(const wxFileTypeInfo *filetypes);
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
// create or remove associations
// create a new association using the fields of wxFileTypeInfo (at least
// the MIME type and the extension should be set)
// if the other fields are empty, the existing values should be left alone
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
// undo Associate()
bool Unassociate(wxFileType *ft) ;
// dtor (not virtual, shouldn't be derived from)
~wxMimeTypesManager();
private:
// no copy ctor/assignment operator
wxMimeTypesManager(const wxMimeTypesManager&);
wxMimeTypesManager& operator=(const wxMimeTypesManager&);
// the fallback info which is used if the information is not found in the
// real system database
wxArrayFileTypeInfo m_fallbacks;
// the object working with the system MIME database
wxMimeTypesManagerImpl *m_impl;
// if m_impl is NULL, create one
void EnsureImpl();
friend class wxMimeTypeCmnModule;
};
// ----------------------------------------------------------------------------
// global variables
// ----------------------------------------------------------------------------
// the default mime manager for wxWidgets programs
extern WXDLLIMPEXP_DATA_BASE(wxMimeTypesManager *) wxTheMimeTypesManager;
#endif // wxUSE_MIMETYPE
#endif
//_WX_MIMETYPE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/colordlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/colordlg.h
// Purpose: wxColourDialog
// Author: Vadim Zeitlin
// Modified by:
// Created: 01/02/97
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLORDLG_H_BASE_
#define _WX_COLORDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_COLOURDLG
#include "wx/colourdata.h"
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/colordlg.h"
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
#include "wx/osx/colordlg.h"
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/colordlg.h"
#elif defined(__WXQT__)
#include "wx/qt/colordlg.h"
#else
#include "wx/generic/colrdlgg.h"
#define wxColourDialog wxGenericColourDialog
#endif
// get the colour from user and return it
WXDLLIMPEXP_CORE wxColour wxGetColourFromUser(wxWindow *parent = NULL,
const wxColour& colInit = wxNullColour,
const wxString& caption = wxEmptyString,
wxColourData *data = NULL);
#endif // wxUSE_COLOURDLG
#endif
// _WX_COLORDLG_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/button.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/button.h
// Purpose: wxButtonBase class
// Author: Vadim Zeitlin
// Modified by:
// Created: 15.08.00
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUTTON_H_BASE_
#define _WX_BUTTON_H_BASE_
#include "wx/defs.h"
#if wxUSE_BUTTON
#include "wx/anybutton.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
// ----------------------------------------------------------------------------
// wxButton: a push button
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
{
public:
wxButtonBase() { }
// show the authentication needed symbol on the button: this is currently
// only implemented on Windows Vista and newer (on which it shows the UAC
// shield symbol)
void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
// make this button the default button in its top level window
//
// returns the old default item (possibly NULL)
virtual wxWindow *SetDefault();
// returns the default button size for this platform
static wxSize GetDefaultSize();
protected:
wxDECLARE_NO_COPY_CLASS(wxButtonBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/button.h"
#elif defined(__WXMSW__)
#include "wx/msw/button.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/button.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/button.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/button.h"
#elif defined(__WXMAC__)
#include "wx/osx/button.h"
#elif defined(__WXQT__)
#include "wx/qt/button.h"
#endif
#endif // wxUSE_BUTTON
#endif // _WX_BUTTON_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/scopedptr.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/scopedptr.h
// Purpose: scoped smart pointer class
// Author: Jesse Lovelace <[email protected]>
// Created: 06/01/02
// Copyright: (c) Jesse Lovelace and original Boost authors (see below)
// (c) 2009 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// This class closely follows the implementation of the boost
// library scoped_ptr and is an adaptation for c++ macro's in
// the wxWidgets project. The original authors of the boost
// scoped_ptr are given below with their respective copyrights.
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
// Copyright (c) 2001, 2002 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation.
//
#ifndef _WX_SCOPED_PTR_H_
#define _WX_SCOPED_PTR_H_
#include "wx/defs.h"
#include "wx/checkeddelete.h"
// ----------------------------------------------------------------------------
// wxScopedPtr: A scoped pointer
// ----------------------------------------------------------------------------
template <class T>
class wxScopedPtr
{
public:
typedef T element_type;
explicit wxScopedPtr(T * ptr = NULL) : m_ptr(ptr) { }
~wxScopedPtr() { wxCHECKED_DELETE(m_ptr); }
// test for pointer validity: defining conversion to unspecified_bool_type
// and not more obvious bool to avoid implicit conversions to integer types
#ifdef __BORLANDC__
// this compiler is too dumb to use unspecified_bool_type operator in tests
// of the form "if ( !ptr )"
typedef bool unspecified_bool_type;
#else
typedef T *(wxScopedPtr<T>::*unspecified_bool_type)() const;
#endif // __BORLANDC__
operator unspecified_bool_type() const
{
return m_ptr ? &wxScopedPtr<T>::get : NULL;
}
void reset(T * ptr = NULL)
{
if ( ptr != m_ptr )
{
wxCHECKED_DELETE(m_ptr);
m_ptr = ptr;
}
}
T *release()
{
T *ptr = m_ptr;
m_ptr = NULL;
return ptr;
}
T & operator*() const
{
wxASSERT(m_ptr != NULL);
return *m_ptr;
}
T * operator->() const
{
wxASSERT(m_ptr != NULL);
return m_ptr;
}
T * get() const
{
return m_ptr;
}
void swap(wxScopedPtr& other)
{
T * const tmp = other.m_ptr;
other.m_ptr = m_ptr;
m_ptr = tmp;
}
private:
T * m_ptr;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxScopedPtr, T);
};
// ----------------------------------------------------------------------------
// old macro based implementation
// ----------------------------------------------------------------------------
/* The type being used *must* be complete at the time
that wxDEFINE_SCOPED_* is called or a compiler error will result.
This is because the class checks for the completeness of the type
being used. */
#define wxDECLARE_SCOPED_PTR(T, name) \
class name \
{ \
private: \
T * m_ptr; \
\
name(name const &); \
name & operator=(name const &); \
\
public: \
explicit name(T * ptr = NULL) \
: m_ptr(ptr) { } \
\
~name(); \
\
void reset(T * ptr = NULL); \
\
T *release() \
{ \
T *ptr = m_ptr; \
m_ptr = NULL; \
return ptr; \
} \
\
T & operator*() const \
{ \
wxASSERT(m_ptr != NULL); \
return *m_ptr; \
} \
\
T * operator->() const \
{ \
wxASSERT(m_ptr != NULL); \
return m_ptr; \
} \
\
T * get() const \
{ \
return m_ptr; \
} \
\
void swap(name & ot) \
{ \
T * tmp = ot.m_ptr; \
ot.m_ptr = m_ptr; \
m_ptr = tmp; \
} \
};
#define wxDEFINE_SCOPED_PTR(T, name)\
void name::reset(T * ptr) \
{ \
if (m_ptr != ptr) \
{ \
wxCHECKED_DELETE(m_ptr); \
m_ptr = ptr; \
} \
} \
name::~name() \
{ \
wxCHECKED_DELETE(m_ptr); \
}
// this macro can be used for the most common case when you want to declare and
// define the scoped pointer at the same time and want to use the standard
// naming convention: auto pointer to Foo is called FooPtr
#define wxDEFINE_SCOPED_PTR_TYPE(T) \
wxDECLARE_SCOPED_PTR(T, T ## Ptr) \
wxDEFINE_SCOPED_PTR(T, T ## Ptr)
// ----------------------------------------------------------------------------
// "Tied" scoped pointer: same as normal one but also sets the value of
// some other variable to the pointer value
// ----------------------------------------------------------------------------
#define wxDEFINE_TIED_SCOPED_PTR_TYPE(T) \
wxDEFINE_SCOPED_PTR_TYPE(T) \
class T ## TiedPtr : public T ## Ptr \
{ \
public: \
T ## TiedPtr(T **pp, T *p) \
: T ## Ptr(p), m_pp(pp) \
{ \
m_pOld = *pp; \
*pp = p; \
} \
\
~ T ## TiedPtr() \
{ \
*m_pp = m_pOld; \
} \
\
private: \
T **m_pp; \
T *m_pOld; \
};
#endif // _WX_SCOPED_PTR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/treectrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/treectrl.h
// Purpose: wxTreeCtrl base header
// Author: Karsten Ballueder
// Modified by:
// Created:
// Copyright: (c) Karsten Ballueder
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TREECTRL_H_BASE_
#define _WX_TREECTRL_H_BASE_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_TREECTRL
#include "wx/control.h"
#include "wx/treebase.h"
#include "wx/textctrl.h" // wxTextCtrl::ms_classinfo used through wxCLASSINFO macro
#include "wx/systhemectrl.h"
class WXDLLIMPEXP_FWD_CORE wxImageList;
#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
#define wxHAS_GENERIC_TREECTRL
#endif
// ----------------------------------------------------------------------------
// wxTreeCtrlBase
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTreeCtrlBase : public wxSystemThemedControl<wxControl>
{
public:
wxTreeCtrlBase();
virtual ~wxTreeCtrlBase();
// accessors
// ---------
// get the total number of items in the control
virtual unsigned int GetCount() const = 0;
// indent is the number of pixels the children are indented relative to
// the parents position. SetIndent() also redraws the control
// immediately.
virtual unsigned int GetIndent() const = 0;
virtual void SetIndent(unsigned int indent) = 0;
// spacing is the number of pixels between the start and the Text
// (has no effect under wxMSW)
unsigned int GetSpacing() const { return m_spacing; }
void SetSpacing(unsigned int spacing) { m_spacing = spacing; }
// image list: these functions allow to associate an image list with
// the control and retrieve it. Note that the control does _not_ delete
// the associated image list when it's deleted in order to allow image
// lists to be shared between different controls.
//
// The normal image list is for the icons which correspond to the
// normal tree item state (whether it is selected or not).
// Additionally, the application might choose to show a state icon
// which corresponds to an app-defined item state (for example,
// checked/unchecked) which are taken from the state image list.
wxImageList *GetImageList() const { return m_imageListNormal; }
wxImageList *GetStateImageList() const { return m_imageListState; }
virtual void SetImageList(wxImageList *imageList) = 0;
virtual void SetStateImageList(wxImageList *imageList) = 0;
void AssignImageList(wxImageList *imageList)
{
SetImageList(imageList);
m_ownsImageListNormal = true;
}
void AssignStateImageList(wxImageList *imageList)
{
SetStateImageList(imageList);
m_ownsImageListState = true;
}
// Functions to work with tree ctrl items. Unfortunately, they can _not_ be
// member functions of wxTreeItem because they must know the tree the item
// belongs to for Windows implementation and storing the pointer to
// wxTreeCtrl in each wxTreeItem is just too much waste.
// accessors
// ---------
// retrieve items label
virtual wxString GetItemText(const wxTreeItemId& item) const = 0;
// get one of the images associated with the item (normal by default)
virtual int GetItemImage(const wxTreeItemId& item,
wxTreeItemIcon which = wxTreeItemIcon_Normal) const = 0;
// get the data associated with the item
virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const = 0;
// get the item's text colour
virtual wxColour GetItemTextColour(const wxTreeItemId& item) const = 0;
// get the item's background colour
virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const = 0;
// get the item's font
virtual wxFont GetItemFont(const wxTreeItemId& item) const = 0;
// get the items state
int GetItemState(const wxTreeItemId& item) const
{
return DoGetItemState(item);
}
// modifiers
// ---------
// set items label
virtual void SetItemText(const wxTreeItemId& item, const wxString& text) = 0;
// set one of the images associated with the item (normal by default)
virtual void SetItemImage(const wxTreeItemId& item,
int image,
wxTreeItemIcon which = wxTreeItemIcon_Normal) = 0;
// associate some data with the item
virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data) = 0;
// force appearance of [+] button near the item. This is useful to
// allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory
// usage and loading time.
virtual void SetItemHasChildren(const wxTreeItemId& item,
bool has = true) = 0;
// the item will be shown in bold
virtual void SetItemBold(const wxTreeItemId& item, bool bold = true) = 0;
// the item will be shown with a drop highlight
virtual void SetItemDropHighlight(const wxTreeItemId& item,
bool highlight = true) = 0;
// set the items text colour
virtual void SetItemTextColour(const wxTreeItemId& item,
const wxColour& col) = 0;
// set the items background colour
virtual void SetItemBackgroundColour(const wxTreeItemId& item,
const wxColour& col) = 0;
// set the items font (should be of the same height for all items)
virtual void SetItemFont(const wxTreeItemId& item,
const wxFont& font) = 0;
// set the items state (special state values: wxTREE_ITEMSTATE_NONE/NEXT/PREV)
void SetItemState(const wxTreeItemId& item, int state);
// item status inquiries
// ---------------------
// is the item visible (it might be outside the view or not expanded)?
virtual bool IsVisible(const wxTreeItemId& item) const = 0;
// does the item has any children?
virtual bool ItemHasChildren(const wxTreeItemId& item) const = 0;
// same as above
bool HasChildren(const wxTreeItemId& item) const
{ return ItemHasChildren(item); }
// is the item expanded (only makes sense if HasChildren())?
virtual bool IsExpanded(const wxTreeItemId& item) const = 0;
// is this item currently selected (the same as has focus)?
virtual bool IsSelected(const wxTreeItemId& item) const = 0;
// is item text in bold font?
virtual bool IsBold(const wxTreeItemId& item) const = 0;
// is the control empty?
bool IsEmpty() const;
// number of children
// ------------------
// if 'recursively' is false, only immediate children count, otherwise
// the returned number is the number of all items in this branch
virtual size_t GetChildrenCount(const wxTreeItemId& item,
bool recursively = true) const = 0;
// navigation
// ----------
// wxTreeItemId.IsOk() will return false if there is no such item
// get the root tree item
virtual wxTreeItemId GetRootItem() const = 0;
// get the item currently selected (may return NULL if no selection)
virtual wxTreeItemId GetSelection() const = 0;
// get the items currently selected, return the number of such item
//
// NB: this operation is expensive and can take a long time for a
// control with a lot of items (~ O(number of items)).
virtual size_t GetSelections(wxArrayTreeItemIds& selections) const = 0;
// get the last item to be clicked when the control has wxTR_MULTIPLE
// equivalent to GetSelection() if not wxTR_MULTIPLE
virtual wxTreeItemId GetFocusedItem() const = 0;
// Clears the currently focused item
virtual void ClearFocusedItem() = 0;
// Sets the currently focused item. Item should be valid
virtual void SetFocusedItem(const wxTreeItemId& item) = 0;
// get the parent of this item (may return NULL if root)
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const = 0;
// for this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
// to make these functions reentrant (i.e. allow more than one
// enumeration on one and the same object simultaneously). Of course,
// the "cookie" passed to GetFirstChild() and GetNextChild() should be
// the same!
// get the first child of this item
virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
wxTreeItemIdValue& cookie) const = 0;
// get the next child
virtual wxTreeItemId GetNextChild(const wxTreeItemId& item,
wxTreeItemIdValue& cookie) const = 0;
// get the last child of this item - this method doesn't use cookies
virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const = 0;
// get the next sibling of this item
virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const = 0;
// get the previous sibling
virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const = 0;
// get first visible item
virtual wxTreeItemId GetFirstVisibleItem() const = 0;
// get the next visible item: item must be visible itself!
// see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const = 0;
// get the previous visible item: item must be visible itself!
virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const = 0;
// operations
// ----------
// add the root node to the tree
virtual wxTreeItemId AddRoot(const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL) = 0;
// insert a new item in as the first child of the parent
wxTreeItemId PrependItem(const wxTreeItemId& parent,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL)
{
return DoInsertItem(parent, 0u, text, image, selImage, data);
}
// insert a new item after a given one
wxTreeItemId InsertItem(const wxTreeItemId& parent,
const wxTreeItemId& idPrevious,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL)
{
return DoInsertAfter(parent, idPrevious, text, image, selImage, data);
}
// insert a new item before the one with the given index
wxTreeItemId InsertItem(const wxTreeItemId& parent,
size_t pos,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL)
{
return DoInsertItem(parent, pos, text, image, selImage, data);
}
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL)
{
return DoInsertItem(parent, (size_t)-1, text, image, selImage, data);
}
// delete this item and associated data if any
virtual void Delete(const wxTreeItemId& item) = 0;
// delete all children (but don't delete the item itself)
// NB: this won't send wxEVT_TREE_ITEM_DELETED events
virtual void DeleteChildren(const wxTreeItemId& item) = 0;
// delete all items from the tree
// NB: this won't send wxEVT_TREE_ITEM_DELETED events
virtual void DeleteAllItems() = 0;
// expand this item
virtual void Expand(const wxTreeItemId& item) = 0;
// expand the item and all its children recursively
void ExpandAllChildren(const wxTreeItemId& item);
// expand all items
void ExpandAll();
// collapse the item without removing its children
virtual void Collapse(const wxTreeItemId& item) = 0;
// collapse the item and all its children
void CollapseAllChildren(const wxTreeItemId& item);
// collapse all items
void CollapseAll();
// collapse the item and remove all children
virtual void CollapseAndReset(const wxTreeItemId& item) = 0;
// toggles the current state
virtual void Toggle(const wxTreeItemId& item) = 0;
// remove the selection from currently selected item (if any)
virtual void Unselect() = 0;
// unselect all items (only makes sense for multiple selection control)
virtual void UnselectAll() = 0;
// select this item
virtual void SelectItem(const wxTreeItemId& item, bool select = true) = 0;
// selects all (direct) children for given parent (only for
// multiselection controls)
virtual void SelectChildren(const wxTreeItemId& parent) = 0;
// unselect this item
void UnselectItem(const wxTreeItemId& item) { SelectItem(item, false); }
// toggle item selection
void ToggleItemSelection(const wxTreeItemId& item)
{
SelectItem(item, !IsSelected(item));
}
// make sure this item is visible (expanding the parent item and/or
// scrolling to this item if necessary)
virtual void EnsureVisible(const wxTreeItemId& item) = 0;
// scroll to this item (but don't expand its parent)
virtual void ScrollTo(const wxTreeItemId& item) = 0;
// start editing the item label: this (temporarily) replaces the item
// with a one line edit control. The item will be selected if it hadn't
// been before. textCtrlClass parameter allows you to create an edit
// control of arbitrary user-defined class deriving from wxTextCtrl.
virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)) = 0;
// returns the same pointer as StartEdit() if the item is being edited,
// NULL otherwise (it's assumed that no more than one item may be
// edited simultaneously)
virtual wxTextCtrl *GetEditControl() const = 0;
// end editing and accept or discard the changes to item label
virtual void EndEditLabel(const wxTreeItemId& item,
bool discardChanges = false) = 0;
// Enable or disable beep when incremental match doesn't find any item.
// Only implemented in the generic version currently.
virtual void EnableBellOnNoMatch(bool WXUNUSED(on) = true) { }
// sorting
// -------
// this function is called to compare 2 items and should return -1, 0
// or +1 if the first item is less than, equal to or greater than the
// second one. The base class version performs alphabetic comparison
// of item labels (GetText)
virtual int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2)
{
return wxStrcmp(GetItemText(item1), GetItemText(item2));
}
// sort the children of this item using OnCompareItems
//
// NB: this function is not reentrant and not MT-safe (FIXME)!
virtual void SortChildren(const wxTreeItemId& item) = 0;
// items geometry
// --------------
// determine to which item (if any) belongs the given point (the
// coordinates specified are relative to the client area of tree ctrl)
// and, in the second variant, fill the flags parameter with a bitmask
// of wxTREE_HITTEST_xxx constants.
wxTreeItemId HitTest(const wxPoint& point) const
{ int dummy; return DoTreeHitTest(point, dummy); }
wxTreeItemId HitTest(const wxPoint& point, int& flags) const
{ return DoTreeHitTest(point, flags); }
// get the bounding rectangle of the item (or of its label only)
virtual bool GetBoundingRect(const wxTreeItemId& item,
wxRect& rect,
bool textOnly = false) const = 0;
// implementation
// --------------
virtual bool ShouldInheritColours() const wxOVERRIDE { return false; }
// hint whether to calculate best size quickly or accurately
void SetQuickBestSize(bool q) { m_quickBestSize = q; }
bool GetQuickBestSize() const { return m_quickBestSize; }
protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
// common part of Get/SetItemState()
virtual int DoGetItemState(const wxTreeItemId& item) const = 0;
virtual void DoSetItemState(const wxTreeItemId& item, int state) = 0;
// common part of Append/Prepend/InsertItem()
//
// pos is the position at which to insert the item or (size_t)-1 to append
// it to the end
virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
size_t pos,
const wxString& text,
int image, int selImage,
wxTreeItemData *data) = 0;
// and this function implements overloaded InsertItem() taking wxTreeItemId
// (it can't be called InsertItem() as we'd have virtual function hiding
// problem in derived classes then)
virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent,
const wxTreeItemId& idPrevious,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL) = 0;
// real HitTest() implementation: again, can't be called just HitTest()
// because it's overloaded and so the non-virtual overload would be hidden
// (and can't be called DoHitTest() because this is already in wxWindow)
virtual wxTreeItemId DoTreeHitTest(const wxPoint& point,
int& flags) const = 0;
wxImageList *m_imageListNormal, // images for tree elements
*m_imageListState; // special images for app defined states
bool m_ownsImageListNormal,
m_ownsImageListState;
// spacing between left border and the text
unsigned int m_spacing;
// whether full or quick calculation is done in DoGetBestSize
bool m_quickBestSize;
private:
// Intercept Escape and Return keys to ensure that our in-place edit
// control always gets them before they're used for dialog navigation or
// anything else.
void OnCharHook(wxKeyEvent& event);
wxDECLARE_NO_COPY_CLASS(wxTreeCtrlBase);
};
// ----------------------------------------------------------------------------
// include the platform-dependent wxTreeCtrl class
// ----------------------------------------------------------------------------
#ifdef wxHAS_GENERIC_TREECTRL
#include "wx/generic/treectlg.h"
#elif defined(__WXMSW__)
#include "wx/msw/treectrl.h"
#else
#error "unknown native wxTreeCtrl implementation"
#endif
#endif // wxUSE_TREECTRL
#endif // _WX_TREECTRL_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/textctrl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/textctrl.h
// Purpose: wxTextAttr and wxTextCtrlBase class - the interface of wxTextCtrl
// Author: Vadim Zeitlin
// Modified by:
// Created: 13.07.99
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TEXTCTRL_H_BASE_
#define _WX_TEXTCTRL_H_BASE_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_TEXTCTRL
#include "wx/control.h" // the base class
#include "wx/textentry.h" // single-line text entry interface
#include "wx/dynarray.h" // wxArrayInt
#include "wx/gdicmn.h" // wxPoint
#if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h"
#define wxHAS_TEXT_WINDOW_STREAM 1
#else
#define wxHAS_TEXT_WINDOW_STREAM 0
#endif
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
class WXDLLIMPEXP_FWD_CORE wxTextCtrlBase;
// ----------------------------------------------------------------------------
// wxTextCtrl types
// ----------------------------------------------------------------------------
// wxTextCoord is the line or row number (which should have been unsigned but
// is long for backwards compatibility)
typedef long wxTextCoord;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
extern WXDLLIMPEXP_DATA_CORE(const char) wxTextCtrlNameStr[];
// this is intentionally not enum to avoid warning fixes with
// typecasting from enum type to wxTextCoord
const wxTextCoord wxOutOfRangeTextCoord = -1;
const wxTextCoord wxInvalidTextCoord = -2;
// ----------------------------------------------------------------------------
// wxTextCtrl style flags
// ----------------------------------------------------------------------------
#define wxTE_NO_VSCROLL 0x0002
#define wxTE_READONLY 0x0010
#define wxTE_MULTILINE 0x0020
#define wxTE_PROCESS_TAB 0x0040
// alignment flags
#define wxTE_LEFT 0x0000 // 0x0000
#define wxTE_CENTER wxALIGN_CENTER_HORIZONTAL // 0x0100
#define wxTE_RIGHT wxALIGN_RIGHT // 0x0200
#define wxTE_CENTRE wxTE_CENTER
// this style means to use RICHEDIT control and does something only under wxMSW
// and Win32 and is silently ignored under all other platforms
#define wxTE_RICH 0x0080
#define wxTE_PROCESS_ENTER 0x0400
#define wxTE_PASSWORD 0x0800
// automatically detect the URLs and generate the events when mouse is
// moved/clicked over an URL
//
// this is for Win32 richedit and wxGTK2 multiline controls only so far
#define wxTE_AUTO_URL 0x1000
// by default, the Windows text control doesn't show the selection when it
// doesn't have focus - use this style to force it to always show it
#define wxTE_NOHIDESEL 0x2000
// use wxHSCROLL to not wrap text at all, wxTE_CHARWRAP to wrap it at any
// position and wxTE_WORDWRAP to wrap at words boundary
//
// if no wrapping style is given at all, the control wraps at word boundary
#define wxTE_DONTWRAP wxHSCROLL
#define wxTE_CHARWRAP 0x4000 // wrap at any position
#define wxTE_WORDWRAP 0x0001 // wrap only at words boundaries
#define wxTE_BESTWRAP 0x0000 // this is the default
#if WXWIN_COMPATIBILITY_2_8
// this style is (or at least should be) on by default now, don't use it
#define wxTE_AUTO_SCROLL 0
#endif // WXWIN_COMPATIBILITY_2_8
// force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for
// wxTE_RICH controls - can be used together with or instead of wxTE_RICH
#define wxTE_RICH2 0x8000
#if defined(__WXOSX_IPHONE__)
#define wxTE_CAPITALIZE wxTE_RICH2
#else
#define wxTE_CAPITALIZE 0
#endif
// ----------------------------------------------------------------------------
// wxTextCtrl file types
// ----------------------------------------------------------------------------
#define wxTEXT_TYPE_ANY 0
// ----------------------------------------------------------------------------
// wxTextCtrl::HitTest return values
// ----------------------------------------------------------------------------
// the point asked is ...
enum wxTextCtrlHitTestResult
{
wxTE_HT_UNKNOWN = -2, // this means HitTest() is simply not implemented
wxTE_HT_BEFORE, // either to the left or upper
wxTE_HT_ON_TEXT, // directly on
wxTE_HT_BELOW, // below [the last line]
wxTE_HT_BEYOND // after [the end of line]
};
// ... the character returned
// ----------------------------------------------------------------------------
// Types for wxTextAttr
// ----------------------------------------------------------------------------
// Alignment
enum wxTextAttrAlignment
{
wxTEXT_ALIGNMENT_DEFAULT,
wxTEXT_ALIGNMENT_LEFT,
wxTEXT_ALIGNMENT_CENTRE,
wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
wxTEXT_ALIGNMENT_RIGHT,
wxTEXT_ALIGNMENT_JUSTIFIED
};
// Flags to indicate which attributes are being applied
enum wxTextAttrFlags
{
wxTEXT_ATTR_TEXT_COLOUR = 0x00000001,
wxTEXT_ATTR_BACKGROUND_COLOUR = 0x00000002,
wxTEXT_ATTR_FONT_FACE = 0x00000004,
wxTEXT_ATTR_FONT_POINT_SIZE = 0x00000008,
wxTEXT_ATTR_FONT_PIXEL_SIZE = 0x10000000,
wxTEXT_ATTR_FONT_WEIGHT = 0x00000010,
wxTEXT_ATTR_FONT_ITALIC = 0x00000020,
wxTEXT_ATTR_FONT_UNDERLINE = 0x00000040,
wxTEXT_ATTR_FONT_STRIKETHROUGH = 0x08000000,
wxTEXT_ATTR_FONT_ENCODING = 0x02000000,
wxTEXT_ATTR_FONT_FAMILY = 0x04000000,
wxTEXT_ATTR_FONT_SIZE = \
( wxTEXT_ATTR_FONT_POINT_SIZE | wxTEXT_ATTR_FONT_PIXEL_SIZE ),
wxTEXT_ATTR_FONT = \
( wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT | \
wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE | wxTEXT_ATTR_FONT_STRIKETHROUGH | wxTEXT_ATTR_FONT_ENCODING | wxTEXT_ATTR_FONT_FAMILY ),
wxTEXT_ATTR_ALIGNMENT = 0x00000080,
wxTEXT_ATTR_LEFT_INDENT = 0x00000100,
wxTEXT_ATTR_RIGHT_INDENT = 0x00000200,
wxTEXT_ATTR_TABS = 0x00000400,
wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800,
wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000,
wxTEXT_ATTR_LINE_SPACING = 0x00002000,
wxTEXT_ATTR_CHARACTER_STYLE_NAME = 0x00004000,
wxTEXT_ATTR_PARAGRAPH_STYLE_NAME = 0x00008000,
wxTEXT_ATTR_LIST_STYLE_NAME = 0x00010000,
wxTEXT_ATTR_BULLET_STYLE = 0x00020000,
wxTEXT_ATTR_BULLET_NUMBER = 0x00040000,
wxTEXT_ATTR_BULLET_TEXT = 0x00080000,
wxTEXT_ATTR_BULLET_NAME = 0x00100000,
wxTEXT_ATTR_BULLET = \
( wxTEXT_ATTR_BULLET_STYLE | wxTEXT_ATTR_BULLET_NUMBER | wxTEXT_ATTR_BULLET_TEXT | \
wxTEXT_ATTR_BULLET_NAME ),
wxTEXT_ATTR_URL = 0x00200000,
wxTEXT_ATTR_PAGE_BREAK = 0x00400000,
wxTEXT_ATTR_EFFECTS = 0x00800000,
wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000,
wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE = 0x20000000,
wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER = 0x40000000,
/*!
* Character and paragraph combined styles
*/
wxTEXT_ATTR_CHARACTER = \
(wxTEXT_ATTR_FONT|wxTEXT_ATTR_EFFECTS| \
wxTEXT_ATTR_BACKGROUND_COLOUR|wxTEXT_ATTR_TEXT_COLOUR|wxTEXT_ATTR_CHARACTER_STYLE_NAME|wxTEXT_ATTR_URL),
wxTEXT_ATTR_PARAGRAPH = \
(wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|wxTEXT_ATTR_LINE_SPACING|\
wxTEXT_ATTR_BULLET|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME|wxTEXT_ATTR_LIST_STYLE_NAME|wxTEXT_ATTR_OUTLINE_LEVEL|\
wxTEXT_ATTR_PAGE_BREAK|wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE|wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER),
wxTEXT_ATTR_ALL = (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
};
/*!
* Styles for wxTextAttr::SetBulletStyle
*/
enum wxTextAttrBulletStyle
{
wxTEXT_ATTR_BULLET_STYLE_NONE = 0x00000000,
wxTEXT_ATTR_BULLET_STYLE_ARABIC = 0x00000001,
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002,
wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER = 0x00000004,
wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008,
wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER = 0x00000010,
wxTEXT_ATTR_BULLET_STYLE_SYMBOL = 0x00000020,
wxTEXT_ATTR_BULLET_STYLE_BITMAP = 0x00000040,
wxTEXT_ATTR_BULLET_STYLE_PARENTHESES = 0x00000080,
wxTEXT_ATTR_BULLET_STYLE_PERIOD = 0x00000100,
wxTEXT_ATTR_BULLET_STYLE_STANDARD = 0x00000200,
wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS = 0x00000400,
wxTEXT_ATTR_BULLET_STYLE_OUTLINE = 0x00000800,
wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT = 0x00000000,
wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT = 0x00001000,
wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000,
wxTEXT_ATTR_BULLET_STYLE_CONTINUATION = 0x00004000
};
/*!
* Styles for wxTextAttr::SetTextEffects
*/
enum wxTextAttrEffects
{
wxTEXT_ATTR_EFFECT_NONE = 0x00000000,
wxTEXT_ATTR_EFFECT_CAPITALS = 0x00000001,
wxTEXT_ATTR_EFFECT_SMALL_CAPITALS = 0x00000002,
wxTEXT_ATTR_EFFECT_STRIKETHROUGH = 0x00000004,
wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH = 0x00000008,
wxTEXT_ATTR_EFFECT_SHADOW = 0x00000010,
wxTEXT_ATTR_EFFECT_EMBOSS = 0x00000020,
wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040,
wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080,
wxTEXT_ATTR_EFFECT_SUPERSCRIPT = 0x00000100,
wxTEXT_ATTR_EFFECT_SUBSCRIPT = 0x00000200,
wxTEXT_ATTR_EFFECT_RTL = 0x00000400,
wxTEXT_ATTR_EFFECT_SUPPRESS_HYPHENATION = 0x00001000
};
/*!
* Line spacing values
*/
enum wxTextAttrLineSpacing
{
wxTEXT_ATTR_LINE_SPACING_NORMAL = 10,
wxTEXT_ATTR_LINE_SPACING_HALF = 15,
wxTEXT_ATTR_LINE_SPACING_TWICE = 20
};
// ----------------------------------------------------------------------------
// wxTextAttr: a structure containing the visual attributes of a text
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTextAttr
{
public:
// ctors
wxTextAttr() { Init(); }
wxTextAttr(const wxTextAttr& attr) { Init(); Copy(attr); }
wxTextAttr(const wxColour& colText,
const wxColour& colBack = wxNullColour,
const wxFont& font = wxNullFont,
wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT);
// Initialise this object.
void Init();
// Copy
void Copy(const wxTextAttr& attr);
// Assignment
void operator= (const wxTextAttr& attr);
// Equality test
bool operator== (const wxTextAttr& attr) const;
// Partial equality test. If @a weakTest is @true, attributes of this object do not
// have to be present if those attributes of @a attr are present. If @a weakTest is
// @false, the function will fail if an attribute is present in @a attr but not
// in this object.
bool EqPartial(const wxTextAttr& attr, bool weakTest = true) const;
// Get attributes from font.
bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT);
// setters
void SetTextColour(const wxColour& colText) { m_colText = colText; m_flags |= wxTEXT_ATTR_TEXT_COLOUR; }
void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; m_flags |= wxTEXT_ATTR_BACKGROUND_COLOUR; }
void SetAlignment(wxTextAttrAlignment alignment) { m_textAlignment = alignment; m_flags |= wxTEXT_ATTR_ALIGNMENT; }
void SetTabs(const wxArrayInt& tabs) { m_tabs = tabs; m_flags |= wxTEXT_ATTR_TABS; }
void SetLeftIndent(int indent, int subIndent = 0) { m_leftIndent = indent; m_leftSubIndent = subIndent; m_flags |= wxTEXT_ATTR_LEFT_INDENT; }
void SetRightIndent(int indent) { m_rightIndent = indent; m_flags |= wxTEXT_ATTR_RIGHT_INDENT; }
void SetFontSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; }
void SetFontPointSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; }
void SetFontPixelSize(int pixelSize) { m_fontSize = pixelSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_PIXEL_SIZE; }
void SetFontStyle(wxFontStyle fontStyle) { m_fontStyle = fontStyle; m_flags |= wxTEXT_ATTR_FONT_ITALIC; }
void SetFontWeight(wxFontWeight fontWeight) { m_fontWeight = fontWeight; m_flags |= wxTEXT_ATTR_FONT_WEIGHT; }
void SetFontFaceName(const wxString& faceName) { m_fontFaceName = faceName; m_flags |= wxTEXT_ATTR_FONT_FACE; }
void SetFontUnderlined(bool underlined) { m_fontUnderlined = underlined; m_flags |= wxTEXT_ATTR_FONT_UNDERLINE; }
void SetFontStrikethrough(bool strikethrough) { m_fontStrikethrough = strikethrough; m_flags |= wxTEXT_ATTR_FONT_STRIKETHROUGH; }
void SetFontEncoding(wxFontEncoding encoding) { m_fontEncoding = encoding; m_flags |= wxTEXT_ATTR_FONT_ENCODING; }
void SetFontFamily(wxFontFamily family) { m_fontFamily = family; m_flags |= wxTEXT_ATTR_FONT_FAMILY; }
// Set font
void SetFont(const wxFont& font, int flags = (wxTEXT_ATTR_FONT & ~wxTEXT_ATTR_FONT_PIXEL_SIZE)) { GetFontAttributes(font, flags); }
void SetFlags(long flags) { m_flags = flags; }
void SetCharacterStyleName(const wxString& name) { m_characterStyleName = name; m_flags |= wxTEXT_ATTR_CHARACTER_STYLE_NAME; }
void SetParagraphStyleName(const wxString& name) { m_paragraphStyleName = name; m_flags |= wxTEXT_ATTR_PARAGRAPH_STYLE_NAME; }
void SetListStyleName(const wxString& name) { m_listStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_LIST_STYLE_NAME); }
void SetParagraphSpacingAfter(int spacing) { m_paragraphSpacingAfter = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_AFTER; }
void SetParagraphSpacingBefore(int spacing) { m_paragraphSpacingBefore = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_BEFORE; }
void SetLineSpacing(int spacing) { m_lineSpacing = spacing; m_flags |= wxTEXT_ATTR_LINE_SPACING; }
void SetBulletStyle(int style) { m_bulletStyle = style; m_flags |= wxTEXT_ATTR_BULLET_STYLE; }
void SetBulletNumber(int n) { m_bulletNumber = n; m_flags |= wxTEXT_ATTR_BULLET_NUMBER; }
void SetBulletText(const wxString& text) { m_bulletText = text; m_flags |= wxTEXT_ATTR_BULLET_TEXT; }
void SetBulletFont(const wxString& bulletFont) { m_bulletFont = bulletFont; }
void SetBulletName(const wxString& name) { m_bulletName = name; m_flags |= wxTEXT_ATTR_BULLET_NAME; }
void SetURL(const wxString& url) { m_urlTarget = url; m_flags |= wxTEXT_ATTR_URL; }
void SetPageBreak(bool pageBreak = true) { SetFlags(pageBreak ? (GetFlags() | wxTEXT_ATTR_PAGE_BREAK) : (GetFlags() & ~wxTEXT_ATTR_PAGE_BREAK)); }
void SetTextEffects(int effects) { m_textEffects = effects; SetFlags(GetFlags() | wxTEXT_ATTR_EFFECTS); }
void SetTextEffectFlags(int effects) { m_textEffectFlags = effects; }
void SetOutlineLevel(int level) { m_outlineLevel = level; SetFlags(GetFlags() | wxTEXT_ATTR_OUTLINE_LEVEL); }
const wxColour& GetTextColour() const { return m_colText; }
const wxColour& GetBackgroundColour() const { return m_colBack; }
wxTextAttrAlignment GetAlignment() const { return m_textAlignment; }
const wxArrayInt& GetTabs() const { return m_tabs; }
long GetLeftIndent() const { return m_leftIndent; }
long GetLeftSubIndent() const { return m_leftSubIndent; }
long GetRightIndent() const { return m_rightIndent; }
long GetFlags() const { return m_flags; }
int GetFontSize() const { return m_fontSize; }
wxFontStyle GetFontStyle() const { return m_fontStyle; }
wxFontWeight GetFontWeight() const { return m_fontWeight; }
bool GetFontUnderlined() const { return m_fontUnderlined; }
bool GetFontStrikethrough() const { return m_fontStrikethrough; }
const wxString& GetFontFaceName() const { return m_fontFaceName; }
wxFontEncoding GetFontEncoding() const { return m_fontEncoding; }
wxFontFamily GetFontFamily() const { return m_fontFamily; }
wxFont GetFont() const;
const wxString& GetCharacterStyleName() const { return m_characterStyleName; }
const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; }
const wxString& GetListStyleName() const { return m_listStyleName; }
int GetParagraphSpacingAfter() const { return m_paragraphSpacingAfter; }
int GetParagraphSpacingBefore() const { return m_paragraphSpacingBefore; }
int GetLineSpacing() const { return m_lineSpacing; }
int GetBulletStyle() const { return m_bulletStyle; }
int GetBulletNumber() const { return m_bulletNumber; }
const wxString& GetBulletText() const { return m_bulletText; }
const wxString& GetBulletFont() const { return m_bulletFont; }
const wxString& GetBulletName() const { return m_bulletName; }
const wxString& GetURL() const { return m_urlTarget; }
int GetTextEffects() const { return m_textEffects; }
int GetTextEffectFlags() const { return m_textEffectFlags; }
int GetOutlineLevel() const { return m_outlineLevel; }
// accessors
bool HasTextColour() const { return m_colText.IsOk() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
bool HasBackgroundColour() const { return m_colBack.IsOk() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && HasFlag(wxTEXT_ATTR_ALIGNMENT) ; }
bool HasTabs() const { return HasFlag(wxTEXT_ATTR_TABS) ; }
bool HasLeftIndent() const { return HasFlag(wxTEXT_ATTR_LEFT_INDENT); }
bool HasRightIndent() const { return HasFlag(wxTEXT_ATTR_RIGHT_INDENT); }
bool HasFontWeight() const { return HasFlag(wxTEXT_ATTR_FONT_WEIGHT); }
bool HasFontSize() const { return HasFlag(wxTEXT_ATTR_FONT_SIZE); }
bool HasFontPointSize() const { return HasFlag(wxTEXT_ATTR_FONT_POINT_SIZE); }
bool HasFontPixelSize() const { return HasFlag(wxTEXT_ATTR_FONT_PIXEL_SIZE); }
bool HasFontItalic() const { return HasFlag(wxTEXT_ATTR_FONT_ITALIC); }
bool HasFontUnderlined() const { return HasFlag(wxTEXT_ATTR_FONT_UNDERLINE); }
bool HasFontStrikethrough() const { return HasFlag(wxTEXT_ATTR_FONT_STRIKETHROUGH); }
bool HasFontFaceName() const { return HasFlag(wxTEXT_ATTR_FONT_FACE); }
bool HasFontEncoding() const { return HasFlag(wxTEXT_ATTR_FONT_ENCODING); }
bool HasFontFamily() const { return HasFlag(wxTEXT_ATTR_FONT_FAMILY); }
bool HasFont() const { return HasFlag(wxTEXT_ATTR_FONT); }
bool HasParagraphSpacingAfter() const { return HasFlag(wxTEXT_ATTR_PARA_SPACING_AFTER); }
bool HasParagraphSpacingBefore() const { return HasFlag(wxTEXT_ATTR_PARA_SPACING_BEFORE); }
bool HasLineSpacing() const { return HasFlag(wxTEXT_ATTR_LINE_SPACING); }
bool HasCharacterStyleName() const { return HasFlag(wxTEXT_ATTR_CHARACTER_STYLE_NAME) && !m_characterStyleName.IsEmpty(); }
bool HasParagraphStyleName() const { return HasFlag(wxTEXT_ATTR_PARAGRAPH_STYLE_NAME) && !m_paragraphStyleName.IsEmpty(); }
bool HasListStyleName() const { return HasFlag(wxTEXT_ATTR_LIST_STYLE_NAME) || !m_listStyleName.IsEmpty(); }
bool HasBulletStyle() const { return HasFlag(wxTEXT_ATTR_BULLET_STYLE); }
bool HasBulletNumber() const { return HasFlag(wxTEXT_ATTR_BULLET_NUMBER); }
bool HasBulletText() const { return HasFlag(wxTEXT_ATTR_BULLET_TEXT); }
bool HasBulletName() const { return HasFlag(wxTEXT_ATTR_BULLET_NAME); }
bool HasURL() const { return HasFlag(wxTEXT_ATTR_URL); }
bool HasPageBreak() const { return HasFlag(wxTEXT_ATTR_PAGE_BREAK); }
bool HasTextEffects() const { return HasFlag(wxTEXT_ATTR_EFFECTS); }
bool HasTextEffect(int effect) const { return HasFlag(wxTEXT_ATTR_EFFECTS) && ((GetTextEffectFlags() & effect) != 0); }
bool HasOutlineLevel() const { return HasFlag(wxTEXT_ATTR_OUTLINE_LEVEL); }
bool HasFlag(long flag) const { return (m_flags & flag) != 0; }
void RemoveFlag(long flag) { m_flags &= ~flag; }
void AddFlag(long flag) { m_flags |= flag; }
// Is this a character style?
bool IsCharacterStyle() const { return HasFlag(wxTEXT_ATTR_CHARACTER); }
bool IsParagraphStyle() const { return HasFlag(wxTEXT_ATTR_PARAGRAPH); }
// returns false if we have any attributes set, true otherwise
bool IsDefault() const
{
return GetFlags() == 0;
}
// Merges the given attributes. If compareWith
// is non-NULL, then it will be used to mask out those attributes that are the same in style
// and compareWith, for situations where we don't want to explicitly set inherited attributes.
bool Apply(const wxTextAttr& style, const wxTextAttr* compareWith = NULL);
// merges the attributes of the base and the overlay objects and returns
// the result; the parameter attributes take precedence
//
// WARNING: the order of arguments is the opposite of Combine()
static wxTextAttr Merge(const wxTextAttr& base, const wxTextAttr& overlay)
{
return Combine(overlay, base, NULL);
}
// merges the attributes of this object and overlay
void Merge(const wxTextAttr& overlay)
{
*this = Merge(*this, overlay);
}
// return the attribute having the valid font and colours: it uses the
// attributes set in attr and falls back first to attrDefault and then to
// the text control font/colours for those attributes which are not set
static wxTextAttr Combine(const wxTextAttr& attr,
const wxTextAttr& attrDef,
const wxTextCtrlBase *text);
// Compare tabs
static bool TabsEq(const wxArrayInt& tabs1, const wxArrayInt& tabs2);
// Remove attributes
static bool RemoveStyle(wxTextAttr& destStyle, const wxTextAttr& style);
// Combine two bitlists, specifying the bits of interest with separate flags.
static bool CombineBitlists(int& valueA, int valueB, int& flagsA, int flagsB);
// Compare two bitlists
static bool BitlistsEqPartial(int valueA, int valueB, int flags);
// Split into paragraph and character styles
static bool SplitParaCharStyles(const wxTextAttr& style, wxTextAttr& parStyle, wxTextAttr& charStyle);
private:
long m_flags;
// Paragraph styles
wxArrayInt m_tabs; // array of int: tab stops in 1/10 mm
int m_leftIndent; // left indent in 1/10 mm
int m_leftSubIndent; // left indent for all but the first
// line in a paragraph relative to the
// first line, in 1/10 mm
int m_rightIndent; // right indent in 1/10 mm
wxTextAttrAlignment m_textAlignment;
int m_paragraphSpacingAfter;
int m_paragraphSpacingBefore;
int m_lineSpacing;
int m_bulletStyle;
int m_bulletNumber;
int m_textEffects;
int m_textEffectFlags;
int m_outlineLevel;
wxString m_bulletText;
wxString m_bulletFont;
wxString m_bulletName;
wxString m_urlTarget;
wxFontEncoding m_fontEncoding;
// Character styles
wxColour m_colText,
m_colBack;
int m_fontSize;
wxFontStyle m_fontStyle;
wxFontWeight m_fontWeight;
wxFontFamily m_fontFamily;
bool m_fontUnderlined;
bool m_fontStrikethrough;
wxString m_fontFaceName;
// Character style
wxString m_characterStyleName;
// Paragraph style
wxString m_paragraphStyleName;
// List style
wxString m_listStyleName;
};
// ----------------------------------------------------------------------------
// wxTextAreaBase: multiline text control specific methods
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTextAreaBase
{
public:
wxTextAreaBase() { }
virtual ~wxTextAreaBase() { }
// lines access
// ------------
virtual int GetLineLength(long lineNo) const = 0;
virtual wxString GetLineText(long lineNo) const = 0;
virtual int GetNumberOfLines() const = 0;
// file IO
// -------
bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY)
{ return DoLoadFile(file, fileType); }
bool SaveFile(const wxString& file = wxEmptyString,
int fileType = wxTEXT_TYPE_ANY);
// dirty flag handling
// -------------------
virtual bool IsModified() const = 0;
virtual void MarkDirty() = 0;
virtual void DiscardEdits() = 0;
void SetModified(bool modified)
{
if ( modified )
MarkDirty();
else
DiscardEdits();
}
// styles handling
// ---------------
// 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) = 0;
virtual bool GetStyle(long position, wxTextAttr& style) = 0;
virtual bool SetDefaultStyle(const wxTextAttr& style) = 0;
virtual const wxTextAttr& GetDefaultStyle() const { return m_defaultStyle; }
// coordinates translation
// -----------------------
// 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 = 0;
virtual bool PositionToXY(long pos, long *x, long *y) const = 0;
// translate the given position (which is just an index in the text control)
// to client coordinates
wxPoint PositionToCoords(long pos) const;
virtual void ShowPosition(long pos) = 0;
// 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;
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
wxTextCoord *col,
wxTextCoord *row) const;
virtual wxString GetValue() const = 0;
virtual void SetValue(const wxString& value) = 0;
protected:
// implementation of loading/saving
virtual bool DoLoadFile(const wxString& file, int fileType);
virtual bool DoSaveFile(const wxString& file, int fileType);
// Return true if the given position is valid, i.e. positive and less than
// the last position.
virtual bool IsValidPosition(long pos) const = 0;
// Default stub implementation of PositionToCoords() always returns
// wxDefaultPosition.
virtual wxPoint DoPositionToCoords(long pos) const;
// the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default
wxString m_filename;
// the text style which will be used for any new text added to the control
wxTextAttr m_defaultStyle;
wxDECLARE_NO_COPY_CLASS(wxTextAreaBase);
};
// this class defines wxTextCtrl interface, wxTextCtrlBase actually implements
// too much things because it derives from wxTextEntry and not wxTextEntryBase
// and so any classes which "look like" wxTextCtrl (such as wxRichTextCtrl)
// but don't need the (native) implementation bits from wxTextEntry should
// actually derive from this one and not wxTextCtrlBase
class WXDLLIMPEXP_CORE wxTextCtrlIface : public wxTextAreaBase,
public wxTextEntryBase
{
public:
wxTextCtrlIface() { }
// wxTextAreaBase overrides
virtual wxString GetValue() const wxOVERRIDE
{
return wxTextEntryBase::GetValue();
}
virtual void SetValue(const wxString& value) wxOVERRIDE
{
wxTextEntryBase::SetValue(value);
}
protected:
virtual bool IsValidPosition(long pos) const wxOVERRIDE
{
return pos >= 0 && pos <= GetLastPosition();
}
private:
wxDECLARE_NO_COPY_CLASS(wxTextCtrlIface);
};
// ----------------------------------------------------------------------------
// wxTextCtrl: a single or multiple line text zone where user can edit text
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTextCtrlBase : public wxControl,
#if wxHAS_TEXT_WINDOW_STREAM
public wxSTD streambuf,
#endif
public wxTextAreaBase,
public wxTextEntry
{
public:
// creation
// --------
wxTextCtrlBase() { }
virtual ~wxTextCtrlBase() { }
// more readable flag testing methods
bool IsSingleLine() const { return !HasFlag(wxTE_MULTILINE); }
bool IsMultiLine() const { return !IsSingleLine(); }
// stream-like insertion operators: these are always available, whether we
// were, or not, compiled with streambuf support
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
wxTextCtrl& operator<<(float f) { return *this << double(f); }
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(char c) { return *this << wxString(c); }
wxTextCtrl& operator<<(wchar_t c) { return *this << wxString(c); }
// insert the character which would have resulted from this key event,
// return true if anything has been inserted
virtual bool EmulateKeyPress(const wxKeyEvent& event);
// do the window-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) wxOVERRIDE;
virtual bool ShouldInheritColours() const wxOVERRIDE { return false; }
// work around the problem with having HitTest() both in wxControl and
// wxTextAreaBase base classes
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const wxOVERRIDE
{
return wxTextAreaBase::HitTest(pt, pos);
}
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
wxTextCoord *col,
wxTextCoord *row) const wxOVERRIDE
{
return wxTextAreaBase::HitTest(pt, col, row);
}
// we provide stubs for these functions as not all platforms have styles
// support, but we really should leave them pure virtual here
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;
// wxTextAreaBase overrides
virtual wxString GetValue() const wxOVERRIDE
{
return wxTextEntry::GetValue();
}
virtual void SetValue(const wxString& value) wxOVERRIDE
{
wxTextEntry::SetValue(value);
}
// wxWindow overrides
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE
{
return GetClassDefaultAttributes(GetWindowVariant());
}
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
{
return GetCompositeControlsDefaultAttributes(variant);
}
protected:
// Override wxEvtHandler method to check for a common problem of binding
// wxEVT_TEXT_ENTER to a control without wxTE_PROCESS_ENTER style, which is
// never going to work.
virtual bool OnDynamicBind(wxDynamicEventTableEntry& entry) wxOVERRIDE;
// override streambuf method
#if wxHAS_TEXT_WINDOW_STREAM
int overflow(int i) wxOVERRIDE;
#endif // wxHAS_TEXT_WINDOW_STREAM
// Another wxTextAreaBase override.
virtual bool IsValidPosition(long pos) const wxOVERRIDE
{
return pos >= 0 && pos <= GetLastPosition();
}
// implement the wxTextEntry pure virtual method
virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; }
wxDECLARE_NO_COPY_CLASS(wxTextCtrlBase);
wxDECLARE_ABSTRACT_CLASS(wxTextCtrlBase);
};
// ----------------------------------------------------------------------------
// include the platform-dependent class definition
// ----------------------------------------------------------------------------
#if defined(__WXX11__)
#include "wx/x11/textctrl.h"
#elif defined(__WXUNIVERSAL__)
#include "wx/univ/textctrl.h"
#elif defined(__WXMSW__)
#include "wx/msw/textctrl.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/textctrl.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/textctrl.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/textctrl.h"
#elif defined(__WXMAC__)
#include "wx/osx/textctrl.h"
#elif defined(__WXQT__)
#include "wx/qt/textctrl.h"
#endif
// ----------------------------------------------------------------------------
// wxTextCtrl events
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxTextUrlEvent;
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_ENTER, wxCommandEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_URL, wxTextUrlEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_MAXLEN, wxCommandEvent);
class WXDLLIMPEXP_CORE wxTextUrlEvent : public wxCommandEvent
{
public:
wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse,
long start, long end)
: wxCommandEvent(wxEVT_TEXT_URL, winid),
m_evtMouse(evtMouse), m_start(start), m_end(end)
{ }
wxTextUrlEvent(const wxTextUrlEvent& event)
: wxCommandEvent(event),
m_evtMouse(event.m_evtMouse),
m_start(event.m_start),
m_end(event.m_end) { }
// get the mouse event which happened over the URL
const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; }
// get the start of the URL
long GetURLStart() const { return m_start; }
// get the end of the URL
long GetURLEnd() const { return m_end; }
virtual wxEvent *Clone() const wxOVERRIDE { return new wxTextUrlEvent(*this); }
protected:
// the corresponding mouse event
wxMouseEvent m_evtMouse;
// the start and end indices of the URL in the text control
long m_start,
m_end;
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTextUrlEvent);
public:
// for wxWin RTTI only, don't use
wxTextUrlEvent() : m_evtMouse(), m_start(0), m_end(0) { }
};
typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&);
#define wxTextEventHandler(func) wxCommandEventHandler(func)
#define wxTextUrlEventHandler(func) \
wxEVENT_HANDLER_CAST(wxTextUrlEventFunction, func)
#define wx__DECLARE_TEXTEVT(evt, id, fn) \
wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextEventHandler(fn))
#define wx__DECLARE_TEXTURLEVT(evt, id, fn) \
wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextUrlEventHandler(fn))
#define EVT_TEXT(id, fn) wx__DECLARE_EVT1(wxEVT_TEXT, id, wxTextEventHandler(fn))
#define EVT_TEXT_ENTER(id, fn) wx__DECLARE_TEXTEVT(ENTER, id, fn)
#define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTURLEVT(URL, id, fn)
#define EVT_TEXT_MAXLEN(id, fn) wx__DECLARE_TEXTEVT(MAXLEN, id, fn)
#if wxHAS_TEXT_WINDOW_STREAM
// ----------------------------------------------------------------------------
// wxStreamToTextRedirector: this class redirects all data sent to the given
// C++ stream to the wxTextCtrl given to its ctor during its lifetime.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxStreamToTextRedirector
{
private:
void Init(wxTextCtrl *text)
{
m_sbufOld = m_ostr.rdbuf();
m_ostr.rdbuf(text);
}
public:
wxStreamToTextRedirector(wxTextCtrl *text)
: m_ostr(wxSTD cout)
{
Init(text);
}
wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr)
: m_ostr(*ostr)
{
Init(text);
}
~wxStreamToTextRedirector()
{
m_ostr.rdbuf(m_sbufOld);
}
private:
// the stream we're redirecting
wxSTD ostream& m_ostr;
// the old streambuf (before we changed it)
wxSTD streambuf *m_sbufOld;
};
#endif // wxHAS_TEXT_WINDOW_STREAM
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT
#define wxEVT_COMMAND_TEXT_ENTER wxEVT_TEXT_ENTER
#define wxEVT_COMMAND_TEXT_URL wxEVT_TEXT_URL
#define wxEVT_COMMAND_TEXT_MAXLEN wxEVT_TEXT_MAXLEN
#endif // wxUSE_TEXTCTRL
#endif
// _WX_TEXTCTRL_H_BASE_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/rearrangectrl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/rearrangectrl.h
// Purpose: various controls for rearranging the items interactively
// Author: Vadim Zeitlin
// Created: 2008-12-15
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_REARRANGECTRL_H_
#define _WX_REARRANGECTRL_H_
#include "wx/checklst.h"
#if wxUSE_REARRANGECTRL
#include "wx/panel.h"
#include "wx/dialog.h"
#include "wx/arrstr.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeListNameStr[];
extern WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeDialogNameStr[];
// ----------------------------------------------------------------------------
// wxRearrangeList: a (check) list box allowing to move items around
// ----------------------------------------------------------------------------
// This class works allows to change the order of the items shown in it as well
// as to check or uncheck them individually. The data structure used to allow
// this is the order array which contains the items indices indexed by their
// position with an added twist that the unchecked items are represented by the
// bitwise complement of the corresponding index (for any architecture using
// two's complement for negative numbers representation (i.e. just about any at
// all) this means that a checked item N is represented by -N-1 in unchecked
// state).
//
// So, for example, the array order [1 -3 0] used in conjunction with the items
// array ["first", "second", "third"] means that the items are displayed in the
// order "second", "third", "first" and the "third" item is unchecked while the
// other two are checked.
class WXDLLIMPEXP_CORE wxRearrangeList : public wxCheckListBox
{
public:
// ctors and such
// --------------
// default ctor, call Create() later
wxRearrangeList() { }
// ctor creating the control, the arguments are the same as for
// wxCheckListBox except for the extra order array which defines the
// (initial) display order of the items as well as their statuses, see the
// description above
wxRearrangeList(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayInt& order,
const wxArrayString& items,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRearrangeListNameStr)
{
Create(parent, id, pos, size, order, items, style, validator, name);
}
// Create() function takes the same parameters as the base class one and
// the order array determining the initial display order
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayInt& order,
const wxArrayString& items,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRearrangeListNameStr);
// items order
// -----------
// get the current items order; the returned array uses the same convention
// as the one passed to the ctor
const wxArrayInt& GetCurrentOrder() const { return m_order; }
// return true if the current item can be moved up or down (i.e. just that
// it's not the first or the last one)
bool CanMoveCurrentUp() const;
bool CanMoveCurrentDown() const;
// move the current item one position up or down, return true if it was moved
// or false if the current item was the first/last one and so nothing was done
bool MoveCurrentUp();
bool MoveCurrentDown();
// Override this to keep our m_order array in sync with the real item state.
virtual void Check(unsigned int item, bool check = true) wxOVERRIDE;
int DoInsertItems(const wxArrayStringsAdapter& items, unsigned int pos,
void **clientData, wxClientDataType type) wxOVERRIDE;
void DoDeleteOneItem(unsigned int n) wxOVERRIDE;
void DoClear() wxOVERRIDE;
private:
// swap two items at the given positions in the listbox
void Swap(int pos1, int pos2);
// event handler for item checking/unchecking
void OnCheck(wxCommandEvent& event);
// the current order array
wxArrayInt m_order;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxRearrangeList);
};
// ----------------------------------------------------------------------------
// wxRearrangeCtrl: composite control containing a wxRearrangeList and buttons
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxRearrangeCtrl : public wxPanel
{
public:
// ctors/Create function are the same as for wxRearrangeList
wxRearrangeCtrl()
{
Init();
}
wxRearrangeCtrl(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayInt& order,
const wxArrayString& items,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRearrangeListNameStr)
{
Init();
Create(parent, id, pos, size, order, items, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayInt& order,
const wxArrayString& items,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRearrangeListNameStr);
// get the underlying listbox
wxRearrangeList *GetList() const { return m_list; }
private:
// common part of all ctors
void Init();
// event handlers for the buttons
void OnUpdateButtonUI(wxUpdateUIEvent& event);
void OnButton(wxCommandEvent& event);
wxRearrangeList *m_list;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxRearrangeCtrl);
};
// ----------------------------------------------------------------------------
// wxRearrangeDialog: dialog containing a wxRearrangeCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxRearrangeDialog : public wxDialog
{
public:
// default ctor, use Create() later
wxRearrangeDialog() { Init(); }
// ctor for the dialog: message is shown inside the dialog itself, order
// and items are passed to wxRearrangeList used internally
wxRearrangeDialog(wxWindow *parent,
const wxString& message,
const wxString& title,
const wxArrayInt& order,
const wxArrayString& items,
const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxRearrangeDialogNameStr)
{
Init();
Create(parent, message, title, order, items, pos, name);
}
bool Create(wxWindow *parent,
const wxString& message,
const wxString& title,
const wxArrayInt& order,
const wxArrayString& items,
const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxRearrangeDialogNameStr);
// methods for the dialog customization
// add extra contents to the dialog below the wxRearrangeCtrl part: the
// given window (usually a wxPanel containing more control inside it) must
// have the dialog as its parent and will be inserted into it at the right
// place by this method
void AddExtraControls(wxWindow *win);
// return the wxRearrangeList control used by the dialog
wxRearrangeList *GetList() const;
// get the order of items after it was modified by the user
wxArrayInt GetOrder() const;
private:
// common part of all ctors
void Init() { m_ctrl = NULL; }
wxRearrangeCtrl *m_ctrl;
wxDECLARE_NO_COPY_CLASS(wxRearrangeDialog);
};
#endif // wxUSE_REARRANGECTRL
#endif // _WX_REARRANGECTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/bannerwindow.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/bannerwindow.h
// Purpose: wxBannerWindow class declaration
// Author: Vadim Zeitlin
// Created: 2011-08-16
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BANNERWINDOW_H_
#define _WX_BANNERWINDOW_H_
#include "wx/defs.h"
#if wxUSE_BANNERWINDOW
#include "wx/bitmap.h"
#include "wx/event.h"
#include "wx/window.h"
class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxColour;
class WXDLLIMPEXP_FWD_CORE wxDC;
extern WXDLLIMPEXP_DATA_CORE(const char) wxBannerWindowNameStr[];
// ----------------------------------------------------------------------------
// A simple banner window showing either a bitmap or text.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBannerWindow : public wxWindow
{
public:
// Default constructor, use Create() later.
wxBannerWindow() { Init(); }
// Convenient constructor that should be used in the majority of cases.
//
// The banner orientation changes how the text in it is displayed and also
// defines where is the bitmap truncated if it's too big to fit but doesn't
// do anything for the banner position, this is supposed to be taken care
// of in the usual way, e.g. using sizers.
wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT)
{
Init();
Create(parent, wxID_ANY, dir);
}
// Full constructor provided for consistency with the other classes only.
wxBannerWindow(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr)
{
Init();
Create(parent, winid, dir, pos, size, style, name);
}
// Can be only called on objects created with the default constructor.
bool Create(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr);
// Provide an existing bitmap to show. For wxLEFT orientation the bitmap is
// truncated from the top, for wxTOP and wxBOTTOM -- from the right and for
// wxRIGHT -- from the bottom, so put the most important part of the bitmap
// information in the opposite direction.
void SetBitmap(const wxBitmap& bmp);
// Set the text to display. This is mutually exclusive with SetBitmap().
// Title is rendered in bold and should be single line, message can have
// multiple lines but is not wrapped automatically.
void SetText(const wxString& title, const wxString& message);
// Set the colours between which the gradient runs. This can be combined
// with SetText() but not SetBitmap().
void SetGradient(const wxColour& start, const wxColour& end);
protected:
virtual wxSize DoGetBestClientSize() const wxOVERRIDE;
private:
// Common part of all constructors.
void Init();
// Fully invalidates the window.
void OnSize(wxSizeEvent& event);
// Redraws the window using either m_bitmap or m_title/m_message.
void OnPaint(wxPaintEvent& event);
// Helper of OnPaint(): draw the bitmap at the correct position depending
// on our orientation.
void DrawBitmapBackground(wxDC& dc);
// Helper of OnPaint(): draw the text in the appropriate direction.
void DrawBannerTextLine(wxDC& dc, const wxString& str, const wxPoint& pos);
// Return the font to use for the title. Currently this is hardcoded as a
// larger bold version of the standard window font but could be made
// configurable in the future.
wxFont GetTitleFont() const;
// Return the colour to use for extending the bitmap. Non-const as it
// updates m_colBitmapBg if needed.
wxColour GetBitmapBg();
// The window side along which the banner is laid out.
wxDirection m_direction;
// If valid, this bitmap is drawn as is.
wxBitmap m_bitmap;
// If bitmap is valid, this is the colour we use to extend it if the bitmap
// is smaller than this window. It is computed on demand by GetBitmapBg().
wxColour m_colBitmapBg;
// The title and main message to draw, used if m_bitmap is invalid.
wxString m_title,
m_message;
// Start and stop gradient colours, only used when drawing text.
wxColour m_colStart,
m_colEnd;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxBannerWindow);
};
#endif // wxUSE_BANNERWINDOW
#endif // _WX_BANNERWINDOW_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/wxprec.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/wxprec.h
// Purpose: Includes the appropriate files for precompiled headers
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// compiler detection; includes setup.h
#include "wx/defs.h"
// check if to use precompiled headers: do it for most Windows compilers unless
// explicitly disabled by defining NOPCH
#if defined(__VISUALC__) || defined(__BORLANDC__)
// If user did not request NOCPH and we're not building using configure
// then assume user wants precompiled headers.
#if !defined(NOPCH) && !defined(__WX_SETUP_H__)
#define WX_PRECOMP
#endif
#endif
#ifdef WX_PRECOMP
// include "wx/chartype.h" first to ensure that UNICODE macro is correctly set
// _before_ including <windows.h>
#include "wx/chartype.h"
// include standard Windows headers
#if defined(__WINDOWS__)
#include "wx/msw/wrapwin.h"
#include "wx/msw/private.h"
#endif
#if defined(__WXMSW__)
#include "wx/msw/wrapcctl.h"
#include "wx/msw/wrapcdlg.h"
#include "wx/msw/missing.h"
#endif
// include the most common wx headers
#include "wx/wx.h"
#endif // WX_PRECOMP
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/wrapsizer.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/wrapsizer.h
// Purpose: provide wrapping sizer for layout (wxWrapSizer)
// Author: Arne Steinarson
// Created: 2008-05-08
// Copyright: (c) Arne Steinarson
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WRAPSIZER_H_
#define _WX_WRAPSIZER_H_
#include "wx/sizer.h"
// flags for wxWrapSizer
enum
{
wxEXTEND_LAST_ON_EACH_LINE = 1,
// don't leave spacers in the beginning of a new row
wxREMOVE_LEADING_SPACES = 2,
wxWRAPSIZER_DEFAULT_FLAGS = wxEXTEND_LAST_ON_EACH_LINE |
wxREMOVE_LEADING_SPACES
};
// ----------------------------------------------------------------------------
// A box sizer that can wrap items on several lines when sum of widths exceed
// available line width.
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxWrapSizer : public wxBoxSizer
{
public:
wxWrapSizer(int orient = wxHORIZONTAL, int flags = wxWRAPSIZER_DEFAULT_FLAGS);
virtual ~wxWrapSizer();
// override base class virtual methods
virtual wxSize CalcMin() wxOVERRIDE;
virtual void RecalcSizes() wxOVERRIDE;
virtual bool InformFirstDirection(int direction,
int size,
int availableOtherDir) wxOVERRIDE;
protected:
// This method is called to decide if an item represents empty space or
// not. We do this to avoid having space-only items first or last on a
// wrapped line (left alignment).
//
// By default only spacers are considered to be empty items but a derived
// class may override this item if some other kind of sizer elements should
// be also considered empty for some reason.
virtual bool IsSpaceItem(wxSizerItem *item) const
{
return item->IsSpacer();
}
// helpers of CalcMin()
void CalcMinFromMinor(int totMinor);
void CalcMinFromMajor(int totMajor);
void CalcMinUsingCurrentLayout();
void CalcMinFittingSize(const wxSize& szBoundary);
void CalcMaxSingleItemSize();
// temporarily change the proportion of the last item of the N-th row to
// extend to the end of line if the appropriate flag is set
void AdjustLastRowItemProp(size_t n, wxSizerItem *itemLast);
// remove all the items from m_rows
void ClearRows();
// return the N-th row sizer from m_rows creating it if necessary
wxSizer *GetRowSizer(size_t n);
// should be called after completion of each row
void FinishRow(size_t n, int rowMajor, int rowMinor, wxSizerItem *itemLast);
const int m_flags; // Flags specified in the ctor
int m_dirInform; // Direction for size information
int m_availSize; // Size available in m_dirInform direction
int m_availableOtherDir; // Size available in the other direction
bool m_lastUsed; // Indicates whether value from InformFirst... has
// been used yet
// The sizes below are computed by RecalcSizes(), i.e. they don't have
// valid values during the initial call to CalcMin() and they are only
// valid for the current layout (i.e. the current number of rows)
int m_minSizeMinor; // Min size in minor direction
int m_maxSizeMajor; // Size of longest row
int m_minItemMajor; // Size of smallest item in major direction
wxBoxSizer m_rows; // Sizer containing multiple rows of our items
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxWrapSizer);
};
#endif // _WX_WRAPSIZER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/platform.h | /**
* Name: wx/platform.h
* Purpose: define the OS and compiler identification macros
* Author: Vadim Zeitlin
* Modified by:
* Created: 29.10.01 (extracted from wx/defs.h)
* Copyright: (c) 1997-2001 Vadim Zeitlin
* Licence: wxWindows licence
*/
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
#ifndef _WX_PLATFORM_H_
#define _WX_PLATFORM_H_
#ifdef __WXMAC_XCODE__
# include <unistd.h>
# include <TargetConditionals.h>
# include <AvailabilityMacros.h>
# ifndef MAC_OS_X_VERSION_10_4
# define MAC_OS_X_VERSION_10_4 1040
# endif
# ifndef MAC_OS_X_VERSION_10_5
# define MAC_OS_X_VERSION_10_5 1050
# endif
# ifndef MAC_OS_X_VERSION_10_6
# define MAC_OS_X_VERSION_10_6 1060
# endif
# ifndef MAC_OS_X_VERSION_10_7
# define MAC_OS_X_VERSION_10_7 1070
# endif
# ifndef MAC_OS_X_VERSION_10_8
# define MAC_OS_X_VERSION_10_8 1080
# endif
# ifndef MAC_OS_X_VERSION_10_9
# define MAC_OS_X_VERSION_10_9 1090
# endif
# ifndef MAC_OS_X_VERSION_10_10
# define MAC_OS_X_VERSION_10_10 101000
# endif
# ifndef MAC_OS_X_VERSION_10_11
# define MAC_OS_X_VERSION_10_11 101100
# endif
# ifndef MAC_OS_X_VERSION_10_12
# define MAC_OS_X_VERSION_10_12 101200
# endif
# ifndef MAC_OS_X_VERSION_10_13
# define MAC_OS_X_VERSION_10_13 101300
# endif
# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
# ifndef NSAppKitVersionNumber10_10
# define NSAppKitVersionNumber10_10 1343
# endif
# ifndef NSAppKitVersionNumber10_11
# define NSAppKitVersionNumber10_11 1404
# endif
# endif
# ifndef __WXOSX__
# define __WXOSX__ 1
# endif
# ifndef __WXMAC__
# define __WXMAC__ 1
# endif
#endif
/*
We use __WINDOWS__ as our main identification symbol for Microsoft Windows
but it's actually not predefined directly by any commonly used compilers
(only Watcom defines it itself and it's not supported any longer), so we
define it ourselves if any of the following macros is defined:
- MSVC _WIN32 (notice that this is also defined under Win64)
- Borland __WIN32__
- Our __WXMSW__ which selects Windows as platform automatically
*/
#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__)
# ifndef __WINDOWS__
# define __WINDOWS__
# endif /* !__WINDOWS__ */
#endif /* Any standard symbol indicating Windows */
#if defined(__WINDOWS__)
/* Select wxMSW under Windows if no other port is specified. */
# if !defined(__WXMSW__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXQT__)
# define __WXMSW__
# endif
# ifndef _WIN32
# define _WIN32
# endif
# ifndef WIN32
# define WIN32
# endif
# ifndef __WIN32__
# define __WIN32__
# endif
/* MSVC predefines _WIN64 for 64 bit builds, for gcc we use generic
architecture definitions. */
# if defined(_WIN64) || defined(__x86_64__)
# ifndef __WIN64__
# define __WIN64__
# endif /* !__WIN64__ */
# endif /* _WIN64 */
#endif /* __WINDOWS__ */
/*
Don't use widget toolkit specific code in non-GUI code in the library
itself to ensure that the same base library is used for both MSW and GTK
ports. But keep __WXMSW__ defined for (console) applications using
wxWidgets for compatibility.
*/
#if defined(WXBUILDING) && defined(wxUSE_GUI) && !wxUSE_GUI
# ifdef __WXMSW__
# undef __WXMSW__
# endif
# ifdef __WXGTK__
# undef __WXGTK__
# endif
#endif
#if (defined(__WXGTK__) || defined(__WXQT__)) && defined(__WINDOWS__)
# ifdef __WXMSW__
# undef __WXMSW__
# endif
#endif /* (__WXGTK__ || __WXQT__) && __WINDOWS__ */
#ifdef __ANDROID__
# define __WXANDROID__
# include "wx/android/config_android.h"
#endif
#include "wx/compiler.h"
/*
Include wx/setup.h for the Unix platform defines generated by configure and
the library compilation options
Note that it must be included before defining hardware symbols below as they
could be already defined by configure but it must be included after defining
the compiler macros above as msvc/wx/setup.h relies on them under Windows.
*/
#include "wx/setup.h"
/*
Convenience for any optional classes that use the wxAnyButton base class.
*/
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
#define wxHAS_ANY_BUTTON
#endif
/*
Hardware platform detection.
VC++ defines _M_xxx symbols.
*/
#if defined(_M_IX86) || defined(i386) || defined(__i386) || defined(__i386__)
#ifndef __INTEL__
#define __INTEL__
#endif
#endif /* x86 */
#if defined(_M_IA64)
#ifndef __IA64__
#define __IA64__
#endif
#endif /* ia64 */
#if defined(_M_MPPC) || defined(__PPC__) || defined(__ppc__)
#ifndef __POWERPC__
#define __POWERPC__
#endif
#endif /* alpha */
#if defined(_M_ALPHA) || defined(__AXP__)
#ifndef __ALPHA__
#define __ALPHA__
#endif
#endif /* alpha */
/*
adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1
and is used by wxWidgets, _UNICODE and/or UNICODE may be defined or used by
the system headers so bring these settings in sync
*/
/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */
#if defined(_UNICODE) || defined(UNICODE)
# undef wxUSE_UNICODE
# define wxUSE_UNICODE 1
#else /* !UNICODE */
# ifndef wxUSE_UNICODE
# define wxUSE_UNICODE 0
# endif
#endif /* UNICODE/!UNICODE */
/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */
#if wxUSE_UNICODE
# ifndef _UNICODE
# define _UNICODE
# endif
# ifndef UNICODE
# define UNICODE
# endif
#endif /* wxUSE_UNICODE */
/*
test for old versions of Borland C, normally need at least 5.82, Turbo
explorer, available for free at http://www.turboexplorer.com/downloads
*/
/*
Older versions of Borland C have some compiler bugs that need
workarounds. Mostly pertains to the free command line compiler 5.5.1.
*/
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)
/*
The Borland free compiler is unable to handle overloaded enum
comparisons under certain conditions e.g. when any class has a
conversion ctor for an integral type and there's an overload to
compare between an integral type and that class type.
*/
# define wxCOMPILER_NO_OVERLOAD_ON_ENUM
/*
This is needed to overcome bugs in 5.5.1 STL, linking errors will
result if it is not defined.
*/
# define _RWSTD_COMPILE_INSTANTIATE
/*
Preprocessor in older Borland compilers have major problems
concatenating with ##. Specifically, if the string operands being
concatenated have special meaning (e.g. L"str", 123i64 etc)
then ## will not concatenate the operands correctly.
As a workaround, define wxPREPEND* and wxAPPEND* without using
wxCONCAT_HELPER.
*/
# define wxCOMPILER_BROKEN_CONCAT_OPER
#endif /* __BORLANDC__ */
/*
OS: then test for generic Unix defines, then for particular flavours and
finally for Unix-like systems
Mac OS X matches this case (__MACH__), prior Mac OS do not.
*/
#if defined(__UNIX__) || defined(__unix) || defined(__unix__) || \
defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) || \
defined(__hpux) || defined(__sun) || defined(__SUN__) || defined(_AIX) || \
defined(__VMS) || defined(__BEOS__) || defined(__MACH__)
# define __UNIX_LIKE__
# ifdef __SGI__
# ifdef __GNUG__
# else /* !gcc */
/*
Note I use the term __SGI_CC__ for both cc and CC, its not a good
idea to mix gcc and cc/CC, the name mangling is different
*/
# define __SGI_CC__
# endif /* gcc/!gcc */
/* system headers use this symbol and not __cplusplus in some places */
# ifndef _LANGUAGE_C_PLUS_PLUS
# define _LANGUAGE_C_PLUS_PLUS
# endif
# endif /* SGI */
# if defined(__INNOTEK_LIBC__)
/* Ensure visibility of strnlen declaration */
# define _GNU_SOURCE
# endif
/* define __HPUX__ for HP-UX where standard macro is __hpux */
# if defined(__hpux) && !defined(__HPUX__)
# define __HPUX__
# endif /* HP-UX */
/* All of these should already be defined by including configure-
generated setup.h but we wish to support Xcode compilation without
requiring the user to define these himself.
*/
# if defined(__APPLE__) && defined(__MACH__)
# ifndef __UNIX__
# define __UNIX__ 1
# endif
# ifndef __BSD__
# define __BSD__ 1
# endif
/* __DARWIN__ is our own define to mean OS X or pure Darwin */
# ifndef __DARWIN__
# define __DARWIN__ 1
# endif
/* OS X uses unsigned long size_t for both ILP32 and LP64 modes. */
# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
# define wxSIZE_T_IS_ULONG
# endif
# endif
/*
OS: Windows
*/
#elif defined(__WINDOWS__)
/* to be changed for Win64! */
# ifndef __WIN32__
# error "__WIN32__ should be defined for Win32 and Win64, Win16 is not supported"
# endif
/* size_t is the same as unsigned int for all Windows compilers we know, */
/* so define it if it hadn't been done by configure yet */
# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) && !defined(__WIN64__)
# define wxSIZE_T_IS_UINT
# endif
#else
# error "Unknown platform."
#endif /* OS */
/*
if we're on a Unix system but didn't use configure (so that setup.h didn't
define __UNIX__), do define __UNIX__ now
*/
#if !defined(__UNIX__) && defined(__UNIX_LIKE__)
# define __UNIX__
#endif /* Unix */
#if defined(__WXMOTIF__) || defined(__WXX11__)
# define __X__
#endif
/*
We get "Large Files (ILP32) not supported in strict ANSI mode." #error
from HP-UX standard headers when compiling with g++ without this:
*/
#if defined(__HPUX__) && !defined(__STDC_EXT__)
# define __STDC_EXT__ 1
#endif
/* Force linking against required libraries under Windows: */
#if defined __WINDOWS__
# include "wx/msw/libraries.h"
#endif
#if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3)
#define wxNEEDS_CHARPP
#endif
/*
Note that wx/msw/gccpriv.h must be included after defining UNICODE and
_UNICODE macros as it includes _mingw.h which relies on them being set.
*/
#if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) ) && \
!defined(__WXMOTIF__) && \
!defined(__WXX11__)
# include "wx/msw/gccpriv.h"
#else
# undef wxCHECK_W32API_VERSION
# define wxCHECK_W32API_VERSION(maj, min) (0)
# undef wxCHECK_MINGW32_VERSION
# define wxCHECK_MINGW32_VERSION( major, minor ) (0)
# define wxDECL_FOR_MINGW32_ALWAYS(rettype, func, params)
# define wxDECL_FOR_STRICT_MINGW32(rettype, func, params)
#endif
/*
Handle Darwin gcc universal compilation. Don't do this in an Apple-
specific case since no sane compiler should be defining either
__BIG_ENDIAN__ or __LITTLE_ENDIAN__ unless it really is generating
code that will be hosted on a machine with the appropriate endianness.
If a compiler defines neither, assume the user or configure set
WORDS_BIGENDIAN appropriately.
*/
#if defined(__BIG_ENDIAN__)
# undef WORDS_BIGENDIAN
# define WORDS_BIGENDIAN 1
#elif defined(__LITTLE_ENDIAN__)
# undef WORDS_BIGENDIAN
#elif defined(__WXMAC__) && !defined(WORDS_BIGENDIAN)
/* According to Stefan even ancient Mac compilers defined __BIG_ENDIAN__ */
# warning "Compiling wxMac with probably wrong endianness"
#endif
/* also the 32/64 bit universal builds must be handled accordingly */
#ifdef __DARWIN__
# ifdef __LP64__
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 8
# define SIZEOF_LONG 8
# define SIZEOF_SIZE_T 8
# else
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 4
# define SIZEOF_LONG 4
# define SIZEOF_SIZE_T 4
# endif
#endif
/*
Define various OS X symbols before including wx/chkconf.h which uses them.
__WXOSX_MAC__ means Mac OS X, non embedded
__WXOSX_IPHONE__ means OS X iPhone
*/
/*
Normally all of __WXOSX_XXX__, __WXOSX__ and __WXMAC__ are defined by
configure but ensure that we also define them if configure was not used for
whatever reason.
The primary symbol remains __WXOSX_XXX__ one, __WXOSX__ exists to allow
checking for any OS X port (Cocoa) and __WXMAC__ is an old name
for it.
*/
#if defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__)
# ifndef __WXOSX__
# define __WXOSX__ 1
# endif
# ifndef __WXMAC__
# define __WXMAC__ 1
# endif
#endif
#ifdef __WXOSX__
/* setup precise defines according to sdk used */
# include <TargetConditionals.h>
# if defined(__WXOSX_IPHONE__)
# if !( defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE )
# error "incorrect SDK for an iPhone build"
# endif
# else
# if wxUSE_GUI && !defined(__WXOSX_COCOA__)
# error "one of __WXOSX_IPHONE__ or __WXOSX_COCOA__ must be defined for the GUI build"
# endif
# if !( defined(TARGET_OS_MAC) && TARGET_OS_MAC )
# error "incorrect SDK for a Mac OS X build"
# endif
# define __WXOSX_MAC__ 1
# endif
#endif
#ifdef __WXOSX_MAC__
# if defined(__MACH__)
# include <AvailabilityMacros.h>
# ifndef MAC_OS_X_VERSION_10_4
# define MAC_OS_X_VERSION_10_4 1040
# endif
# ifndef MAC_OS_X_VERSION_10_5
# define MAC_OS_X_VERSION_10_5 1050
# endif
# ifndef MAC_OS_X_VERSION_10_6
# define MAC_OS_X_VERSION_10_6 1060
# endif
# ifndef MAC_OS_X_VERSION_10_7
# define MAC_OS_X_VERSION_10_7 1070
# endif
# ifndef MAC_OS_X_VERSION_10_8
# define MAC_OS_X_VERSION_10_8 1080
# endif
# ifndef MAC_OS_X_VERSION_10_9
# define MAC_OS_X_VERSION_10_9 1090
# endif
# ifndef MAC_OS_X_VERSION_10_10
# define MAC_OS_X_VERSION_10_10 101000
# endif
# ifndef MAC_OS_X_VERSION_10_11
# define MAC_OS_X_VERSION_10_11 101100
# endif
# ifndef MAC_OS_X_VERSION_10_12
# define MAC_OS_X_VERSION_10_12 101200
# endif
# ifndef MAC_OS_X_VERSION_10_13
# define MAC_OS_X_VERSION_10_13 101300
# endif
# ifndef MAC_OS_X_VERSION_10_14
# define MAC_OS_X_VERSION_10_14 101400
# endif
# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
# ifndef NSAppKitVersionNumber10_10
# define NSAppKitVersionNumber10_10 1343
# endif
# ifndef NSAppKitVersionNumber10_11
# define NSAppKitVersionNumber10_11 1404
# endif
# endif
# else
# error "only mach-o configurations are supported"
# endif
#endif
/*
This is obsolete and kept for backwards compatibility only.
*/
#if defined(__WXOSX__)
# define __WXOSX_OR_COCOA__ 1
#endif
/*
check the consistency of the settings in setup.h: note that this must be
done after setting wxUSE_UNICODE correctly as it is used in wx/chkconf.h
and after defining the compiler macros which are used in it too
*/
#include "wx/chkconf.h"
/*
some compilers don't support iostream.h any longer, while some of theme
are not updated with <iostream> yet, so override the users setting here
in such case.
*/
#if defined(_MSC_VER) && (_MSC_VER >= 1310)
# undef wxUSE_IOSTREAMH
# define wxUSE_IOSTREAMH 0
#elif defined(__MINGW32__)
# undef wxUSE_IOSTREAMH
# define wxUSE_IOSTREAMH 0
#endif /* compilers with/without iostream.h */
/*
old C++ headers (like <iostream.h>) declare classes in the global namespace
while the new, standard ones (like <iostream>) do it in std:: namespace,
unless it's an old gcc version.
using this macro allows constuctions like "wxSTD iostream" to work in
either case
*/
#if !wxUSE_IOSTREAMH && (!defined(__GNUC__) || ( __GNUC__ > 2 ) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# define wxSTD std::
#else
# define wxSTD
#endif
/* On OpenVMS with the most recent HP C++ compiler some function (i.e. wscanf)
* are only available in the std-namespace. (BUG???)
*/
#if defined( __VMS ) && (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD )
# define wxVMS_USE_STD std::
#else
# define wxVMS_USE_STD
#endif
#ifdef __VMS
#define XtDisplay XTDISPLAY
#ifdef __WXMOTIF__
#define XtParent XTPARENT
#define XtScreen XTSCREEN
#define XtWindow XTWINDOW
#endif
#endif
/* Choose which method we will use for updating menus
* - in OnIdle, or when we receive a wxEVT_MENU_OPEN event.
* Presently, only Windows, OS X and GTK+ support wxEVT_MENU_OPEN.
*/
#ifndef wxUSE_IDLEMENUUPDATES
# if (defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXOSX__)) && !defined(__WXUNIVERSAL__)
# define wxUSE_IDLEMENUUPDATES 0
# else
# define wxUSE_IDLEMENUUPDATES 1
# endif
#endif
/*
* Define symbols that are not yet in
* configure or possibly some setup.h files.
* They will need to be added.
*/
#ifndef wxUSE_FILECONFIG
# if wxUSE_CONFIG && wxUSE_TEXTFILE
# define wxUSE_FILECONFIG 1
# else
# define wxUSE_FILECONFIG 0
# endif
#endif
#ifndef wxUSE_HOTKEY
# define wxUSE_HOTKEY 0
#endif
#if !defined(wxUSE_WXDIB) && defined(__WXMSW__)
# define wxUSE_WXDIB 1
#endif
/*
Optionally supported C++ features.
*/
/*
RTTI: if it is disabled in build/msw/makefile.* then this symbol will
already be defined but it's also possible to do it from configure (with
g++) or by editing project files with MSVC so test for it here too.
*/
#ifndef wxNO_RTTI
/*
Only 4.3 defines __GXX_RTTI by default so its absence is not an
indication of disabled RTTI with the previous versions.
*/
# if wxCHECK_GCC_VERSION(4, 3)
# ifndef __GXX_RTTI
# define wxNO_RTTI
# endif
# elif defined(_MSC_VER)
# ifndef _CPPRTTI
# define wxNO_RTTI
# endif
# endif
#endif /* wxNO_RTTI */
#endif /* _WX_PLATFORM_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/aboutdlg.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/aboutdlg.h
// Purpose: declaration of wxAboutDialog class
// Author: Vadim Zeitlin
// Created: 2006-10-07
// Copyright: (c) 2006 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ABOUTDLG_H_
#define _WX_ABOUTDLG_H_
#include "wx/defs.h"
#if wxUSE_ABOUTDLG
#include "wx/app.h"
#include "wx/icon.h"
// ----------------------------------------------------------------------------
// wxAboutDialogInfo: information shown by the standard "About" dialog
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxAboutDialogInfo
{
public:
// all fields are initially uninitialized
wxAboutDialogInfo() { }
// accessors for various simply fields
// -----------------------------------
// name of the program, if not used defaults to wxApp::GetAppDisplayName()
void SetName(const wxString& name) { m_name = name; }
wxString GetName() const
{ return m_name.empty() ? wxTheApp->GetAppDisplayName() : m_name; }
// version should contain program version without "version" word (e.g.,
// "1.2" or "RC2") while longVersion may contain the full version including
// "version" word (e.g., "Version 1.2" or "Release Candidate 2")
//
// if longVersion is empty, it is automatically constructed from version
//
// generic and gtk native: use short version only, as a suffix to the
// program name msw and osx native: use long version
void SetVersion(const wxString& version,
const wxString& longVersion = wxString());
bool HasVersion() const { return !m_version.empty(); }
const wxString& GetVersion() const { return m_version; }
const wxString& GetLongVersion() const { return m_longVersion; }
// brief, but possibly multiline, description of the program
void SetDescription(const wxString& desc) { m_description = desc; }
bool HasDescription() const { return !m_description.empty(); }
const wxString& GetDescription() const { return m_description; }
// short string containing the program copyright information
void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
bool HasCopyright() const { return !m_copyright.empty(); }
const wxString& GetCopyright() const { return m_copyright; }
// long, multiline string containing the text of the program licence
void SetLicence(const wxString& licence) { m_licence = licence; }
void SetLicense(const wxString& licence) { m_licence = licence; }
bool HasLicence() const { return !m_licence.empty(); }
const wxString& GetLicence() const { return m_licence; }
// icon to be shown in the dialog, defaults to the main frame icon
void SetIcon(const wxIcon& icon) { m_icon = icon; }
bool HasIcon() const { return m_icon.IsOk(); }
wxIcon GetIcon() const;
// web site for the program and its description (defaults to URL itself if
// empty)
void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
{
m_url = url;
m_urlDesc = desc.empty() ? url : desc;
}
bool HasWebSite() const { return !m_url.empty(); }
const wxString& GetWebSiteURL() const { return m_url; }
const wxString& GetWebSiteDescription() const { return m_urlDesc; }
// accessors for the arrays
// ------------------------
// the list of developers of the program
void SetDevelopers(const wxArrayString& developers)
{ m_developers = developers; }
void AddDeveloper(const wxString& developer)
{ m_developers.push_back(developer); }
bool HasDevelopers() const { return !m_developers.empty(); }
const wxArrayString& GetDevelopers() const { return m_developers; }
// the list of documentation writers
void SetDocWriters(const wxArrayString& docwriters)
{ m_docwriters = docwriters; }
void AddDocWriter(const wxString& docwriter)
{ m_docwriters.push_back(docwriter); }
bool HasDocWriters() const { return !m_docwriters.empty(); }
const wxArrayString& GetDocWriters() const { return m_docwriters; }
// the list of artists for the program art
void SetArtists(const wxArrayString& artists)
{ m_artists = artists; }
void AddArtist(const wxString& artist)
{ m_artists.push_back(artist); }
bool HasArtists() const { return !m_artists.empty(); }
const wxArrayString& GetArtists() const { return m_artists; }
// the list of translators
void SetTranslators(const wxArrayString& translators)
{ m_translators = translators; }
void AddTranslator(const wxString& translator)
{ m_translators.push_back(translator); }
bool HasTranslators() const { return !m_translators.empty(); }
const wxArrayString& GetTranslators() const { return m_translators; }
// implementation only
// -------------------
// "simple" about dialog shows only textual information (with possibly
// default icon but without hyperlink nor any long texts such as the
// licence text)
bool IsSimple() const
{ return !HasWebSite() && !HasIcon() && !HasLicence(); }
// get the description and credits (i.e. all of developers, doc writers,
// artists and translators) as a one long multiline string
wxString GetDescriptionAndCredits() const;
// returns the copyright with the (C) string substituted by the Unicode
// character U+00A9
wxString GetCopyrightToDisplay() const;
private:
wxString m_name,
m_version,
m_longVersion,
m_description,
m_copyright,
m_licence;
wxIcon m_icon;
wxString m_url,
m_urlDesc;
wxArrayString m_developers,
m_docwriters,
m_artists,
m_translators;
};
// functions to show the about dialog box
WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL);
#endif // wxUSE_ABOUTDLG
#endif // _WX_ABOUTDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/checkeddelete.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/checkeddelete.h
// Purpose: wxCHECKED_DELETE() macro
// Author: Vadim Zeitlin
// Created: 2009-02-03
// Copyright: (c) 2002-2009 wxWidgets dev team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKEDDELETE_H_
#define _WX_CHECKEDDELETE_H_
#include "wx/cpp.h"
// TODO: provide wxCheckedDelete[Array]() template functions too
// ----------------------------------------------------------------------------
// wxCHECKED_DELETE and wxCHECKED_DELETE_ARRAY macros
// ----------------------------------------------------------------------------
/*
checked deleters are used to make sure that the type being deleted is really
a complete type.: otherwise sizeof() would result in a compile-time error
do { ... } while ( 0 ) construct is used to have an anonymous scope
(otherwise we could have name clashes between different "complete"s) but
still force a semicolon after the macro
*/
#define wxCHECKED_DELETE(ptr) \
wxSTATEMENT_MACRO_BEGIN \
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
delete ptr; \
wxSTATEMENT_MACRO_END
#define wxCHECKED_DELETE_ARRAY(ptr) \
wxSTATEMENT_MACRO_BEGIN \
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
delete [] ptr; \
wxSTATEMENT_MACRO_END
#endif // _WX_CHECKEDDELETE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/ownerdrw.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ownerdrw.h
// Purpose: interface for owner-drawn GUI elements
// Author: Vadim Zeitlin
// Modified by: Marcin Malich
// Created: 11.11.97
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OWNERDRW_H_BASE
#define _WX_OWNERDRW_H_BASE
#include "wx/defs.h"
#if wxUSE_OWNER_DRAWN
#include "wx/font.h"
#include "wx/colour.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
// ----------------------------------------------------------------------------
// wxOwnerDrawn - a mix-in base class, derive from it to implement owner-drawn
// behaviour
//
// wxOwnerDrawn supports drawing of an item with non standard font, color and
// also supports 3 bitmaps: either a checked/unchecked bitmap for a checkable
// element or one unchangeable bitmap otherwise.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxOwnerDrawnBase
{
public:
wxOwnerDrawnBase()
{
m_ownerDrawn = false;
m_margin = ms_defaultMargin;
}
virtual ~wxOwnerDrawnBase() {}
void SetFont(const wxFont& font)
{ m_font = font; m_ownerDrawn = true; }
wxFont& GetFont() const
{ return (wxFont&) m_font; }
void SetTextColour(const wxColour& colText)
{ m_colText = colText; m_ownerDrawn = true; }
wxColour& GetTextColour() const
{ return (wxColour&) m_colText; }
void SetBackgroundColour(const wxColour& colBack)
{ m_colBack = colBack; m_ownerDrawn = true; }
wxColour& GetBackgroundColour() const
{ return (wxColour&) m_colBack ; }
void SetMarginWidth(int width)
{ m_margin = width; }
int GetMarginWidth() const
{ return m_margin; }
static int GetDefaultMarginWidth()
{ return ms_defaultMargin; }
// get item name (with mnemonics if exist)
virtual wxString GetName() const = 0;
// this function might seem strange, but if it returns false it means that
// no non-standard attribute are set, so there is no need for this control
// to be owner-drawn. Moreover, you can force owner-drawn to false if you
// want to change, say, the color for the item but only if it is owner-drawn
// (see wxMenuItem::wxMenuItem for example)
bool IsOwnerDrawn() const
{ return m_ownerDrawn; }
// switch on/off owner-drawing the item
void SetOwnerDrawn(bool ownerDrawn = true)
{ m_ownerDrawn = ownerDrawn; }
// constants used in OnDrawItem
// (they have the same values as corresponding Win32 constants)
enum wxODAction
{
wxODDrawAll = 0x0001, // redraw entire control
wxODSelectChanged = 0x0002, // selection changed (see Status.Select)
wxODFocusChanged = 0x0004 // keyboard focus changed (see Status.Focus)
};
enum wxODStatus
{
wxODSelected = 0x0001, // control is currently selected
wxODGrayed = 0x0002, // item is to be grayed
wxODDisabled = 0x0004, // item is to be drawn as disabled
wxODChecked = 0x0008, // item is to be checked
wxODHasFocus = 0x0010, // item has the keyboard focus
wxODDefault = 0x0020, // item is the default item
wxODHidePrefix= 0x0100 // hide keyboard cues (w2k and xp only)
};
// virtual functions to implement drawing (return true if processed)
virtual bool OnMeasureItem(size_t *width, size_t *height);
virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat) = 0;
protected:
// get the font and colour to use, whether it is set or not
virtual void GetFontToUse(wxFont& font) const;
virtual void GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& colBack) const;
private:
bool m_ownerDrawn; // true if something is non standard
wxFont m_font; // font to use for drawing
wxColour m_colText, // color ----"---"---"----
m_colBack; // background color
int m_margin; // space occupied by bitmap to the left of the item
static int ms_defaultMargin;
};
// ----------------------------------------------------------------------------
// include the platform-specific class declaration
// ----------------------------------------------------------------------------
#if defined(__WXMSW__)
#include "wx/msw/ownerdrw.h"
#endif
#endif // wxUSE_OWNER_DRAWN
#endif // _WX_OWNERDRW_H_BASE
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/textbuf.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/textbuf.h
// Purpose: class wxTextBuffer to work with text buffers of _small_ size
// (buffer is fully loaded in memory) and which understands CR/LF
// differences between platforms.
// Created: 14.11.01
// Author: Morten Hanssen, Vadim Zeitlin
// Copyright: (c) 1998-2001 Morten Hanssen, Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TEXTBUFFER_H
#define _WX_TEXTBUFFER_H
#include "wx/defs.h"
#include "wx/arrstr.h"
#include "wx/convauto.h"
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// the line termination type (kept wxTextFileType name for compatibility)
enum wxTextFileType
{
wxTextFileType_None, // incomplete (the last line of the file only)
wxTextFileType_Unix, // line is terminated with 'LF' = 0xA = 10 = '\n'
wxTextFileType_Dos, // 'CR' 'LF'
wxTextFileType_Mac, // 'CR' = 0xD = 13 = '\r'
wxTextFileType_Os2 // 'CR' 'LF'
};
#include "wx/string.h"
#if wxUSE_TEXTBUFFER
#include "wx/dynarray.h"
// ----------------------------------------------------------------------------
// wxTextBuffer
// ----------------------------------------------------------------------------
WX_DEFINE_USER_EXPORTED_ARRAY_INT(wxTextFileType,
wxArrayLinesType,
class WXDLLIMPEXP_BASE);
#endif // wxUSE_TEXTBUFFER
class WXDLLIMPEXP_BASE wxTextBuffer
{
public:
// constants and static functions
// default type for current platform (determined at compile time)
static const wxTextFileType typeDefault;
// this function returns a string which is identical to "text" passed in
// except that the line terminator characters are changed to correspond the
// given type. Called with the default argument, the function translates
// the string to the native format (Unix for Unix, DOS for Windows, ...).
static wxString Translate(const wxString& text,
wxTextFileType type = typeDefault);
// get the buffer termination string
static const wxChar *GetEOL(wxTextFileType type = typeDefault);
// the static methods of this class are compiled in even when
// !wxUSE_TEXTBUFFER because they are used by the library itself, but the
// rest can be left out
#if wxUSE_TEXTBUFFER
// buffer operations
// -----------------
// buffer exists?
bool Exists() const;
// create the buffer if it doesn't already exist
bool Create();
// same as Create() but with (another) buffer name
bool Create(const wxString& strBufferName);
// Open() also loads buffer in memory on success
bool Open(const wxMBConv& conv = wxConvAuto());
// same as Open() but with (another) buffer name
bool Open(const wxString& strBufferName, const wxMBConv& conv = wxConvAuto());
// closes the buffer and frees memory, losing all changes
bool Close();
// is buffer currently opened?
bool IsOpened() const { return m_isOpened; }
// accessors
// ---------
// get the number of lines in the buffer
size_t GetLineCount() const { return m_aLines.size(); }
// the returned line may be modified (but don't add CR/LF at the end!)
wxString& GetLine(size_t n) { return m_aLines[n]; }
const wxString& GetLine(size_t n) const { return m_aLines[n]; }
wxString& operator[](size_t n) { return m_aLines[n]; }
const wxString& operator[](size_t n) const { return m_aLines[n]; }
// the current line has meaning only when you're using
// GetFirstLine()/GetNextLine() functions, it doesn't get updated when
// you're using "direct access" i.e. GetLine()
size_t GetCurrentLine() const { return m_nCurLine; }
void GoToLine(size_t n) { m_nCurLine = n; }
bool Eof() const { return m_nCurLine == m_aLines.size(); }
// these methods allow more "iterator-like" traversal of the list of
// lines, i.e. you may write something like:
// for ( str = GetFirstLine(); !Eof(); str = GetNextLine() ) { ... }
// NB: const is commented out because not all compilers understand
// 'mutable' keyword yet (m_nCurLine should be mutable)
wxString& GetFirstLine() /* const */
{ return m_aLines.empty() ? ms_eof : m_aLines[m_nCurLine = 0]; }
wxString& GetNextLine() /* const */
{ return ++m_nCurLine == m_aLines.size() ? ms_eof
: m_aLines[m_nCurLine]; }
wxString& GetPrevLine() /* const */
{ wxASSERT(m_nCurLine > 0); return m_aLines[--m_nCurLine]; }
wxString& GetLastLine() /* const */
{ return m_aLines.empty() ? ms_eof : m_aLines[m_nCurLine = m_aLines.size() - 1]; }
// get the type of the line (see also GetEOL)
wxTextFileType GetLineType(size_t n) const { return m_aTypes[n]; }
// guess the type of buffer
wxTextFileType GuessType() const;
// get the name of the buffer
const wxString& GetName() const { return m_strBufferName; }
// add/remove lines
// ----------------
// add a line to the end
void AddLine(const wxString& str, wxTextFileType type = typeDefault)
{ m_aLines.push_back(str); m_aTypes.push_back(type); }
// insert a line before the line number n
void InsertLine(const wxString& str,
size_t n,
wxTextFileType type = typeDefault)
{
m_aLines.insert(m_aLines.begin() + n, str);
m_aTypes.insert(m_aTypes.begin()+n, type);
}
// delete one line
void RemoveLine(size_t n)
{
m_aLines.erase(m_aLines.begin() + n);
m_aTypes.erase(m_aTypes.begin() + n);
}
// remove all lines
void Clear() { m_aLines.clear(); m_aTypes.clear(); m_nCurLine = 0; }
// change the buffer (default argument means "don't change type")
// possibly in another format
bool Write(wxTextFileType typeNew = wxTextFileType_None,
const wxMBConv& conv = wxConvAuto());
// dtor
virtual ~wxTextBuffer();
protected:
// ctors
// -----
// default ctor, use Open(string)
wxTextBuffer() { m_nCurLine = 0; m_isOpened = false; }
// ctor from filename
wxTextBuffer(const wxString& strBufferName);
enum wxTextBufferOpenMode { ReadAccess, WriteAccess };
// Must implement these in derived classes.
virtual bool OnExists() const = 0;
virtual bool OnOpen(const wxString &strBufferName,
wxTextBufferOpenMode openmode) = 0;
virtual bool OnClose() = 0;
virtual bool OnRead(const wxMBConv& conv) = 0;
virtual bool OnWrite(wxTextFileType typeNew, const wxMBConv& conv) = 0;
static wxString ms_eof; // dummy string returned at EOF
wxString m_strBufferName; // name of the buffer
private:
wxArrayLinesType m_aTypes; // type of each line
wxArrayString m_aLines; // lines of file
size_t m_nCurLine; // number of current line in the buffer
bool m_isOpened; // was the buffer successfully opened the last time?
#endif // wxUSE_TEXTBUFFER
// copy ctor/assignment operator not implemented
wxTextBuffer(const wxTextBuffer&);
wxTextBuffer& operator=(const wxTextBuffer&);
};
#endif // _WX_TEXTBUFFER_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/fontenum.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/fontenum.h
// Purpose: wxFontEnumerator class for getting available fonts
// Author: Julian Smart, Vadim Zeitlin
// Modified by: extended to enumerate more than just font facenames and works
// not only on Windows now (VZ)
// Created: 04/01/98
// Copyright: (c) Julian Smart, Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FONTENUM_H_
#define _WX_FONTENUM_H_
#include "wx/defs.h"
#if wxUSE_FONTENUM
#include "wx/fontenc.h"
#include "wx/arrstr.h"
// ----------------------------------------------------------------------------
// wxFontEnumerator enumerates all available fonts on the system or only the
// fonts with given attributes
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFontEnumerator
{
public:
wxFontEnumerator() {}
// virtual dtor for the base class
virtual ~wxFontEnumerator() {}
// start enumerating font facenames (either all of them or those which
// support the given encoding) - will result in OnFacename() being
// called for each available facename (until they are exhausted or
// OnFacename returns false)
virtual bool EnumerateFacenames
(
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
bool fixedWidthOnly = false
);
// enumerate the different encodings either for given font facename or for
// all facenames - will result in OnFontEncoding() being called for each
// available (facename, encoding) couple
virtual bool EnumerateEncodings(const wxString& facename = wxEmptyString);
// callbacks which are called after one of EnumerateXXX() functions from
// above is invoked - all of them may return false to stop enumeration or
// true to continue with it
// called by EnumerateFacenames
virtual bool OnFacename(const wxString& WXUNUSED(facename))
{ return true; }
// called by EnumerateEncodings
virtual bool OnFontEncoding(const wxString& WXUNUSED(facename),
const wxString& WXUNUSED(encoding))
{ return true; }
// convenience function that returns array of facenames.
static wxArrayString
GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
bool fixedWidthOnly = false);
// convenience function that returns array of all available encodings.
static wxArrayString GetEncodings(const wxString& facename = wxEmptyString);
// convenience function that returns true if the given face name exist
// in the user's system
static bool IsValidFacename(const wxString &str);
// Invalidate cache used by some of the methods of this class internally.
// This should be called if the list of the fonts available on the system
// changes, for whatever reason.
static void InvalidateCache();
private:
#ifdef wxHAS_UTF8_FONTS
// helper for ports that only use UTF-8 encoding natively
bool EnumerateEncodingsUTF8(const wxString& facename);
#endif
wxDECLARE_NO_COPY_CLASS(wxFontEnumerator);
};
#endif // wxUSE_FONTENUM
#endif // _WX_FONTENUM_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/textwrapper.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/textwrapper.h
// Purpose: declaration of wxTextWrapper class
// Author: Vadim Zeitlin
// Created: 2009-05-31 (extracted from dlgcmn.cpp via wx/private/stattext.h)
// Copyright: (c) 1999, 2009 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TEXTWRAPPER_H_
#define _WX_TEXTWRAPPER_H_
#include "wx/window.h"
// ----------------------------------------------------------------------------
// wxTextWrapper
// ----------------------------------------------------------------------------
// this class is used to wrap the text on word boundary: wrapping is done by
// calling OnStartLine() and OnOutputLine() functions
class WXDLLIMPEXP_CORE wxTextWrapper
{
public:
wxTextWrapper() { m_eol = false; }
// win is used for getting the font, text is the text to wrap, width is the
// max line width or -1 to disable wrapping
void Wrap(wxWindow *win, const wxString& text, int widthMax);
// we don't need it, but just to avoid compiler warnings
virtual ~wxTextWrapper() { }
protected:
// line may be empty
virtual void OnOutputLine(const wxString& line) = 0;
// called at the start of every new line (except the very first one)
virtual void OnNewLine() { }
private:
// call OnOutputLine() and set m_eol to true
void DoOutputLine(const wxString& line)
{
OnOutputLine(line);
m_eol = true;
}
// this function is a destructive inspector: when it returns true it also
// resets the flag to false so calling it again wouldn't return true any
// more
bool IsStartOfNewLine()
{
if ( !m_eol )
return false;
m_eol = false;
return true;
}
bool m_eol;
wxDECLARE_NO_COPY_CLASS(wxTextWrapper);
};
#if wxUSE_STATTEXT
#include "wx/sizer.h"
#include "wx/stattext.h"
// A class creating a sizer with one static text per line of text. Creation of
// the controls used for each line can be customized by overriding
// OnCreateLine() function.
//
// This class is currently private to wxWidgets and used only by wxDialog
// itself. We may make it public later if there is sufficient interest.
class wxTextSizerWrapper : public wxTextWrapper
{
public:
wxTextSizerWrapper(wxWindow *win)
{
m_win = win;
m_hLine = 0;
}
wxSizer *CreateSizer(const wxString& text, int widthMax)
{
m_sizer = new wxBoxSizer(wxVERTICAL);
Wrap(m_win, text, widthMax);
return m_sizer;
}
wxWindow *GetParent() const { return m_win; }
protected:
virtual wxWindow *OnCreateLine(const wxString& line)
{
return new wxStaticText(m_win, wxID_ANY,
wxControl::EscapeMnemonics(line));
}
virtual void OnOutputLine(const wxString& line) wxOVERRIDE
{
if ( !line.empty() )
{
m_sizer->Add(OnCreateLine(line));
}
else // empty line, no need to create a control for it
{
if ( !m_hLine )
m_hLine = m_win->GetCharHeight();
m_sizer->Add(5, m_hLine);
}
}
private:
wxWindow *m_win;
wxSizer *m_sizer;
int m_hLine;
};
#endif // wxUSE_STATTEXT
#endif // _WX_TEXTWRAPPER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/headercol.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/headercol.h
// Purpose: declaration of wxHeaderColumn class
// Author: Vadim Zeitlin
// Created: 2008-12-02
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HEADERCOL_H_
#define _WX_HEADERCOL_H_
#include "wx/bitmap.h"
#if wxUSE_HEADERCTRL
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
enum
{
// special value for column width meaning unspecified/default
wxCOL_WIDTH_DEFAULT = -1,
// size the column automatically to fit all values
wxCOL_WIDTH_AUTOSIZE = -2
};
// bit masks for the various column attributes
enum
{
// column can be resized (included in default flags)
wxCOL_RESIZABLE = 1,
// column can be clicked to toggle the sort order by its contents
wxCOL_SORTABLE = 2,
// column can be dragged to change its order (included in default)
wxCOL_REORDERABLE = 4,
// column is not shown at all
wxCOL_HIDDEN = 8,
// default flags for wxHeaderColumn ctor
wxCOL_DEFAULT_FLAGS = wxCOL_RESIZABLE | wxCOL_REORDERABLE
};
// ----------------------------------------------------------------------------
// wxHeaderColumn: interface for a column in a header of controls such as
// wxListCtrl, wxDataViewCtrl or wxGrid
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxHeaderColumn
{
public:
// ctors and dtor
// --------------
/*
Derived classes must provide ctors with the following signatures
(notice that they shouldn't be explicit to allow passing strings/bitmaps
directly to methods such wxHeaderCtrl::AppendColumn()):
wxHeaderColumn(const wxString& title,
int width = wxCOL_WIDTH_DEFAULT,
wxAlignment align = wxALIGN_NOT,
int flags = wxCOL_DEFAULT_FLAGS);
wxHeaderColumn(const wxBitmap &bitmap,
int width = wxDVC_DEFAULT_WIDTH,
wxAlignment align = wxALIGN_CENTER,
int flags = wxCOL_DEFAULT_FLAGS);
*/
// virtual dtor for the base class to avoid gcc warnings even though we
// don't normally delete the objects of this class via a pointer to
// wxHeaderColumn so it's not necessary, strictly speaking
virtual ~wxHeaderColumn() { }
// getters for various attributes
// ------------------------------
// notice that wxHeaderColumn only provides getters as this is all the
// wxHeaderCtrl needs, various derived class must also provide some way to
// change these attributes but this can be done either at the column level
// (in which case they should inherit from wxSettableHeaderColumn) or via
// the methods of the main control in which case you don't need setters in
// the column class at all
// title is the string shown for this column
virtual wxString GetTitle() const = 0;
// bitmap shown (instead of text) in the column header
virtual wxBitmap GetBitmap() const = 0; \
// width of the column in pixels, can be set to wxCOL_WIDTH_DEFAULT meaning
// unspecified/default
virtual int GetWidth() const = 0;
// minimal width can be set for resizable columns to forbid resizing them
// below the specified size (set to 0 to remove)
virtual int GetMinWidth() const = 0;
// alignment of the text: wxALIGN_CENTRE, wxALIGN_LEFT or wxALIGN_RIGHT
virtual wxAlignment GetAlignment() const = 0;
// flags manipulations:
// --------------------
// notice that while we make GetFlags() pure virtual here and implement the
// individual flags access in terms of it, for some derived classes it is
// more natural to implement access to each flag individually, in which
// case they can use our GetFromIndividualFlags() helper below to implement
// GetFlags()
// retrieve all column flags at once: combination of wxCOL_XXX values above
virtual int GetFlags() const = 0;
bool HasFlag(int flag) const { return (GetFlags() & flag) != 0; }
// wxCOL_RESIZABLE
virtual bool IsResizeable() const
{ return HasFlag(wxCOL_RESIZABLE); }
// wxCOL_SORTABLE
virtual bool IsSortable() const
{ return HasFlag(wxCOL_SORTABLE); }
// wxCOL_REORDERABLE
virtual bool IsReorderable() const
{ return HasFlag(wxCOL_REORDERABLE); }
// wxCOL_HIDDEN
virtual bool IsHidden() const
{ return HasFlag(wxCOL_HIDDEN); }
bool IsShown() const
{ return !IsHidden(); }
// sorting
// -------
// return true if the column is the one currently used for sorting
virtual bool IsSortKey() const = 0;
// for sortable columns indicate whether we should sort in ascending or
// descending order (this should only be taken into account if IsSortKey())
virtual bool IsSortOrderAscending() const = 0;
protected:
// helper for the class overriding IsXXX()
int GetFromIndividualFlags() const;
};
// ----------------------------------------------------------------------------
// wxSettableHeaderColumn: column which allows to change its fields too
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxSettableHeaderColumn : public wxHeaderColumn
{
public:
virtual void SetTitle(const wxString& title) = 0;
virtual void SetBitmap(const wxBitmap& bitmap) = 0;
virtual void SetWidth(int width) = 0;
virtual void SetMinWidth(int minWidth) = 0;
virtual void SetAlignment(wxAlignment align) = 0;
// see comment for wxHeaderColumn::GetFlags() about the relationship
// between SetFlags() and Set{Sortable,Reorderable,...}
// change, set, clear, toggle or test for any individual flag
virtual void SetFlags(int flags) = 0;
void ChangeFlag(int flag, bool set);
void SetFlag(int flag);
void ClearFlag(int flag);
void ToggleFlag(int flag);
virtual void SetResizeable(bool resizable)
{ ChangeFlag(wxCOL_RESIZABLE, resizable); }
virtual void SetSortable(bool sortable)
{ ChangeFlag(wxCOL_SORTABLE, sortable); }
virtual void SetReorderable(bool reorderable)
{ ChangeFlag(wxCOL_REORDERABLE, reorderable); }
virtual void SetHidden(bool hidden)
{ ChangeFlag(wxCOL_HIDDEN, hidden); }
// This function can be called to indicate that this column is not used for
// sorting any more. Under some platforms it's not necessary to do anything
// in this case as just setting another column as a sort key takes care of
// everything but under MSW we currently need to call this explicitly to
// reset the sort indicator displayed on the column.
virtual void UnsetAsSortKey() { }
virtual void SetSortOrder(bool ascending) = 0;
void ToggleSortOrder() { SetSortOrder(!IsSortOrderAscending()); }
protected:
// helper for the class overriding individual SetXXX() methods instead of
// overriding SetFlags()
void SetIndividualFlags(int flags);
};
// ----------------------------------------------------------------------------
// wxHeaderColumnSimple: trivial generic implementation of wxHeaderColumn
// ----------------------------------------------------------------------------
class wxHeaderColumnSimple : public wxSettableHeaderColumn
{
public:
// ctors and dtor
wxHeaderColumnSimple(const wxString& title,
int width = wxCOL_WIDTH_DEFAULT,
wxAlignment align = wxALIGN_NOT,
int flags = wxCOL_DEFAULT_FLAGS)
: m_title(title),
m_width(width),
m_align(align),
m_flags(flags)
{
Init();
}
wxHeaderColumnSimple(const wxBitmap& bitmap,
int width = wxCOL_WIDTH_DEFAULT,
wxAlignment align = wxALIGN_CENTER,
int flags = wxCOL_DEFAULT_FLAGS)
: m_bitmap(bitmap),
m_width(width),
m_align(align),
m_flags(flags)
{
Init();
}
// implement base class pure virtuals
virtual void SetTitle(const wxString& title) wxOVERRIDE { m_title = title; }
virtual wxString GetTitle() const wxOVERRIDE { return m_title; }
virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE { m_bitmap = bitmap; }
wxBitmap GetBitmap() const wxOVERRIDE { return m_bitmap; }
virtual void SetWidth(int width) wxOVERRIDE { m_width = width; }
virtual int GetWidth() const wxOVERRIDE { return m_width; }
virtual void SetMinWidth(int minWidth) wxOVERRIDE { m_minWidth = minWidth; }
virtual int GetMinWidth() const wxOVERRIDE { return m_minWidth; }
virtual void SetAlignment(wxAlignment align) wxOVERRIDE { m_align = align; }
virtual wxAlignment GetAlignment() const wxOVERRIDE { return m_align; }
virtual void SetFlags(int flags) wxOVERRIDE { m_flags = flags; }
virtual int GetFlags() const wxOVERRIDE { return m_flags; }
virtual bool IsSortKey() const wxOVERRIDE { return m_sort; }
virtual void UnsetAsSortKey() wxOVERRIDE { m_sort = false; }
virtual void SetSortOrder(bool ascending) wxOVERRIDE
{
m_sort = true;
m_sortAscending = ascending;
}
virtual bool IsSortOrderAscending() const wxOVERRIDE { return m_sortAscending; }
private:
// common part of all ctors
void Init()
{
m_minWidth = 0;
m_sort = false;
m_sortAscending = true;
}
wxString m_title;
wxBitmap m_bitmap;
int m_width,
m_minWidth;
wxAlignment m_align;
int m_flags;
bool m_sort,
m_sortAscending;
};
#endif // wxUSE_HEADERCTRL
#endif // _WX_HEADERCOL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/prntbase.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/prntbase.h
// Purpose: Base classes for printing framework
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRNTBASEH__
#define _WX_PRNTBASEH__
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/event.h"
#include "wx/cmndata.h"
#include "wx/panel.h"
#include "wx/scrolwin.h"
#include "wx/dialog.h"
#include "wx/frame.h"
#include "wx/dc.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxButton;
class WXDLLIMPEXP_FWD_CORE wxChoice;
class WXDLLIMPEXP_FWD_CORE wxPrintout;
class WXDLLIMPEXP_FWD_CORE wxPrinterBase;
class WXDLLIMPEXP_FWD_CORE wxPrintDialogBase;
class WXDLLIMPEXP_FWD_CORE wxPrintDialog;
class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogBase;
class WXDLLIMPEXP_FWD_CORE wxPageSetupDialog;
class WXDLLIMPEXP_FWD_CORE wxPrintPreviewBase;
class WXDLLIMPEXP_FWD_CORE wxPreviewCanvas;
class WXDLLIMPEXP_FWD_CORE wxPreviewControlBar;
class WXDLLIMPEXP_FWD_CORE wxPreviewFrame;
class WXDLLIMPEXP_FWD_CORE wxPrintFactory;
class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
class WXDLLIMPEXP_FWD_CORE wxPrintPreview;
class WXDLLIMPEXP_FWD_CORE wxPrintAbortDialog;
class WXDLLIMPEXP_FWD_CORE wxStaticText;
class wxPrintPageMaxCtrl;
class wxPrintPageTextCtrl;
//----------------------------------------------------------------------------
// error consts
//----------------------------------------------------------------------------
enum wxPrinterError
{
wxPRINTER_NO_ERROR = 0,
wxPRINTER_CANCELLED,
wxPRINTER_ERROR
};
// Preview frame modality kind used with wxPreviewFrame::Initialize()
enum wxPreviewFrameModalityKind
{
// Disable all the other top level windows while the preview is shown.
wxPreviewFrame_AppModal,
// Disable only the parent window while the preview is shown.
wxPreviewFrame_WindowModal,
// Don't disable any windows.
wxPreviewFrame_NonModal
};
//----------------------------------------------------------------------------
// wxPrintFactory
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintFactory
{
public:
wxPrintFactory() {}
virtual ~wxPrintFactory() {}
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0;
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout = NULL,
wxPrintDialogData *data = NULL ) = 0;
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout,
wxPrintData *data ) = 0;
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintDialogData *data = NULL ) = 0;
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintData *data ) = 0;
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData * data = NULL ) = 0;
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) = 0;
// What to do and what to show in the wxPrintDialog
// a) Use the generic print setup dialog or a native one?
virtual bool HasPrintSetupDialog() = 0;
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) = 0;
// b) Provide the "print to file" option ourselves or via print setup?
virtual bool HasOwnPrintToFile() = 0;
// c) Show current printer
virtual bool HasPrinterLine() = 0;
virtual wxString CreatePrinterLine() = 0;
// d) Show Status line for current printer?
virtual bool HasStatusLine() = 0;
virtual wxString CreateStatusLine() = 0;
virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0;
static void SetPrintFactory( wxPrintFactory *factory );
static wxPrintFactory *GetFactory();
private:
static wxPrintFactory *m_factory;
};
class WXDLLIMPEXP_CORE wxNativePrintFactory: public wxPrintFactory
{
public:
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data ) wxOVERRIDE;
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout = NULL,
wxPrintDialogData *data = NULL ) wxOVERRIDE;
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout,
wxPrintData *data ) wxOVERRIDE;
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintDialogData *data = NULL ) wxOVERRIDE;
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintData *data ) wxOVERRIDE;
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData * data = NULL ) wxOVERRIDE;
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) wxOVERRIDE;
virtual bool HasPrintSetupDialog() wxOVERRIDE;
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) wxOVERRIDE;
virtual bool HasOwnPrintToFile() wxOVERRIDE;
virtual bool HasPrinterLine() wxOVERRIDE;
virtual wxString CreatePrinterLine() wxOVERRIDE;
virtual bool HasStatusLine() wxOVERRIDE;
virtual wxString CreateStatusLine() wxOVERRIDE;
virtual wxPrintNativeDataBase *CreatePrintNativeData() wxOVERRIDE;
};
//----------------------------------------------------------------------------
// wxPrintNativeDataBase
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintNativeDataBase: public wxObject
{
public:
wxPrintNativeDataBase();
virtual ~wxPrintNativeDataBase() {}
virtual bool TransferTo( wxPrintData &data ) = 0;
virtual bool TransferFrom( const wxPrintData &data ) = 0;
#ifdef __WXOSX__
// in order to expose functionality already to the result type of the ..PrintData->GetNativeData()
virtual void TransferFrom( const wxPageSetupDialogData * ) = 0;
virtual void TransferTo( wxPageSetupDialogData * ) = 0;
#endif
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const = 0;
int m_ref;
private:
wxDECLARE_CLASS(wxPrintNativeDataBase);
wxDECLARE_NO_COPY_CLASS(wxPrintNativeDataBase);
};
//----------------------------------------------------------------------------
// wxPrinterBase
//----------------------------------------------------------------------------
/*
* Represents the printer: manages printing a wxPrintout object
*/
class WXDLLIMPEXP_CORE wxPrinterBase: public wxObject
{
public:
wxPrinterBase(wxPrintDialogData *data = NULL);
virtual ~wxPrinterBase();
virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout);
virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message);
virtual wxPrintDialogData& GetPrintDialogData() const;
bool GetAbort() const { return sm_abortIt; }
static wxPrinterError GetLastError() { return sm_lastError; }
///////////////////////////////////////////////////////////////////////////
// OVERRIDES
virtual bool Setup(wxWindow *parent) = 0;
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true) = 0;
virtual wxDC* PrintDialog(wxWindow *parent) = 0;
protected:
wxPrintDialogData m_printDialogData;
wxPrintout* m_currentPrintout;
static wxPrinterError sm_lastError;
public:
static wxWindow* sm_abortWindow;
static bool sm_abortIt;
private:
wxDECLARE_CLASS(wxPrinterBase);
wxDECLARE_NO_COPY_CLASS(wxPrinterBase);
};
//----------------------------------------------------------------------------
// wxPrinter
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase
{
public:
wxPrinter(wxPrintDialogData *data = NULL);
virtual ~wxPrinter();
virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout) wxOVERRIDE;
virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message) wxOVERRIDE;
virtual bool Setup(wxWindow *parent) wxOVERRIDE;
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true) wxOVERRIDE;
virtual wxDC* PrintDialog(wxWindow *parent) wxOVERRIDE;
virtual wxPrintDialogData& GetPrintDialogData() const wxOVERRIDE;
protected:
wxPrinterBase *m_pimpl;
private:
wxDECLARE_CLASS(wxPrinter);
wxDECLARE_NO_COPY_CLASS(wxPrinter);
};
//----------------------------------------------------------------------------
// wxPrintout
//----------------------------------------------------------------------------
/*
* Represents an object via which a document may be printed.
* The programmer derives from this, overrides (at least) OnPrintPage,
* and passes it to a wxPrinter object for printing, or a wxPrintPreview
* object for previewing.
*/
class WXDLLIMPEXP_CORE wxPrintout: public wxObject
{
public:
wxPrintout(const wxString& title = wxGetTranslation("Printout"));
virtual ~wxPrintout();
virtual bool OnBeginDocument(int startPage, int endPage);
virtual void OnEndDocument();
virtual void OnBeginPrinting();
virtual void OnEndPrinting();
// Guaranteed to be before any other functions are called
virtual void OnPreparePrinting() { }
virtual bool HasPage(int page);
virtual bool OnPrintPage(int page) = 0;
virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
virtual wxString GetTitle() const { return m_printoutTitle; }
// Port-specific code should call this function to initialize this object
// with everything it needs, instead of using individual accessors below.
bool SetUp(wxDC& dc);
wxDC *GetDC() const { return m_printoutDC; }
void SetDC(wxDC *dc) { m_printoutDC = dc; }
void FitThisSizeToPaper(const wxSize& imageSize);
void FitThisSizeToPage(const wxSize& imageSize);
void FitThisSizeToPageMargins(const wxSize& imageSize, const wxPageSetupDialogData& pageSetupData);
void MapScreenSizeToPaper();
void MapScreenSizeToPage();
void MapScreenSizeToPageMargins(const wxPageSetupDialogData& pageSetupData);
void MapScreenSizeToDevice();
wxRect GetLogicalPaperRect() const;
wxRect GetLogicalPageRect() const;
wxRect GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSetupData) const;
void SetLogicalOrigin(wxCoord x, wxCoord y);
void OffsetLogicalOrigin(wxCoord xoff, wxCoord yoff);
void SetPageSizePixels(int w, int h) { m_pageWidthPixels = w; m_pageHeightPixels = h; }
void GetPageSizePixels(int *w, int *h) const { *w = m_pageWidthPixels; *h = m_pageHeightPixels; }
void SetPageSizeMM(int w, int h) { m_pageWidthMM = w; m_pageHeightMM = h; }
void GetPageSizeMM(int *w, int *h) const { *w = m_pageWidthMM; *h = m_pageHeightMM; }
void SetPPIScreen(int x, int y) { m_PPIScreenX = x; m_PPIScreenY = y; }
void SetPPIScreen(const wxSize& ppi) { SetPPIScreen(ppi.x, ppi.y); }
void GetPPIScreen(int *x, int *y) const { *x = m_PPIScreenX; *y = m_PPIScreenY; }
void SetPPIPrinter(int x, int y) { m_PPIPrinterX = x; m_PPIPrinterY = y; }
void SetPPIPrinter(const wxSize& ppi) { SetPPIPrinter(ppi.x, ppi.y); }
void GetPPIPrinter(int *x, int *y) const { *x = m_PPIPrinterX; *y = m_PPIPrinterY; }
void SetPaperRectPixels(const wxRect& paperRectPixels) { m_paperRectPixels = paperRectPixels; }
wxRect GetPaperRectPixels() const { return m_paperRectPixels; }
// This must be called by wxPrintPreview to associate itself with the
// printout it uses.
virtual void SetPreview(wxPrintPreview *preview) { m_preview = preview; }
wxPrintPreview *GetPreview() const { return m_preview; }
virtual bool IsPreview() const { return GetPreview() != NULL; }
private:
wxString m_printoutTitle;
wxDC* m_printoutDC;
wxPrintPreview *m_preview;
int m_pageWidthPixels;
int m_pageHeightPixels;
int m_pageWidthMM;
int m_pageHeightMM;
int m_PPIScreenX;
int m_PPIScreenY;
int m_PPIPrinterX;
int m_PPIPrinterY;
wxRect m_paperRectPixels;
private:
wxDECLARE_ABSTRACT_CLASS(wxPrintout);
wxDECLARE_NO_COPY_CLASS(wxPrintout);
};
//----------------------------------------------------------------------------
// wxPreviewCanvas
//----------------------------------------------------------------------------
/*
* Canvas upon which a preview is drawn.
*/
class WXDLLIMPEXP_CORE wxPreviewCanvas: public wxScrolledWindow
{
public:
wxPreviewCanvas(wxPrintPreviewBase *preview,
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("canvas"));
virtual ~wxPreviewCanvas();
void SetPreview(wxPrintPreviewBase *preview) { m_printPreview = preview; }
void OnPaint(wxPaintEvent& event);
void OnChar(wxKeyEvent &event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
private:
#if wxUSE_MOUSEWHEEL
void OnMouseWheel(wxMouseEvent& event);
#endif // wxUSE_MOUSEWHEEL
void OnIdle(wxIdleEvent& event);
wxPrintPreviewBase* m_printPreview;
wxDECLARE_CLASS(wxPreviewCanvas);
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxPreviewCanvas);
};
//----------------------------------------------------------------------------
// wxPreviewFrame
//----------------------------------------------------------------------------
/*
* Default frame for showing preview.
*/
class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame
{
public:
wxPreviewFrame(wxPrintPreviewBase *preview,
wxWindow *parent,
const wxString& title = wxGetTranslation("Print Preview"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT,
const wxString& name = wxFrameNameStr);
virtual ~wxPreviewFrame();
// Either Initialize() or InitializeWithModality() must be called before
// showing the preview frame, the former being just a particular case of
// the latter initializing the frame for being showing app-modally.
// Notice that we must keep Initialize() with its existing signature to
// avoid breaking the old code that overrides it and we can't reuse the
// same name for the other functions to avoid virtual function hiding
// problem and the associated warnings given by some compilers (e.g. from
// g++ with -Woverloaded-virtual).
virtual void Initialize()
{
InitializeWithModality(wxPreviewFrame_AppModal);
}
// Also note that this method is not virtual as it doesn't need to be
// overridden: it's never called by wxWidgets (of course, the same is true
// for Initialize() but, again, it must remain virtual for compatibility).
void InitializeWithModality(wxPreviewFrameModalityKind kind);
void OnCloseWindow(wxCloseEvent& event);
virtual void CreateCanvas();
virtual void CreateControlBar();
inline wxPreviewControlBar* GetControlBar() const { return m_controlBar; }
protected:
wxPreviewCanvas* m_previewCanvas;
wxPreviewControlBar* m_controlBar;
wxPrintPreviewBase* m_printPreview;
wxWindowDisabler* m_windowDisabler;
wxPreviewFrameModalityKind m_modalityKind;
private:
void OnChar(wxKeyEvent& event);
wxDECLARE_EVENT_TABLE();
wxDECLARE_CLASS(wxPreviewFrame);
wxDECLARE_NO_COPY_CLASS(wxPreviewFrame);
};
//----------------------------------------------------------------------------
// wxPreviewControlBar
//----------------------------------------------------------------------------
/*
* A panel with buttons for controlling a print preview.
* The programmer may wish to use other means for controlling
* the print preview.
*/
#define wxPREVIEW_PRINT 1
#define wxPREVIEW_PREVIOUS 2
#define wxPREVIEW_NEXT 4
#define wxPREVIEW_ZOOM 8
#define wxPREVIEW_FIRST 16
#define wxPREVIEW_LAST 32
#define wxPREVIEW_GOTO 64
#define wxPREVIEW_DEFAULT (wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\
|wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST)
// Ids for controls
#define wxID_PREVIEW_CLOSE 1
#define wxID_PREVIEW_NEXT 2
#define wxID_PREVIEW_PREVIOUS 3
#define wxID_PREVIEW_PRINT 4
#define wxID_PREVIEW_ZOOM 5
#define wxID_PREVIEW_FIRST 6
#define wxID_PREVIEW_LAST 7
#define wxID_PREVIEW_GOTO 8
#define wxID_PREVIEW_ZOOM_IN 9
#define wxID_PREVIEW_ZOOM_OUT 10
class WXDLLIMPEXP_CORE wxPreviewControlBar: public wxPanel
{
wxDECLARE_CLASS(wxPreviewControlBar);
public:
wxPreviewControlBar(wxPrintPreviewBase *preview,
long buttons,
wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString& name = wxT("panel"));
virtual ~wxPreviewControlBar();
virtual void CreateButtons();
virtual void SetPageInfo(int minPage, int maxPage);
virtual void SetZoomControl(int zoom);
virtual int GetZoomControl();
virtual wxPrintPreviewBase *GetPrintPreview() const
{ return m_printPreview; }
// Implementation only from now on.
void OnWindowClose(wxCommandEvent& event);
void OnNext();
void OnPrevious();
void OnFirst();
void OnLast();
void OnGotoPage();
void OnPrint();
void OnPrintButton(wxCommandEvent& WXUNUSED(event)) { OnPrint(); }
void OnNextButton(wxCommandEvent & WXUNUSED(event)) { OnNext(); }
void OnPreviousButton(wxCommandEvent & WXUNUSED(event)) { OnPrevious(); }
void OnFirstButton(wxCommandEvent & WXUNUSED(event)) { OnFirst(); }
void OnLastButton(wxCommandEvent & WXUNUSED(event)) { OnLast(); }
void OnPaint(wxPaintEvent& event);
void OnUpdateNextButton(wxUpdateUIEvent& event)
{ event.Enable(IsNextEnabled()); }
void OnUpdatePreviousButton(wxUpdateUIEvent& event)
{ event.Enable(IsPreviousEnabled()); }
void OnUpdateFirstButton(wxUpdateUIEvent& event)
{ event.Enable(IsFirstEnabled()); }
void OnUpdateLastButton(wxUpdateUIEvent& event)
{ event.Enable(IsLastEnabled()); }
void OnUpdateZoomInButton(wxUpdateUIEvent& event)
{ event.Enable(IsZoomInEnabled()); }
void OnUpdateZoomOutButton(wxUpdateUIEvent& event)
{ event.Enable(IsZoomOutEnabled()); }
// These methods are not private because they are called by wxPreviewCanvas.
void DoZoomIn();
void DoZoomOut();
protected:
wxPrintPreviewBase* m_printPreview;
wxButton* m_closeButton;
wxChoice* m_zoomControl;
wxPrintPageTextCtrl* m_currentPageText;
wxPrintPageMaxCtrl* m_maxPageText;
long m_buttonFlags;
private:
void DoGotoPage(int page);
void DoZoom();
bool IsNextEnabled() const;
bool IsPreviousEnabled() const;
bool IsFirstEnabled() const;
bool IsLastEnabled() const;
bool IsZoomInEnabled() const;
bool IsZoomOutEnabled() const;
void OnZoomInButton(wxCommandEvent & WXUNUSED(event)) { DoZoomIn(); }
void OnZoomOutButton(wxCommandEvent & WXUNUSED(event)) { DoZoomOut(); }
void OnZoomChoice(wxCommandEvent& WXUNUSED(event)) { DoZoom(); }
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxPreviewControlBar);
};
//----------------------------------------------------------------------------
// wxPrintPreviewBase
//----------------------------------------------------------------------------
/*
* Programmer creates an object of this class to preview a wxPrintout.
*/
class WXDLLIMPEXP_CORE wxPrintPreviewBase: public wxObject
{
public:
wxPrintPreviewBase(wxPrintout *printout,
wxPrintout *printoutForPrinting = NULL,
wxPrintDialogData *data = NULL);
wxPrintPreviewBase(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
virtual ~wxPrintPreviewBase();
virtual bool SetCurrentPage(int pageNum);
virtual int GetCurrentPage() const;
virtual void SetPrintout(wxPrintout *printout);
virtual wxPrintout *GetPrintout() const;
virtual wxPrintout *GetPrintoutForPrinting() const;
virtual void SetFrame(wxFrame *frame);
virtual void SetCanvas(wxPreviewCanvas *canvas);
virtual wxFrame *GetFrame() const;
virtual wxPreviewCanvas *GetCanvas() const;
// This is a helper routine, used by the next 4 routines.
virtual void CalcRects(wxPreviewCanvas *canvas, wxRect& printableAreaRect, wxRect& paperRect);
// The preview canvas should call this from OnPaint
virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
// Updates rendered page by calling RenderPage() if needed, returns true
// if there was some change. Preview canvas should call it at idle time
virtual bool UpdatePageRendering();
// This draws a blank page onto the preview canvas
virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
// Adjusts the scrollbars for the current scale
virtual void AdjustScrollbars(wxPreviewCanvas *canvas);
// This is called by wxPrintPreview to render a page into a wxMemoryDC.
virtual bool RenderPage(int pageNum);
virtual void SetZoom(int percent);
virtual int GetZoom() const;
virtual wxPrintDialogData& GetPrintDialogData();
virtual int GetMaxPage() const;
virtual int GetMinPage() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
virtual void SetOk(bool ok);
///////////////////////////////////////////////////////////////////////////
// OVERRIDES
// If we own a wxPrintout that can be used for printing, this
// will invoke the actual printing procedure. Called
// by the wxPreviewControlBar.
virtual bool Print(bool interactive) = 0;
// Calculate scaling that needs to be done to get roughly
// the right scaling for the screen pretending to be
// the currently selected printer.
virtual void DetermineScaling() = 0;
protected:
// helpers for RenderPage():
virtual bool RenderPageIntoDC(wxDC& dc, int pageNum);
// renders preview into m_previewBitmap
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
void InvalidatePreviewBitmap();
protected:
wxPrintDialogData m_printDialogData;
wxPreviewCanvas* m_previewCanvas;
wxFrame* m_previewFrame;
wxBitmap* m_previewBitmap;
bool m_previewFailed;
wxPrintout* m_previewPrintout;
wxPrintout* m_printPrintout;
int m_currentPage;
int m_currentZoom;
float m_previewScaleX;
float m_previewScaleY;
int m_topMargin;
int m_leftMargin;
int m_pageWidth;
int m_pageHeight;
int m_minPage;
int m_maxPage;
bool m_isOk;
bool m_printingPrepared; // Called OnPreparePrinting?
private:
void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
wxDECLARE_NO_COPY_CLASS(wxPrintPreviewBase);
wxDECLARE_CLASS(wxPrintPreviewBase);
};
//----------------------------------------------------------------------------
// wxPrintPreview
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase
{
public:
wxPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting = NULL,
wxPrintDialogData *data = NULL);
wxPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
virtual ~wxPrintPreview();
virtual bool SetCurrentPage(int pageNum) wxOVERRIDE;
virtual int GetCurrentPage() const wxOVERRIDE;
virtual void SetPrintout(wxPrintout *printout) wxOVERRIDE;
virtual wxPrintout *GetPrintout() const wxOVERRIDE;
virtual wxPrintout *GetPrintoutForPrinting() const wxOVERRIDE;
virtual void SetFrame(wxFrame *frame) wxOVERRIDE;
virtual void SetCanvas(wxPreviewCanvas *canvas) wxOVERRIDE;
virtual wxFrame *GetFrame() const wxOVERRIDE;
virtual wxPreviewCanvas *GetCanvas() const wxOVERRIDE;
virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc) wxOVERRIDE;
virtual bool UpdatePageRendering() wxOVERRIDE;
virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc) wxOVERRIDE;
virtual void AdjustScrollbars(wxPreviewCanvas *canvas) wxOVERRIDE;
virtual bool RenderPage(int pageNum) wxOVERRIDE;
virtual void SetZoom(int percent) wxOVERRIDE;
virtual int GetZoom() const wxOVERRIDE;
virtual bool Print(bool interactive) wxOVERRIDE;
virtual void DetermineScaling() wxOVERRIDE;
virtual wxPrintDialogData& GetPrintDialogData() wxOVERRIDE;
virtual int GetMaxPage() const wxOVERRIDE;
virtual int GetMinPage() const wxOVERRIDE;
virtual bool Ok() const wxOVERRIDE { return IsOk(); }
virtual bool IsOk() const wxOVERRIDE;
virtual void SetOk(bool ok) wxOVERRIDE;
private:
wxPrintPreviewBase *m_pimpl;
private:
wxDECLARE_CLASS(wxPrintPreview);
wxDECLARE_NO_COPY_CLASS(wxPrintPreview);
};
//----------------------------------------------------------------------------
// wxPrintAbortDialog
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrintAbortDialog: public wxDialog
{
public:
wxPrintAbortDialog(wxWindow *parent,
const wxString& documentTitle,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxT("dialog"));
void SetProgress(int currentPage, int totalPages,
int currentCopy, int totalCopies);
void OnCancel(wxCommandEvent& event);
private:
wxStaticText *m_progress;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxPrintAbortDialog);
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_PRNTBASEH__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/validate.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/validate.h
// Purpose: wxValidator class
// Author: Julian Smart
// Modified by:
// Created: 29/01/98
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_VALIDATE_H_
#define _WX_VALIDATE_H_
#include "wx/defs.h"
#if wxUSE_VALIDATORS
#include "wx/event.h"
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
/*
A validator has up to three purposes:
1) To validate the data in the window that's associated
with the validator.
2) To transfer data to and from the window.
3) To filter input, using its role as a wxEvtHandler
to intercept e.g. OnChar.
Note that wxValidator and derived classes use reference counting.
*/
class WXDLLIMPEXP_CORE wxValidator : public wxEvtHandler
{
public:
wxValidator();
wxValidator(const wxValidator& other)
: wxEvtHandler()
, m_validatorWindow(other.m_validatorWindow)
{
}
virtual ~wxValidator();
// Make a clone of this validator (or return NULL) - currently necessary
// if you're passing a reference to a validator.
// Another possibility is to always pass a pointer to a new validator
// (so the calling code can use a copy constructor of the relevant class).
virtual wxObject *Clone() const
{ return NULL; }
bool Copy(const wxValidator& val)
{ m_validatorWindow = val.m_validatorWindow; return true; }
// Called when the value in the window must be validated.
// This function can pop up an error message.
virtual bool Validate(wxWindow *WXUNUSED(parent)) { return false; }
// Called to transfer data to the window
virtual bool TransferToWindow() { return false; }
// Called to transfer data from the window
virtual bool TransferFromWindow() { return false; }
// Called when the validator is associated with a window, may be useful to
// override if it needs to somehow initialize the window.
virtual void SetWindow(wxWindow *win) { m_validatorWindow = win; }
// accessors
wxWindow *GetWindow() const { return m_validatorWindow; }
// validators beep by default if invalid key is pressed, this function
// allows to change this
static void SuppressBellOnError(bool suppress = true)
{ ms_isSilent = suppress; }
// test if beep is currently disabled
static bool IsSilent() { return ms_isSilent; }
// this function is deprecated because it handled its parameter
// unnaturally: it disabled the bell when it was true, not false as could
// be expected; use SuppressBellOnError() instead
#if WXWIN_COMPATIBILITY_2_8
static wxDEPRECATED_INLINE(
void SetBellOnError(bool doIt = true),
ms_isSilent = doIt;
)
#endif
protected:
wxWindow *m_validatorWindow;
private:
static bool ms_isSilent;
wxDECLARE_DYNAMIC_CLASS(wxValidator);
wxDECLARE_NO_ASSIGN_CLASS(wxValidator);
};
extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator;
#define wxVALIDATOR_PARAM(val) val
#else // !wxUSE_VALIDATORS
// wxWidgets is compiled without support for wxValidator, but we still
// want to be able to pass wxDefaultValidator to the functions which take
// a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS"
// everywhere
class WXDLLIMPEXP_FWD_CORE wxValidator;
static const wxValidator* const wxDefaultValidatorPtr = NULL;
#define wxDefaultValidator (*wxDefaultValidatorPtr)
// this macro allows to avoid warnings about unused parameters when
// wxUSE_VALIDATORS == 0
#define wxVALIDATOR_PARAM(val)
#endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS
#endif // _WX_VALIDATE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/wupdlock.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/wupdlock.h
// Purpose: wxWindowUpdateLocker prevents window redrawing
// Author: Vadim Zeitlin
// Created: 2006-03-06
// Copyright: (c) 2006 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WUPDLOCK_H_
#define _WX_WUPDLOCK_H_
#include "wx/window.h"
// ----------------------------------------------------------------------------
// wxWindowUpdateLocker prevents updates to the window during its lifetime
// ----------------------------------------------------------------------------
class wxWindowUpdateLocker
{
public:
// create an object preventing updates of the given window (which must have
// a lifetime at least as great as ours)
wxWindowUpdateLocker(wxWindow *win) : m_win(win) { win->Freeze(); }
// dtor thaws the window to permit updates again
~wxWindowUpdateLocker() { m_win->Thaw(); }
private:
wxWindow *m_win;
wxDECLARE_NO_COPY_CLASS(wxWindowUpdateLocker);
};
#endif // _WX_WUPDLOCK_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/fswatcher.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/fswatcher.h
// Purpose: wxFileSystemWatcherBase
// Author: Bartosz Bekier
// Created: 2009-05-23
// Copyright: (c) 2009 Bartosz Bekier <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FSWATCHER_BASE_H_
#define _WX_FSWATCHER_BASE_H_
#include "wx/defs.h"
#if wxUSE_FSWATCHER
#include "wx/log.h"
#include "wx/event.h"
#include "wx/evtloop.h"
#include "wx/filename.h"
#include "wx/dir.h"
#include "wx/hashmap.h"
#define wxTRACE_FSWATCHER "fswatcher"
// ----------------------------------------------------------------------------
// wxFileSystemWatcherEventType & wxFileSystemWatcherEvent
// ----------------------------------------------------------------------------
/**
* Possible types of file system events.
* This is a subset that will work fine an all platforms (actually, we will
* see how it works on Mac).
*
* We got 2 types of error events:
* - warning: these are not fatal and further events can still be generated
* - error: indicates fatal error and causes that no more events will happen
*/
enum
{
wxFSW_EVENT_CREATE = 0x01,
wxFSW_EVENT_DELETE = 0x02,
wxFSW_EVENT_RENAME = 0x04,
wxFSW_EVENT_MODIFY = 0x08,
wxFSW_EVENT_ACCESS = 0x10,
wxFSW_EVENT_ATTRIB = 0x20, // Currently this is wxGTK-only
// error events
wxFSW_EVENT_WARNING = 0x40,
wxFSW_EVENT_ERROR = 0x80,
wxFSW_EVENT_ALL = wxFSW_EVENT_CREATE | wxFSW_EVENT_DELETE |
wxFSW_EVENT_RENAME | wxFSW_EVENT_MODIFY |
wxFSW_EVENT_ACCESS | wxFSW_EVENT_ATTRIB |
wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR
#if defined(wxHAS_INOTIFY) || defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
,wxFSW_EVENT_UNMOUNT = 0x2000
#endif
};
// Type of the path watched, used only internally for now.
enum wxFSWPathType
{
wxFSWPath_None, // Invalid value for an initialized watch.
wxFSWPath_File, // Plain file.
wxFSWPath_Dir, // Watch a directory and the files in it.
wxFSWPath_Tree // Watch a directory and all its children recursively.
};
// Type of the warning for the events notifying about them.
enum wxFSWWarningType
{
wxFSW_WARNING_NONE,
wxFSW_WARNING_GENERAL,
wxFSW_WARNING_OVERFLOW
};
/**
* Event containing information about file system change.
*/
class WXDLLIMPEXP_FWD_BASE wxFileSystemWatcherEvent;
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER,
wxFileSystemWatcherEvent);
class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent
{
public:
// Constructor for any kind of events, also used as default ctor.
wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE)
{
}
// Constructor for the error or warning events.
wxFileSystemWatcherEvent(int changeType,
wxFSWWarningType warningType,
const wxString& errorMsg = wxString(),
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType),
m_warningType(warningType),
m_errorMsg(errorMsg)
{
}
// Constructor for the normal events carrying information about the changes.
wxFileSystemWatcherEvent(int changeType,
const wxFileName& path, const wxFileName& newPath,
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE),
m_path(path),
m_newPath(newPath)
{
}
/**
* Returns the path at which the event occurred.
*/
const wxFileName& GetPath() const
{
return m_path;
}
/**
* Sets the path at which the event occurred
*/
void SetPath(const wxFileName& path)
{
m_path = path;
}
/**
* In case of rename(move?) events, returns the new path related to the
* event. The "new" means newer in the sense of time. In case of other
* events it returns the same path as GetPath().
*/
const wxFileName& GetNewPath() const
{
return m_newPath;
}
/**
* Sets the new path related to the event. See above.
*/
void SetNewPath(const wxFileName& path)
{
m_newPath = path;
}
/**
* Returns the type of file system event that occurred.
*/
int GetChangeType() const
{
return m_changeType;
}
virtual wxEvent* Clone() const wxOVERRIDE
{
wxFileSystemWatcherEvent* evt = new wxFileSystemWatcherEvent(*this);
evt->m_errorMsg = m_errorMsg.Clone();
evt->m_path = wxFileName(m_path.GetFullPath().Clone());
evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone());
evt->m_warningType = m_warningType;
return evt;
}
virtual wxEventCategory GetEventCategory() const wxOVERRIDE
{
// TODO this has to be merged with "similar" categories and changed
return wxEVT_CATEGORY_UNKNOWN;
}
/**
* Returns if this error is an error event
*/
bool IsError() const
{
return (m_changeType & (wxFSW_EVENT_ERROR | wxFSW_EVENT_WARNING)) != 0;
}
wxString GetErrorDescription() const
{
return m_errorMsg;
}
wxFSWWarningType GetWarningType() const
{
return m_warningType;
}
/**
* Returns a wxString describing an event useful for debugging or testing
*/
wxString ToString() const;
protected:
int m_changeType;
wxFSWWarningType m_warningType;
wxFileName m_path;
wxFileName m_newPath;
wxString m_errorMsg;
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileSystemWatcherEvent);
};
typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction)
(wxFileSystemWatcherEvent&);
#define wxFileSystemWatcherEventHandler(func) \
wxEVENT_HANDLER_CAST(wxFileSystemWatcherEventFunction, func)
#define EVT_FSWATCHER(winid, func) \
wx__DECLARE_EVT1(wxEVT_FSWATCHER, winid, wxFileSystemWatcherEventHandler(func))
// ----------------------------------------------------------------------------
// wxFileSystemWatcherBase: interface for wxFileSystemWatcher
// ----------------------------------------------------------------------------
// Simple container to store information about one watched path.
class wxFSWatchInfo
{
public:
wxFSWatchInfo() :
m_events(-1), m_type(wxFSWPath_None), m_refcount(-1)
{
}
wxFSWatchInfo(const wxString& path,
int events,
wxFSWPathType type,
const wxString& filespec = wxString()) :
m_path(path), m_filespec(filespec), m_events(events), m_type(type),
m_refcount(1)
{
}
const wxString& GetPath() const
{
return m_path;
}
const wxString& GetFilespec() const { return m_filespec; }
int GetFlags() const
{
return m_events;
}
wxFSWPathType GetType() const
{
return m_type;
}
// Reference counting of watch entries is used to avoid watching the same
// file system path multiple times (this can happen even accidentally, e.g.
// when you have a recursive watch and then decide to watch some file or
// directory under it separately).
int IncRef()
{
return ++m_refcount;
}
int DecRef()
{
wxASSERT_MSG( m_refcount > 0, wxS("Trying to decrement a zero count") );
return --m_refcount;
}
protected:
wxString m_path;
wxString m_filespec; // For tree watches, holds any filespec to apply
int m_events;
wxFSWPathType m_type;
int m_refcount;
};
WX_DECLARE_STRING_HASH_MAP(wxFSWatchInfo, wxFSWatchInfoMap);
/**
* Encapsulation of platform-specific file system event mechanism
*/
class wxFSWatcherImpl;
/**
* Main entry point for clients interested in file system events.
* Defines interface that can be used to receive that kind of events.
*/
class WXDLLIMPEXP_BASE wxFileSystemWatcherBase: public wxEvtHandler
{
public:
wxFileSystemWatcherBase();
virtual ~wxFileSystemWatcherBase();
/**
* Adds path to currently watched files. Any events concerning this
* particular path will be sent to handler. Optionally a filter can be
* specified to receive only events of particular type.
*
* Please note that when adding a dir, immediate children will be watched
* as well.
*/
virtual bool Add(const wxFileName& path, int events = wxFSW_EVENT_ALL);
/**
* Like above, but recursively adds every file/dir in the tree rooted in
* path. Additionally a file mask can be specified to include only files
* of particular type.
*/
virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
const wxString& filespec = wxEmptyString);
/**
* Removes path from the list of watched paths.
*/
virtual bool Remove(const wxFileName& path);
/**
* Same as above, but also removes every file belonging to the tree rooted
* at path.
*/
virtual bool RemoveTree(const wxFileName& path);
/**
* Clears the list of currently watched paths.
*/
virtual bool RemoveAll();
/**
* Returns the number of watched paths
*/
int GetWatchedPathsCount() const;
/**
* Retrieves all watched paths and places them in wxArrayString. Returns
* the number of paths.
*
* TODO think about API here: we need to return more information (like is
* the path watched recursively)
*/
int GetWatchedPaths(wxArrayString* paths) const;
wxEvtHandler* GetOwner() const
{
return m_owner;
}
void SetOwner(wxEvtHandler* handler)
{
if (!handler)
m_owner = this;
else
m_owner = handler;
}
// This is a semi-private function used by wxWidgets itself only.
//
// Delegates the real work of adding the path to wxFSWatcherImpl::Add() and
// updates m_watches if the new path was successfully added.
bool AddAny(const wxFileName& path, int events, wxFSWPathType type,
const wxString& filespec = wxString());
protected:
static wxString GetCanonicalPath(const wxFileName& path)
{
wxFileName path_copy = wxFileName(path);
if ( !path_copy.Normalize() )
{
wxFAIL_MSG(wxString::Format("Unable to normalize path '%s'",
path.GetFullPath()));
return wxEmptyString;
}
return path_copy.GetFullPath();
}
wxFSWatchInfoMap m_watches; // path=>wxFSWatchInfo map
wxFSWatcherImpl* m_service; // file system events service
wxEvtHandler* m_owner; // handler for file system events
friend class wxFSWatcherImpl;
};
// include the platform specific file defining wxFileSystemWatcher
// inheriting from wxFileSystemWatcherBase
#ifdef wxHAS_INOTIFY
#include "wx/unix/fswatcher_inotify.h"
#define wxFileSystemWatcher wxInotifyFileSystemWatcher
#elif defined(wxHAS_KQUEUE) && defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
#include "wx/unix/fswatcher_kqueue.h"
#include "wx/osx/fswatcher_fsevents.h"
#define wxFileSystemWatcher wxFsEventsFileSystemWatcher
#elif defined(wxHAS_KQUEUE)
#include "wx/unix/fswatcher_kqueue.h"
#define wxFileSystemWatcher wxKqueueFileSystemWatcher
#elif defined(__WINDOWS__)
#include "wx/msw/fswatcher.h"
#define wxFileSystemWatcher wxMSWFileSystemWatcher
#else
#include "wx/generic/fswatcher.h"
#define wxFileSystemWatcher wxPollingFileSystemWatcher
#endif
#endif // wxUSE_FSWATCHER
#endif /* _WX_FSWATCHER_BASE_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/anystr.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/anystr.h
// Purpose: wxAnyStrPtr class declaration
// Author: Vadim Zeitlin
// Created: 2009-03-23
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANYSTR_H_
#define _WX_ANYSTR_H_
#include "wx/string.h"
// ----------------------------------------------------------------------------
// wxAnyStrPtr
//
// Notice that this is an internal and intentionally not documented class. It
// is only used by wxWidgets itself to ensure compatibility with previous
// versions and shouldn't be used by user code. When you see a function
// returning it you should just know that you can treat it as a string pointer.
// ----------------------------------------------------------------------------
// This is a helper class convertible to either narrow or wide string pointer.
// It is similar to wxCStrData but, unlike it, can be NULL which is required to
// represent the return value of wxDateTime::ParseXXX() methods for example.
//
// NB: this class is fully inline and so doesn't need to be DLL-exported
class wxAnyStrPtr
{
public:
// ctors: this class must be created from the associated string or using
// its default ctor for an invalid NULL-like object; notice that it is
// immutable after creation.
// ctor for invalid pointer
wxAnyStrPtr()
: m_str(NULL)
{
}
// ctor for valid pointer into the given string (whose lifetime must be
// greater than ours and which should remain constant while we're used)
wxAnyStrPtr(const wxString& str, const wxString::const_iterator& iter)
: m_str(&str),
m_iter(iter)
{
}
// default copy ctor is ok and so is default dtor, in particular we do not
// free the string
// various operators meant to make this class look like a superposition of
// char* and wchar_t*
// this one is needed to allow boolean expressions involving these objects,
// e.g. "if ( FuncReturningAnyStrPtr() && ... )" (unfortunately using
// unspecified_bool_type here wouldn't help with ambiguity between all the
// different conversions to pointers)
operator bool() const { return m_str != NULL; }
// at least VC7 also needs this one or it complains about ambiguity
// for !anystr expressions
bool operator!() const { return !((bool)*this); }
// and these are the conversions operator which allow to assign the result
// of FuncReturningAnyStrPtr() to either char* or wxChar* (i.e. wchar_t*)
operator const char *() const
{
if ( !m_str )
return NULL;
// check if the string is convertible to char at all
//
// notice that this pointer points into wxString internal buffer
// containing its char* representation and so it can be kept for as
// long as wxString is not modified -- which is long enough for our
// needs
const char *p = m_str->c_str().AsChar();
if ( *p )
{
// find the offset of the character corresponding to this iterator
// position in bytes: we don't have any direct way to do it so we
// need to redo the conversion again for the part of the string
// before the iterator to find its length in bytes in current
// locale
//
// NB: conversion won't fail as it succeeded for the entire string
p += strlen(wxString(m_str->begin(), m_iter).mb_str());
}
//else: conversion failed, return "" as we can't do anything else
return p;
}
operator const wchar_t *() const
{
if ( !m_str )
return NULL;
// no complications with wide strings (as long as we discount
// surrogates as we do for now)
//
// just remember that this works as long as wxString keeps an internal
// buffer with its wide wide char representation, just as with AsChar()
// above
return m_str->c_str().AsWChar() + (m_iter - m_str->begin());
}
// Because the objects of this class are only used as return type for
// functions which can return NULL we can skip providing dereferencing
// operators: the code using this class must test it for NULL first and if
// it does anything else with it it has to assign it to either char* or
// wchar_t* itself, before dereferencing.
//
// IOW this
//
// if ( *FuncReturningAnyStrPtr() )
//
// is invalid because it could crash. And this
//
// const char *p = FuncReturningAnyStrPtr();
// if ( p && *p )
//
// already works fine.
private:
// the original string and the position in it we correspond to, if the
// string is NULL this object is NULL pointer-like
const wxString * const m_str;
const wxString::const_iterator m_iter;
wxDECLARE_NO_ASSIGN_CLASS(wxAnyStrPtr);
};
#endif // _WX_ANYSTR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/dir.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/dir.h
// Purpose: wxDir is a class for enumerating the files in a directory
// Author: Vadim Zeitlin
// Modified by:
// Created: 08.12.99
// Copyright: (c) 1999 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIR_H_
#define _WX_DIR_H_
#include "wx/longlong.h"
#include "wx/string.h"
#include "wx/filefn.h" // for wxS_DIR_DEFAULT
class WXDLLIMPEXP_FWD_BASE wxArrayString;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// These flags affect the behaviour of GetFirst/GetNext() and Traverse().
// They define what types are included in the list of items they produce.
// Note that wxDIR_NO_FOLLOW is relevant only on Unix and ignored under systems
// not supporting symbolic links.
enum wxDirFlags
{
wxDIR_FILES = 0x0001, // include files
wxDIR_DIRS = 0x0002, // include directories
wxDIR_HIDDEN = 0x0004, // include hidden files
wxDIR_DOTDOT = 0x0008, // include '.' and '..'
wxDIR_NO_FOLLOW = 0x0010, // don't dereference any symlink
// by default, enumerate everything except '.' and '..'
wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN
};
// these constants are possible return value of wxDirTraverser::OnDir()
enum wxDirTraverseResult
{
wxDIR_IGNORE = -1, // ignore this directory but continue with others
wxDIR_STOP, // stop traversing
wxDIR_CONTINUE // continue into this directory
};
#if wxUSE_LONGLONG
// error code of wxDir::GetTotalSize()
extern WXDLLIMPEXP_DATA_BASE(const wxULongLong) wxInvalidSize;
#endif // wxUSE_LONGLONG
// ----------------------------------------------------------------------------
// wxDirTraverser: helper class for wxDir::Traverse()
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxDirTraverser
{
public:
/// a virtual dtor has been provided since this class has virtual members
virtual ~wxDirTraverser() { }
// called for each file found by wxDir::Traverse()
//
// return wxDIR_STOP or wxDIR_CONTINUE from here (wxDIR_IGNORE doesn't
// make sense)
virtual wxDirTraverseResult OnFile(const wxString& filename) = 0;
// called for each directory found by wxDir::Traverse()
//
// return one of the enum elements defined above
virtual wxDirTraverseResult OnDir(const wxString& dirname) = 0;
// called for each directory which we couldn't open during our traversal
// of the directory tree
//
// this method can also return either wxDIR_STOP, wxDIR_IGNORE or
// wxDIR_CONTINUE but the latter is treated specially: it means to retry
// opening the directory and so may lead to infinite loop if it is
// returned unconditionally, be careful with this!
//
// the base class version always returns wxDIR_IGNORE
virtual wxDirTraverseResult OnOpenError(const wxString& dirname);
};
// ----------------------------------------------------------------------------
// wxDir: portable equivalent of {open/read/close}dir functions
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxDirData;
class WXDLLIMPEXP_BASE wxDir
{
public:
// ctors
// -----
// default, use Open()
wxDir() { m_data = NULL; }
// opens the directory for enumeration, use IsOpened() to test success
wxDir(const wxString& dir);
// dtor calls Close() automatically
~wxDir() { Close(); }
// open the directory for enumerating
bool Open(const wxString& dir);
// close the directory, Open() can be called again later
void Close();
// returns true if the directory was successfully opened
bool IsOpened() const;
// get the full name of the directory (without '/' at the end)
wxString GetName() const;
// Same as GetName() but does include the trailing separator, unless the
// string is empty (only for invalid directories).
wxString GetNameWithSep() const;
// file enumeration routines
// -------------------------
// start enumerating all files matching filespec (or all files if it is
// empty) and flags, return true on success
bool GetFirst(wxString *filename,
const wxString& filespec = wxEmptyString,
int flags = wxDIR_DEFAULT) const;
// get next file in the enumeration started with GetFirst()
bool GetNext(wxString *filename) const;
// return true if this directory has any files in it
bool HasFiles(const wxString& spec = wxEmptyString) const;
// return true if this directory has any subdirectories
bool HasSubDirs(const wxString& spec = wxEmptyString) const;
// enumerate all files in this directory and its subdirectories
//
// return the number of files found
size_t Traverse(wxDirTraverser& sink,
const wxString& filespec = wxEmptyString,
int flags = wxDIR_DEFAULT) const;
// simplest version of Traverse(): get the names of all files under this
// directory into filenames array, return the number of files
static size_t GetAllFiles(const wxString& dirname,
wxArrayString *files,
const wxString& filespec = wxEmptyString,
int flags = wxDIR_DEFAULT);
// check if there any files matching the given filespec under the given
// directory (i.e. searches recursively), return the file path if found or
// empty string otherwise
static wxString FindFirst(const wxString& dirname,
const wxString& filespec,
int flags = wxDIR_DEFAULT);
#if wxUSE_LONGLONG
// returns the size of all directories recursively found in given path
static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL);
#endif // wxUSE_LONGLONG
// static utilities for directory management
// (alias to wxFileName's functions for dirs)
// -----------------------------------------
// test for existence of a directory with the given name
static bool Exists(const wxString& dir);
static bool Make(const wxString &dir, int perm = wxS_DIR_DEFAULT,
int flags = 0);
static bool Remove(const wxString &dir, int flags = 0);
private:
friend class wxDirData;
wxDirData *m_data;
wxDECLARE_NO_COPY_CLASS(wxDir);
};
#endif // _WX_DIR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/paper.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/paper.h
// Purpose: Paper database types and classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PAPERH__
#define _WX_PAPERH__
#include "wx/defs.h"
#include "wx/event.h"
#include "wx/cmndata.h"
#include "wx/intl.h"
#include "wx/hashmap.h"
/*
* Paper type: see defs.h for wxPaperSize enum.
* A wxPrintPaperType can have an id and a name, or just a name and wxPAPER_NONE,
* so you can add further paper types without needing new ids.
*/
#ifdef __WXMSW__
#define WXADDPAPER(paperId, platformId, name, w, h) AddPaperType(paperId, platformId, name, w, h)
#else
#define WXADDPAPER(paperId, platformId, name, w, h) AddPaperType(paperId, 0, name, w, h)
#endif
class WXDLLIMPEXP_CORE wxPrintPaperType: public wxObject
{
public:
wxPrintPaperType();
// platformId is a platform-specific id, such as in Windows, DMPAPER_...
wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h);
inline wxString GetName() const { return wxGetTranslation(m_paperName); }
inline wxPaperSize GetId() const { return m_paperId; }
inline int GetPlatformId() const { return m_platformId; }
// Get width and height in tenths of a millimetre
inline int GetWidth() const { return m_width; }
inline int GetHeight() const { return m_height; }
// Get size in tenths of a millimetre
inline wxSize GetSize() const { return wxSize(m_width, m_height); }
// Get size in a millimetres
inline wxSize GetSizeMM() const { return wxSize(m_width/10, m_height/10); }
// Get width and height in device units (1/72th of an inch)
wxSize GetSizeDeviceUnits() const ;
public:
wxPaperSize m_paperId;
int m_platformId;
int m_width; // In tenths of a millimetre
int m_height; // In tenths of a millimetre
wxString m_paperName;
private:
wxDECLARE_DYNAMIC_CLASS(wxPrintPaperType);
};
WX_DECLARE_STRING_HASH_MAP(wxPrintPaperType*, wxStringToPrintPaperTypeHashMap);
class WXDLLIMPEXP_FWD_CORE wxPrintPaperTypeList;
class WXDLLIMPEXP_CORE wxPrintPaperDatabase
{
public:
wxPrintPaperDatabase();
~wxPrintPaperDatabase();
void CreateDatabase();
void ClearDatabase();
void AddPaperType(wxPaperSize paperId, const wxString& name, int w, int h);
void AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h);
// Find by name
wxPrintPaperType *FindPaperType(const wxString& name);
// Find by size id
wxPrintPaperType *FindPaperType(wxPaperSize id);
// Find by platform id
wxPrintPaperType *FindPaperTypeByPlatformId(int id);
// Find by size
wxPrintPaperType *FindPaperType(const wxSize& size);
// Convert name to size id
wxPaperSize ConvertNameToId(const wxString& name);
// Convert size id to name
wxString ConvertIdToName(wxPaperSize paperId);
// Get the paper size
wxSize GetSize(wxPaperSize paperId);
// Get the paper size
wxPaperSize GetSize(const wxSize& size);
//
wxPrintPaperType* Item(size_t index) const;
size_t GetCount() const;
private:
wxStringToPrintPaperTypeHashMap* m_map;
wxPrintPaperTypeList* m_list;
//wxDECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase);
};
extern WXDLLIMPEXP_DATA_CORE(wxPrintPaperDatabase*) wxThePrintPaperDatabase;
#endif
// _WX_PAPERH__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/zipstrm.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/zipstrm.h
// Purpose: Streams for Zip files
// Author: Mike Wetherell
// Copyright: (c) Mike Wetherell
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WXZIPSTREAM_H__
#define _WX_WXZIPSTREAM_H__
#include "wx/defs.h"
#if wxUSE_ZIPSTREAM
#include "wx/archive.h"
#include "wx/filename.h"
// some methods from wxZipInputStream and wxZipOutputStream stream do not get
// exported/imported when compiled with Mingw versions before 3.4.2. So they
// are imported/exported individually as a workaround
#if (defined(__GNUWIN32__) || defined(__MINGW32__)) \
&& (!defined __GNUC__ \
|| !defined __GNUC_MINOR__ \
|| !defined __GNUC_PATCHLEVEL__ \
|| __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 30402)
#define WXZIPFIX WXDLLIMPEXP_BASE
#else
#define WXZIPFIX
#endif
/////////////////////////////////////////////////////////////////////////////
// constants
// Compression Method, only 0 (store) and 8 (deflate) are supported here
//
enum wxZipMethod
{
wxZIP_METHOD_STORE,
wxZIP_METHOD_SHRINK,
wxZIP_METHOD_REDUCE1,
wxZIP_METHOD_REDUCE2,
wxZIP_METHOD_REDUCE3,
wxZIP_METHOD_REDUCE4,
wxZIP_METHOD_IMPLODE,
wxZIP_METHOD_TOKENIZE,
wxZIP_METHOD_DEFLATE,
wxZIP_METHOD_DEFLATE64,
wxZIP_METHOD_BZIP2 = 12,
wxZIP_METHOD_DEFAULT = 0xffff
};
// Originating File-System.
//
// These are Pkware's values. Note that Info-zip disagree on some of them,
// most notably NTFS.
//
enum wxZipSystem
{
wxZIP_SYSTEM_MSDOS,
wxZIP_SYSTEM_AMIGA,
wxZIP_SYSTEM_OPENVMS,
wxZIP_SYSTEM_UNIX,
wxZIP_SYSTEM_VM_CMS,
wxZIP_SYSTEM_ATARI_ST,
wxZIP_SYSTEM_OS2_HPFS,
wxZIP_SYSTEM_MACINTOSH,
wxZIP_SYSTEM_Z_SYSTEM,
wxZIP_SYSTEM_CPM,
wxZIP_SYSTEM_WINDOWS_NTFS,
wxZIP_SYSTEM_MVS,
wxZIP_SYSTEM_VSE,
wxZIP_SYSTEM_ACORN_RISC,
wxZIP_SYSTEM_VFAT,
wxZIP_SYSTEM_ALTERNATE_MVS,
wxZIP_SYSTEM_BEOS,
wxZIP_SYSTEM_TANDEM,
wxZIP_SYSTEM_OS_400
};
// Dos/Win file attributes
//
enum wxZipAttributes
{
wxZIP_A_RDONLY = 0x01,
wxZIP_A_HIDDEN = 0x02,
wxZIP_A_SYSTEM = 0x04,
wxZIP_A_SUBDIR = 0x10,
wxZIP_A_ARCH = 0x20,
wxZIP_A_MASK = 0x37
};
// Values for the flags field in the zip headers
//
enum wxZipFlags
{
wxZIP_ENCRYPTED = 0x0001,
wxZIP_DEFLATE_NORMAL = 0x0000, // normal compression
wxZIP_DEFLATE_EXTRA = 0x0002, // extra compression
wxZIP_DEFLATE_FAST = 0x0004, // fast compression
wxZIP_DEFLATE_SUPERFAST = 0x0006, // superfast compression
wxZIP_DEFLATE_MASK = 0x0006,
wxZIP_SUMS_FOLLOW = 0x0008, // crc and sizes come after the data
wxZIP_ENHANCED = 0x0010,
wxZIP_PATCH = 0x0020,
wxZIP_STRONG_ENC = 0x0040,
wxZIP_LANG_ENC_UTF8 = 0x0800, // filename and comment are UTF8
wxZIP_UNUSED = 0x0F80,
wxZIP_RESERVED = 0xF000
};
enum wxZipArchiveFormat
{
/// Default zip format
wxZIP_FORMAT_DEFAULT,
/// ZIP64 format
wxZIP_FORMAT_ZIP64
};
// Forward decls
//
class WXDLLIMPEXP_FWD_BASE wxZipEntry;
class WXDLLIMPEXP_FWD_BASE wxZipInputStream;
/////////////////////////////////////////////////////////////////////////////
// wxZipNotifier
class WXDLLIMPEXP_BASE wxZipNotifier
{
public:
virtual ~wxZipNotifier() { }
virtual void OnEntryUpdated(wxZipEntry& entry) = 0;
};
/////////////////////////////////////////////////////////////////////////////
// Zip Entry - holds the meta data for a file in the zip
class wxDataOutputStream;
class WXDLLIMPEXP_BASE wxZipEntry : public wxArchiveEntry
{
public:
wxZipEntry(const wxString& name = wxEmptyString,
const wxDateTime& dt = wxDateTime::Now(),
wxFileOffset size = wxInvalidOffset);
virtual ~wxZipEntry();
wxZipEntry(const wxZipEntry& entry);
wxZipEntry& operator=(const wxZipEntry& entry);
// Get accessors
wxDateTime GetDateTime() const wxOVERRIDE { return m_DateTime; }
wxFileOffset GetSize() const wxOVERRIDE { return m_Size; }
wxFileOffset GetOffset() const wxOVERRIDE { return m_Offset; }
wxString GetInternalName() const wxOVERRIDE { return m_Name; }
int GetMethod() const { return m_Method; }
int GetFlags() const { return m_Flags; }
wxUint32 GetCrc() const { return m_Crc; }
wxFileOffset GetCompressedSize() const { return m_CompressedSize; }
int GetSystemMadeBy() const { return m_SystemMadeBy; }
wxString GetComment() const { return m_Comment; }
wxUint32 GetExternalAttributes() const { return m_ExternalAttributes; }
wxPathFormat GetInternalFormat() const wxOVERRIDE { return wxPATH_UNIX; }
int GetMode() const;
const char *GetLocalExtra() const;
size_t GetLocalExtraLen() const;
const char *GetExtra() const;
size_t GetExtraLen() const;
wxString GetName(wxPathFormat format = wxPATH_NATIVE) const wxOVERRIDE;
// is accessors
inline bool IsDir() const wxOVERRIDE;
inline bool IsText() const;
inline bool IsReadOnly() const wxOVERRIDE;
inline bool IsMadeByUnix() const;
// set accessors
void SetDateTime(const wxDateTime& dt) wxOVERRIDE { m_DateTime = dt; }
void SetSize(wxFileOffset size) wxOVERRIDE { m_Size = size; }
void SetMethod(int method) { m_Method = (wxUint16)method; }
void SetComment(const wxString& comment) { m_Comment = comment; }
void SetExternalAttributes(wxUint32 attr ) { m_ExternalAttributes = attr; }
void SetSystemMadeBy(int system);
void SetMode(int mode);
void SetExtra(const char *extra, size_t len);
void SetLocalExtra(const char *extra, size_t len);
inline void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) wxOVERRIDE;
static wxString GetInternalName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE,
bool *pIsDir = NULL);
// set is accessors
void SetIsDir(bool isDir = true) wxOVERRIDE;
inline void SetIsReadOnly(bool isReadOnly = true) wxOVERRIDE;
inline void SetIsText(bool isText = true);
wxZipEntry *Clone() const { return ZipClone(); }
void SetNotifier(wxZipNotifier& notifier);
void UnsetNotifier() wxOVERRIDE;
protected:
// Internal attributes
enum { TEXT_ATTR = 1 };
// protected Get accessors
int GetVersionNeeded() const { return m_VersionNeeded; }
wxFileOffset GetKey() const { return m_Key; }
int GetVersionMadeBy() const { return m_VersionMadeBy; }
int GetDiskStart() const { return m_DiskStart; }
int GetInternalAttributes() const { return m_InternalAttributes; }
void SetVersionNeeded(int version) { m_VersionNeeded = (wxUint16)version; }
void SetOffset(wxFileOffset offset) wxOVERRIDE { m_Offset = offset; }
void SetFlags(int flags) { m_Flags = (wxUint16)flags; }
void SetVersionMadeBy(int version) { m_VersionMadeBy = (wxUint8)version; }
void SetCrc(wxUint32 crc) { m_Crc = crc; }
void SetCompressedSize(wxFileOffset size) { m_CompressedSize = size; }
void SetKey(wxFileOffset offset) { m_Key = offset; }
void SetDiskStart(int start) { m_DiskStart = (wxUint16)start; }
void SetInternalAttributes(int attr) { m_InternalAttributes = (wxUint16)attr; }
virtual wxZipEntry *ZipClone() const { return new wxZipEntry(*this); }
void Notify();
private:
wxArchiveEntry* DoClone() const wxOVERRIDE { return ZipClone(); }
size_t ReadLocal(wxInputStream& stream, wxMBConv& conv);
size_t WriteLocal(wxOutputStream& stream, wxMBConv& conv, wxZipArchiveFormat zipFormat);
size_t ReadCentral(wxInputStream& stream, wxMBConv& conv);
size_t WriteCentral(wxOutputStream& stream, wxMBConv& conv) const;
size_t ReadDescriptor(wxInputStream& stream);
size_t WriteDescriptor(wxOutputStream& stream, wxUint32 crc,
wxFileOffset compressedSize, wxFileOffset size);
void WriteLocalFileSizes(wxDataOutputStream& ds) const;
void WriteLocalZip64ExtraInfo(wxOutputStream& stream) const;
bool LoadExtraInfo(const char* extraData, wxUint16 extraLen, bool localInfo);
wxUint16 GetInternalFlags(bool checkForUTF8) const;
wxUint8 m_SystemMadeBy; // one of enum wxZipSystem
wxUint8 m_VersionMadeBy; // major * 10 + minor
wxUint16 m_VersionNeeded; // ver needed to extract (20 i.e. v2.0)
wxUint16 m_Flags;
wxUint16 m_Method; // compression method (one of wxZipMethod)
wxDateTime m_DateTime;
wxUint32 m_Crc;
wxFileOffset m_CompressedSize;
wxFileOffset m_Size;
wxString m_Name; // in internal format
wxFileOffset m_Key; // the original offset for copied entries
wxFileOffset m_Offset; // file offset of the entry
wxString m_Comment;
wxUint16 m_DiskStart; // for multidisk archives, not unsupported
wxUint16 m_InternalAttributes; // bit 0 set for text files
wxUint32 m_ExternalAttributes; // system specific depends on SystemMadeBy
wxUint16 m_z64infoOffset; // Offset of ZIP64 local extra data for file sizes
class wxZipMemory *m_Extra;
class wxZipMemory *m_LocalExtra;
wxZipNotifier *m_zipnotifier;
class wxZipWeakLinks *m_backlink;
friend class wxZipInputStream;
friend class wxZipOutputStream;
wxDECLARE_DYNAMIC_CLASS(wxZipEntry);
};
/////////////////////////////////////////////////////////////////////////////
// wxZipOutputStream
WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wxZipEntryList_, class WXDLLIMPEXP_BASE);
class WXDLLIMPEXP_BASE wxZipOutputStream : public wxArchiveOutputStream
{
public:
wxZipOutputStream(wxOutputStream& stream,
int level = -1,
wxMBConv& conv = wxConvUTF8);
wxZipOutputStream(wxOutputStream *stream,
int level = -1,
wxMBConv& conv = wxConvUTF8);
virtual WXZIPFIX ~wxZipOutputStream();
bool PutNextEntry(wxZipEntry *entry) { return DoCreate(entry); }
bool WXZIPFIX PutNextEntry(const wxString& name,
const wxDateTime& dt = wxDateTime::Now(),
wxFileOffset size = wxInvalidOffset) wxOVERRIDE;
bool WXZIPFIX PutNextDirEntry(const wxString& name,
const wxDateTime& dt = wxDateTime::Now()) wxOVERRIDE;
bool WXZIPFIX CopyEntry(wxZipEntry *entry, wxZipInputStream& inputStream);
bool WXZIPFIX CopyArchiveMetaData(wxZipInputStream& inputStream);
void WXZIPFIX Sync() wxOVERRIDE;
bool WXZIPFIX CloseEntry() wxOVERRIDE;
bool WXZIPFIX Close() wxOVERRIDE;
void SetComment(const wxString& comment) { m_Comment = comment; }
int GetLevel() const { return m_level; }
void WXZIPFIX SetLevel(int level);
void SetFormat(wxZipArchiveFormat format) { m_format = format; }
wxZipArchiveFormat GetFormat() const { return m_format; }
protected:
virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size) wxOVERRIDE;
virtual wxFileOffset OnSysTell() const wxOVERRIDE { return m_entrySize; }
// this protected interface isn't yet finalised
struct Buffer { const char *m_data; size_t m_size; };
virtual wxOutputStream* WXZIPFIX OpenCompressor(wxOutputStream& stream,
wxZipEntry& entry,
const Buffer bufs[]);
virtual bool WXZIPFIX CloseCompressor(wxOutputStream *comp);
bool IsParentSeekable() const
{ return m_offsetAdjustment != wxInvalidOffset; }
private:
void Init(int level);
bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry) wxOVERRIDE;
bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream) wxOVERRIDE;
bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream) wxOVERRIDE;
bool IsOpened() const { return m_comp || m_pending; }
bool DoCreate(wxZipEntry *entry, bool raw = false);
void CreatePendingEntry(const void *buffer, size_t size);
void CreatePendingEntry();
class wxStoredOutputStream *m_store;
class wxZlibOutputStream2 *m_deflate;
class wxZipStreamLink *m_backlink;
wxZipEntryList_ m_entries;
char *m_initialData;
size_t m_initialSize;
wxZipEntry *m_pending;
bool m_raw;
wxFileOffset m_headerOffset;
size_t m_headerSize;
wxFileOffset m_entrySize;
wxUint32 m_crcAccumulator;
wxOutputStream *m_comp;
int m_level;
wxFileOffset m_offsetAdjustment;
wxString m_Comment;
bool m_endrecWritten;
wxZipArchiveFormat m_format;
wxDECLARE_NO_COPY_CLASS(wxZipOutputStream);
};
/////////////////////////////////////////////////////////////////////////////
// wxZipInputStream
class WXDLLIMPEXP_BASE wxZipInputStream : public wxArchiveInputStream
{
public:
typedef wxZipEntry entry_type;
wxZipInputStream(wxInputStream& stream, wxMBConv& conv = wxConvLocal);
wxZipInputStream(wxInputStream *stream, wxMBConv& conv = wxConvLocal);
virtual WXZIPFIX ~wxZipInputStream();
bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); }
bool WXZIPFIX CloseEntry() wxOVERRIDE;
wxZipEntry *GetNextEntry();
wxString WXZIPFIX GetComment();
int WXZIPFIX GetTotalEntries();
virtual wxFileOffset GetLength() const wxOVERRIDE { return m_entry.GetSize(); }
protected:
size_t WXZIPFIX OnSysRead(void *buffer, size_t size) wxOVERRIDE;
wxFileOffset OnSysTell() const wxOVERRIDE { return m_decomp ? m_decomp->TellI() : 0; }
// this protected interface isn't yet finalised
virtual wxInputStream* WXZIPFIX OpenDecompressor(wxInputStream& stream);
virtual bool WXZIPFIX CloseDecompressor(wxInputStream *decomp);
private:
void Init();
void Init(const wxString& file);
wxArchiveEntry *DoGetNextEntry() wxOVERRIDE { return GetNextEntry(); }
bool WXZIPFIX OpenEntry(wxArchiveEntry& entry) wxOVERRIDE;
wxStreamError ReadLocal(bool readEndRec = false);
wxStreamError ReadCentral();
wxUint32 ReadSignature();
bool FindEndRecord();
bool LoadEndRecord();
bool AtHeader() const { return m_headerSize == 0; }
bool AfterHeader() const { return m_headerSize > 0 && !m_decomp; }
bool IsOpened() const { return m_decomp != NULL; }
wxZipStreamLink *MakeLink(wxZipOutputStream *out);
bool DoOpen(wxZipEntry *entry = NULL, bool raw = false);
bool OpenDecompressor(bool raw = false);
class wxStoredInputStream *m_store;
class wxZlibInputStream2 *m_inflate;
class wxRawInputStream *m_rawin;
wxZipEntry m_entry;
bool m_raw;
size_t m_headerSize;
wxUint32 m_crcAccumulator;
wxInputStream *m_decomp;
bool m_parentSeekable;
class wxZipWeakLinks *m_weaklinks;
class wxZipStreamLink *m_streamlink;
wxFileOffset m_offsetAdjustment;
wxFileOffset m_position;
wxUint32 m_signature;
size_t m_TotalEntries;
wxString m_Comment;
friend bool wxZipOutputStream::CopyEntry(
wxZipEntry *entry, wxZipInputStream& inputStream);
friend bool wxZipOutputStream::CopyArchiveMetaData(
wxZipInputStream& inputStream);
wxDECLARE_NO_COPY_CLASS(wxZipInputStream);
};
/////////////////////////////////////////////////////////////////////////////
// Iterators
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, wxZipEntry*> > wxZipPairIter;
#endif
/////////////////////////////////////////////////////////////////////////////
// wxZipClassFactory
class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory
{
public:
typedef wxZipEntry entry_type;
typedef wxZipInputStream instream_type;
typedef wxZipOutputStream outstream_type;
typedef wxZipNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxZipIter iter_type;
typedef wxZipPairIter pairiter_type;
#endif
wxZipClassFactory();
wxZipEntry *NewEntry() const
{ return new wxZipEntry; }
wxZipInputStream *NewStream(wxInputStream& stream) const
{ return new wxZipInputStream(stream, GetConv()); }
wxZipOutputStream *NewStream(wxOutputStream& stream) const
{ return new wxZipOutputStream(stream, -1, GetConv()); }
wxZipInputStream *NewStream(wxInputStream *stream) const
{ return new wxZipInputStream(stream, GetConv()); }
wxZipOutputStream *NewStream(wxOutputStream *stream) const
{ return new wxZipOutputStream(stream, -1, GetConv()); }
wxString GetInternalName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) const wxOVERRIDE
{ return wxZipEntry::GetInternalName(name, format); }
const wxChar * const *GetProtocols(wxStreamProtocolType type
= wxSTREAM_PROTOCOL) const wxOVERRIDE;
protected:
wxArchiveEntry *DoNewEntry() const wxOVERRIDE
{ return NewEntry(); }
wxArchiveInputStream *DoNewStream(wxInputStream& stream) const wxOVERRIDE
{ return NewStream(stream); }
wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const wxOVERRIDE
{ return NewStream(stream); }
wxArchiveInputStream *DoNewStream(wxInputStream *stream) const wxOVERRIDE
{ return NewStream(stream); }
wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const wxOVERRIDE
{ return NewStream(stream); }
private:
wxDECLARE_DYNAMIC_CLASS(wxZipClassFactory);
};
/////////////////////////////////////////////////////////////////////////////
// wxZipEntry inlines
inline bool wxZipEntry::IsText() const
{
return (m_InternalAttributes & TEXT_ATTR) != 0;
}
inline bool wxZipEntry::IsDir() const
{
return (m_ExternalAttributes & wxZIP_A_SUBDIR) != 0;
}
inline bool wxZipEntry::IsReadOnly() const
{
return (m_ExternalAttributes & wxZIP_A_RDONLY) != 0;
}
inline bool wxZipEntry::IsMadeByUnix() const
{
switch ( m_SystemMadeBy )
{
case wxZIP_SYSTEM_MSDOS:
// note: some unix zippers put madeby = dos
return (m_ExternalAttributes & ~0xFFFF) != 0;
case wxZIP_SYSTEM_OPENVMS:
case wxZIP_SYSTEM_UNIX:
case wxZIP_SYSTEM_ATARI_ST:
case wxZIP_SYSTEM_ACORN_RISC:
case wxZIP_SYSTEM_BEOS:
case wxZIP_SYSTEM_TANDEM:
return true;
case wxZIP_SYSTEM_AMIGA:
case wxZIP_SYSTEM_VM_CMS:
case wxZIP_SYSTEM_OS2_HPFS:
case wxZIP_SYSTEM_MACINTOSH:
case wxZIP_SYSTEM_Z_SYSTEM:
case wxZIP_SYSTEM_CPM:
case wxZIP_SYSTEM_WINDOWS_NTFS:
case wxZIP_SYSTEM_MVS:
case wxZIP_SYSTEM_VSE:
case wxZIP_SYSTEM_VFAT:
case wxZIP_SYSTEM_ALTERNATE_MVS:
case wxZIP_SYSTEM_OS_400:
return false;
}
// Unknown system, assume not Unix.
return false;
}
inline void wxZipEntry::SetIsText(bool isText)
{
if (isText)
m_InternalAttributes |= TEXT_ATTR;
else
m_InternalAttributes &= ~TEXT_ATTR;
}
inline void wxZipEntry::SetIsReadOnly(bool isReadOnly)
{
if (isReadOnly)
SetMode(GetMode() & ~0222);
else
SetMode(GetMode() | 0200);
}
inline void wxZipEntry::SetName(const wxString& name,
wxPathFormat format /*=wxPATH_NATIVE*/)
{
bool isDir;
m_Name = GetInternalName(name, format, &isDir);
SetIsDir(isDir);
}
#endif // wxUSE_ZIPSTREAM
#endif // _WX_WXZIPSTREAM_H__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_grid.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_grid.h
// Purpose: XML resource handler for wxGrid
// Author: Agron Selimaj
// Created: 2005/08/11
// Copyright: (c) 2005 Agron Selimaj, Freepour Controls Inc.
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_GRD_H_
#define _WX_XH_GRD_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_GRID
class WXDLLIMPEXP_XRC wxGridXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxGridXmlHandler);
public:
wxGridXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_GRID
#endif // _WX_XH_GRD_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_stlin.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_stlin.h
// Purpose: XML resource handler for wxStaticLine
// Author: Vaclav Slavik
// Created: 2000/09/00
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_STLIN_H_
#define _WX_XH_STLIN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_STATLINE
class WXDLLIMPEXP_XRC wxStaticLineXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxStaticLineXmlHandler);
public:
wxStaticLineXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_STATLINE
#endif // _WX_XH_STLIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_stbmp.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_stbmp.h
// Purpose: XML resource handler for wxStaticBitmap
// Author: Vaclav Slavik
// Created: 2000/04/22
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_STBMP_H_
#define _WX_XH_STBMP_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_STATBMP
class WXDLLIMPEXP_XRC wxStaticBitmapXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxStaticBitmapXmlHandler);
public:
wxStaticBitmapXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_STATBMP
#endif // _WX_XH_STBMP_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_bmpbt.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_bmpbt.h
// Purpose: XML resource handler for bitmap buttons
// Author: Brian Gavin
// Created: 2000/03/05
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_BMPBT_H_
#define _WX_XH_BMPBT_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_BMPBUTTON
class WXDLLIMPEXP_XRC wxBitmapButtonXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxBitmapButtonXmlHandler);
public:
wxBitmapButtonXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_BMPBUTTON
#endif // _WX_XH_BMPBT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_bannerwindow.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_bannerwindow.h
// Purpose: Declaration of wxBannerWindow XRC handler.
// Author: Vadim Zeitlin
// Created: 2011-08-16
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_BANNERWINDOW_H_
#define _WX_XH_BANNERWINDOW_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_BANNERWINDOW
class WXDLLIMPEXP_XRC wxBannerWindowXmlHandler : public wxXmlResourceHandler
{
public:
wxBannerWindowXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxBannerWindowXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_BANNERWINDOW
#endif // _WX_XH_BANNERWINDOW_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_notbk.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_notbk.h
// Purpose: XML resource handler for wxNotebook
// Author: Vaclav Slavik
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_NOTBK_H_
#define _WX_XH_NOTBK_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_NOTEBOOK
class WXDLLIMPEXP_FWD_CORE wxNotebook;
class WXDLLIMPEXP_XRC wxNotebookXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxNotebookXmlHandler);
public:
wxNotebookXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxNotebook *m_notebook;
};
#endif // wxUSE_XRC && wxUSE_NOTEBOOK
#endif // _WX_XH_NOTBK_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_panel.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_panel.h
// Purpose: XML resource handler for wxPanel
// Author: Vaclav Slavik
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_PANEL_H_
#define _WX_XH_PANEL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
class WXDLLIMPEXP_XRC wxPanelXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxPanelXmlHandler);
public:
wxPanelXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC
#endif // _WX_XH_PANEL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_cald.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_cald.h
// Purpose: XML resource handler for wxCalendarCtrl
// Author: Brian Gavin
// Created: 2000/09/09
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_CALD_H_
#define _WX_XH_CALD_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_CALENDARCTRL
class WXDLLIMPEXP_XRC wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler);
public:
wxCalendarCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_CALENDARCTRL
#endif // _WX_XH_CALD_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_text.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_text.h
// Purpose: XML resource handler for wxTextCtrl
// Author: Aleksandras Gluchovas
// Created: 2000/03/21
// Copyright: (c) 2000 Aleksandras Gluchovas
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TEXT_H_
#define _WX_XH_TEXT_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TEXTCTRL
class WXDLLIMPEXP_XRC wxTextCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxTextCtrlXmlHandler);
public:
wxTextCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_TEXTCTRL
#endif // _WX_XH_TEXT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_datectrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_datectrl.h
// Purpose: XML resource handler for wxDatePickerCtrl
// Author: Vaclav Slavik
// Created: 2005-02-07
// Copyright: (c) 2005 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_DATECTRL_H_
#define _WX_XH_DATECTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_DATEPICKCTRL
class WXDLLIMPEXP_XRC wxDateCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxDateCtrlXmlHandler);
public:
wxDateCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_DATEPICKCTRL
#endif // _WX_XH_DATECTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_dirpicker.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_dirpicker.h
// Purpose: XML resource handler for wxDirPickerCtrl
// Author: Francesco Montorsi
// Created: 2006-04-17
// Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_DIRPICKERCTRL_H_
#define _WX_XH_DIRPICKERCTRL_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_DIRPICKERCTRL
class WXDLLIMPEXP_XRC wxDirPickerCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler);
public:
wxDirPickerCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_DIRPICKERCTRL
#endif // _WX_XH_DIRPICKERCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_combo.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_combo.h
// Purpose: XML resource handler for wxComboBox
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_COMBO_H_
#define _WX_XH_COMBO_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_COMBOBOX
class WXDLLIMPEXP_XRC wxComboBoxXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxComboBoxXmlHandler);
public:
wxComboBoxXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_insideBox;
wxArrayString strList;
};
#endif // wxUSE_XRC && wxUSE_COMBOBOX
#endif // _WX_XH_COMBO_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_dlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_dlg.h
// Purpose: XML resource handler for dialogs
// Author: Vaclav Slavik
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_DLG_H_
#define _WX_XH_DLG_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
class WXDLLIMPEXP_XRC wxDialogXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxDialogXmlHandler);
public:
wxDialogXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC
#endif // _WX_XH_DLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_scwin.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_scwin.h
// Purpose: XML resource handler for wxScrolledWindow
// Author: Vaclav Slavik
// Created: 2002/10/18
// Copyright: (c) 2002 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SCWIN_H_
#define _WX_XH_SCWIN_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC
class WXDLLIMPEXP_XRC wxScrolledWindowXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxScrolledWindowXmlHandler);
public:
wxScrolledWindowXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC
#endif // _WX_XH_SCWIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_slidr.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_slidr.h
// Purpose: XML resource handler for wxSlider
// Author: Bob Mitchell
// Created: 2000/03/21
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_SLIDR_H_
#define _WX_XH_SLIDR_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_SLIDER
class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler
{
public:
wxSliderXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxSliderXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_SLIDER
#endif // _WX_XH_SLIDR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_tree.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_tree.h
// Purpose: XML resource handler for wxTreeCtrl
// Author: Brian Gavin
// Created: 2000/09/09
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TREE_H_
#define _WX_XH_TREE_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TREECTRL
class WXDLLIMPEXP_XRC wxTreeCtrlXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxTreeCtrlXmlHandler);
public:
wxTreeCtrlXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
};
#endif // wxUSE_XRC && wxUSE_TREECTRL
#endif // _WX_XH_TREE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xmlres.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xmlres.h
// Purpose: XML resources
// Author: Vaclav Slavik
// Created: 2000/03/05
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XMLRES_H_
#define _WX_XMLRES_H_
#include "wx/defs.h"
#if wxUSE_XRC
#include "wx/string.h"
#include "wx/dynarray.h"
#include "wx/arrstr.h"
#include "wx/datetime.h"
#include "wx/list.h"
#include "wx/gdicmn.h"
#include "wx/filesys.h"
#include "wx/bitmap.h"
#include "wx/icon.h"
#include "wx/artprov.h"
#include "wx/colour.h"
#include "wx/vector.h"
#include "wx/xrc/xmlreshandler.h"
class WXDLLIMPEXP_FWD_BASE wxFileName;
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
class WXDLLIMPEXP_FWD_CORE wxImageList;
class WXDLLIMPEXP_FWD_CORE wxMenu;
class WXDLLIMPEXP_FWD_CORE wxMenuBar;
class WXDLLIMPEXP_FWD_CORE wxDialog;
class WXDLLIMPEXP_FWD_CORE wxPanel;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxToolBar;
class WXDLLIMPEXP_FWD_XML wxXmlDocument;
class WXDLLIMPEXP_FWD_XML wxXmlNode;
class WXDLLIMPEXP_FWD_XRC wxXmlSubclassFactory;
class wxXmlSubclassFactories;
class wxXmlResourceModule;
class wxXmlResourceDataRecords;
// These macros indicate current version of XML resources (this information is
// encoded in root node of XRC file as "version" property).
//
// Rules for increasing version number:
// - change it only if you made incompatible change to the format. Addition
// of new attribute to control handler is _not_ incompatible change, because
// older versions of the library may ignore it.
// - if you change version number, follow these steps:
// - set major, minor and release numbers to respective version numbers of
// the wxWidgets library (see wx/version.h)
// - reset revision to 0 unless the first three are same as before,
// in which case you should increase revision by one
#define WX_XMLRES_CURRENT_VERSION_MAJOR 2
#define WX_XMLRES_CURRENT_VERSION_MINOR 5
#define WX_XMLRES_CURRENT_VERSION_RELEASE 3
#define WX_XMLRES_CURRENT_VERSION_REVISION 0
#define WX_XMLRES_CURRENT_VERSION_STRING wxT("2.5.3.0")
#define WX_XMLRES_CURRENT_VERSION \
(WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \
WX_XMLRES_CURRENT_VERSION_MINOR * 256*256 + \
WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \
WX_XMLRES_CURRENT_VERSION_REVISION)
enum wxXmlResourceFlags
{
wxXRC_USE_LOCALE = 1,
wxXRC_NO_SUBCLASSING = 2,
wxXRC_NO_RELOADING = 4
};
// This class holds XML resources from one or more .xml files
// (or derived forms, either binary or zipped -- see manual for
// details).
class WXDLLIMPEXP_XRC wxXmlResource : public wxObject
{
public:
// Constructor.
// Flags: wxXRC_USE_LOCALE
// translatable strings will be translated via _()
// using the given domain if specified
// wxXRC_NO_SUBCLASSING
// subclass property of object nodes will be ignored
// (useful for previews in XRC editors)
// wxXRC_NO_RELOADING
// don't check the modification time of the XRC files and
// reload them if they have changed on disk
wxXmlResource(int flags = wxXRC_USE_LOCALE,
const wxString& domain = wxEmptyString);
// Constructor.
// Flags: wxXRC_USE_LOCALE
// translatable strings will be translated via _()
// using the given domain if specified
// wxXRC_NO_SUBCLASSING
// subclass property of object nodes will be ignored
// (useful for previews in XRC editors)
wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE,
const wxString& domain = wxEmptyString);
// Destructor.
virtual ~wxXmlResource();
// Loads resources from XML files that match given filemask.
// This method understands wxFileSystem URLs if wxUSE_FILESYS.
bool Load(const wxString& filemask);
// Loads resources from single XRC file.
bool LoadFile(const wxFileName& file);
// Loads all XRC files from a directory.
bool LoadAllFiles(const wxString& dirname);
// Unload resource from the given XML file (wildcards not allowed)
bool Unload(const wxString& filename);
// Initialize handlers for all supported controls/windows. This will
// make the executable quite big because it forces linking against
// most of the wxWidgets library.
void InitAllHandlers();
// Initialize only a specific handler (or custom handler). Convention says
// that handler name is equal to the control's name plus 'XmlHandler', for
// example wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource
// compiler (xmlres) can create include file that contains initialization
// code for all controls used within the resource.
void AddHandler(wxXmlResourceHandler *handler);
// Add a new handler at the beginning of the handler list
void InsertHandler(wxXmlResourceHandler *handler);
// Removes all handlers
void ClearHandlers();
// Registers subclasses factory for use in XRC. This function is not meant
// for public use, please see the comment above wxXmlSubclassFactory
// definition.
static void AddSubclassFactory(wxXmlSubclassFactory *factory);
// Loads menu from resource. Returns NULL on failure.
wxMenu *LoadMenu(const wxString& name);
// Loads menubar from resource. Returns NULL on failure.
wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name);
// Loads menubar from resource. Returns NULL on failure.
wxMenuBar *LoadMenuBar(const wxString& name) { return LoadMenuBar(NULL, name); }
#if wxUSE_TOOLBAR
// Loads a toolbar.
wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name);
#endif
// Loads a dialog. dlg points to parent window (if any).
wxDialog *LoadDialog(wxWindow *parent, const wxString& name);
// Loads a dialog. dlg points to parent window (if any). This form
// is used to finish creation of already existing instance (main reason
// for this is that you may want to use derived class with new event table)
// Example (typical usage):
// MyDialog dlg;
// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
// dlg->ShowModal();
bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name);
// Loads a panel. panel points to parent window (if any).
wxPanel *LoadPanel(wxWindow *parent, const wxString& name);
// Loads a panel. panel points to parent window (if any). This form
// is used to finish creation of already existing instance.
bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name);
// Loads a frame.
wxFrame *LoadFrame(wxWindow* parent, const wxString& name);
bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name);
// Load an object from the resource specifying both the resource name and
// the classname. This lets you load nonstandard container windows.
wxObject *LoadObject(wxWindow *parent, const wxString& name,
const wxString& classname)
{
return DoLoadObject(parent, name, classname, false /* !recursive */);
}
// Load an object from the resource specifying both the resource name and
// the classname. This form lets you finish the creation of an existing
// instance.
bool LoadObject(wxObject *instance,
wxWindow *parent,
const wxString& name,
const wxString& classname)
{
return DoLoadObject(instance, parent, name, classname, false);
}
// These versions of LoadObject() look for the object with the given name
// recursively (breadth first) and can be used to instantiate an individual
// control defined anywhere in an XRC file. No check is done that the name
// is unique, it's up to the caller to ensure this.
wxObject *LoadObjectRecursively(wxWindow *parent,
const wxString& name,
const wxString& classname)
{
return DoLoadObject(parent, name, classname, true /* recursive */);
}
bool LoadObjectRecursively(wxObject *instance,
wxWindow *parent,
const wxString& name,
const wxString& classname)
{
return DoLoadObject(instance, parent, name, classname, true);
}
// Loads a bitmap resource from a file.
wxBitmap LoadBitmap(const wxString& name);
// Loads an icon resource from a file.
wxIcon LoadIcon(const wxString& name);
// Attaches an unknown control to the given panel/window/dialog.
// Unknown controls are used in conjunction with <object class="unknown">.
bool AttachUnknownControl(const wxString& name, wxWindow *control,
wxWindow *parent = NULL);
// Returns a numeric ID that is equivalent to the string ID used in an XML
// resource. If an unknown str_id is requested (i.e. other than wxID_XXX
// or integer), a new record is created which associates the given string
// with a number. If value_if_not_found == wxID_NONE, the number is obtained via
// wxWindow::NewControlId(). Otherwise value_if_not_found is used.
// Macro XRCID(name) is provided for convenient use in event tables.
static int GetXRCID(const wxString& str_id, int value_if_not_found = wxID_NONE)
{ return DoGetXRCID(str_id.mb_str(), value_if_not_found); }
// version for internal use only
static int DoGetXRCID(const char *str_id, int value_if_not_found = wxID_NONE);
// Find the string ID with the given numeric value, returns an empty string
// if no such ID is found.
//
// Notice that unlike GetXRCID(), which is fast, this operation is slow as
// it checks all the IDs used in XRC.
static wxString FindXRCIDById(int numId);
// Returns version information (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a).
long GetVersion() const { return m_version; }
// Compares resources version to argument. Returns -1 if resources version
// is less than the argument, +1 if greater and 0 if they equal.
int CompareVersion(int major, int minor, int release, int revision) const
{
long diff = GetVersion() -
(major*256*256*256 + minor*256*256 + release*256 + revision);
if ( diff < 0 )
return -1;
else if ( diff > 0 )
return +1;
else
return 0;
}
//// Singleton accessors.
// Gets the global resources object or creates one if none exists.
static wxXmlResource *Get();
// Sets the global resources object and returns a pointer to the previous one (may be NULL).
static wxXmlResource *Set(wxXmlResource *res);
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
int GetFlags() const { return m_flags; }
// Set flags after construction.
void SetFlags(int flags) { m_flags = flags; }
// Get/Set the domain to be passed to the translation functions, defaults
// to empty string (no domain).
const wxString& GetDomain() const { return m_domain; }
void SetDomain(const wxString& domain);
// This function returns the wxXmlNode containing the definition of the
// object with the given name or NULL.
//
// It can be used to access additional information defined in the XRC file
// and not used by wxXmlResource itself.
const wxXmlNode *GetResourceNode(const wxString& name) const
{ return GetResourceNodeAndLocation(name, wxString(), true); }
protected:
// reports input error at position 'context'
void ReportError(const wxXmlNode *context, const wxString& message);
// override this in derived class to customize errors reporting
virtual void DoReportError(const wxString& xrcFile, const wxXmlNode *position,
const wxString& message);
// Load the contents of a single file and returns its contents as a new
// wxXmlDocument (which will be owned by caller) on success or NULL.
wxXmlDocument *DoLoadFile(const wxString& file);
// Scans the resources list for unloaded files and loads them. Also reloads
// files that have been modified since last loading.
bool UpdateResources();
// Common implementation of GetResourceNode() and FindResource(): searches
// all top-level or all (if recursive == true) nodes if all loaded XRC
// files and returns the node, if found, as well as the path of the file it
// was found in if path is non-NULL
wxXmlNode *GetResourceNodeAndLocation(const wxString& name,
const wxString& classname,
bool recursive = false,
wxString *path = NULL) const;
// Note that these functions are used outside of wxWidgets itself, e.g.
// there are several known cases of inheriting from wxXmlResource just to
// be able to call FindResource() so we keep them for compatibility even if
// their names are not really consistent with GetResourceNode() public
// function and FindResource() is also non-const because it changes the
// current path of m_curFileSystem to ensure that relative paths work
// correctly when CreateResFromNode() is called immediately afterwards
// (something const public function intentionally does not do)
// Returns the node containing the resource with the given name and class
// name unless it's empty (then any class matches) or NULL if not found.
wxXmlNode *FindResource(const wxString& name, const wxString& classname,
bool recursive = false);
// Helper function used by FindResource() to look under the given node.
wxXmlNode *DoFindResource(wxXmlNode *parent, const wxString& name,
const wxString& classname, bool recursive) const;
// Creates a resource from information in the given node
// (Uses only 'handlerToUse' if != NULL)
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent,
wxObject *instance = NULL,
wxXmlResourceHandler *handlerToUse = NULL)
{
return node ? DoCreateResFromNode(*node, parent, instance, handlerToUse)
: NULL;
}
// Helper of Load() and Unload(): returns the URL corresponding to the
// given file if it's indeed a file, otherwise returns the original string
// unmodified
static wxString ConvertFileNameToURL(const wxString& filename);
// loading resources from archives is impossible without wxFileSystem
#if wxUSE_FILESYSTEM
// Another helper: detect if the filename is a ZIP or XRS file
static bool IsArchive(const wxString& filename);
#endif // wxUSE_FILESYSTEM
private:
wxXmlResourceDataRecords& Data() { return *m_data; }
const wxXmlResourceDataRecords& Data() const { return *m_data; }
// the real implementation of CreateResFromNode(): this should be only
// called if node is non-NULL
wxObject *DoCreateResFromNode(wxXmlNode& node,
wxObject *parent,
wxObject *instance,
wxXmlResourceHandler *handlerToUse = NULL);
// common part of LoadObject() and LoadObjectRecursively()
wxObject *DoLoadObject(wxWindow *parent,
const wxString& name,
const wxString& classname,
bool recursive);
bool DoLoadObject(wxObject *instance,
wxWindow *parent,
const wxString& name,
const wxString& classname,
bool recursive);
private:
long m_version;
int m_flags;
wxVector<wxXmlResourceHandler*> m_handlers;
wxXmlResourceDataRecords *m_data;
#if wxUSE_FILESYSTEM
wxFileSystem m_curFileSystem;
wxFileSystem& GetCurFileSystem() { return m_curFileSystem; }
#endif
// domain to pass to translation functions, if any.
wxString m_domain;
friend class wxXmlResourceHandlerImpl;
friend class wxXmlResourceModule;
friend class wxIdRangeManager;
friend class wxIdRange;
static wxXmlSubclassFactories *ms_subclassFactories;
// singleton instance:
static wxXmlResource *ms_instance;
};
// This macro translates string identifier (as used in XML resource,
// e.g. <menuitem id="my_menu">...</menuitem>) to integer id that is needed by
// wxWidgets event tables.
// Example:
// wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
// EVT_MENU(XRCID("quit"), MyFrame::OnQuit)
// EVT_MENU(XRCID("about"), MyFrame::OnAbout)
// EVT_MENU(XRCID("new"), MyFrame::OnNew)
// EVT_MENU(XRCID("open"), MyFrame::OnOpen)
// wxEND_EVENT_TABLE()
#define XRCID(str_id) \
wxXmlResource::DoGetXRCID(str_id)
// This macro returns pointer to particular control in dialog
// created using XML resources. You can use it to set/get values from
// controls.
// Example:
// wxDialog dlg;
// wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
// XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
#define XRCCTRL(window, id, type) \
(wxStaticCast((window).FindWindow(XRCID(id)), type))
// This macro returns pointer to sizer item
// Example:
//
// <object class="spacer" name="area">
// <size>400, 300</size>
// </object>
//
// wxSizerItem* item = XRCSIZERITEM(*this, "area")
#define XRCSIZERITEM(window, id) \
((window).GetSizer() ? (window).GetSizer()->GetItemById(XRCID(id)) : NULL)
// wxXmlResourceHandlerImpl is the back-end of the wxXmlResourceHander class to
// really implementing all its functionality. It is defined in the "xrc"
// library unlike wxXmlResourceHandler itself which is defined in "core" to
// allow inheriting from it in the code from the other libraries too.
class WXDLLIMPEXP_XRC wxXmlResourceHandlerImpl : public wxXmlResourceHandlerImplBase
{
public:
// Constructor.
wxXmlResourceHandlerImpl(wxXmlResourceHandler *handler);
// Destructor.
virtual ~wxXmlResourceHandlerImpl() {}
// Creates an object (menu, dialog, control, ...) from an XML node.
// Should check for validity.
// parent is a higher-level object (usually window, dialog or panel)
// that is often necessary to create the resource.
// If instance is non-NULL it should not create a new instance via 'new' but
// should rather use this one, and call its Create method.
wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
wxObject *instance) wxOVERRIDE;
// --- Handy methods:
// Returns true if the node has a property class equal to classname,
// e.g. <object class="wxDialog">.
bool IsOfClass(wxXmlNode *node, const wxString& classname) const wxOVERRIDE;
bool IsObjectNode(const wxXmlNode *node) const wxOVERRIDE;
// Gets node content from wxXML_ENTITY_NODE
// The problem is, <tag>content<tag> is represented as
// wxXML_ENTITY_NODE name="tag", content=""
// |-- wxXML_TEXT_NODE or
// wxXML_CDATA_SECTION_NODE name="" content="content"
wxString GetNodeContent(const wxXmlNode *node) wxOVERRIDE;
wxXmlNode *GetNodeParent(const wxXmlNode *node) const wxOVERRIDE;
wxXmlNode *GetNodeNext(const wxXmlNode *node) const wxOVERRIDE;
wxXmlNode *GetNodeChildren(const wxXmlNode *node) const wxOVERRIDE;
// Check to see if a parameter exists.
bool HasParam(const wxString& param) wxOVERRIDE;
// Finds the node or returns NULL.
wxXmlNode *GetParamNode(const wxString& param) wxOVERRIDE;
// Finds the parameter value or returns the empty string.
wxString GetParamValue(const wxString& param) wxOVERRIDE;
// Returns the parameter value from given node.
wxString GetParamValue(const wxXmlNode* node) wxOVERRIDE;
// Gets style flags from text in form "flag | flag2| flag3 |..."
// Only understands flags added with AddStyle
int GetStyle(const wxString& param = wxT("style"), int defaults = 0) wxOVERRIDE;
// Gets text from param and does some conversions:
// - replaces \n, \r, \t by respective chars (according to C syntax)
// - replaces _ by & and __ by _ (needed for _File => &File because of XML)
// - calls wxGetTranslations (unless disabled in wxXmlResource)
//
// The first two conversions can be disabled by using wxXRC_TEXT_NO_ESCAPE
// in flags and the last one -- by using wxXRC_TEXT_NO_TRANSLATE.
wxString GetNodeText(const wxXmlNode *node, int flags = 0) wxOVERRIDE;
// Returns the XRCID.
int GetID() wxOVERRIDE;
// Returns the resource name.
wxString GetName() wxOVERRIDE;
// Gets a bool flag (1, t, yes, on, true are true, everything else is false).
bool GetBool(const wxString& param, bool defaultv = false) wxOVERRIDE;
// Gets an integer value from the parameter.
long GetLong(const wxString& param, long defaultv = 0) wxOVERRIDE;
// Gets a float value from the parameter.
float GetFloat(const wxString& param, float defaultv = 0) wxOVERRIDE;
// Gets colour in HTML syntax (#RRGGBB).
wxColour GetColour(const wxString& param, const wxColour& defaultv = wxNullColour) wxOVERRIDE;
// Gets the size (may be in dialog units).
wxSize GetSize(const wxString& param = wxT("size"),
wxWindow *windowToUse = NULL) wxOVERRIDE;
// Gets the position (may be in dialog units).
wxPoint GetPosition(const wxString& param = wxT("pos")) wxOVERRIDE;
// Gets a dimension (may be in dialog units).
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
wxWindow *windowToUse = NULL) wxOVERRIDE;
// Gets a size which is not expressed in pixels, so not in dialog units.
wxSize GetPairInts(const wxString& param) wxOVERRIDE;
// Gets a direction, complains if the value is invalid.
wxDirection GetDirection(const wxString& param, wxDirection dirDefault = wxLEFT) wxOVERRIDE;
// Gets a bitmap.
wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) wxOVERRIDE;
// Gets a bitmap from an XmlNode.
wxBitmap GetBitmap(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) wxOVERRIDE;
// Gets an icon.
wxIcon GetIcon(const wxString& param = wxT("icon"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) wxOVERRIDE;
// Gets an icon from an XmlNode.
wxIcon GetIcon(const wxXmlNode* node,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize) wxOVERRIDE;
// Gets an icon bundle.
wxIconBundle GetIconBundle(const wxString& param,
const wxArtClient& defaultArtClient = wxART_OTHER) wxOVERRIDE;
// Gets an image list.
wxImageList *GetImageList(const wxString& param = wxT("imagelist")) wxOVERRIDE;
#if wxUSE_ANIMATIONCTRL
// Gets an animation.
wxAnimation* GetAnimation(const wxString& param = wxT("animation")) wxOVERRIDE;
#endif
// Gets a font.
wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL) wxOVERRIDE;
// Gets the value of a boolean attribute (only "0" and "1" are valid values)
bool GetBoolAttr(const wxString& attr, bool defaultv) wxOVERRIDE;
// Returns the window associated with the handler (may be NULL).
wxWindow* GetParentAsWindow() const { return m_handler->GetParentAsWindow(); }
// Sets common window options.
void SetupWindow(wxWindow *wnd) wxOVERRIDE;
// Creates children.
void CreateChildren(wxObject *parent, bool this_hnd_only = false) wxOVERRIDE;
// Helper function.
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL) wxOVERRIDE;
// Creates a resource from a node.
wxObject *CreateResFromNode(wxXmlNode *node,
wxObject *parent, wxObject *instance = NULL) wxOVERRIDE;
// helper
#if wxUSE_FILESYSTEM
wxFileSystem& GetCurFileSystem() wxOVERRIDE;
#endif
// reports input error at position 'context'
void ReportError(wxXmlNode *context, const wxString& message) wxOVERRIDE;
// reports input error at m_node
void ReportError(const wxString& message) wxOVERRIDE;
// reports input error when parsing parameter with given name
void ReportParamError(const wxString& param, const wxString& message) wxOVERRIDE;
};
// Programmer-friendly macros for writing XRC handlers:
#define XRC_MAKE_INSTANCE(variable, classname) \
classname *variable = NULL; \
if (m_instance) \
variable = wxStaticCast(m_instance, classname); \
if (!variable) \
variable = new classname; \
if (GetBool(wxT("hidden"), 0) == 1) \
variable->Hide();
// FIXME -- remove this $%^#$%#$@# as soon as Ron checks his changes in!!
WXDLLIMPEXP_XRC void wxXmlInitResourceModule();
// This class is used to create instances of XRC "object" nodes with "subclass"
// property. It is _not_ supposed to be used by XRC users, you should instead
// register your subclasses via wxWidgets' RTTI mechanism. This class is useful
// only for language bindings developer who need a way to implement subclassing
// in wxWidgets ports that don't support wxRTTI (e.g. wxPython).
class WXDLLIMPEXP_XRC wxXmlSubclassFactory
{
public:
// Try to create instance of given class and return it, return NULL on
// failure:
virtual wxObject *Create(const wxString& className) = 0;
virtual ~wxXmlSubclassFactory() {}
};
/* -------------------------------------------------------------------------
Backward compatibility macros. Do *NOT* use, they may disappear in future
versions of the XRC library!
------------------------------------------------------------------------- */
#endif // wxUSE_XRC
#endif // _WX_XMLRES_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/include/wx/xrc/xh_treebk.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_treebk.h
// Purpose: XML resource handler for wxTreebook
// Author: Evgeniy Tarassov
// Created: 2005/09/28
// Copyright: (c) 2005 TT-Solutions <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_TREEBK_H_
#define _WX_XH_TREEBK_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_TREEBOOK
class WXDLLIMPEXP_FWD_CORE wxTreebook;
#include "wx/dynarray.h"
WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes,
class WXDLLIMPEXP_XRC);
// ---------------------------------------------------------------------
// wxTreebookXmlHandler class
// ---------------------------------------------------------------------
// Resource xml structure have to be almost the "same" as for wxNotebook
// except the additional (size_t)depth parameter for treebookpage nodes
// which indicates the depth of the page in the tree.
// There is only one logical constraint on this parameter :
// it cannot be greater than the previous page depth plus one
class WXDLLIMPEXP_XRC wxTreebookXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler);
public:
wxTreebookXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxTreebook *m_tbk;
wxArrayTbkPageIndexes m_treeContext;
bool m_isInside;
};
// Example:
// -------
// Label
// \--First
// | \--Second
// \--Third
//
//<resource>
// ...
// <object class="wxTreebook">
// <object class="treebookpage">
// <object class="wxWindow" />
// <label>My first page</label>
// <depth>0</depth>
// </object>
// <object class="treebookpage">
// <object class="wxWindow" />
// <label>First</label>
// <depth>1</depth>
// </object>
// <object class="treebookpage">
// <object class="wxWindow" />
// <label>Second</label>
// <depth>2</depth>
// </object>
// <object class="treebookpage">
// <object class="wxWindow" />
// <label>Third</label>
// <depth>1</depth>
// </object>
// </object>
// ...
//</resource>
#endif // wxUSE_XRC && wxUSE_TREEBOOK
#endif // _WX_XH_TREEBK_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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/Win32/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 |
Subsets and Splits