repo_name
stringclasses 10
values | file_path
stringlengths 29
222
| content
stringlengths 24
926k
| extention
stringclasses 5
values |
---|---|---|---|
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/minifram.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/minifram.h
// Purpose: wxMiniFrame class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MINIFRAM_H_
#define _WX_MINIFRAM_H_
#include "wx/frame.h"
class WXDLLIMPEXP_CORE wxMiniFrame : public wxFrame
{
public:
wxMiniFrame() { }
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER,
const wxString& name = wxFrameNameStr)
{
return wxFrame::Create(parent, id, title, pos, size,
style |
wxFRAME_TOOL_WINDOW |
(parent ? wxFRAME_FLOAT_ON_PARENT : 0), name);
}
wxMiniFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
protected:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMiniFrame);
};
#endif
// _WX_MINIFRAM_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/pen.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/pen.h
// Purpose: wxPen class
// Author: Julian Smart
// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PEN_H_
#define _WX_PEN_H_
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
// ----------------------------------------------------------------------------
// Pen
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPen : public wxPenBase
{
public:
wxPen() { }
wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
wxPen(const wxBitmap& stipple, int width);
wxPen(const wxPenInfo& info);
virtual ~wxPen() { }
bool operator==(const wxPen& pen) const;
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
// Override in order to recreate the pen
void SetColour(const wxColour& col) wxOVERRIDE;
void SetColour(unsigned char r, unsigned char g, unsigned char b) wxOVERRIDE;
void SetWidth(int width) wxOVERRIDE;
void SetStyle(wxPenStyle style) wxOVERRIDE;
void SetStipple(const wxBitmap& stipple) wxOVERRIDE;
void SetDashes(int nb_dashes, const wxDash *dash) wxOVERRIDE;
void SetJoin(wxPenJoin join) wxOVERRIDE;
void SetCap(wxPenCap cap) wxOVERRIDE;
wxColour GetColour() const wxOVERRIDE;
int GetWidth() const wxOVERRIDE;
wxPenStyle GetStyle() const wxOVERRIDE;
wxPenJoin GetJoin() const wxOVERRIDE;
wxPenCap GetCap() const wxOVERRIDE;
int GetDashes(wxDash** ptr) const wxOVERRIDE;
wxDash* GetDash() const;
int GetDashCount() const;
wxBitmap* GetStipple() const wxOVERRIDE;
wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
wxPen(const wxColour& col, int width, int style);
wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
// internal: wxGDIObject methods
virtual bool RealizeResource() wxOVERRIDE;
virtual bool FreeResource(bool force = false) wxOVERRIDE;
virtual WXHANDLE GetResourceHandle() const wxOVERRIDE;
virtual bool IsFree() const wxOVERRIDE;
protected:
virtual wxGDIRefData* CreateGDIRefData() const wxOVERRIDE;
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const wxOVERRIDE;
// same as FreeResource() + RealizeResource()
bool Recreate();
wxDECLARE_DYNAMIC_CLASS(wxPen);
};
#endif // _WX_PEN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/dialog.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/dialog.h
// Purpose: wxDialog class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIALOG_H_
#define _WX_DIALOG_H_
#include "wx/panel.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[];
class WXDLLIMPEXP_FWD_CORE wxDialogModalData;
// Dialog boxes
class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase
{
public:
wxDialog() { Init(); }
// full ctor
wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
Init();
(void)Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
virtual ~wxDialog();
// return true if we're showing the dialog modally
virtual bool IsModal() const wxOVERRIDE { return m_modalData != NULL; }
// show the dialog modally and return the value passed to EndModal()
virtual int ShowModal() wxOVERRIDE;
// may be called to terminate the dialog with the given return code
virtual void EndModal(int retCode) wxOVERRIDE;
// implementation only from now on
// -------------------------------
// override some base class virtuals
virtual bool Show(bool show = true) wxOVERRIDE;
virtual void SetWindowStyleFlag(long style) wxOVERRIDE;
// Windows callbacks
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
protected:
// common part of all ctors
void Init();
private:
// these functions deal with the gripper window shown in the corner of
// resizable dialogs
void CreateGripper();
void DestroyGripper();
void ShowGripper(bool show);
void ResizeGripper();
// this function is used to adjust Z-order of new children relative to the
// gripper if we have one
void OnWindowCreate(wxWindowCreateEvent& event);
// gripper window for a resizable dialog, NULL if we're not resizable
WXHWND m_hGripper;
// this pointer is non-NULL only while the modal event loop is running
wxDialogModalData *m_modalData;
wxDECLARE_DYNAMIC_CLASS(wxDialog);
wxDECLARE_NO_COPY_CLASS(wxDialog);
};
#endif
// _WX_DIALOG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/icon.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/icon.h
// Purpose: wxIcon class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ICON_H_
#define _WX_ICON_H_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/msw/gdiimage.h"
// ---------------------------------------------------------------------------
// icon data
// ---------------------------------------------------------------------------
// notice that although wxIconRefData inherits from wxBitmapRefData, it is not
// a valid wxBitmapRefData
class WXDLLIMPEXP_CORE wxIconRefData : public wxGDIImageRefData
{
public:
wxIconRefData() { }
virtual ~wxIconRefData() { Free(); }
virtual void Free() wxOVERRIDE;
};
// ---------------------------------------------------------------------------
// Icon
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxIcon : public wxGDIImage
{
public:
// ctors
// default
wxIcon() { }
// from raw data
wxIcon(const char bits[], int width, int height);
// from XPM data
wxIcon(const char* const* data) { CreateIconFromXpm(data); }
#ifdef wxNEEDS_CHARPP
wxIcon(char **data) { CreateIconFromXpm(const_cast<const char* const*>(data)); }
#endif
// from resource/file
wxIcon(const wxString& name,
wxBitmapType type = wxICON_DEFAULT_TYPE,
int desiredWidth = -1, int desiredHeight = -1);
wxIcon(const wxIconLocation& loc);
virtual ~wxIcon();
virtual bool LoadFile(const wxString& name,
wxBitmapType type = wxICON_DEFAULT_TYPE,
int desiredWidth = -1, int desiredHeight = -1);
bool CreateFromHICON(WXHICON icon);
// implementation only from now on
wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; }
#if WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_INLINE(void SetHICON(WXHICON icon), SetHandle((WXHANDLE)icon); )
#endif // WXWIN_COMPATIBILITY_3_0
WXHICON GetHICON() const { return (WXHICON)GetHandle(); }
bool InitFromHICON(WXHICON icon, int width, int height);
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// ctors, assignment operators...), but it's ok to have such function
void CopyFromBitmap(const wxBitmap& bmp);
protected:
virtual wxGDIImageRefData *CreateData() const wxOVERRIDE
{
return new wxIconRefData;
}
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const wxOVERRIDE;
// create from XPM data
void CreateIconFromXpm(const char* const* data);
private:
wxDECLARE_DYNAMIC_CLASS(wxIcon);
};
#endif
// _WX_ICON_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/cursor.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/cursor.h
// Purpose: wxCursor class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CURSOR_H_
#define _WX_CURSOR_H_
class WXDLLIMPEXP_FWD_CORE wxImage;
// Cursor
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
{
public:
// constructors
wxCursor();
wxCursor(const wxImage& image);
wxCursor(const wxString& name,
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
int hotSpotX = 0, int hotSpotY = 0);
wxCursor(wxStockCursor id) { InitFromStock(id); }
#if WXWIN_COMPATIBILITY_2_8
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
#endif
virtual wxPoint GetHotSpot() const wxOVERRIDE;
virtual ~wxCursor();
// implementation only
void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
protected:
void InitFromStock(wxStockCursor);
virtual wxGDIImageRefData *CreateData() const wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxCursor);
};
#endif
// _WX_CURSOR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/winundef.h | /////////////////////////////////////////////////////////////////////////////
// Name: winundef.h
// Purpose: undefine the common symbols #define'd by <windows.h>
// Author: Vadim Zeitlin
// Modified by:
// Created: 16.05.99
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/* THIS SHOULD NOT BE USED since you might include it once e.g. in window.h,
* then again _AFTER_ you've included windows.h, in which case it won't work
* a 2nd time -- JACS
#ifndef _WX_WINUNDEF_H_
#define _WX_WINUNDEF_H_
*/
#ifndef wxUSE_UNICODE_WINDOWS_H
#ifdef _UNICODE
#define wxUSE_UNICODE_WINDOWS_H 1
#else
#define wxUSE_UNICODE_WINDOWS_H 0
#endif
#endif
// ----------------------------------------------------------------------------
// windows.h #defines the following identifiers which are also used in wxWin so
// we replace these symbols with the corresponding inline functions and
// undefine the macro.
//
// This looks quite ugly here but allows us to write clear (and correct!) code
// elsewhere because the functions, unlike the macros, respect the scope.
// ----------------------------------------------------------------------------
// CreateDialog
#if defined(CreateDialog)
#undef CreateDialog
inline HWND CreateDialog(HINSTANCE hInstance,
LPCTSTR pTemplate,
HWND hwndParent,
DLGPROC pDlgProc)
{
#if wxUSE_UNICODE_WINDOWS_H
return CreateDialogW(hInstance, pTemplate, hwndParent, pDlgProc);
#else
return CreateDialogA(hInstance, pTemplate, hwndParent, pDlgProc);
#endif
}
#endif
// CreateFont
#ifdef CreateFont
#undef CreateFont
inline HFONT CreateFont(int height,
int width,
int escapement,
int orientation,
int weight,
DWORD italic,
DWORD underline,
DWORD strikeout,
DWORD charset,
DWORD outprecision,
DWORD clipprecision,
DWORD quality,
DWORD family,
LPCTSTR facename)
{
#if wxUSE_UNICODE_WINDOWS_H
return CreateFontW(height, width, escapement, orientation,
weight, italic, underline, strikeout, charset,
outprecision, clipprecision, quality,
family, facename);
#else
return CreateFontA(height, width, escapement, orientation,
weight, italic, underline, strikeout, charset,
outprecision, clipprecision, quality,
family, facename);
#endif
}
#endif // CreateFont
// CreateWindow
#if defined(CreateWindow)
#undef CreateWindow
inline HWND CreateWindow(LPCTSTR lpClassName,
LPCTSTR lpWndClass,
DWORD dwStyle,
int x, int y, int w, int h,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam)
{
#if wxUSE_UNICODE_WINDOWS_H
return CreateWindowW(lpClassName, lpWndClass, dwStyle, x, y, w, h,
hWndParent, hMenu, hInstance, lpParam);
#else
return CreateWindowA(lpClassName, lpWndClass, dwStyle, x, y, w, h,
hWndParent, hMenu, hInstance, lpParam);
#endif
}
#endif
// LoadMenu
#ifdef LoadMenu
#undef LoadMenu
inline HMENU LoadMenu(HINSTANCE instance, LPCTSTR name)
{
#if wxUSE_UNICODE_WINDOWS_H
return LoadMenuW(instance, name);
#else
return LoadMenuA(instance, name);
#endif
}
#endif
// FindText
#ifdef FindText
#undef FindText
inline HWND APIENTRY FindText(LPFINDREPLACE lpfindreplace)
{
#if wxUSE_UNICODE_WINDOWS_H
return FindTextW(lpfindreplace);
#else
return FindTextA(lpfindreplace);
#endif
}
#endif
// GetCharWidth
#ifdef GetCharWidth
#undef GetCharWidth
inline BOOL GetCharWidth(HDC dc, UINT first, UINT last, LPINT buffer)
{
#if wxUSE_UNICODE_WINDOWS_H
return GetCharWidthW(dc, first, last, buffer);
#else
return GetCharWidthA(dc, first, last, buffer);
#endif
}
#endif
// FindWindow
#ifdef FindWindow
#undef FindWindow
#if wxUSE_UNICODE_WINDOWS_H
inline HWND FindWindow(LPCWSTR classname, LPCWSTR windowname)
{
return FindWindowW(classname, windowname);
}
#else
inline HWND FindWindow(LPCSTR classname, LPCSTR windowname)
{
return FindWindowA(classname, windowname);
}
#endif
#endif
// PlaySound
#ifdef PlaySound
#undef PlaySound
#if wxUSE_UNICODE_WINDOWS_H
inline BOOL PlaySound(LPCWSTR pszSound, HMODULE hMod, DWORD fdwSound)
{
return PlaySoundW(pszSound, hMod, fdwSound);
}
#else
inline BOOL PlaySound(LPCSTR pszSound, HMODULE hMod, DWORD fdwSound)
{
return PlaySoundA(pszSound, hMod, fdwSound);
}
#endif
#endif
// GetClassName
#ifdef GetClassName
#undef GetClassName
#if wxUSE_UNICODE_WINDOWS_H
inline int GetClassName(HWND h, LPWSTR classname, int maxcount)
{
return GetClassNameW(h, classname, maxcount);
}
#else
inline int GetClassName(HWND h, LPSTR classname, int maxcount)
{
return GetClassNameA(h, classname, maxcount);
}
#endif
#endif
// GetClassInfo
#ifdef GetClassInfo
#undef GetClassInfo
#if wxUSE_UNICODE_WINDOWS_H
inline BOOL GetClassInfo(HINSTANCE h, LPCWSTR name, LPWNDCLASSW winclass)
{
return GetClassInfoW(h, name, winclass);
}
#else
inline BOOL GetClassInfo(HINSTANCE h, LPCSTR name, LPWNDCLASSA winclass)
{
return GetClassInfoA(h, name, winclass);
}
#endif
#endif
// LoadAccelerators
#ifdef LoadAccelerators
#undef LoadAccelerators
#if wxUSE_UNICODE_WINDOWS_H
inline HACCEL LoadAccelerators(HINSTANCE h, LPCWSTR name)
{
return LoadAcceleratorsW(h, name);
}
#else
inline HACCEL LoadAccelerators(HINSTANCE h, LPCSTR name)
{
return LoadAcceleratorsA(h, name);
}
#endif
#endif
// DrawText
#ifdef DrawText
#undef DrawText
#if wxUSE_UNICODE_WINDOWS_H
inline int DrawText(HDC h, LPCWSTR str, int count, LPRECT rect, UINT format)
{
return DrawTextW(h, str, count, rect, format);
}
#else
inline int DrawText(HDC h, LPCSTR str, int count, LPRECT rect, UINT format)
{
return DrawTextA(h, str, count, rect, format);
}
#endif
#endif
// StartDoc
#ifdef StartDoc
#undef StartDoc
#if wxUSE_UNICODE_WINDOWS_H
inline int StartDoc(HDC h, CONST DOCINFOW* info)
{
return StartDocW(h, (DOCINFOW*) info);
}
#else
inline int StartDoc(HDC h, CONST DOCINFOA* info)
{
return StartDocA(h, (DOCINFOA*) info);
}
#endif
#endif
// GetObject
#ifdef GetObject
#undef GetObject
inline int GetObject(HGDIOBJ h, int i, LPVOID buffer)
{
#if wxUSE_UNICODE_WINDOWS_H
return GetObjectW(h, i, buffer);
#else
return GetObjectA(h, i, buffer);
#endif
}
#endif
// GetMessage
#ifdef GetMessage
#undef GetMessage
inline int GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax)
{
#if wxUSE_UNICODE_WINDOWS_H
return GetMessageW(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
#else
return GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
#endif
}
#endif
// LoadIcon
#ifdef LoadIcon
#undef LoadIcon
inline HICON LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName)
{
#if wxUSE_UNICODE_WINDOWS_H
return LoadIconW(hInstance, lpIconName);
#else // ANSI
return LoadIconA(hInstance, lpIconName);
#endif // Unicode/ANSI
}
#endif // LoadIcon
// LoadBitmap
#ifdef LoadBitmap
#undef LoadBitmap
inline HBITMAP LoadBitmap(HINSTANCE hInstance, LPCTSTR lpBitmapName)
{
#if wxUSE_UNICODE_WINDOWS_H
return LoadBitmapW(hInstance, lpBitmapName);
#else // ANSI
return LoadBitmapA(hInstance, lpBitmapName);
#endif // Unicode/ANSI
}
#endif // LoadBitmap
// LoadLibrary
#ifdef LoadLibrary
#undef LoadLibrary
#if wxUSE_UNICODE_WINDOWS_H
inline HINSTANCE LoadLibrary(LPCWSTR lpLibFileName)
{
return LoadLibraryW(lpLibFileName);
}
#else
inline HINSTANCE LoadLibrary(LPCSTR lpLibFileName)
{
return LoadLibraryA(lpLibFileName);
}
#endif
#endif
// FindResource
#ifdef FindResource
#undef FindResource
#if wxUSE_UNICODE_WINDOWS_H
inline HRSRC FindResource(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType)
{
return FindResourceW(hModule, lpName, lpType);
}
#else
inline HRSRC FindResource(HMODULE hModule, LPCSTR lpName, LPCSTR lpType)
{
return FindResourceA(hModule, lpName, lpType);
}
#endif
#endif
// IsMaximized
#ifdef IsMaximized
#undef IsMaximized
inline BOOL IsMaximized(HWND hwnd)
{
return IsZoomed(hwnd);
}
#endif
// GetFirstChild
#ifdef GetFirstChild
#undef GetFirstChild
inline HWND GetFirstChild(HWND hwnd)
{
return GetTopWindow(hwnd);
}
#endif
// GetFirstSibling
#ifdef GetFirstSibling
#undef GetFirstSibling
inline HWND GetFirstSibling(HWND hwnd)
{
return GetWindow(hwnd,GW_HWNDFIRST);
}
#endif
// GetLastSibling
#ifdef GetLastSibling
#undef GetLastSibling
inline HWND GetLastSibling(HWND hwnd)
{
return GetWindow(hwnd,GW_HWNDLAST);
}
#endif
// GetPrevSibling
#ifdef GetPrevSibling
#undef GetPrevSibling
inline HWND GetPrevSibling(HWND hwnd)
{
return GetWindow(hwnd,GW_HWNDPREV);
}
#endif
// GetNextSibling
#ifdef GetNextSibling
#undef GetNextSibling
inline HWND GetNextSibling(HWND hwnd)
{
return GetWindow(hwnd,GW_HWNDNEXT);
}
#endif
// For WINE
#if defined(GetWindowStyle)
#undef GetWindowStyle
#endif
// For ming and cygwin
#ifdef Yield
#undef Yield
#endif
// GetWindowProc
//ifdef GetWindowProc
// #undef GetWindowProc
//endif
//ifdef GetNextChild
// #undef GetNextChild
//endif
// #endif // _WX_WINUNDEF_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/popupwin.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/popupwin.h
// Purpose: wxPopupWindow class for wxMSW
// Author: Vadim Zeitlin
// Modified by:
// Created: 06.01.01
// Copyright: (c) 2001 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_POPUPWIN_H_
#define _WX_MSW_POPUPWIN_H_
// ----------------------------------------------------------------------------
// wxPopupWindow
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase
{
public:
wxPopupWindow() { m_owner = NULL; }
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual bool Show(bool show = true) wxOVERRIDE;
// return the style to be used for the popup windows
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const wxOVERRIDE;
// Implementation only from now on.
// Return the top level window parent of this popup or null.
wxWindow* MSWGetOwner() const { return m_owner; }
private:
wxWindow* m_owner;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow);
};
#endif // _WX_MSW_POPUPWIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/caret.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/caret.h
// Purpose: wxCaret class - the MSW implementation of wxCaret
// Author: Vadim Zeitlin
// Modified by:
// Created: 23.05.99
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CARET_H_
#define _WX_CARET_H_
class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
{
public:
wxCaret() { Init(); }
// create the caret of given (in pixels) width and height and associate
// with the given window
wxCaret(wxWindow *window, int width, int height)
{
Init();
(void)Create(window, width, height);
}
// same as above
wxCaret(wxWindowBase *window, const wxSize& size)
{
Init();
(void)Create(window, size);
}
// process wxWindow notifications
virtual void OnSetFocus() wxOVERRIDE;
virtual void OnKillFocus() wxOVERRIDE;
protected:
void Init()
{
wxCaretBase::Init();
m_hasCaret = false;
}
// override base class virtuals
virtual void DoMove() wxOVERRIDE;
virtual void DoShow() wxOVERRIDE;
virtual void DoHide() wxOVERRIDE;
virtual void DoSize() wxOVERRIDE;
// helper function which creates the system caret
bool MSWCreateCaret();
private:
bool m_hasCaret;
wxDECLARE_NO_COPY_CLASS(wxCaret);
};
#endif // _WX_CARET_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/joystick.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/joystick.h
// Purpose: wxJoystick class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_JOYSTICK_H_
#define _WX_JOYSTICK_H_
#include "wx/event.h"
class wxJoystickThread;
class WXDLLIMPEXP_ADV wxJoystick: public wxObject
{
wxDECLARE_DYNAMIC_CLASS(wxJoystick);
public:
/*
* Public interface
*/
wxJoystick(int joystick = wxJOYSTICK1);
virtual ~wxJoystick();
// Attributes
////////////////////////////////////////////////////////////////////////////
wxPoint GetPosition(void) const;
int GetPosition(unsigned axis) const;
bool GetButtonState(unsigned button) const;
int GetZPosition(void) const;
int GetButtonState(void) const;
int GetPOVPosition(void) const;
int GetPOVCTSPosition(void) const;
int GetRudderPosition(void) const;
int GetUPosition(void) const;
int GetVPosition(void) const;
int GetMovementThreshold(void) const;
void SetMovementThreshold(int threshold) ;
// Capabilities
////////////////////////////////////////////////////////////////////////////
static int GetNumberJoysticks(void);
bool IsOk(void) const; // Checks that the joystick is functioning
int GetManufacturerId(void) const ;
int GetProductId(void) const ;
wxString GetProductName(void) const ;
int GetXMin(void) const;
int GetYMin(void) const;
int GetZMin(void) const;
int GetXMax(void) const;
int GetYMax(void) const;
int GetZMax(void) const;
int GetNumberButtons(void) const;
int GetNumberAxes(void) const;
int GetMaxButtons(void) const;
int GetMaxAxes(void) const;
int GetPollingMin(void) const;
int GetPollingMax(void) const;
int GetRudderMin(void) const;
int GetRudderMax(void) const;
int GetUMin(void) const;
int GetUMax(void) const;
int GetVMin(void) const;
int GetVMax(void) const;
bool HasRudder(void) const;
bool HasZ(void) const;
bool HasU(void) const;
bool HasV(void) const;
bool HasPOV(void) const;
bool HasPOV4Dir(void) const;
bool HasPOVCTS(void) const;
// Operations
////////////////////////////////////////////////////////////////////////////
// pollingFreq = 0 means that movement events are sent when above the threshold.
// If pollingFreq > 0, events are received every this many milliseconds.
bool SetCapture(wxWindow* win, int pollingFreq = 0);
bool ReleaseCapture(void);
protected:
int m_joystick;
wxJoystickThread* m_thread;
};
#endif
// _WX_JOYSTICK_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/dib.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/dib.h
// Purpose: wxDIB class representing Win32 device independent bitmaps
// Author: Vadim Zeitlin
// Modified by:
// Created: 03.03.03 (replaces the old file with the same name)
// Copyright: (c) 1997-2003 wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DIB_H_
#define _WX_MSW_DIB_H_
class WXDLLIMPEXP_FWD_CORE wxPalette;
#include "wx/msw/private.h"
#if wxUSE_WXDIB
#ifdef __WXMSW__
#include "wx/bitmap.h"
#endif // __WXMSW__
// ----------------------------------------------------------------------------
// wxDIB: represents a DIB section
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDIB
{
public:
// ctors and such
// --------------
// create an uninitialized DIB with the given width, height and depth (only
// 24 and 32 bpp DIBs are currently supported)
//
// after using this ctor, GetData() and GetHandle() may be used if IsOk()
// returns true
wxDIB(int width, int height, int depth)
{ Init(); (void)Create(width, height, depth); }
#ifdef __WXMSW__
// create a DIB from the DDB
wxDIB(const wxBitmap& bmp)
{ Init(); (void)Create(bmp); }
#endif // __WXMSW__
// create a DIB from the Windows DDB
wxDIB(HBITMAP hbmp)
{ Init(); (void)Create(hbmp); }
// load a DIB from file (any depth is supoprted here unlike above)
//
// as above, use IsOk() to see if the bitmap was loaded successfully
wxDIB(const wxString& filename)
{ Init(); (void)Load(filename); }
// same as the corresponding ctors but with return value
bool Create(int width, int height, int depth);
#ifdef __WXMSW__
bool Create(const wxBitmap& bmp) { return Create(GetHbitmapOf(bmp)); }
#endif
bool Create(HBITMAP hbmp);
bool Load(const wxString& filename);
// dtor is not virtual, this class is not meant to be used polymorphically
~wxDIB();
// operations
// ----------
// create a bitmap compatible with the given HDC (or screen by default) and
// return its handle, the caller is responsible for freeing it (using
// DeleteObject())
HBITMAP CreateDDB(HDC hdc = 0) const;
// get the handle from the DIB and reset it, i.e. this object won't destroy
// the DIB after this (but the caller should do it)
HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; }
#if defined(__WXMSW__) && wxUSE_PALETTE
// create a palette for this DIB (always a trivial/default one for 24bpp)
wxPalette *CreatePalette() const;
#endif // defined(__WXMSW__) && wxUSE_PALETTE
// save the DIB as a .BMP file to the file with the given name
bool Save(const wxString& filename);
// accessors
// ---------
// return true if DIB was successfully created, false otherwise
bool IsOk() const { return m_handle != 0; }
// get the bitmap size
wxSize GetSize() const { DoGetObject(); return wxSize(m_width, m_height); }
int GetWidth() const { DoGetObject(); return m_width; }
int GetHeight() const { DoGetObject(); return m_height; }
// get the number of bits per pixel, or depth
int GetDepth() const { DoGetObject(); return m_depth; }
// get the DIB handle
HBITMAP GetHandle() const { return m_handle; }
// get raw pointer to bitmap bits, you should know what you do if you
// decide to use it
unsigned char *GetData() const
{ DoGetObject(); return (unsigned char *)m_data; }
// HBITMAP conversion
// ------------------
// these functions are only used by wxWidgets internally right now, please
// don't use them directly if possible as they're subject to change
// creates a DDB compatible with the given (or screen) DC from either
// a plain DIB or a DIB section (in which case the last parameter must be
// non NULL)
static HBITMAP ConvertToBitmap(const BITMAPINFO *pbi,
HDC hdc = 0,
void *bits = NULL);
// create a plain DIB (not a DIB section) from a DDB, the caller is
// responsable for freeing it using ::GlobalFree()
static HGLOBAL ConvertFromBitmap(HBITMAP hbmp);
// creates a DIB from the given DDB or calculates the space needed by it:
// if pbi is NULL, only the space is calculated, otherwise pbi is supposed
// to point at BITMAPINFO of the correct size which is filled by this
// function (this overload is needed for wxBitmapDataObject code in
// src/msw/ole/dataobj.cpp)
static size_t ConvertFromBitmap(BITMAPINFO *pbi, HBITMAP hbmp);
// wxImage conversion
// ------------------
#if wxUSE_IMAGE
// Possible formats for DIBs created by the functions below.
enum PixelFormat
{
PixelFormat_PreMultiplied = 0,
PixelFormat_NotPreMultiplied = 1
};
// Create a DIB from the given image, the DIB will be either 24 or 32 (if
// the image has alpha channel) bpp.
//
// By default the DIB stores pixel data in pre-multiplied format so that it
// can be used with ::AlphaBlend() but it is also possible to disable
// pre-multiplication for the DIB to be usable with ImageList_Draw() which
// does pre-multiplication internally.
wxDIB(const wxImage& image, PixelFormat pf = PixelFormat_PreMultiplied)
{
Init();
(void)Create(image, pf);
}
// same as the above ctor but with the return code
bool Create(const wxImage& image, PixelFormat pf = PixelFormat_PreMultiplied);
// create wxImage having the same data as this DIB
// Possible options of conversion to wxImage
enum ConversionFlags
{
// Determine whether 32bpp DIB contains real alpha channel
// and return wxImage with or without alpha channel values.
Convert_AlphaAuto,
// Assume that 32bpp DIB contains valid alpha channel and always
// return wxImage with alpha channel values in this case.
Convert_AlphaAlwaysIf32bpp
};
wxImage ConvertToImage(ConversionFlags flags = Convert_AlphaAuto) const;
#endif // wxUSE_IMAGE
// helper functions
// ----------------
// return the size of one line in a DIB with given width and depth: the
// point here is that as the scan lines need to be DWORD aligned so we may
// need to add some padding
static unsigned long GetLineSize(int width, int depth)
{
return ((width*depth + 31) & ~31) >> 3;
}
private:
// common part of all ctors
void Init();
// free resources
void Free();
// initialize the contents from the provided DDB (Create() must have been
// already called)
bool CopyFromDDB(HBITMAP hbmp);
// the DIB section handle, 0 if invalid
HBITMAP m_handle;
// NB: we could store only m_handle and not any of the other fields as
// we may always retrieve them from it using ::GetObject(), but we
// decide to still store them for efficiency concerns -- however if we
// don't have them from the very beginning (e.g. DIB constructed from a
// bitmap), we only retrieve them when necessary and so these fields
// should *never* be accessed directly, even from inside wxDIB code
// function which must be called before accessing any members and which
// gets their values from m_handle, if not done yet
void DoGetObject() const;
// pointer to DIB bits, may be NULL
void *m_data;
// size and depth of the image
int m_width,
m_height,
m_depth;
// in some cases we could be using a handle which we didn't create and in
// this case we shouldn't free it neither -- this flag tell us if this is
// the case
bool m_ownsHandle;
// DIBs can't be copied
wxDIB(const wxDIB&);
wxDIB& operator=(const wxDIB&);
};
// ----------------------------------------------------------------------------
// inline functions implementation
// ----------------------------------------------------------------------------
inline
void wxDIB::Init()
{
m_handle = 0;
m_ownsHandle = true;
m_data = NULL;
m_width =
m_height =
m_depth = 0;
}
inline
void wxDIB::Free()
{
if ( m_handle && m_ownsHandle )
{
if ( !::DeleteObject(m_handle) )
{
wxLogLastError(wxT("DeleteObject(hDIB)"));
}
Init();
}
}
inline wxDIB::~wxDIB()
{
Free();
}
#endif
// wxUSE_WXDIB
#endif // _WX_MSW_DIB_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/brush.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/brush.h
// Purpose: wxBrush class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BRUSH_H_
#define _WX_BRUSH_H_
class WXDLLIMPEXP_FWD_CORE wxBrush;
class WXDLLIMPEXP_FWD_CORE wxColour;
class WXDLLIMPEXP_FWD_CORE wxBitmap;
// ----------------------------------------------------------------------------
// wxBrush
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
{
public:
wxBrush();
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
wxBrush(const wxBitmap& stipple);
virtual ~wxBrush();
virtual void SetColour(const wxColour& col) wxOVERRIDE;
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) wxOVERRIDE;
virtual void SetStyle(wxBrushStyle style) wxOVERRIDE;
virtual void SetStipple(const wxBitmap& stipple) wxOVERRIDE;
bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
wxColour GetColour() const wxOVERRIDE;
wxBrushStyle GetStyle() const wxOVERRIDE;
wxBitmap *GetStipple() const wxOVERRIDE;
wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants")
wxBrush(const wxColour& col, int style);
wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants")
void SetStyle(int style) { SetStyle((wxBrushStyle)style); }
// return the HBRUSH for this brush
virtual WXHANDLE GetResourceHandle() const wxOVERRIDE;
protected:
virtual wxGDIRefData *CreateGDIRefData() const wxOVERRIDE;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS(wxBrush);
};
#endif // _WX_BRUSH_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/wrapgdip.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/wrapgdip.h
// Purpose: wrapper around <gdiplus.h> header
// Author: Vadim Zeitlin
// Created: 2007-03-15
// Copyright: (c) 2007 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_WRAPGDIP_H_
#define _WX_MSW_WRAPGDIP_H_
#include "wx/msw/wrapwin.h"
// min and max must be available for gdiplus.h but we cannot define them as
// macros because they conflict with std::numeric_limits<T>::min and max when
// compiling with mingw-w64 and -std=c++17. This happens because with c++17,
// math.h includes bessel_function which requires std::numeric_limits.
#include <cmath>
using std::min;
using std::max;
// There are many clashes between the names of the member fields and parameters
// in the standard gdiplus.h header and each of them results in C4458 with
// VC14, so disable this warning for this file as there is no other way to
// avoid it.
#ifdef __VISUALC__
#pragma warning(push)
#pragma warning(disable:4458) // declaration of 'xxx' hides class member
#endif
#include <gdiplus.h>
using namespace Gdiplus;
#ifdef __VISUALC__
#pragma warning(pop)
#endif
#endif // _WX_MSW_WRAPGDIP_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/clipbrd.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/clipbrd.h
// Purpose: wxClipboad class and clipboard functions for MSW
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CLIPBRD_H_
#define _WX_CLIPBRD_H_
#if wxUSE_CLIPBOARD
// These functions superceded by wxClipboard, but retained in order to
// implement wxClipboard, and for compatibility.
// open/close the clipboard
WXDLLIMPEXP_CORE bool wxOpenClipboard();
WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
#define wxClipboardOpen wxIsClipboardOpened
WXDLLIMPEXP_CORE bool wxCloseClipboard();
// get/set data
WXDLLIMPEXP_CORE bool wxEmptyClipboard();
#if !wxUSE_OLE
WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
const void *data,
int width = 0, int height = 0);
#endif // !wxUSE_OLE
// clipboard formats
WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
wxChar *formatName,
int maxCount);
//-----------------------------------------------------------------------------
// wxClipboard
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
{
public:
wxClipboard();
virtual ~wxClipboard();
// open the clipboard before SetData() and GetData()
virtual bool Open() wxOVERRIDE;
// close the clipboard after SetData() and GetData()
virtual void Close() wxOVERRIDE;
// query whether the clipboard is opened
virtual bool IsOpened() const wxOVERRIDE;
// set the clipboard data. all other formats will be deleted.
virtual bool SetData( wxDataObject *data ) wxOVERRIDE;
// add to the clipboard data.
virtual bool AddData( wxDataObject *data ) wxOVERRIDE;
// ask if data in correct format is available
virtual bool IsSupported( const wxDataFormat& format ) wxOVERRIDE;
// fill data with data on the clipboard (if available)
virtual bool GetData( wxDataObject& data ) wxOVERRIDE;
// clears wxTheClipboard and the system's clipboard if possible
virtual void Clear() wxOVERRIDE;
// flushes the clipboard: this means that the data which is currently on
// clipboard will stay available even after the application exits (possibly
// eating memory), otherwise the clipboard will be emptied on exit
virtual bool Flush() wxOVERRIDE;
private:
IDataObject *m_lastDataObject;
bool m_isOpened;
wxDECLARE_DYNAMIC_CLASS(wxClipboard);
};
#endif // wxUSE_CLIPBOARD
#endif // _WX_CLIPBRD_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/printwin.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/printwin.h
// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINTWIN_H_
#define _WX_PRINTWIN_H_
#include "wx/prntbase.h"
// ---------------------------------------------------------------------------
// Represents the printer: manages printing a wxPrintout object
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase
{
wxDECLARE_DYNAMIC_CLASS(wxWindowsPrinter);
public:
wxWindowsPrinter(wxPrintDialogData *data = NULL);
virtual bool Print(wxWindow *parent,
wxPrintout *printout,
bool prompt = true) wxOVERRIDE;
virtual wxDC *PrintDialog(wxWindow *parent) wxOVERRIDE;
virtual bool Setup(wxWindow *parent) wxOVERRIDE;
private:
wxDECLARE_NO_COPY_CLASS(wxWindowsPrinter);
};
// ---------------------------------------------------------------------------
// wxPrintPreview: programmer creates an object of this class to preview a
// wxPrintout.
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase
{
public:
wxWindowsPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting = NULL,
wxPrintDialogData *data = NULL);
wxWindowsPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
virtual ~wxWindowsPrintPreview();
virtual bool Print(bool interactive) wxOVERRIDE;
virtual void DetermineScaling() wxOVERRIDE;
protected:
#if wxUSE_ENH_METAFILE
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum) wxOVERRIDE;
#endif
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview);
};
#endif
// _WX_PRINTWIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/timectrl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/timectrl.h
// Purpose: wxTimePickerCtrl for Windows.
// Author: Vadim Zeitlin
// Created: 2011-09-22
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_TIMECTRL_H_
#define _WX_MSW_TIMECTRL_H_
// ----------------------------------------------------------------------------
// wxTimePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase
{
public:
// ctors
wxTimePickerCtrl() { }
wxTimePickerCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr)
{
Create(parent, id, dt, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr)
{
return MSWCreateDateTimePicker(parent, id, dt,
pos, size, style,
validator, name);
}
// Override MSW-specific functions used during control creation.
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
protected:
#if wxUSE_INTL
virtual wxLocaleInfo MSWGetFormat() const wxOVERRIDE;
#endif // wxUSE_INTL
virtual bool MSWAllowsNone() const wxOVERRIDE { return false; }
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
};
#endif // _WX_MSW_TIMECTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/tglbtn.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/tglbtn.h
// Purpose: Declaration of the wxToggleButton class, which implements a
// toggle button under wxMSW.
// Author: John Norris, minor changes by Axel Schlueter
// Modified by:
// Created: 08.02.01
// Copyright: (c) 2000 Johnny C. Norris II
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TOGGLEBUTTON_H_
#define _WX_TOGGLEBUTTON_H_
#include "wx/bitmap.h"
// Checkbox item (single checkbox)
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
{
public:
wxToggleButton() { Init(); }
wxToggleButton(wxWindow *parent,
wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool value) wxOVERRIDE;
virtual bool GetValue() const wxOVERRIDE;
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }
protected:
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const wxOVERRIDE;
virtual bool MSWIsPushed() const wxOVERRIDE;
void Init();
// current state of the button (when owner-drawn)
bool m_state;
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton);
};
//-----------------------------------------------------------------------------
// wxBitmapToggleButton
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton
{
public:
// construction/destruction
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
// Create the control
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
// deprecated synonym for SetBitmapLabel()
wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap),
SetBitmapLabel(bitmap); )
// prevent virtual function hiding
virtual void SetLabel(const wxString& label) wxOVERRIDE { wxToggleButton::SetLabel(label); }
private:
wxDECLARE_DYNAMIC_CLASS(wxBitmapToggleButton);
};
#endif // _WX_TOGGLEBUTTON_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/dcscreen.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/dcscreen.h
// Purpose: wxScreenDC class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DCSCREEN_H_
#define _WX_MSW_DCSCREEN_H_
#include "wx/dcscreen.h"
#include "wx/msw/dc.h"
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxMSWDCImpl
{
public:
// Create a DC representing the whole virtual screen (all monitors)
wxScreenDCImpl( wxScreenDC *owner );
// Return the size of the whole virtual screen (all monitors)
virtual void DoGetSize(int *w, int *h) const wxOVERRIDE;
wxDECLARE_CLASS(wxScreenDCImpl);
wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
};
#endif // _WX_MSW_DCSCREEN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/rcdefs.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/rcdefs.h
// Purpose: Fallback for the generated rcdefs.h under the lib directory
// Author: Mike Wetherell
// Copyright: (c) 2005 Mike Wetherell
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RCDEFS_H
#define _WX_RCDEFS_H
#ifdef __GNUC__
// We must be using windres which uses gcc as its preprocessor. We do need
// to generate the manifest then as gcc doesn't do it automatically and we
// can define the architecture macro on our own as all the usual symbols
// are available (unlike with Microsoft RC.EXE which doesn't predefine
// anything useful at all).
#ifndef wxUSE_RC_MANIFEST
#define wxUSE_RC_MANIFEST 1
#endif
#if defined __i386__
#ifndef WX_CPU_X86
#define WX_CPU_X86
#endif
#elif defined __x86_64__
#ifndef WX_CPU_AMD64
#define WX_CPU_AMD64
#endif
#elif defined __ia64__
#ifndef WX_CPU_IA64
#define WX_CPU_IA64
#endif
#endif
#endif
// Don't do anything here for the other compilers, in particular don't define
// WX_CPU_X86 here as we used to do. If people define wxUSE_RC_MANIFEST, they
// must also define the architecture constant correctly.
#endif
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/missing.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/missing.h
// Purpose: Declarations for parts of the Win32 SDK that are missing in
// the versions that come with some compilers
// Created: 2002/04/23
// Copyright: (c) 2002 Mattia Barbon
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MISSING_H_
#define _WX_MISSING_H_
#ifndef WM_CHANGEUISTATE
#define WM_CHANGEUISTATE 0x0127
#endif
#ifndef WM_UPDATEUISTATE
#define WM_UPDATEUISTATE 0x0128
#endif
#ifndef WM_QUERYUISTATE
#define WM_QUERYUISTATE 0x0129
#endif
#ifndef WM_PRINTCLIENT
#define WM_PRINTCLIENT 0x318
#endif
#ifndef DT_HIDEPREFIX
#define DT_HIDEPREFIX 0x00100000
#endif
#ifndef DSS_HIDEPREFIX
#define DSS_HIDEPREFIX 0x0200
#endif
// Needed by toplevel.cpp
#ifndef UIS_SET
#define UIS_SET 1
#define UIS_CLEAR 2
#define UIS_INITIALIZE 3
#endif
#ifndef UISF_HIDEFOCUS
#define UISF_HIDEFOCUS 1
#endif
#ifndef UISF_HIDEACCEL
#define UISF_HIDEACCEL 2
#endif
#ifndef OFN_EXPLORER
#define OFN_EXPLORER 0x00080000
#endif
#ifndef OFN_ENABLESIZING
#define OFN_ENABLESIZING 0x00800000
#endif
// Needed by window.cpp
#if wxUSE_MOUSEWHEEL
#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL 0x020A
#endif
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif
#ifndef WHEEL_DELTA
#define WHEEL_DELTA 120
#endif
#ifndef SPI_GETWHEELSCROLLLINES
#define SPI_GETWHEELSCROLLLINES 104
#endif
#ifndef SPI_GETWHEELSCROLLCHARS
#define SPI_GETWHEELSCROLLCHARS 108
#endif
#endif // wxUSE_MOUSEWHEEL
// Needed by window.cpp
#ifndef VK_OEM_1
#define VK_OEM_1 0xBA
#define VK_OEM_2 0xBF
#define VK_OEM_3 0xC0
#define VK_OEM_4 0xDB
#define VK_OEM_5 0xDC
#define VK_OEM_6 0xDD
#define VK_OEM_7 0xDE
#define VK_OEM_102 0xE2
#endif
#ifndef VK_OEM_COMMA
#define VK_OEM_PLUS 0xBB
#define VK_OEM_COMMA 0xBC
#define VK_OEM_MINUS 0xBD
#define VK_OEM_PERIOD 0xBE
#endif
#ifndef SM_TABLETPC
#define SM_TABLETPC 86
#endif
#ifndef INKEDIT_CLASS
# define INKEDIT_CLASSW L"INKEDIT"
# ifdef UNICODE
# define INKEDIT_CLASS INKEDIT_CLASSW
# else
# define INKEDIT_CLASS "INKEDIT"
# endif
#endif
#ifndef EM_SETINKINSERTMODE
# define EM_SETINKINSERTMODE (WM_USER + 0x0204)
#endif
#ifndef EM_SETUSEMOUSEFORINPUT
#define EM_SETUSEMOUSEFORINPUT (WM_USER + 0x224)
#endif
#ifndef TPM_RECURSE
#define TPM_RECURSE 1
#endif
#ifndef WS_EX_LAYOUTRTL
#define WS_EX_LAYOUTRTL 0x00400000
#endif
#ifndef WS_EX_COMPOSITED
#define WS_EX_COMPOSITED 0x02000000L
#endif
#ifndef WS_EX_LAYERED
#define WS_EX_LAYERED 0x00080000
#endif
#ifndef LWA_ALPHA
#define LWA_ALPHA 2
#endif
#ifndef QS_ALLPOSTMESSAGE
#define QS_ALLPOSTMESSAGE 0
#endif
// Missing from MinGW 4.8 SDK headers.
#ifndef BS_TYPEMASK
#define BS_TYPEMASK 0xf
#endif
// ----------------------------------------------------------------------------
// menu stuff
// ----------------------------------------------------------------------------
#ifndef MIIM_BITMAP
#define MIIM_STRING 0x00000040
#define MIIM_BITMAP 0x00000080
#define MIIM_FTYPE 0x00000100
#define HBMMENU_CALLBACK ((HBITMAP) -1)
typedef struct tagMENUINFO
{
DWORD cbSize;
DWORD fMask;
DWORD dwStyle;
UINT cyMax;
HBRUSH hbrBack;
DWORD dwContextHelpID;
DWORD dwMenuData;
} MENUINFO, FAR *LPMENUINFO;
#endif // MIIM_BITMAP &c
// ----------------------------------------------------------------------------
// definitions related to ListView and Header common controls, needed by
// msw/listctrl.cpp and msw/headerctrl.cpp
// ----------------------------------------------------------------------------
#ifndef I_IMAGENONE
#define I_IMAGENONE (-2)
#endif
#ifndef LVS_EX_FULLROWSELECT
#define LVS_EX_FULLROWSELECT 0x00000020
#endif
#if !defined(LVS_EX_LABELTIP)
#define LVS_EX_LABELTIP 0x00004000
#endif
#ifndef LVS_EX_SUBITEMIMAGES
#define LVS_EX_SUBITEMIMAGES 0x00000002
#endif
#ifndef LVS_EX_DOUBLEBUFFER
#define LVS_EX_DOUBLEBUFFER 0x00010000
#endif
#ifndef HDN_GETDISPINFOW
#define HDN_GETDISPINFOW (HDN_FIRST-29)
#endif
#ifndef HDS_HOTTRACK
#define HDS_HOTTRACK 4
#endif
#ifndef HDS_FLAT
#define HDS_FLAT 0x0200
#endif
#ifndef HDS_NOSIZING
#define HDS_NOSIZING 0x0800
#endif
#ifndef HDF_SORTUP
#define HDF_SORTUP 0x0400
#define HDF_SORTDOWN 0x0200
#endif
/*
* In addition to the above, the following are required for several compilers.
*/
#if !defined(CCS_VERT)
#define CCS_VERT 0x00000080L
#endif
#if !defined(CCS_RIGHT)
#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
#endif
#if !defined(TB_SETDISABLEDIMAGELIST)
#define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
#endif // !defined(TB_SETDISABLEDIMAGELIST)
#ifndef HANGUL_CHARSET
#define HANGUL_CHARSET 129
#endif
#ifndef CCM_SETUNICODEFORMAT
#define CCM_SETUNICODEFORMAT 8197
#endif
// ----------------------------------------------------------------------------
// Tree control
// ----------------------------------------------------------------------------
#ifndef TV_FIRST
#define TV_FIRST 0x1100
#endif
#ifndef TVS_EX_DOUBLEBUFFER
#define TVS_EX_DOUBLEBUFFER 0x0004
#endif
#ifndef TVS_FULLROWSELECT
#define TVS_FULLROWSELECT 0x1000
#endif
#ifndef TVM_SETBKCOLOR
#define TVM_SETBKCOLOR (TV_FIRST + 29)
#define TVM_SETTEXTCOLOR (TV_FIRST + 30)
#endif
#ifndef TVM_SETEXTENDEDSTYLE
#define TVM_SETEXTENDEDSTYLE (TV_FIRST + 44)
#define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45)
#endif
// Various defines used by the webview library that are needed by mingw
#ifndef DISPID_COMMANDSTATECHANGE
#define DISPID_COMMANDSTATECHANGE 105
#endif
#ifndef DISPID_NAVIGATECOMPLETE2
#define DISPID_NAVIGATECOMPLETE2 252
#endif
#ifndef DISPID_NAVIGATEERROR
#define DISPID_NAVIGATEERROR 271
#endif
#ifndef DISPID_NEWWINDOW3
#define DISPID_NEWWINDOW3 273
#endif
#ifndef INET_E_ERROR_FIRST
#define INET_E_ERROR_FIRST 0x800C0002L
#endif
#ifndef INET_E_INVALID_URL
#define INET_E_INVALID_URL 0x800C0002L
#endif
#ifndef INET_E_NO_SESSION
#define INET_E_NO_SESSION 0x800C0003L
#endif
#ifndef INET_E_CANNOT_CONNECT
#define INET_E_CANNOT_CONNECT 0x800C0004L
#endif
#ifndef INET_E_RESOURCE_NOT_FOUND
#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
#endif
#ifndef INET_E_OBJECT_NOT_FOUND
#define INET_E_OBJECT_NOT_FOUND 0x800C0006L
#endif
#ifndef INET_E_DATA_NOT_AVAILABLE
#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
#endif
#ifndef INET_E_DOWNLOAD_FAILURE
#define INET_E_DOWNLOAD_FAILURE 0x800C0008L
#endif
#ifndef INET_E_AUTHENTICATION_REQUIRED
#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
#endif
#ifndef INET_E_NO_VALID_MEDIA
#define INET_E_NO_VALID_MEDIA 0x800C000AL
#endif
#ifndef INET_E_CONNECTION_TIMEOUT
#define INET_E_CONNECTION_TIMEOUT 0x800C000BL
#endif
#ifndef INET_E_INVALID_REQUEST
#define INET_E_INVALID_REQUEST 0x800C000CL
#endif
#ifndef INET_E_UNKNOWN_PROTOCOL
#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
#endif
#ifndef INET_E_SECURITY_PROBLEM
#define INET_E_SECURITY_PROBLEM 0x800C000EL
#endif
#ifndef INET_E_CANNOT_LOAD_DATA
#define INET_E_CANNOT_LOAD_DATA 0x800C000FL
#endif
#ifndef INET_E_CANNOT_INSTANTIATE_OBJECT
#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
#endif
#ifndef INET_E_QUERYOPTION_UNKNOWN
#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
#endif
#ifndef INET_E_REDIRECT_FAILED
#define INET_E_REDIRECT_FAILED 0x800C0014L
#endif
#ifndef INET_E_REDIRECT_TO_DIR
#define INET_E_REDIRECT_TO_DIR 0x800C0015L
#endif
#ifndef INET_E_CANNOT_LOCK_REQUEST
#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
#endif
#ifndef INET_E_USE_EXTEND_BINDING
#define INET_E_USE_EXTEND_BINDING 0x800C0017L
#endif
#ifndef INET_E_TERMINATED_BIND
#define INET_E_TERMINATED_BIND 0x800C0018L
#endif
#ifndef INET_E_INVALID_CERTIFICATE
#define INET_E_INVALID_CERTIFICATE 0x800C0019L
#endif
#ifndef INET_E_CODE_DOWNLOAD_DECLINED
#define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L
#endif
#ifndef INET_E_RESULT_DISPATCHED
#define INET_E_RESULT_DISPATCHED 0x800C0200L
#endif
#ifndef INET_E_CANNOT_REPLACE_SFP_FILE
#define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L
#endif
#ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY
#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L
#endif
#ifndef INET_E_CODE_INSTALL_SUPPRESSED
#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L
#endif
#ifndef MUI_LANGUAGE_NAME
#define MUI_LANGUAGE_NAME 0x8
#endif
/*
* The following are specifically required for Wine
*/
#ifdef __WINE__
#ifndef ENUM_CURRENT_SETTINGS
#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
#endif
#ifndef BROADCAST_QUERY_DENY
#define BROADCAST_QUERY_DENY 1112363332
#endif
#endif // defined __WINE__
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
#endif
// _WX_MISSING_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/combobox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/combobox.h
// Purpose: wxComboBox class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COMBOBOX_H_
#define _WX_COMBOBOX_H_
#include "wx/choice.h"
#include "wx/textentry.h"
#if wxUSE_COMBOBOX
// ----------------------------------------------------------------------------
// Combobox control
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxComboBox : public wxChoice,
public wxTextEntry
{
public:
wxComboBox() { Init(); }
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0,
const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
// See wxComboBoxBase discussion of IsEmpty().
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
// resolve ambiguities among virtual functions inherited from both base
// classes
virtual void Clear() wxOVERRIDE;
virtual wxString GetValue() const wxOVERRIDE;
virtual void SetValue(const wxString& value) wxOVERRIDE;
virtual wxString GetStringSelection() const wxOVERRIDE
{ return wxChoice::GetStringSelection(); }
virtual void Popup() { MSWDoPopupOrDismiss(true); }
virtual void Dismiss() { MSWDoPopupOrDismiss(false); }
virtual void SetSelection(int n) wxOVERRIDE { wxChoice::SetSelection(n); }
virtual void SetSelection(long from, long to) wxOVERRIDE
{ wxTextEntry::SetSelection(from, to); }
virtual int GetSelection() const wxOVERRIDE { return wxChoice::GetSelection(); }
virtual bool ContainsHWND(WXHWND hWnd) const wxOVERRIDE;
virtual void GetSelection(long *from, long *to) const wxOVERRIDE;
virtual bool IsEditable() const wxOVERRIDE;
// implementation only from now on
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
bool MSWShouldPreProcessMessage(WXMSG *pMsg) wxOVERRIDE;
// Standard event handling
void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event);
void OnPaste(wxCommandEvent& event);
void OnUndo(wxCommandEvent& event);
void OnRedo(wxCommandEvent& event);
void OnDelete(wxCommandEvent& event);
void OnSelectAll(wxCommandEvent& event);
void OnUpdateCut(wxUpdateUIEvent& event);
void OnUpdateCopy(wxUpdateUIEvent& event);
void OnUpdatePaste(wxUpdateUIEvent& event);
void OnUpdateUndo(wxUpdateUIEvent& event);
void OnUpdateRedo(wxUpdateUIEvent& event);
void OnUpdateDelete(wxUpdateUIEvent& event);
void OnUpdateSelectAll(wxUpdateUIEvent& event);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
#if wxUSE_UXTHEME
// override wxTextEntry method to work around Windows bug
virtual bool SetHint(const wxString& hint) wxOVERRIDE;
#endif // wxUSE_UXTHEME
virtual void SetLayoutDirection(wxLayoutDirection dir) wxOVERRIDE;
protected:
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip(wxToolTip *tip) wxOVERRIDE;
#endif
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE;
// Override this one to avoid eating events from our popup listbox.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const wxOVERRIDE;
// this is the implementation of GetEditHWND() which can also be used when
// we don't have the edit control, it simply returns NULL then
//
// try not to use this function unless absolutely necessary (as in the
// message handling code where the edit control might not be created yet
// for the messages we receive during the control creation) as normally
// just testing for IsEditable() and using GetEditHWND() should be enough
WXHWND GetEditHWNDIfAvailable() const;
virtual void EnableTextChangedEvents(bool enable) wxOVERRIDE
{
m_allowTextEvents = enable;
}
private:
// there are the overridden wxTextEntry methods which should only be called
// when we do have an edit control so they assert if this is not the case
virtual wxWindow *GetEditableWindow() wxOVERRIDE;
virtual WXHWND GetEditHWND() const wxOVERRIDE;
// Common part of MSWProcessEditMsg() and MSWProcessSpecialKey(), return
// true if the key was processed.
bool MSWProcessEditSpecialKey(WXWPARAM vkey);
#if wxUSE_OLE
virtual void MSWProcessSpecialKey(wxKeyEvent& event) wxOVERRIDE;
#endif // wxUSE_OLE
// common part of all ctors
void Init()
{
m_allowTextEvents = true;
}
// normally true, false if text events are currently disabled
bool m_allowTextEvents;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox);
wxDECLARE_EVENT_TABLE();
};
#endif // wxUSE_COMBOBOX
#endif // _WX_COMBOBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/setup_inc.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/setup_inc.h
// Purpose: MSW-specific setup.h options
// Author: Vadim Zeitlin
// Created: 2007-07-21 (extracted from wx/msw/setup0.h)
// Copyright: (c) 2007 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
// Graphics backends choices for Windows
// ----------------------------------------------------------------------------
// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1.
// Enable support for GDI+-based implementation of wxGraphicsContext.
//
// Default is 1.
//
// Recommended setting: 1 if you need to support XP, as Direct2D is not
// available there.
#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT
// Enable support for Direct2D-based implementation of wxGraphicsContext.
//
// Default is 1 for compilers which support it, i.e. VC10+ currently. If you
// use an earlier MSVC version or another compiler and installed the necessary
// SDK components manually, you need to change this setting.
//
// Recommended setting: 1 for faster and better quality graphics under Windows
// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier
// systems will fall back on using GDI+).
#if defined(_MSC_VER) && _MSC_VER >= 1600
#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
#define wxUSE_GRAPHICS_DIRECT2D 0
#endif
// ----------------------------------------------------------------------------
// Windows-only settings
// ----------------------------------------------------------------------------
// Set this to 1 for generic OLE support: this is required for drag-and-drop,
// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and
// can't compile/doesn't have the OLE headers.
//
// Default is 1.
//
// Recommended setting: 1
#define wxUSE_OLE 1
// Set this to 1 to enable wxAutomationObject class.
//
// Default is 1.
//
// Recommended setting: 1 if you need to control other applications via OLE
// Automation, can be safely set to 0 otherwise
#define wxUSE_OLE_AUTOMATION 1
// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE
// controls in wx.
//
// Default is 1.
//
// Recommended setting: 1, required by wxMediaCtrl
#define wxUSE_ACTIVEX 1
// Enable WinRT support
//
// Default is 1 for compilers which support it, i.e. VS2012+ currently. If you
// use an earlier MSVC version or another compiler and installed the necessary
// SDK components manually, you need to change this setting.
//
// Recommended setting: 1
#if defined(_MSC_VER) && _MSC_VER >= 1700 && !defined(_USING_V110_SDK71_)
#define wxUSE_WINRT 1
#else
#define wxUSE_WINRT 0
#endif
// wxDC caching implementation
#define wxUSE_DC_CACHEING 1
// Set this to 1 to enable wxDIB class used internally for manipulating
// wxBitmap data.
//
// Default is 1, set it to 0 only if you don't use wxImage neither
//
// Recommended setting: 1 (without it conversion to/from wxImage won't work)
#define wxUSE_WXDIB 1
// Set to 0 to disable PostScript print/preview architecture code under Windows
// (just use Windows printing).
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
// Set this to 1 to compile in wxRegKey class.
//
// Default is 1
//
// Recommended setting: 1, this is used internally by wx in a few places
#define wxUSE_REGKEY 1
// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH
// which allows to put more than ~32Kb of text in it even under Win9x (NT
// doesn't have such limitation).
//
// Default is 1 for compilers which support it
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile <richedit.h>
#define wxUSE_RICHEDIT 1
// Set this to 1 to use extra features of richedit v2 and later controls
//
// Default is 1 for compilers which support it
//
// Recommended setting: 1
#define wxUSE_RICHEDIT2 1
// Set this to 1 to enable support for the owner-drawn menu and listboxes. This
// is required by wxUSE_CHECKLISTBOX.
//
// Default is 1.
//
// Recommended setting: 1, set to 0 for a small library size reduction
#define wxUSE_OWNER_DRAWN 1
// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It
// is required by native wxNotificationMessage implementation.
//
// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain
// the necessary declarations.
//
// Recommended setting: 1, set to 0 for a tiny library size reduction
#define wxUSE_TASKBARICON_BALLOONS 1
// Set this to 1 to enable following functionality added in Windows 7: thumbnail
// representations, thumbnail toolbars, notification and status overlays,
// progress indicators and jump lists.
//
// Default is 1.
//
// Recommended setting: 1, set to 0 for a tiny library size reduction
#define wxUSE_TASKBARBUTTON 1
// Set to 1 to compile MS Windows XP theme engine support
#define wxUSE_UXTHEME 1
// Set to 1 to use InkEdit control (Tablet PC), if available
#define wxUSE_INKEDIT 0
// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig)
//
// Default is 0.
//
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the
// native wxDatePickerCtrl
//
// Default is 0.
//
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_DATEPICKCTRL_GENERIC 0
// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the
// native wxTimePickerCtrl for the platforms that have the latter (MSW).
//
// Default is 0.
//
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_TIMEPICKCTRL_GENERIC 0
// ----------------------------------------------------------------------------
// Crash debugging helpers
// ----------------------------------------------------------------------------
// Set this to 1 to use dbghelp.dll for providing stack traces in crash
// reports.
//
// Default is 1 if the compiler supports it, 0 for old MinGW.
//
// Recommended setting: 1, there is not much gain in disabling this
#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
#define wxUSE_DBGHELP 1
#else
#define wxUSE_DBGHELP 0
#endif
// Set this to 1 to be able to use wxCrashReport::Generate() to create mini
// dumps of your program when it crashes (or at any other moment)
//
// Default is 1 if supported by the compiler (VC++ and recent BC++ only).
//
// Recommended setting: 1, set to 0 if your programs never crash
#define wxUSE_CRASHREPORT 1
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/headerctrl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/headerctrl.h
// Purpose: wxMSW native wxHeaderCtrl
// Author: Vadim Zeitlin
// Created: 2008-12-01
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_HEADERCTRL_H_
#define _WX_MSW_HEADERCTRL_H_
class WXDLLIMPEXP_FWD_CORE wxImageList;
class wxMSWHeaderCtrlCustomDraw;
// ----------------------------------------------------------------------------
// wxHeaderCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxHeaderCtrl : public wxHeaderCtrlBase
{
public:
wxHeaderCtrl()
{
Init();
}
wxHeaderCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr);
virtual ~wxHeaderCtrl();
// Override to implement colours support via custom drawing.
virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE;
virtual bool SetForegroundColour(const wxColour& colour) wxOVERRIDE;
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
protected:
// override wxWindow methods which must be implemented by a new control
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
private:
// implement base class pure virtuals
virtual void DoSetCount(unsigned int count) wxOVERRIDE;
virtual unsigned int DoGetCount() const wxOVERRIDE;
virtual void DoUpdate(unsigned int idx) wxOVERRIDE;
virtual void DoScrollHorz(int dx) wxOVERRIDE;
virtual void DoSetColumnsOrder(const wxArrayInt& order) wxOVERRIDE;
virtual wxArrayInt DoGetColumnsOrder() const wxOVERRIDE;
// override MSW-specific methods needed for new control
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxOVERRIDE;
// common part of all ctors
void Init();
// wrapper around Header_InsertItem(): insert the item using information
// from the given column at the given index
void DoInsertItem(const wxHeaderColumn& col, unsigned int idx);
// get the number of currently visible items: this is also the total number
// of items contained in the native control
int GetShownColumnsCount() const;
// due to the discrepancy for the hidden columns which we know about but
// the native control does not, there can be a difference between the
// column indices we use and the ones used by the native control; these
// functions translate between them
//
// notice that MSWToNativeIdx() shouldn't be called for hidden columns and
// MSWFromNativeIdx() always returns an index of a visible column
int MSWToNativeIdx(int idx);
int MSWFromNativeIdx(int item);
// this is the same as above but for order, not index
int MSWToNativeOrder(int order);
int MSWFromNativeOrder(int order);
// get the event type corresponding to a click or double click event
// (depending on dblclk value) with the specified (using MSW convention)
// mouse button
wxEventType GetClickEventType(bool dblclk, int button);
// allocate m_customDraw if we need it or free it if it no longer is,
// return the pointer which can be used to update it if it's non-null
wxMSWHeaderCtrlCustomDraw* GetCustomDraw();
// the number of columns in the control, including the hidden ones (not
// taken into account by the native control, see comment in DoGetCount())
unsigned int m_numColumns;
// this is a lookup table allowing us to check whether the column with the
// given index is currently shown in the native control, in which case the
// value of this array element with this index is 0, or hidden
//
// notice that this may be different from GetColumn(idx).IsHidden() and in
// fact we need this array precisely because it will be different from it
// in DoUpdate() when the column hidden flag gets toggled and we need it to
// handle this transition correctly
wxArrayInt m_isHidden;
// the order of our columns: this array contains the index of the column
// shown at the position n as the n-th element
//
// this is necessary only to handle the hidden columns: the native control
// doesn't know about them and so we can't use Header_GetOrderArray()
wxArrayInt m_colIndices;
// the image list: initially NULL, created on demand
wxImageList *m_imageList;
// the offset of the window used to emulate scrolling it
int m_scrollOffset;
// actual column we are dragging or -1 if not dragging anything
int m_colBeingDragged;
// a column is currently being resized
bool m_isColBeingResized;
// the custom draw helper: initially NULL, created on demand, use
// GetCustomDraw() to do it
wxMSWHeaderCtrlCustomDraw *m_customDraw;
wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl);
};
#endif // _WX_MSW_HEADERCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/debughlp.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/debughlp.h
// Purpose: wraps dbghelp.h standard file
// Author: Vadim Zeitlin, Suzumizaki-kimitaka
// Created: 2005-01-08 (extracted from msw/crashrpt.cpp)
// Copyright: (c) 2003-2005 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DEBUGHLPH_H_
#define _WX_MSW_DEBUGHLPH_H_
#include "wx/defs.h"
#if wxUSE_DBGHELP
#include "wx/dynlib.h"
#include "wx/msw/wrapwin.h"
#ifdef __VISUALC__
// Disable a warning that we can do nothing about: we get it at least for
// imagehlp.h from 8.1 Windows kit when using VC14.
#pragma warning(push)
// 'typedef ': ignored on left of '' when no variable is declared
#pragma warning(disable:4091)
#endif
#include <imagehlp.h>
#ifdef __VISUALC__
#pragma warning(pop)
#endif
#include "wx/msw/private.h"
/*
The table below shows which functions are exported by dbghelp.dll.
On 64 bit Windows, there seems to be no difference between 32bit dll and 64bit
one. Vista-64 and Win8-64 look the same, but "Ex" and "ExW" versions exist only
in Windows 8.
Note that SymGetLineFromAddrW and EnumerateLoadedModulesW DON'T exist at all.
function | Windows | XP-32 Vista-64 Win8-64
SymEnumSymbolsW n/a v v
SymFromAddrW n/a v v
SymInitializeW n/a v v
SymEnumSymbols v v v
SymFromAddr v v v
SymInitialize v v v
SymGetLineFromAddrW64 n/a v v
SymGetLineFromAddr64 v v v
SymGetLineFromAddrW n/a n/a n/a
SymGetLineFromAddr v v v
EnumerateLoadedModulesW64 n/a v v
EnumerateLoadedModules64 v v v
EnumerateLoadedModulesW n/a n/a n/a
EnumerateLoadedModules v v v
*/
// It's not really clear whether API v10 is used by anything as VC8 still used
// v9, just as MSVC7.1, while VC9 already used v11, but provide support for it
// just in case.
#if API_VERSION_NUMBER < 10/*{{{*/
typedef BOOL
(CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PWSTR ModuleName,
DWORD64 ModuleBase,
ULONG ModuleSize,
PVOID UserContext);
typedef struct _IMAGEHLP_LINEW64
{
DWORD SizeOfStruct;
PVOID Key;
DWORD LineNumber;
PWSTR FileName;
DWORD64 Address;
} IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
typedef struct _SYMBOL_INFOW
{
ULONG SizeOfStruct;
ULONG TypeIndex;
ULONG64 Reserved[2];
ULONG Index;
ULONG Size;
ULONG64 ModBase;
ULONG Flags;
ULONG64 Value;
ULONG64 Address;
ULONG Register;
ULONG Scope;
ULONG Tag;
ULONG NameLen;
ULONG MaxNameLen;
WCHAR Name[1];
} SYMBOL_INFOW, *PSYMBOL_INFOW;
typedef BOOL
(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW pSymInfo,
ULONG SymbolSize,
PVOID UserContext);
typedef BOOL
(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO pSymInfo,
ULONG SymbolSize,
PVOID UserContext);
#endif // API_VERSION_NUMBER < 10/*}}}*/
// wx-prefixed types map to either the ANSI or Unicode ("W") version depending
// on the build of wx itself.
#ifdef UNICODE
#define wxPSYM_ENUMERATESYMBOLS_CALLBACK PSYM_ENUMERATESYMBOLS_CALLBACKW
#else // !UNICODE
#define wxPSYM_ENUMERATESYMBOLS_CALLBACK PSYM_ENUMERATESYMBOLS_CALLBACK
#endif // UNICODE/!UNICODE
// This one could be already defined by wx/msw/stackwalk.h
#ifndef wxSYMBOL_INFO
#ifdef UNICODE
#define wxSYMBOL_INFO SYMBOL_INFOW
#else // !UNICODE
#define wxSYMBOL_INFO SYMBOL_INFO
#endif // UNICODE/!UNICODE
#endif // !defined(wxSYMBOL_INFO)
typedef wxSYMBOL_INFO* wxPSYMBOL_INFO;
// This differs from PENUMLOADED_MODULES_CALLBACK[W]64 in that it always uses
// "const" for its first argument when the SDK used to pass a non-const string
// here until API_VERSION_NUMBER==11, so we can't just define it as an existing
// typedef.
typedef BOOL
(CALLBACK *wxPENUMLOADED_MODULES_CALLBACK)(const wxChar* moduleName,
DWORD64 moduleBase,
ULONG moduleSize,
void *userContext);
// ----------------------------------------------------------------------------
// wxDbgHelpDLL: dynamically load dbghelp.dll functions
// ----------------------------------------------------------------------------
// wrapper for some functions from dbghelp.dll
//
// MT note: this class is not MT safe and should be only used from a single
// thread at a time (this is so because dbghelp.dll is not MT-safe
// itself anyhow)
class wxDbgHelpDLL
{
public:
// some useful constants not present in debughlp.h (stolen from DIA SDK)
enum BasicType
{
BASICTYPE_NOTYPE = 0,
BASICTYPE_VOID = 1,
BASICTYPE_CHAR = 2,
BASICTYPE_WCHAR = 3,
BASICTYPE_INT = 6,
BASICTYPE_UINT = 7,
BASICTYPE_FLOAT = 8,
BASICTYPE_BCD = 9,
BASICTYPE_BOOL = 10,
BASICTYPE_LONG = 13,
BASICTYPE_ULONG = 14,
BASICTYPE_CURRENCY = 25,
BASICTYPE_DATE = 26,
BASICTYPE_VARIANT = 27,
BASICTYPE_COMPLEX = 28,
BASICTYPE_BIT = 29,
BASICTYPE_BSTR = 30,
BASICTYPE_HRESULT = 31,
BASICTYPE_MAX
};
enum SymbolTag
{
SYMBOL_TAG_NULL,
SYMBOL_TAG_EXE,
SYMBOL_TAG_COMPILAND,
SYMBOL_TAG_COMPILAND_DETAILS,
SYMBOL_TAG_COMPILAND_ENV,
SYMBOL_TAG_FUNCTION,
SYMBOL_TAG_BLOCK,
SYMBOL_TAG_DATA,
SYMBOL_TAG_ANNOTATION,
SYMBOL_TAG_LABEL,
SYMBOL_TAG_PUBLIC_SYMBOL,
SYMBOL_TAG_UDT,
SYMBOL_TAG_ENUM,
SYMBOL_TAG_FUNCTION_TYPE,
SYMBOL_TAG_POINTER_TYPE,
SYMBOL_TAG_ARRAY_TYPE,
SYMBOL_TAG_BASE_TYPE,
SYMBOL_TAG_TYPEDEF,
SYMBOL_TAG_BASE_CLASS,
SYMBOL_TAG_FRIEND,
SYMBOL_TAG_FUNCTION_ARG_TYPE,
SYMBOL_TAG_FUNC_DEBUG_START,
SYMBOL_TAG_FUNC_DEBUG_END,
SYMBOL_TAG_USING_NAMESPACE,
SYMBOL_TAG_VTABLE_SHAPE,
SYMBOL_TAG_VTABLE,
SYMBOL_TAG_CUSTOM,
SYMBOL_TAG_THUNK,
SYMBOL_TAG_CUSTOM_TYPE,
SYMBOL_TAG_MANAGED_TYPE,
SYMBOL_TAG_DIMENSION,
SYMBOL_TAG_MAX
};
enum DataKind
{
DATA_UNKNOWN,
DATA_LOCAL,
DATA_STATIC_LOCAL,
DATA_PARAM,
DATA_OBJECT_PTR, // "this" pointer
DATA_FILE_STATIC,
DATA_GLOBAL,
DATA_MEMBER,
DATA_STATIC_MEMBER,
DATA_CONSTANT,
DATA_MAX
};
enum UdtKind
{
UDT_STRUCT,
UDT_CLASS,
UDT_UNION,
UDT_MAX
};
// function types
typedef DWORD (WINAPI *SymGetOptions_t)();
typedef DWORD (WINAPI *SymSetOptions_t)(DWORD);
typedef BOOL (WINAPI *SymInitialize_t)(HANDLE, LPCSTR, BOOL);
typedef BOOL (WINAPI *SymInitializeW_t)(HANDLE, LPCWSTR, BOOL);
typedef BOOL (WINAPI *StackWalk_t)(DWORD, HANDLE, HANDLE, LPSTACKFRAME,
LPVOID, PREAD_PROCESS_MEMORY_ROUTINE,
PFUNCTION_TABLE_ACCESS_ROUTINE,
PGET_MODULE_BASE_ROUTINE,
PTRANSLATE_ADDRESS_ROUTINE);
typedef BOOL (WINAPI *SymFromAddr_t)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO);
typedef BOOL (WINAPI *SymFromAddrW_t)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFOW);
typedef LPVOID (WINAPI *SymFunctionTableAccess_t)(HANDLE, DWORD_PTR);
typedef DWORD_PTR (WINAPI *SymGetModuleBase_t)(HANDLE, DWORD_PTR);
typedef BOOL (WINAPI *SymGetLineFromAddr_t)(HANDLE, DWORD,
PDWORD, PIMAGEHLP_LINE);
typedef BOOL (WINAPI *SymGetLineFromAddr64_t)(HANDLE, DWORD64,
PDWORD, PIMAGEHLP_LINE64);
typedef BOOL (WINAPI *SymGetLineFromAddrW64_t)(HANDLE, DWORD64,
PDWORD, PIMAGEHLP_LINEW64);
typedef BOOL (WINAPI *SymSetContext_t)(HANDLE, PIMAGEHLP_STACK_FRAME,
PIMAGEHLP_CONTEXT);
typedef BOOL (WINAPI *SymEnumSymbols_t)(HANDLE, ULONG64, PCSTR,
PSYM_ENUMERATESYMBOLS_CALLBACK,
const PVOID);
typedef BOOL (WINAPI *SymEnumSymbolsW_t)(HANDLE, ULONG64, PCWSTR,
PSYM_ENUMERATESYMBOLS_CALLBACKW,
const PVOID);
typedef BOOL (WINAPI *SymGetTypeInfo_t)(HANDLE, DWORD64, ULONG,
IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
typedef BOOL (WINAPI *SymCleanup_t)(HANDLE);
typedef BOOL (WINAPI *EnumerateLoadedModules_t)(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
typedef BOOL (WINAPI *EnumerateLoadedModules64_t)(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
typedef BOOL (WINAPI *EnumerateLoadedModulesW64_t)(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
typedef BOOL (WINAPI *MiniDumpWriteDump_t)(HANDLE, DWORD, HANDLE,
MINIDUMP_TYPE,
CONST PMINIDUMP_EXCEPTION_INFORMATION,
CONST PMINIDUMP_USER_STREAM_INFORMATION,
CONST PMINIDUMP_CALLBACK_INFORMATION);
// Higher level functions selecting the right debug help library function
// to call: for CallFoo(), it can be Foo(), Foo64(), FooW() or FooW64()
// depending on the build options and function availability.
//
// They also provide more convenient to use wx-specific API, e.g. work with
// wxString instead of char/wchar_t pointers and omit the arguments we
// don't need.
static BOOL CallSymInitialize(HANDLE, BOOL);
static BOOL CallEnumerateLoadedModules(HANDLE, wxPENUMLOADED_MODULES_CALLBACK, PVOID);
static BOOL CallSymFromAddr(HANDLE, DWORD64,
size_t* offset, wxString* name);
static BOOL CallSymGetLineFromAddr(HANDLE, DWORD64,
wxString* fileName, size_t* line);
static BOOL CallSymEnumSymbols(HANDLE hProcess,
ULONG64 baseOfDll,
wxPSYM_ENUMERATESYMBOLS_CALLBACK callback,
const PVOID callbackParam);
// The macro called by wxDO_FOR_ALL_SYM_FUNCS() below takes 2 arguments:
// the name of the function in the program code, which never has "64"
// suffix, and the name of the function in the DLL which can have "64"
// suffix in some cases. These 2 helper macros call the macro with the
// correct arguments in both cases.
#define wxSYM_CALL(what, name) what(name, name)
#if defined(_M_AMD64) || defined(_M_ARM64)
#define wxSYM_CALL_64(what, name) what(name, name ## 64)
// Also undo all the "helpful" definitions done by imagehlp.h that map 32
// bit functions to 64 bit ones, we don't need this as we do it ourselves.
#undef StackWalk
#undef SymFunctionTableAccess
#undef SymGetModuleBase
#undef SymGetLineFromAddr
#undef EnumerateLoadedModules
#else
#define wxSYM_CALL_64(what, name) what(name, name)
#endif
#define wxSYM_CALL_ALWAYS_W(what, name) what(name ## W, name ## W)
#define wxSYM_CALL_ALTERNATIVES(what, name) \
what(name, name); \
what(name ## 64, name ## 64); \
what(name ## W64, name ## W64)
#define wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PUBLIC(what) \
wxSYM_CALL_64(what, StackWalk); \
wxSYM_CALL_64(what, SymFunctionTableAccess); \
wxSYM_CALL_64(what, SymGetModuleBase); \
\
wxSYM_CALL(what, SymGetOptions); \
wxSYM_CALL(what, SymSetOptions); \
wxSYM_CALL(what, SymSetContext); \
wxSYM_CALL(what, SymGetTypeInfo); \
wxSYM_CALL(what, SymCleanup); \
wxSYM_CALL(what, MiniDumpWriteDump)
#define wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PRIVATE(what) \
wxSYM_CALL(what, SymInitialize); \
wxSYM_CALL(what, SymFromAddr); \
wxSYM_CALL(what, SymEnumSymbols)
#define wxDO_FOR_ALL_SYM_FUNCS_REQUIRED(what) \
wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PRIVATE(what); \
wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PUBLIC(what)
// Alternation will work when the following functions are not found,
// therefore they are not included in REQUIRED version.
#define wxDO_FOR_ALL_SYM_FUNCS_OPTIONAL(what) \
wxSYM_CALL_ALTERNATIVES(what, SymGetLineFromAddr); \
wxSYM_CALL_ALTERNATIVES(what, EnumerateLoadedModules); \
wxSYM_CALL_ALWAYS_W(what, SymInitialize); \
wxSYM_CALL_ALWAYS_W(what, SymFromAddr); \
wxSYM_CALL_ALWAYS_W(what, SymEnumSymbols)
#define wxDO_FOR_ALL_SYM_FUNCS(what) \
wxDO_FOR_ALL_SYM_FUNCS_REQUIRED(what); \
wxDO_FOR_ALL_SYM_FUNCS_OPTIONAL(what)
#define wxDECLARE_SYM_FUNCTION(func, name) static func ## _t func
wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PUBLIC(wxDECLARE_SYM_FUNCTION);
private:
wxDO_FOR_ALL_SYM_FUNCS_REQUIRED_PRIVATE(wxDECLARE_SYM_FUNCTION);
wxDO_FOR_ALL_SYM_FUNCS_OPTIONAL(wxDECLARE_SYM_FUNCTION);
public:
#undef wxDECLARE_SYM_FUNCTION
// load all functions from DLL, return true if ok
static bool Init();
// return the string with the error message explaining why Init() failed
static const wxString& GetErrorMessage();
// log error returned by the given function to debug output
static void LogError(const wxChar *func);
// return textual representation of the value of given symbol
static wxString DumpSymbol(wxPSYMBOL_INFO pSymInfo, void *pVariable);
// return the name of the symbol with given type index
static wxString GetSymbolName(wxPSYMBOL_INFO pSymInfo);
private:
// dereference the given symbol, i.e. return symbol which is not a
// pointer/reference any more
//
// if ppData != NULL, dereference the pointer as many times as we
// dereferenced the symbol
//
// return the tag of the dereferenced symbol
static SymbolTag DereferenceSymbol(wxPSYMBOL_INFO pSymInfo, void **ppData);
static wxString DumpField(wxPSYMBOL_INFO pSymInfo,
void *pVariable,
unsigned level);
static wxString DumpBaseType(BasicType bt, DWORD64 length, void *pVariable);
static wxString DumpUDT(wxPSYMBOL_INFO pSymInfo,
void *pVariable,
unsigned level = 0);
static bool BindDbgHelpFunctions(const wxDynamicLibrary& dllDbgHelp);
static bool DoInit();
};
#endif // wxUSE_DBGHELP
#endif // _WX_MSW_DEBUGHLPH_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/glcanvas.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/glcanvas.h
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Windows
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GLCANVAS_H_
#define _WX_GLCANVAS_H_
#include "wx/palette.h"
#include "wx/msw/wrapwin.h"
#include <GL/gl.h>
// ----------------------------------------------------------------------------
// wxGLContext: OpenGL rendering context
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase
{
public:
wxGLContext(wxGLCanvas *win,
const wxGLContext *other = NULL,
const wxGLContextAttrs *ctxAttrs = NULL);
virtual ~wxGLContext();
virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE;
HGLRC GetGLRC() const { return m_glContext; }
protected:
HGLRC m_glContext;
private:
wxDECLARE_CLASS(wxGLContext);
};
// ----------------------------------------------------------------------------
// wxGLCanvas: OpenGL output window
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase
{
public:
explicit // avoid implicitly converting a wxWindow* to wxGLCanvas
wxGLCanvas(wxWindow *parent,
const wxGLAttributes& dispAttrs,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const wxPalette& palette = wxNullPalette);
explicit
wxGLCanvas(wxWindow *parent,
wxWindowID id = wxID_ANY,
const int *attribList = NULL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const wxPalette& palette = wxNullPalette);
bool Create(wxWindow *parent,
const wxGLAttributes& dispAttrs,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const wxPalette& palette = wxNullPalette);
bool Create(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const int *attribList = NULL,
const wxPalette& palette = wxNullPalette);
virtual ~wxGLCanvas();
// implement wxGLCanvasBase methods
virtual bool SwapBuffers() wxOVERRIDE;
// MSW-specific helpers
// --------------------
// get the HDC used for OpenGL rendering
HDC GetHDC() const { return m_hDC; }
// Try to find pixel format matching the given attributes list for the
// specified HDC, return 0 on error, otherwise ppfd is filled in with the
// information from dispAttrs
static int FindMatchingPixelFormat(const wxGLAttributes& dispAttrs,
PIXELFORMATDESCRIPTOR* ppfd = NULL);
// Same as FindMatchingPixelFormat
static int ChooseMatchingPixelFormat(HDC hdc, const int *attribList,
PIXELFORMATDESCRIPTOR *pfd = NULL);
#if wxUSE_PALETTE
// palette stuff
bool SetupPalette(const wxPalette& palette);
virtual wxPalette CreateDefaultPalette() wxOVERRIDE;
void OnQueryNewPalette(wxQueryNewPaletteEvent& event);
void OnPaletteChanged(wxPaletteChangedEvent& event);
#endif // wxUSE_PALETTE
// deprecated methods using the implicit wxGLContext, associate the context
// explicitly with the window instead
#if WXWIN_COMPATIBILITY_2_8
wxDEPRECATED(
wxGLCanvas(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const int *attribList = NULL,
const wxPalette& palette = wxNullPalette)
);
wxDEPRECATED(
wxGLCanvas(wxWindow *parent,
const wxGLContext *shared,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const int *attribList = NULL,
const wxPalette& palette = wxNullPalette)
);
wxDEPRECATED(
wxGLCanvas(wxWindow *parent,
const wxGLCanvas *shared,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
const int *attribList = NULL,
const wxPalette& palette = wxNullPalette)
);
#endif // WXWIN_COMPATIBILITY_2_8
protected:
// common part of all ctors
void Init();
// the real window creation function, Create() may reuse it twice as we may
// need to create an OpenGL window to query the available extensions and
// then potentially delete and recreate it with another pixel format
bool CreateWindow(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName);
// set up the pixel format using the given attributes and palette
int DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int *attribList);
// HDC for this window, we keep it all the time
HDC m_hDC;
private:
wxDECLARE_EVENT_TABLE();
wxDECLARE_CLASS(wxGLCanvas);
};
#endif // _WX_GLCANVAS_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/window.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/window.h
// Purpose: wxWindowMSW class
// Author: Julian Smart
// Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling,
// elimination of Default(), ...
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WINDOW_H_
#define _WX_WINDOW_H_
#include "wx/settings.h" // solely for wxSystemColour
class WXDLLIMPEXP_FWD_CORE wxButton;
// if this is set to 1, we use deferred window sizing to reduce flicker when
// resizing complicated window hierarchies, but this can in theory result in
// different behaviour than the old code so we keep the possibility to use it
// by setting this to 0 (in the future this should be removed completely)
#define wxUSE_DEFERRED_SIZING 1
// ---------------------------------------------------------------------------
// wxWindow declaration for MSW
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowMSW : public wxWindowBase
{
friend class wxSpinCtrl;
friend class wxSlider;
friend class wxRadioBox;
public:
wxWindowMSW() { Init(); }
wxWindowMSW(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
}
virtual ~wxWindowMSW();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
return CreateUsingMSWClass(GetMSWClassName(style),
parent, id, pos, size, style, name);
}
// Non-portable, MSW-specific Create() variant allowing to create the
// window with a custom Windows class name. This can be useful to assign a
// custom Windows class, that can be recognized from the outside of the
// application, for windows of specific type.
bool CreateUsingMSWClass(const wxChar* classname,
wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
// implement base class pure virtuals
virtual void SetLabel(const wxString& label) wxOVERRIDE;
virtual wxString GetLabel() const wxOVERRIDE;
virtual void Raise() wxOVERRIDE;
virtual void Lower() wxOVERRIDE;
#if wxUSE_DEFERRED_SIZING
virtual bool BeginRepositioningChildren() wxOVERRIDE;
virtual void EndRepositioningChildren() wxOVERRIDE;
#endif // wxUSE_DEFERRED_SIZING
virtual bool Show(bool show = true) wxOVERRIDE;
virtual bool ShowWithEffect(wxShowEffect effect,
unsigned timeout = 0) wxOVERRIDE
{
return MSWShowWithEffect(true, effect, timeout);
}
virtual bool HideWithEffect(wxShowEffect effect,
unsigned timeout = 0) wxOVERRIDE
{
return MSWShowWithEffect(false, effect, timeout);
}
virtual void SetFocus() wxOVERRIDE;
virtual void SetFocusFromKbd() wxOVERRIDE;
virtual bool Reparent(wxWindowBase *newParent) wxOVERRIDE;
virtual void WarpPointer(int x, int y) wxOVERRIDE;
virtual bool EnableTouchEvents(int eventsMask) wxOVERRIDE;
virtual void Refresh( bool eraseBackground = true,
const wxRect *rect = (const wxRect *) NULL ) wxOVERRIDE;
virtual void Update() wxOVERRIDE;
virtual void SetWindowStyleFlag(long style) wxOVERRIDE;
virtual void SetExtraStyle(long exStyle) wxOVERRIDE;
virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE;
virtual bool SetFont( const wxFont &font ) wxOVERRIDE;
virtual int GetCharHeight() const wxOVERRIDE;
virtual int GetCharWidth() const wxOVERRIDE;
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true ) wxOVERRIDE;
virtual void SetScrollPos( int orient, int pos, bool refresh = true ) wxOVERRIDE;
virtual int GetScrollPos( int orient ) const wxOVERRIDE;
virtual int GetScrollThumb( int orient ) const wxOVERRIDE;
virtual int GetScrollRange( int orient ) const wxOVERRIDE;
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = NULL ) wxOVERRIDE;
virtual bool ScrollLines(int lines) wxOVERRIDE;
virtual bool ScrollPages(int pages) wxOVERRIDE;
virtual void SetLayoutDirection(wxLayoutDirection dir) wxOVERRIDE;
virtual wxLayoutDirection GetLayoutDirection() const wxOVERRIDE;
virtual wxCoord AdjustForLayoutDirection(wxCoord x,
wxCoord width,
wxCoord widthTotal) const wxOVERRIDE;
virtual void SetId(wxWindowID winid) wxOVERRIDE;
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
// Accept files for dragging
virtual void DragAcceptFiles(bool accept) wxOVERRIDE;
#endif // wxUSE_DRAG_AND_DROP
#ifndef __WXUNIVERSAL__
// Native resource loading (implemented in src/msw/nativdlg.cpp)
// FIXME: should they really be all virtual?
virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID id);
virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name);
wxWindow* GetWindowChild1(wxWindowID id);
wxWindow* GetWindowChild(wxWindowID id);
#endif // __WXUNIVERSAL__
#if wxUSE_HOTKEY
// install and deinstall a system wide hotkey
virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) wxOVERRIDE;
virtual bool UnregisterHotKey(int hotkeyId) wxOVERRIDE;
#endif // wxUSE_HOTKEY
// window handle stuff
// -------------------
WXHWND GetHWND() const { return m_hWnd; }
void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
virtual WXWidget GetHandle() const wxOVERRIDE { return GetHWND(); }
void AssociateHandle(WXWidget handle) wxOVERRIDE;
void DissociateHandle() wxOVERRIDE;
// does this window have deferred position and/or size?
bool IsSizeDeferred() const;
// these functions allow to register a global handler for the given Windows
// message: it will be called from MSWWindowProc() of any window which gets
// this event if it's not processed before (i.e. unlike a hook procedure it
// does not override the normal processing)
//
// notice that if you want to process a message for a given window only you
// should override its MSWWindowProc() instead
// type of the handler: it is called with the message parameters (except
// that the window object is passed instead of window handle) and should
// return true if it handled the message or false if it should be passed to
// DefWindowProc()
typedef bool (*MSWMessageHandler)(wxWindowMSW *win,
WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam);
// install a handler, shouldn't be called more than one for the same message
static bool MSWRegisterMessageHandler(int msg, MSWMessageHandler handler);
// unregister a previously registered handler
static void MSWUnregisterMessageHandler(int msg, MSWMessageHandler handler);
// implementation from now on
// ==========================
// event handlers
// --------------
void OnPaint(wxPaintEvent& event);
public:
// Windows subclassing
void SubclassWin(WXHWND hWnd);
void UnsubclassWin();
WXWNDPROC MSWGetOldWndProc() const { return m_oldWndProc; }
void MSWSetOldWndProc(WXWNDPROC proc) { m_oldWndProc = proc; }
// return true if the window is of a standard (i.e. not wxWidgets') class
//
// to understand why does it work, look at SubclassWin() code and comments
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
wxWindow *FindItem(long id, WXHWND hWnd = NULL) const;
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
// MSW only: true if this control is part of the main control
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; }
#if wxUSE_TOOLTIPS
// MSW only: true if this window or any of its children have a tooltip
virtual bool HasToolTips() const { return GetToolTip() != NULL; }
#endif // wxUSE_TOOLTIPS
// translate wxWidgets style flags for this control into the Windows style
// and optional extended style for the corresponding native control
//
// this is the function that should be overridden in the derived classes,
// but you will mostly use MSWGetCreateWindowFlags() below
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const ;
// get the MSW window flags corresponding to wxWidgets ones
//
// the functions returns the flags (WS_XXX) directly and puts the ext
// (WS_EX_XXX) flags into the provided pointer if not NULL
WXDWORD MSWGetCreateWindowFlags(WXDWORD *exflags = NULL) const
{ return MSWGetStyle(GetWindowStyle(), exflags); }
// update the real underlying window style flags to correspond to the
// current wxWindow object style (safe to call even if window isn't fully
// created yet)
void MSWUpdateStyle(long flagsOld, long exflagsOld);
// get the HWND to be used as parent of this window with CreateWindow()
virtual WXHWND MSWGetParent() const;
// Return the name of the Win32 class that should be used by this wxWindow
// object, taking into account wxFULL_REPAINT_ON_RESIZE style (if it's not
// specified, the wxApp::GetNoRedrawClassSuffix()-suffixed version of the
// class is used).
static const wxChar *GetMSWClassName(long style);
// creates the window of specified Windows class with given style, extended
// style, title and geometry (default values
//
// returns true if the window has been created, false if creation failed
bool MSWCreate(const wxChar *wclass,
const wxChar *title = NULL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
WXDWORD style = 0,
WXDWORD exendedStyle = 0);
virtual bool MSWCommand(WXUINT param, WXWORD id);
#ifndef __WXUNIVERSAL__
// Create an appropriate wxWindow from a HWND
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
// Make sure the window style reflects the HWND style (roughly)
virtual void AdoptAttributesFromHWND();
#endif // __WXUNIVERSAL__
// Setup background and foreground colours correctly
virtual void SetupColours();
// ------------------------------------------------------------------------
// helpers for message handlers: these perform the same function as the
// message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into
// the correct parameters
// ------------------------------------------------------------------------
void UnpackCommand(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *id, WXHWND *hwnd, WXWORD *cmd);
void UnpackActivate(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *state, WXWORD *minimized, WXHWND *hwnd);
void UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *code, WXWORD *pos, WXHWND *hwnd);
void UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
WXHDC *hdc, WXHWND *hwnd);
void UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *item, WXWORD *flags, WXHMENU *hmenu);
// ------------------------------------------------------------------------
// internal handlers for MSW messages: all handlers return a boolean value:
// true means that the handler processed the event and false that it didn't
// ------------------------------------------------------------------------
// there are several cases where we have virtual functions for Windows
// message processing: this is because these messages often require to be
// processed in a different manner in the derived classes. For all other
// messages, however, we do *not* have corresponding MSWOnXXX() function
// and if the derived class wants to process them, it should override
// MSWWindowProc() directly.
// scroll event (both horizontal and vertical)
virtual bool MSWOnScroll(int orientation, WXWORD nSBCode,
WXWORD pos, WXHWND control);
// child control notifications
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
// owner-drawn controls need to process these messages
virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item);
virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item);
// the rest are not virtual
bool HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate);
bool HandleInitDialog(WXHWND hWndFocus);
bool HandleDestroy();
bool HandlePaint();
bool HandlePrintClient(WXHDC hDC);
bool HandleEraseBkgnd(WXHDC hDC);
bool HandleMinimize();
bool HandleMaximize();
bool HandleSize(int x, int y, WXUINT flag);
bool HandleSizing(wxRect& rect);
bool HandleGetMinMaxInfo(void *mmInfo);
bool HandleEnterSizeMove();
bool HandleExitSizeMove();
bool HandleShow(bool show, int status);
bool HandleActivate(int flag, bool minimized, WXHWND activate);
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
bool HandleCtlColor(WXHBRUSH *hBrush, WXHDC hdc, WXHWND hWnd);
bool HandlePaletteChanged(WXHWND hWndPalChange);
bool HandleQueryNewPalette();
bool HandleSysColorChange();
bool HandleDisplayChange();
bool HandleCaptureChanged(WXHWND gainedCapture);
virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam);
bool HandleQueryEndSession(long logOff, bool *mayEnd);
bool HandleEndSession(bool endSession, long logOff);
bool HandleSetFocus(WXHWND wnd);
bool HandleKillFocus(WXHWND wnd);
bool HandleDropFiles(WXWPARAM wParam);
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
bool HandleMouseMove(int x, int y, WXUINT flags);
bool HandleMouseWheel(wxMouseWheelAxis axis,
WXWPARAM wParam, WXLPARAM lParam);
// Common gesture event initialization, returns true if it is the initial
// event (GF_BEGIN set in flags), false otherwise.
bool InitGestureEvent(wxGestureEvent& event, const wxPoint& pt, WXDWORD flags);
bool HandlePanGesture(const wxPoint& pt, WXDWORD flags);
bool HandleZoomGesture(const wxPoint& pt, WXDWORD fingerDistance, WXDWORD flags);
bool HandleRotateGesture(const wxPoint& pt, WXDWORD angleArgument, WXDWORD flags);
bool HandleTwoFingerTap(const wxPoint& pt, WXDWORD flags);
bool HandlePressAndTap(const wxPoint& pt, WXDWORD flags);
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam);
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
#if wxUSE_HOTKEY
bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam);
#endif
int HandleMenuChar(int chAccel, WXLPARAM lParam);
// Create and process a clipboard event specified by type.
bool HandleClipboardEvent( WXUINT nMsg );
bool HandleQueryDragIcon(WXHICON *hIcon);
bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg);
bool HandlePower(WXWPARAM wParam, WXLPARAM lParam, bool *vetoed);
// The main body of common window proc for all wxWindow objects. It tries
// to handle the given message and returns true if it was handled (the
// appropriate return value is then put in result, which must be non-NULL)
// or false if it wasn't.
//
// This function should be overridden in any new code instead of
// MSWWindowProc() even if currently most of the code overrides
// MSWWindowProc() as it had been written before this function was added.
virtual bool MSWHandleMessage(WXLRESULT *result,
WXUINT message,
WXWPARAM wParam,
WXLPARAM lParam);
// Common Window procedure for all wxWindow objects: forwards to
// MSWHandleMessage() and MSWDefWindowProc() if the message wasn't handled.
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// Calls an appropriate default window procedure
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// message processing helpers
// return false if the message shouldn't be translated/preprocessed but
// dispatched normally
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
// return true if the message was preprocessed and shouldn't be dispatched
virtual bool MSWProcessMessage(WXMSG* pMsg);
// return true if the message was translated and shouldn't be dispatched
virtual bool MSWTranslateMessage(WXMSG* pMsg);
// called when the window is about to be destroyed
virtual void MSWDestroyWindow();
// Functions dealing with painting the window background. The derived
// classes should normally only need to reimplement MSWGetBgBrush() if they
// need to use a non-solid brush for erasing their background. This
// function is called by MSWGetBgBrushForChild() which only exists for the
// weird wxToolBar case and MSWGetBgBrushForChild() itself is used by
// MSWGetBgBrush() to actually find the right brush to use.
// Adjust the origin for the brush returned by MSWGetBgBrushForChild().
//
// This needs to be overridden for scrolled windows to ensure that the
// scrolling of their associated DC is taken into account.
//
// Both parameters must be non-NULL.
virtual void MSWAdjustBrushOrg(int* WXUNUSED(xOrg),
int* WXUNUSED(yOrg)) const
{
}
// The brush returned from here must remain valid at least until the next
// event loop iteration. Returning 0, as is done by default, indicates
// there is no custom background brush.
virtual WXHBRUSH MSWGetCustomBgBrush() { return 0; }
// this function should return the brush to paint the children controls
// background or 0 if this window doesn't impose any particular background
// on its children
//
// the hDC parameter is the DC background will be drawn on, it can be used
// to call SetBrushOrgEx() on it if the returned brush is a bitmap one
//
// child parameter is never NULL, it can be this window itself or one of
// its (grand)children
//
// the base class version returns a solid brush if we have a non default
// background colour or 0 otherwise
virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child);
// return the background brush to use for painting the given window by
// querying the parent windows via MSWGetBgBrushForChild() recursively
WXHBRUSH MSWGetBgBrush(WXHDC hDC);
enum MSWThemeColour
{
ThemeColourText = 0,
ThemeColourBackground,
ThemeColourBorder
};
// returns a specific theme colour, or if that is not possible then
// wxSystemSettings::GetColour(fallback)
wxColour MSWGetThemeColour(const wchar_t *themeName,
int themePart,
int themeState,
MSWThemeColour themeColour,
wxSystemColour fallback) const;
// gives the parent the possibility to draw its children background, e.g.
// this is used by wxNotebook to do it using DrawThemeBackground()
//
// return true if background was drawn, false otherwise
virtual bool MSWPrintChild(WXHDC WXUNUSED(hDC), wxWindow * WXUNUSED(child))
{
return false;
}
// some controls (e.g. wxListBox) need to set the return value themselves
//
// return true to let parent handle it if we don't, false otherwise
virtual bool MSWShouldPropagatePrintChild()
{
return true;
}
// This should be overridden to return true for the controls which have
// themed background that should through their children. Currently only
// wxNotebook uses this.
//
// The base class version already returns true if we have a solid
// background colour that should be propagated to our children.
virtual bool MSWHasInheritableBackground() const
{
return InheritsBackgroundColour();
}
#if !defined(__WXUNIVERSAL__)
#define wxHAS_MSW_BACKGROUND_ERASE_HOOK
#endif
#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK
// allows the child to hook into its parent WM_ERASEBKGND processing: call
// MSWSetEraseBgHook() with a non-NULL window to make parent call
// MSWEraseBgHook() on this window (don't forget to reset it to NULL
// afterwards)
//
// this hack is used by wxToolBar, see comments there
void MSWSetEraseBgHook(wxWindow *child);
// return true if WM_ERASEBKGND is currently hooked
bool MSWHasEraseBgHook() const;
// called when the window on which MSWSetEraseBgHook() had been called
// receives WM_ERASEBKGND
virtual bool MSWEraseBgHook(WXHDC WXUNUSED(hDC)) { return false; }
#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK
// common part of Show/HideWithEffect()
bool MSWShowWithEffect(bool show,
wxShowEffect effect,
unsigned timeout);
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
// initialize various fields of wxMouseEvent (common part of MSWOnMouseXXX)
void InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags);
// check if mouse is in the window
bool IsMouseInWindow() const;
virtual void SetDoubleBuffered(bool on) wxOVERRIDE;
virtual bool IsDoubleBuffered() const wxOVERRIDE;
// synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false
void GenerateMouseLeave();
// virtual function for implementing internal idle
// behaviour
virtual void OnInternalIdle() wxOVERRIDE;
#if wxUSE_MENUS && !defined(__WXUNIVERSAL__)
virtual bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
// handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE
bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu);
// Command part of HandleMenuPopup() and HandleExitMenuLoop().
virtual bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu);
// Find the menu corresponding to the given handle.
virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu);
#endif // wxUSE_MENUS && !__WXUNIVERSAL__
// Return the default button for the TLW containing this window or NULL if
// none.
static wxButton* MSWGetDefaultButtonFor(wxWindow* win);
// Simulate a click on the given button if it is non-null, enabled and
// shown.
//
// Return true if the button was clicked, false otherwise.
static bool MSWClickButtonIfPossible(wxButton* btn);
protected:
// this allows you to implement standard control borders without
// repeating the code in different classes that are not derived from
// wxControl
virtual wxBorder GetDefaultBorderForControl() const wxOVERRIDE;
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE;
// Translate wxBORDER_THEME (and other border styles if necessary to the value
// that makes most sense for this Windows environment
virtual wxBorder TranslateBorder(wxBorder border) const;
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) wxOVERRIDE;
#endif // wxUSE_MENUS_NATIVE
// the window handle
WXHWND m_hWnd;
// the old window proc (we subclass all windows)
WXWNDPROC m_oldWndProc;
// additional (MSW specific) flags
bool m_mouseInWindow:1;
bool m_lastKeydownProcessed:1;
// the size of one page for scrolling
int m_xThumbSize;
int m_yThumbSize;
// implement the base class pure virtuals
virtual void DoGetTextExtent(const wxString& string,
int *x, int *y,
int *descent = NULL,
int *externalLeading = NULL,
const wxFont *font = NULL) const wxOVERRIDE;
virtual void DoClientToScreen( int *x, int *y ) const wxOVERRIDE;
virtual void DoScreenToClient( int *x, int *y ) const wxOVERRIDE;
virtual void DoGetPosition( int *x, int *y ) const wxOVERRIDE;
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
virtual void DoGetClientSize( int *width, int *height ) const wxOVERRIDE;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
virtual void DoSetClientSize(int width, int height) wxOVERRIDE;
virtual wxSize DoGetBorderSize() const wxOVERRIDE;
virtual void DoCaptureMouse() wxOVERRIDE;
virtual void DoReleaseMouse() wxOVERRIDE;
virtual void DoEnable(bool enable) wxOVERRIDE;
virtual void DoFreeze() wxOVERRIDE;
virtual void DoThaw() wxOVERRIDE;
// this simply moves/resizes the given HWND which is supposed to be our
// sibling (this is useful for controls which are composite at MSW level
// and for which DoMoveWindow() is not enough)
//
// returns true if the window move was deferred, false if it was moved
// immediately (no error return)
bool DoMoveSibling(WXHWND hwnd, int x, int y, int width, int height);
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize() and would usually just call
// ::MoveWindow() except for composite controls which will want to arrange
// themselves inside the given rectangle
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip( wxToolTip *tip ) wxOVERRIDE;
// process TTN_NEEDTEXT message properly (i.e. fixing the bugs in
// comctl32.dll in our code -- see the function body for more info)
bool HandleTooltipNotify(WXUINT code,
WXLPARAM lParam,
const wxString& ttip);
#endif // wxUSE_TOOLTIPS
// This is used by CreateKeyEvent() and also for wxEVT_CHAR[_HOOK] event
// creation. Notice that this method doesn't initialize wxKeyEvent
// m_keyCode and m_uniChar fields.
void InitAnyKeyEvent(wxKeyEvent& event,
WXWPARAM wParam,
WXLPARAM lParam) const;
// Helper functions used by HandleKeyXXX() methods and some derived
// classes, wParam and lParam have the same meaning as in WM_KEY{DOWN,UP}.
//
// NB: evType here must be wxEVT_KEY_{DOWN,UP} as wParam here contains the
// virtual key code, not character!
wxKeyEvent CreateKeyEvent(wxEventType evType,
WXWPARAM wParam,
WXLPARAM lParam = 0) const;
// Another helper for creating wxKeyEvent for wxEVT_CHAR and related types.
//
// The wParam and lParam here must come from WM_CHAR event parameters, i.e.
// wParam must be a character and not a virtual code.
wxKeyEvent CreateCharEvent(wxEventType evType,
WXWPARAM wParam,
WXLPARAM lParam) const;
// default OnEraseBackground() implementation, return true if we did erase
// the background, false otherwise (i.e. the system should erase it)
bool DoEraseBackground(WXHDC hDC);
// generate WM_CHANGEUISTATE if it's needed for the OS we're running under
//
// action should be one of the UIS_XXX constants
// state should be one or more of the UISF_XXX constants
// if action == UIS_INITIALIZE then it doesn't seem to matter what we use
// for state as the system will decide for us what needs to be set
void MSWUpdateUIState(int action, int state = 0);
// translate wxWidgets coords into Windows ones suitable to be passed to
// ::CreateWindow(), called from MSWCreate()
virtual void MSWGetCreateWindowCoords(const wxPoint& pos,
const wxSize& size,
int& x, int& y,
int& w, int& h) const;
bool MSWEnableHWND(WXHWND hWnd, bool enable);
// Return the pointer to this window or one of its sub-controls if this ID
// and HWND combination belongs to one of them.
//
// This is used by FindItem() and is overridden in wxControl, see there.
virtual wxWindow* MSWFindItem(long WXUNUSED(id), WXHWND WXUNUSED(hWnd)) const
{
return NULL;
}
private:
// common part of all ctors
void Init();
// the (non-virtual) handlers for the events
bool HandleMove(int x, int y);
bool HandleMoving(wxRect& rect);
bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags);
bool HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
#ifndef __WXUNIVERSAL__
// Call ::IsDialogMessage() if it is safe to do it (i.e. if it's not going
// to hang or do something else stupid) with the given message, return true
// if the message was handled by it.
bool MSWSafeIsDialogMessage(WXMSG* msg);
#endif // __WXUNIVERSAL__
static inline bool MSWIsPositionDirectlySupported(int x, int y)
{
// The supported coordinate intervals for various functions are:
// - MoveWindow, DeferWindowPos: [-32768, 32767] a.k.a. [SHRT_MIN, SHRT_MAX];
// - CreateWindow, CreateWindowEx: [-32768, 32554].
// CreateXXX will _sometimes_ manage to create the window at higher coordinates
// like 32580, 32684, 32710, but that was not consistent and the lowest common
// limit was 32554 (so far at least).
return (x >= SHRT_MIN && x <= 32554 && y >= SHRT_MIN && y <= 32554);
}
protected:
WXHWND MSWCreateWindowAtAnyPosition(WXDWORD exStyle, const wxChar* clName,
const wxChar* title, WXDWORD style,
int x, int y, int width, int height,
WXHWND parent, wxWindowID id);
void MSWMoveWindowToAnyPosition(WXHWND hwnd, int x, int y,
int width, int height, bool bRepaint);
#if wxUSE_DEFERRED_SIZING
// this function is called after the window was resized to its new size
virtual void MSWEndDeferWindowPos()
{
m_pendingPosition = wxDefaultPosition;
m_pendingSize = wxDefaultSize;
}
// current defer window position operation handle (may be NULL)
WXHANDLE m_hDWP;
// When deferred positioning is done these hold the pending changes, and
// are used for the default values if another size/pos changes is done on
// this window before the group of deferred changes is completed.
wxPoint m_pendingPosition;
wxSize m_pendingSize;
#endif // wxUSE_DEFERRED_SIZING
private:
wxDECLARE_DYNAMIC_CLASS(wxWindowMSW);
wxDECLARE_NO_COPY_CLASS(wxWindowMSW);
wxDECLARE_EVENT_TABLE();
};
// window creation helper class: before creating a new HWND, instantiate an
// object of this class on stack - this allows to process the messages sent to
// the window even before CreateWindow() returns
class wxWindowCreationHook
{
public:
wxWindowCreationHook(wxWindowMSW *winBeingCreated);
~wxWindowCreationHook();
};
#endif // _WX_WINDOW_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/appprogress.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/appprogress.h
// Purpose: wxAppProgressIndicator interface.
// Author: Chaobin Zhang <[email protected]>
// Created: 2014-09-05
// Copyright: (c) 2014 wxWidgets development team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_APPPROG_H_
#define _WX_MSW_APPPROG_H_
#include "wx/vector.h"
class WXDLLIMPEXP_FWD_CORE wxTaskBarButton;
class WXDLLIMPEXP_CORE wxAppProgressIndicator
: public wxAppProgressIndicatorBase
{
public:
wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100);
virtual ~wxAppProgressIndicator();
virtual bool IsAvailable() const wxOVERRIDE;
virtual void SetValue(int value) wxOVERRIDE;
virtual void SetRange(int range) wxOVERRIDE;
virtual void Pulse() wxOVERRIDE;
virtual void Reset() wxOVERRIDE;
private:
int m_maxValue;
wxVector<wxTaskBarButton*> m_taskBarButtons;
wxDECLARE_NO_COPY_CLASS(wxAppProgressIndicator);
};
#endif // _WX_MSW_APPPROG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/apptbase.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/apptbase.h
// Purpose: declaration of wxAppTraits for MSW
// Author: Vadim Zeitlin
// Modified by:
// Created: 22.06.2003
// Copyright: (c) 2003 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_APPTBASE_H_
#define _WX_MSW_APPTBASE_H_
// ----------------------------------------------------------------------------
// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
{
public:
// wxExecute() support methods
// ---------------------------
// called before starting to wait for the child termination, may return
// some opaque data which will be passed later to AfterChildWaitLoop()
virtual void *BeforeChildWaitLoop() = 0;
// called after starting to wait for the child termination, the parameter
// is the return value of BeforeChildWaitLoop()
virtual void AfterChildWaitLoop(void *data) = 0;
#if wxUSE_THREADS
// wxThread helpers
// ----------------
// process a message while waiting for a(nother) thread, should return
// false if and only if we have to exit the application
virtual bool DoMessageFromThreadWait() = 0;
// wait for the handle to be signaled, return WAIT_OBJECT_0 if it is or, in
// the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived
virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags) = 0;
#endif // wxUSE_THREADS
// console helpers
// ---------------
// this method can be overridden by a derived class to always return true
// or false to force [not] using the console for output to stderr
//
// by default console applications always return true from here while the
// GUI ones only return true if they're being run from console and there is
// no other activity happening in this console
virtual bool CanUseStderr() = 0;
// write text to the console, return true if ok or false on error
virtual bool WriteToStderr(const wxString& text) = 0;
protected:
#if wxUSE_THREADS
// implementation of WaitForThread() for the console applications which is
// also used by the GUI code if it doesn't [yet|already] dispatch events
WXDWORD DoSimpleWaitForThread(WXHANDLE hThread);
#endif // wxUSE_THREADS
};
#endif // _WX_MSW_APPTBASE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/dc.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/dc.h
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DC_H_
#define _WX_MSW_DC_H_
#include "wx/defs.h"
#include "wx/dc.h"
// ---------------------------------------------------------------------------
// macros
// ---------------------------------------------------------------------------
#if wxUSE_DC_CACHEING
/*
* Cached blitting, maintaining a cache
* of bitmaps required for transparent blitting
* instead of constant creation/deletion
*/
class wxDCCacheEntry: public wxObject
{
public:
wxDCCacheEntry(WXHBITMAP hBitmap, int w, int h, int depth);
wxDCCacheEntry(WXHDC hDC, int depth);
virtual ~wxDCCacheEntry();
WXHBITMAP m_bitmap;
WXHDC m_dc;
int m_width;
int m_height;
int m_depth;
};
#endif
// this is an ABC: use one of the derived classes to create a DC associated
// with a window, screen, printer and so on
class WXDLLIMPEXP_CORE wxMSWDCImpl: public wxDCImpl
{
public:
wxMSWDCImpl(wxDC *owner, WXHDC hDC);
virtual ~wxMSWDCImpl();
// implement base class pure virtuals
// ----------------------------------
virtual void Clear() wxOVERRIDE;
virtual bool StartDoc(const wxString& message) wxOVERRIDE;
virtual void EndDoc() wxOVERRIDE;
virtual void StartPage() wxOVERRIDE;
virtual void EndPage() wxOVERRIDE;
virtual void SetFont(const wxFont& font) wxOVERRIDE;
virtual void SetPen(const wxPen& pen) wxOVERRIDE;
virtual void SetBrush(const wxBrush& brush) wxOVERRIDE;
virtual void SetBackground(const wxBrush& brush) wxOVERRIDE;
virtual void SetBackgroundMode(int mode) wxOVERRIDE;
#if wxUSE_PALETTE
virtual void SetPalette(const wxPalette& palette) wxOVERRIDE;
#endif // wxUSE_PALETTE
virtual void DestroyClippingRegion() wxOVERRIDE;
virtual wxCoord GetCharHeight() const wxOVERRIDE;
virtual wxCoord GetCharWidth() const wxOVERRIDE;
virtual bool CanDrawBitmap() const wxOVERRIDE;
virtual bool CanGetTextExtent() const wxOVERRIDE;
virtual int GetDepth() const wxOVERRIDE;
virtual wxSize GetPPI() const wxOVERRIDE;
virtual void SetMapMode(wxMappingMode mode) wxOVERRIDE;
virtual void SetUserScale(double x, double y) wxOVERRIDE;
virtual void SetLogicalScale(double x, double y) wxOVERRIDE;
virtual void SetLogicalOrigin(wxCoord x, wxCoord y) wxOVERRIDE;
virtual void SetDeviceOrigin(wxCoord x, wxCoord y) wxOVERRIDE;
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) wxOVERRIDE;
#if wxUSE_DC_TRANSFORM_MATRIX
virtual bool CanUseTransformMatrix() const wxOVERRIDE;
virtual bool SetTransformMatrix(const wxAffineMatrix2D& matrix) wxOVERRIDE;
virtual wxAffineMatrix2D GetTransformMatrix() const wxOVERRIDE;
virtual void ResetTransformMatrix() wxOVERRIDE;
#endif // wxUSE_DC_TRANSFORM_MATRIX
virtual void SetLogicalFunction(wxRasterOperationMode function) wxOVERRIDE;
// implementation from now on
// --------------------------
virtual void SetRop(WXHDC cdc);
virtual void SelectOldObjects(WXHDC dc);
void SetWindow(wxWindow *win)
{
m_window = win;
#if wxUSE_PALETTE
// if we have palettes use the correct one for this window
InitializePalette();
#endif // wxUSE_PALETTE
}
WXHDC GetHDC() const { return m_hDC; }
void SetHDC(WXHDC dc, bool bOwnsDC = false)
{
m_hDC = dc;
m_bOwnsDC = bOwnsDC;
// we might have a pre existing clipping region, make sure that we
// return it if asked -- but avoid calling ::GetClipBox() right now as
// it could be unnecessary wasteful
m_clipping = true;
m_isClipBoxValid = false;
}
void* GetHandle() const wxOVERRIDE { return (void*)GetHDC(); }
const wxBitmap& GetSelectedBitmap() const wxOVERRIDE { return m_selectedBitmap; }
wxBitmap& GetSelectedBitmap() wxOVERRIDE { return m_selectedBitmap; }
// update the internal clip box variables
void UpdateClipBox();
#if wxUSE_DC_CACHEING
static wxDCCacheEntry* FindBitmapInCache(WXHDC hDC, int w, int h);
static wxDCCacheEntry* FindDCInCache(wxDCCacheEntry* notThis, WXHDC hDC);
static void AddToBitmapCache(wxDCCacheEntry* entry);
static void AddToDCCache(wxDCCacheEntry* entry);
static void ClearCache();
#endif
// RTL related functions
// ---------------------
// get or change the layout direction (LTR or RTL) for this dc,
// wxLayout_Default is returned if layout direction is not supported
virtual wxLayoutDirection GetLayoutDirection() const wxOVERRIDE;
virtual void SetLayoutDirection(wxLayoutDirection dir) wxOVERRIDE;
protected:
void Init()
{
m_bOwnsDC = false;
m_hDC = NULL;
m_oldBitmap = NULL;
m_oldPen = NULL;
m_oldBrush = NULL;
m_oldFont = NULL;
#if wxUSE_PALETTE
m_oldPalette = NULL;
#endif // wxUSE_PALETTE
m_isClipBoxValid = false;
}
// create an uninitialized DC: this should be only used by the derived
// classes
wxMSWDCImpl( wxDC *owner ) : wxDCImpl( owner ) { Init(); }
void RealizeScaleAndOrigin();
public:
virtual void DoGetFontMetrics(int *height,
int *ascent,
int *descent,
int *internalLeading,
int *externalLeading,
int *averageWidth) const wxOVERRIDE;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *theFont = NULL) const wxOVERRIDE;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const wxOVERRIDE;
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
wxFloodFillStyle style = wxFLOOD_SURFACE) wxOVERRIDE;
virtual void DoGradientFillLinear(const wxRect& rect,
const wxColour& initialColour,
const wxColour& destColour,
wxDirection nDirection = wxEAST) wxOVERRIDE;
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const wxOVERRIDE;
virtual void DoDrawPoint(wxCoord x, wxCoord y) wxOVERRIDE;
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) wxOVERRIDE;
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc) wxOVERRIDE;
virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) wxOVERRIDE;
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea) wxOVERRIDE;
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord width, wxCoord height,
double radius) wxOVERRIDE;
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
#if wxUSE_SPLINES
virtual void DoDrawSpline(const wxPointList *points) wxOVERRIDE;
#endif
virtual void DoCrossHair(wxCoord x, wxCoord y) wxOVERRIDE;
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) wxOVERRIDE;
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = false) wxOVERRIDE;
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) wxOVERRIDE;
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle) wxOVERRIDE;
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) wxOVERRIDE;
virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
wxCoord dstWidth, wxCoord dstHeight,
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
wxCoord srcWidth, wxCoord srcHeight,
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) wxOVERRIDE;
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) wxOVERRIDE;
virtual void DoSetDeviceClippingRegion(const wxRegion& region) wxOVERRIDE;
virtual bool DoGetClippingRect(wxRect& rect) const wxOVERRIDE;
virtual void DoGetSizeMM(int* width, int* height) const wxOVERRIDE;
virtual void DoDrawLines(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset) wxOVERRIDE;
virtual void DoDrawPolygon(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE) wxOVERRIDE;
virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE) wxOVERRIDE;
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE
{
return subrect == NULL ? GetSelectedBitmap()
: GetSelectedBitmap().GetSubBitmap(*subrect);
}
#if wxUSE_PALETTE
// MSW specific, select a logical palette into the HDC
// (tell windows to translate pixel from other palettes to our custom one
// and vice versa)
// Realize tells it to also reset the system palette to this one.
void DoSelectPalette(bool realize = false);
// Find out what palette our parent window has, then select it into the dc
void InitializePalette();
#endif // wxUSE_PALETTE
protected:
// common part of DoDrawText() and DoDrawRotatedText()
void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);
// common part of DoSetClippingRegion() and DoSetDeviceClippingRegion()
void SetClippingHrgn(WXHRGN hrgn);
// implementation of DoGetSize() for wxScreen/PrinterDC: this simply
// returns the size of the entire device this DC is associated with
//
// notice that we intentionally put it in a separate function instead of
// DoGetSize() itself because we want it to remain pure virtual both
// because each derived class should take care to define it as needed (this
// implementation is not at all always appropriate) and because we want
// wxDC to be an ABC to prevent it from being created directly
void GetDeviceSize(int *width, int *height) const;
// MSW-specific member variables
// -----------------------------
// the window associated with this DC (may be NULL)
wxWindow *m_canvas;
wxBitmap m_selectedBitmap;
// TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it
bool m_bOwnsDC:1;
// our HDC
WXHDC m_hDC;
// Store all old GDI objects when do a SelectObject, so we can select them
// back in (this unselecting user's objects) so we can safely delete the
// DC.
WXHBITMAP m_oldBitmap;
WXHPEN m_oldPen;
WXHBRUSH m_oldBrush;
WXHFONT m_oldFont;
#if wxUSE_PALETTE
WXHPALETTE m_oldPalette;
#endif // wxUSE_PALETTE
#if wxUSE_DC_CACHEING
static wxObjectList sm_bitmapCache;
static wxObjectList sm_dcCache;
#endif
bool m_isClipBoxValid;
wxDECLARE_CLASS(wxMSWDCImpl);
wxDECLARE_NO_COPY_CLASS(wxMSWDCImpl);
};
// ----------------------------------------------------------------------------
// wxDCTemp: a wxDC which doesn't free the given HDC (used by wxWidgets
// only/mainly)
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDCTempImpl : public wxMSWDCImpl
{
public:
// construct a temporary DC with the specified HDC and size (it should be
// specified whenever we know it for this HDC)
wxDCTempImpl(wxDC *owner, WXHDC hdc, const wxSize& size )
: wxMSWDCImpl( owner, hdc ),
m_size(size)
{
}
virtual ~wxDCTempImpl()
{
// prevent base class dtor from freeing it
SetHDC((WXHDC)NULL);
}
virtual void DoGetSize(int *w, int *h) const wxOVERRIDE
{
wxASSERT_MSG( m_size.IsFullySpecified(),
wxT("size of this DC hadn't been set and is unknown") );
if ( w )
*w = m_size.x;
if ( h )
*h = m_size.y;
}
private:
// size of this DC must be explicitly set by SetSize() as we have no way to
// find it ourselves
const wxSize m_size;
wxDECLARE_NO_COPY_CLASS(wxDCTempImpl);
};
class WXDLLIMPEXP_CORE wxDCTemp : public wxDC
{
public:
wxDCTemp(WXHDC hdc, const wxSize& size = wxDefaultSize)
: wxDC(new wxDCTempImpl(this, hdc, size))
{
}
};
#endif // _WX_MSW_DC_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/msgdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/msgdlg.h
// Purpose: wxMessageDialog class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSGBOXDLG_H_
#define _WX_MSGBOXDLG_H_
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
{
public:
wxMessageDialog(wxWindow *parent,
const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK|wxCENTRE,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition)
: wxMessageDialogBase(parent, message, caption, style)
{
m_hook = NULL;
}
virtual int ShowModal() wxOVERRIDE;
virtual long GetEffectiveIcon() const wxOVERRIDE;
// implementation-specific
// return the font used for the text in the message box
static wxFont GetMessageFont();
protected:
// Override this as task dialogs are always centered on parent.
virtual void DoCentre(int dir) wxOVERRIDE;
private:
// hook procedure used to adjust the message box beyond what the standard
// MessageBox() function can do for us
static WXLRESULT wxCALLBACK HookFunction(int code, WXWPARAM, WXLPARAM);
static const struct ButtonAccessors
{
int id;
wxString (wxMessageDialog::*getter)() const;
} ms_buttons[];
// replace the static text control with a text control in order to show
// scrollbar (and also, incidentally, allow text selection)
void ReplaceStaticWithEdit();
// adjust the button labels
//
// this is called from HookFunction() and our HWND is valid at this moment
void AdjustButtonLabels();
// offset all buttons starting from the first one given by dx to the right
void OffsetButtonsStartingFrom(int first, int dx);
// used by ShowModal() to display a message box when task dialogs
// aren't available.
int ShowMessageBox();
WXHANDLE m_hook; // HHOOK used to position the message box
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog);
};
#endif // _WX_MSGBOXDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/tls.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/tls.h
// Purpose: Win32 implementation of wxTlsValue<>
// Author: Vadim Zeitlin
// Created: 2008-08-08
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_TLS_H_
#define _WX_MSW_TLS_H_
#include "wx/msw/wrapwin.h"
#include "wx/thread.h"
#include "wx/vector.h"
// ----------------------------------------------------------------------------
// wxTlsKey is a helper class encapsulating a TLS slot
// ----------------------------------------------------------------------------
class wxTlsKey
{
public:
// ctor allocates a new key
wxTlsKey(wxTlsDestructorFunction destructor)
{
m_destructor = destructor;
m_slot = ::TlsAlloc();
}
// return true if the key was successfully allocated
bool IsOk() const { return m_slot != TLS_OUT_OF_INDEXES; }
// get the key value, there is no error return
void *Get() const
{
// Exceptionally, TlsGetValue() calls SetLastError() even on success
// which means it overwrites the previous value. This is undesirable
// here, so explicitly preserve the last error here.
const DWORD dwLastError = ::GetLastError();
void* const value = ::TlsGetValue(m_slot);
if ( dwLastError )
::SetLastError(dwLastError);
return value;
}
// change the key value, return true if ok
bool Set(void *value)
{
void *old = Get();
if ( ::TlsSetValue(m_slot, value) == 0 )
return false;
if ( old )
m_destructor(old);
// update m_allValues list of all values - remove old, add new
wxCriticalSectionLocker lock(m_csAllValues);
if ( old )
{
for ( wxVector<void*>::iterator i = m_allValues.begin();
i != m_allValues.end();
++i )
{
if ( *i == old )
{
if ( value )
*i = value;
else
m_allValues.erase(i);
return true;
}
}
wxFAIL_MSG( "previous wxTlsKey value not recorded in m_allValues" );
}
if ( value )
m_allValues.push_back(value);
return true;
}
// free the key
~wxTlsKey()
{
if ( !IsOk() )
return;
// Win32 API doesn't have the equivalent of pthread's destructor, so we
// have to keep track of all allocated values and destroy them manually;
// ideally we'd do that at thread exit time, but since we could only
// do that with wxThread and not otherwise created threads, we do it
// here.
//
// TODO: We should still call destructors for wxTlsKey used in the
// thread from wxThread's thread shutdown code, *in addition*
// to doing it in ~wxTlsKey.
//
// NB: No need to lock m_csAllValues, by the time this code is called,
// no other thread can be using this key.
for ( wxVector<void*>::iterator i = m_allValues.begin();
i != m_allValues.end();
++i )
{
m_destructor(*i);
}
::TlsFree(m_slot);
}
private:
wxTlsDestructorFunction m_destructor;
DWORD m_slot;
wxVector<void*> m_allValues;
wxCriticalSection m_csAllValues;
wxDECLARE_NO_COPY_CLASS(wxTlsKey);
};
#endif // _WX_MSW_TLS_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/notebook.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/notebook.h
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
// Author: Robert Roebling
// Modified by: Vadim Zeitlin for Windows version
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _NOTEBOOK_H
#define _NOTEBOOK_H
#if wxUSE_NOTEBOOK
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/control.h"
// ----------------------------------------------------------------------------
// wxNotebook
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase
{
public:
// ctors
// -----
// default for dynamic class
wxNotebook();
// the same arguments as for wxControl (@@@ any special styles?)
wxNotebook(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNotebookNameStr);
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNotebookNameStr);
virtual ~wxNotebook();
// accessors
// ---------
// get number of pages in the dialog
virtual size_t GetPageCount() const wxOVERRIDE;
// set the currently selected page, return the index of the previously
// selected one (or wxNOT_FOUND on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
int SetSelection(size_t nPage) wxOVERRIDE;
// changes selected page without sending events
int ChangeSelection(size_t nPage) wxOVERRIDE;
// set/get the title of a page
bool SetPageText(size_t nPage, const wxString& strText) wxOVERRIDE;
wxString GetPageText(size_t nPage) const wxOVERRIDE;
// image list stuff: each page may have an image associated with it. All
// the images belong to an image list, so you have to
// 1) create an image list
// 2) associate it with the notebook
// 3) set for each page it's image
// associate image list with a control
void SetImageList(wxImageList* imageList) wxOVERRIDE;
// sets/returns item's image index in the current image list
int GetPageImage(size_t nPage) const wxOVERRIDE;
bool SetPageImage(size_t nPage, int nImage) wxOVERRIDE;
// currently it's always 1 because wxGTK doesn't support multi-row
// tab controls
int GetRowCount() const wxOVERRIDE;
// control the appearance of the notebook pages
// set the size (the same for all pages)
void SetPageSize(const wxSize& size) wxOVERRIDE;
// set the padding between tabs (in pixels)
void SetPadding(const wxSize& padding) wxOVERRIDE;
// operations
// ----------
// remove all pages
bool DeleteAllPages() wxOVERRIDE;
// inserts a new page to the notebook (it will be deleted ny the notebook,
// don't delete it yourself). If bSelect, this page becomes active.
bool InsertPage(size_t nPage,
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = false,
int imageId = NO_IMAGE) wxOVERRIDE;
// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
// style.
void SetTabSize(const wxSize& sz) wxOVERRIDE;
// hit test
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const wxOVERRIDE;
// calculate the size of the notebook from the size of its page
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const wxOVERRIDE;
// callbacks
// ---------
void OnSize(wxSizeEvent& event);
void OnNavigationKey(wxNavigationKeyEvent& event);
// base class virtuals
// -------------------
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxOVERRIDE;
virtual bool MSWOnScroll(int orientation, WXWORD nSBCode,
WXWORD pos, WXHWND control) wxOVERRIDE;
#if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = true) wxOVERRIDE;
virtual bool DoPhase(int nPhase) wxOVERRIDE;
#endif // wxUSE_CONSTRAINTS
// Attempts to get colour for UX theme page background
wxColour GetThemeBackgroundColour() const wxOVERRIDE;
// implementation only
// -------------------
#if wxUSE_UXTHEME
virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE
{
if ( !wxNotebookBase::SetBackgroundColour(colour) )
return false;
UpdateBgBrush();
return true;
}
// draw child background
virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win) wxOVERRIDE;
virtual bool MSWHasInheritableBackground() const wxOVERRIDE { return true; }
#endif // wxUSE_UXTHEME
// translate wxWin styles to the Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const wxOVERRIDE;
protected:
// common part of all ctors
void Init();
// hides the currently shown page and shows the given one (if not -1) and
// updates m_selection accordingly
void UpdateSelection(int selNew);
// remove one page from the notebook, without deleting
virtual wxNotebookPage *DoRemovePage(size_t nPage) wxOVERRIDE;
// get the page rectangle for the current notebook size
//
// returns empty rectangle if an error occurs, do test for it
wxRect GetPageSize() const;
// set the size of the given page to fit in the notebook
void AdjustPageSize(wxNotebookPage *page);
#if wxUSE_UXTHEME
virtual void MSWAdjustBrushOrg(int *xOrg, int* yOrg) const wxOVERRIDE
{
*xOrg -= m_bgBrushAdj.x;
*yOrg -= m_bgBrushAdj.y;
}
// return the themed brush for painting our children
virtual WXHBRUSH MSWGetCustomBgBrush() wxOVERRIDE { return m_hbrBackground; }
// gets the bitmap of notebook background and returns a brush from it and
// sets m_bgBrushAdj
WXHBRUSH QueryBgBitmap();
// creates the brush to be used for drawing the tab control background
void UpdateBgBrush();
#endif // wxUSE_UXTHEME
// these function are used for reducing flicker on notebook resize
void OnEraseBackground(wxEraseEvent& event);
void OnPaint(wxPaintEvent& event);
// true if we have already subclassed our updown control
bool m_hasSubclassedUpdown;
#if wxUSE_UXTHEME
// background brush used to paint the tab control
WXHBRUSH m_hbrBackground;
// offset for MSWAdjustBrushOrg()
wxPoint m_bgBrushAdj;
#endif // wxUSE_UXTHEME
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook);
wxDECLARE_EVENT_TABLE();
};
#endif // wxUSE_NOTEBOOK
#endif // _NOTEBOOK_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/webview_ie.h | /////////////////////////////////////////////////////////////////////////////
// Name: include/wx/msw/webview_ie.h
// Purpose: wxMSW IE wxWebView backend
// Author: Marianne Gagnon
// Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef wxWebViewIE_H
#define wxWebViewIE_H
#include "wx/setup.h"
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#include "wx/control.h"
#include "wx/webview.h"
#include "wx/msw/ole/automtn.h"
#include "wx/msw/ole/activex.h"
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/private/comptr.h"
#include "wx/msw/wrapwin.h"
#include "wx/msw/missing.h"
#include "wx/msw/webview_missing.h"
#include "wx/sharedptr.h"
#include "wx/vector.h"
#include "wx/msw/private.h"
struct IHTMLDocument2;
struct IHTMLElement;
struct IMarkupPointer;
class wxFSFile;
class ClassFactory;
class wxIEContainer;
class DocHostUIHandler;
class wxFindPointers;
class wxIInternetProtocol;
class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView
{
public:
wxWebViewIE() {}
wxWebViewIE(wxWindow* parent,
wxWindowID id,
const wxString& url = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxWebViewNameStr)
{
Create(parent, id, url, pos, size, style, name);
}
~wxWebViewIE();
bool Create(wxWindow* parent,
wxWindowID id,
const wxString& url = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxWebViewNameStr) wxOVERRIDE;
virtual void LoadURL(const wxString& url) wxOVERRIDE;
virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) wxOVERRIDE;
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() wxOVERRIDE;
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() wxOVERRIDE;
virtual bool CanGoForward() const wxOVERRIDE;
virtual bool CanGoBack() const wxOVERRIDE;
virtual void GoBack() wxOVERRIDE;
virtual void GoForward() wxOVERRIDE;
virtual void ClearHistory() wxOVERRIDE;
virtual void EnableHistory(bool enable = true) wxOVERRIDE;
virtual void Stop() wxOVERRIDE;
virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) wxOVERRIDE;
virtual wxString GetPageSource() const wxOVERRIDE;
virtual wxString GetPageText() const wxOVERRIDE;
virtual bool IsBusy() const wxOVERRIDE;
virtual wxString GetCurrentURL() const wxOVERRIDE;
virtual wxString GetCurrentTitle() const wxOVERRIDE;
virtual void SetZoomType(wxWebViewZoomType) wxOVERRIDE;
virtual wxWebViewZoomType GetZoomType() const wxOVERRIDE;
virtual bool CanSetZoomType(wxWebViewZoomType) const wxOVERRIDE;
virtual void Print() wxOVERRIDE;
virtual wxWebViewZoom GetZoom() const wxOVERRIDE;
virtual void SetZoom(wxWebViewZoom zoom) wxOVERRIDE;
//Clipboard functions
virtual bool CanCut() const wxOVERRIDE;
virtual bool CanCopy() const wxOVERRIDE;
virtual bool CanPaste() const wxOVERRIDE;
virtual void Cut() wxOVERRIDE;
virtual void Copy() wxOVERRIDE;
virtual void Paste() wxOVERRIDE;
//Undo / redo functionality
virtual bool CanUndo() const wxOVERRIDE;
virtual bool CanRedo() const wxOVERRIDE;
virtual void Undo() wxOVERRIDE;
virtual void Redo() wxOVERRIDE;
//Find function
virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE;
//Editing functions
virtual void SetEditable(bool enable = true) wxOVERRIDE;
virtual bool IsEditable() const wxOVERRIDE;
//Selection
virtual void SelectAll() wxOVERRIDE;
virtual bool HasSelection() const wxOVERRIDE;
virtual void DeleteSelection() wxOVERRIDE;
virtual wxString GetSelectedText() const wxOVERRIDE;
virtual wxString GetSelectedSource() const wxOVERRIDE;
virtual void ClearSelection() wxOVERRIDE;
virtual bool RunScript(const wxString& javascript, wxString* output = NULL) wxOVERRIDE;
//Virtual Filesystem Support
virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) wxOVERRIDE;
virtual void* GetNativeBackend() const wxOVERRIDE { return m_webBrowser; }
// ---- IE-specific methods
// FIXME: I seem to be able to access remote webpages even in offline mode...
bool IsOfflineMode();
void SetOfflineMode(bool offline);
wxWebViewZoom GetIETextZoom() const;
void SetIETextZoom(wxWebViewZoom level);
wxWebViewZoom GetIEOpticalZoom() const;
void SetIEOpticalZoom(wxWebViewZoom level);
void onActiveXEvent(wxActiveXEvent& evt);
void onEraseBg(wxEraseEvent&) {}
// Establish sufficiently modern emulation level for the browser control to
// allow RunScript() to return any kind of values.
static bool MSWSetModernEmulationLevel(bool modernLevel = true);
wxDECLARE_EVENT_TABLE();
protected:
virtual void DoSetPage(const wxString& html, const wxString& baseUrl) wxOVERRIDE;
private:
wxIEContainer* m_container;
wxAutomationObject m_ie;
IWebBrowser2* m_webBrowser;
wxCOMPtr<DocHostUIHandler> m_uiHandler;
//We store the current zoom type;
wxWebViewZoomType m_zoomType;
/** The "Busy" property of IWebBrowser2 does not always return busy when
* we'd want it to; this variable may be set to true in cases where the
* Busy property is false but should be true.
*/
bool m_isBusy;
//We manage our own history, the history list contains the history items
//which are added as documentcomplete events arrive, unless we are loading
//an item from the history. The position is stored as an int, and reflects
//where we are in the history list.
wxVector<wxSharedPtr<wxWebViewHistoryItem> > m_historyList;
wxVector<ClassFactory*> m_factories;
int m_historyPosition;
bool m_historyLoadingFromList;
bool m_historyEnabled;
//We store find flag, results and position.
wxVector<wxFindPointers> m_findPointers;
int m_findFlags;
wxString m_findText;
int m_findPosition;
//Generic helper functions
bool CanExecCommand(wxString command) const;
void ExecCommand(wxString command);
wxCOMPtr<IHTMLDocument2> GetDocument() const;
bool IsElementVisible(wxCOMPtr<IHTMLElement> elm);
//Find helper functions.
void FindInternal(const wxString& text, int flags, int internal_flag);
long FindNext(int direction = 1);
void FindClear();
//Toggles control features see INTERNETFEATURELIST for values.
bool EnableControlFeature(long flag, bool enable = true);
wxDECLARE_DYNAMIC_CLASS(wxWebViewIE);
};
class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryIE : public wxWebViewFactory
{
public:
virtual wxWebView* Create() wxOVERRIDE { return new wxWebViewIE; }
virtual wxWebView* Create(wxWindow* parent,
wxWindowID id,
const wxString& url = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxWebViewNameStr) wxOVERRIDE
{ return new wxWebViewIE(parent, id, url, pos, size, style, name); }
};
class VirtualProtocol : public wxIInternetProtocol
{
protected:
wxIInternetProtocolSink* m_protocolSink;
wxString m_html;
VOID * fileP;
wxFSFile* m_file;
wxSharedPtr<wxWebViewHandler> m_handler;
public:
VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
virtual ~VirtualProtocol() {}
//IUnknown
DECLARE_IUNKNOWN_METHODS;
//IInternetProtocolRoot
HRESULT STDMETHODCALLTYPE Abort(HRESULT WXUNUSED(hrReason),
DWORD WXUNUSED(dwOptions)) wxOVERRIDE
{ return E_NOTIMPL; }
HRESULT STDMETHODCALLTYPE Continue(wxPROTOCOLDATA *WXUNUSED(pProtocolData)) wxOVERRIDE
{ return S_OK; }
HRESULT STDMETHODCALLTYPE Resume() wxOVERRIDE { return S_OK; }
HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl,
wxIInternetProtocolSink *pOIProtSink,
wxIInternetBindInfo *pOIBindInfo,
DWORD grfPI,
HANDLE_PTR dwReserved) wxOVERRIDE;
HRESULT STDMETHODCALLTYPE Suspend() wxOVERRIDE { return S_OK; }
HRESULT STDMETHODCALLTYPE Terminate(DWORD WXUNUSED(dwOptions)) wxOVERRIDE { return S_OK; }
//IInternetProtocol
HRESULT STDMETHODCALLTYPE LockRequest(DWORD WXUNUSED(dwOptions)) wxOVERRIDE
{ return S_OK; }
HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead) wxOVERRIDE;
HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER WXUNUSED(dlibMove),
DWORD WXUNUSED(dwOrigin),
ULARGE_INTEGER* WXUNUSED(plibNewPosition)) wxOVERRIDE
{ return E_FAIL; }
HRESULT STDMETHODCALLTYPE UnlockRequest() wxOVERRIDE { return S_OK; }
};
class ClassFactory : public IClassFactory
{
public:
ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler)
{ AddRef(); }
virtual ~ClassFactory() {}
wxString GetName() { return m_handler->GetName(); }
//IClassFactory
HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter,
REFIID riid, void** ppvObject) wxOVERRIDE;
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock) wxOVERRIDE;
//IUnknown
DECLARE_IUNKNOWN_METHODS;
private:
wxSharedPtr<wxWebViewHandler> m_handler;
};
class wxIEContainer : public wxActiveXContainer
{
public:
wxIEContainer(wxWindow *parent, REFIID iid, IUnknown *pUnk, DocHostUIHandler* uiHandler = NULL);
virtual ~wxIEContainer();
virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc) wxOVERRIDE;
private:
DocHostUIHandler* m_uiHandler;
};
class DocHostUIHandler : public wxIDocHostUIHandler
{
public:
DocHostUIHandler(wxWebView* browser) { m_browser = browser; }
virtual ~DocHostUIHandler() {}
virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved) wxOVERRIDE;
virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) wxOVERRIDE;
virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
IOleInPlaceActiveObject *pActiveObject,
IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame,
IOleInPlaceUIWindow *pDoc) wxOVERRIDE;
virtual HRESULT wxSTDCALL HideUI(void) wxOVERRIDE;
virtual HRESULT wxSTDCALL UpdateUI(void) wxOVERRIDE;
virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) wxOVERRIDE;
virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) wxOVERRIDE;
virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate) wxOVERRIDE;
virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder,
IOleInPlaceUIWindow *pUIWindow,
BOOL fRameWindow) wxOVERRIDE;
virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg,
const GUID *pguidCmdGroup,
DWORD nCmdID) wxOVERRIDE;
virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw) wxOVERRIDE;
virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget,
IDropTarget **ppDropTarget) wxOVERRIDE;
virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) wxOVERRIDE;
virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate,
OLECHAR *pchURLIn,
OLECHAR **ppchURLOut) wxOVERRIDE;
virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet) wxOVERRIDE;
//IUnknown
DECLARE_IUNKNOWN_METHODS;
private:
wxWebView* m_browser;
};
class wxFindPointers
{
public:
wxFindPointers(wxIMarkupPointer *ptrBegin, wxIMarkupPointer *ptrEnd)
{
begin = ptrBegin;
end = ptrEnd;
}
//The two markup pointers.
wxIMarkupPointer *begin, *end;
};
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#endif // wxWebViewIE_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/statline.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/statline.h
// Purpose: MSW version of wxStaticLine class
// Author: Vadim Zeitlin
// Created: 28.06.99
// Copyright: (c) 1998 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_STATLINE_H_
#define _WX_MSW_STATLINE_H_
// ----------------------------------------------------------------------------
// wxStaticLine
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
{
public:
// constructors and pseudo-constructors
wxStaticLine() { }
wxStaticLine( wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const wxString &name = wxStaticLineNameStr )
{
Create(parent, id, pos, size, style, name);
}
bool Create( wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const wxString &name = wxStaticLineNameStr );
// overridden base class virtuals
virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
// usually overridden base class virtuals
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticLine);
};
#endif // _WX_MSW_STATLINE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/seh.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/seh.h
// Purpose: declarations for SEH (structured exceptions handling) support
// Author: Vadim Zeitlin
// Created: 2006-04-26
// Copyright: (c) 2006 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_SEH_H_
#define _WX_MSW_SEH_H_
#if wxUSE_ON_FATAL_EXCEPTION
// the exception handler which should be called from the exception filter
//
// it calls wxApp::OnFatalException() if wxTheApp object exists
WXDLLIMPEXP_BASE unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
// helper macro for wxSEH_HANDLE
#if defined(__BORLANDC__)
// some compilers don't understand that this code is unreachable and warn
// about no value being returned from the function without it, so calm them
// down
#define wxSEH_DUMMY_RETURN(rc) return rc;
#else
#define wxSEH_DUMMY_RETURN(rc)
#endif
// macros which allow to avoid many #if wxUSE_ON_FATAL_EXCEPTION in the code
// which uses them
#define wxSEH_TRY __try
#define wxSEH_IGNORE __except ( EXCEPTION_EXECUTE_HANDLER ) { }
#define wxSEH_HANDLE(rc) \
__except ( wxGlobalSEHandler(GetExceptionInformation()) ) \
{ \
/* use the same exit code as abort() */ \
::ExitProcess(3); \
\
wxSEH_DUMMY_RETURN(rc) \
}
#else // wxUSE_ON_FATAL_EXCEPTION
#define wxSEH_TRY
#define wxSEH_IGNORE
#define wxSEH_HANDLE(rc)
#endif // wxUSE_ON_FATAL_EXCEPTION
#if wxUSE_ON_FATAL_EXCEPTION && defined(__VISUALC__)
#include <eh.h>
// C++ exception to structured exceptions translator: we need it in order
// to prevent VC++ from "helpfully" translating structured exceptions (such
// as division by 0 or access violation) to C++ pseudo-exceptions
extern void wxSETranslator(unsigned int code, EXCEPTION_POINTERS *ep);
// up to VC 12 this warning ("calling _set_se_translator() requires /EHa")
// is harmless and it's easier to suppress it than deal with it as make/
// project file level as it seems to be harmless
#if __VISUALC__ < 2000
#pragma warning(disable: 4535)
#endif
// note that the SE translator must be called wxSETranslator!
#define DisableAutomaticSETranslator() _set_se_translator(wxSETranslator)
#else // !__VISUALC__
// the other compilers do nothing as stupid by default so nothing to do for
// them
#define DisableAutomaticSETranslator()
#endif // __VISUALC__/!__VISUALC__
#endif // _WX_MSW_SEH_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/wrapcctl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/wrapcctl.h
// Purpose: Wrapper for the standard <commctrl.h> header
// Author: Vadim Zeitlin
// Modified by:
// Created: 03.08.2003
// Copyright: (c) 2003 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_WRAPCCTL_H_
#define _WX_MSW_WRAPCCTL_H_
#include "wx/msw/wrapwin.h"
#include <commctrl.h>
// define things which might be missing from our commctrl.h
#include "wx/msw/missing.h"
// Set Unicode format for a common control
inline void wxSetCCUnicodeFormat(HWND hwnd)
{
::SendMessage(hwnd, CCM_SETUNICODEFORMAT, wxUSE_UNICODE, 0);
}
#if wxUSE_GUI
// Return the default font for the common controls
//
// this is implemented in msw/settings.cpp
class wxFont;
extern wxFont wxGetCCDefaultFont();
// this is just a wrapper for HDITEM which we can't use in the public header
// because we don't want to include commctrl.h (and hence windows.h) from there
struct wxHDITEM : public HDITEM
{
wxHDITEM()
{
::ZeroMemory(this, sizeof(*this));
}
};
#endif // wxUSE_GUI
#endif // _WX_MSW_WRAPCCTL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/msvcrt.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/msvcrt.h
// Purpose: macros to use some non-standard features of MS Visual C++
// C run-time library
// Author: Vadim Zeitlin
// Modified by:
// Created: 31.01.1999
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// the goal of this file is to define wxCrtSetDbgFlag() macro which may be
// used like this:
// wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
// to turn on memory leak checks for programs compiled with Microsoft Visual
// C++ (5.0+). The macro will not be defined under other compilers or if it
// can't be used with MSVC for whatever reason.
#ifndef _MSW_MSVCRT_H_
#define _MSW_MSVCRT_H_
// use debug CRT functions for memory leak detections in VC++ 5.0+ in debug
// builds
#undef wxUSE_VC_CRTDBG
#if defined(_DEBUG) && defined(__VISUALC__) \
&& !defined(UNDER_CE)
// it doesn't combine well with wxWin own memory debugging methods
#if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__)
#define wxUSE_VC_CRTDBG
#endif
#endif
#ifdef wxUSE_VC_CRTDBG
// Need to undef new if including crtdbg.h which may redefine new itself
#ifdef new
#undef new
#endif
#include <stdlib.h>
// Defining _CRTBLD should never be necessary at all, but keep it for now
// as there is no time to retest all the compilers before 3.0 release.
// Definitely do not use it with MSVS 2013 as defining it results in errors
// if the standard <assert.h> is included afterwards.
#if !defined(_CRTBLD) && !wxCHECK_VISUALC_VERSION(12)
// Needed when building with pure MS SDK
#define _CRTBLD
#endif
#include <crtdbg.h>
#undef WXDEBUG_NEW
#define WXDEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
// this define works around a bug with inline declarations of new, see
//
// http://support.microsoft.com/kb/q140858/
//
// for the details
#define new WXDEBUG_NEW
#define wxCrtSetDbgFlag(flag) \
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | (flag))
#else // !using VC CRT
#define wxCrtSetDbgFlag(flag)
#endif // wxUSE_VC_CRTDBG
#endif // _MSW_MSVCRT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/frame.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/frame.h
// Purpose: wxFrame class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FRAME_H_
#define _WX_FRAME_H_
#if wxUSE_TASKBARBUTTON
class WXDLLIMPEXP_FWD_CORE wxTaskBarButton;
#endif
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
{
public:
// construction
wxFrame() { Init(); }
wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Init();
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
virtual ~wxFrame();
// implement base class pure virtuals
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) wxOVERRIDE;
// implementation only from now on
// -------------------------------
// event handlers
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Toolbar
#if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = -1,
wxWindowID id = wxID_ANY,
const wxString& name = wxToolBarNameStr) wxOVERRIDE;
#endif // wxUSE_TOOLBAR
// Status bar
#if wxUSE_STATUSBAR
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
long style = wxSTB_DEFAULT_STYLE,
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr) wxOVERRIDE;
// Hint to tell framework which status bar to use: the default is to use
// native one for the platforms which support it (Win32), the generic one
// otherwise
// TODO: should this go into a wxFrameworkSettings class perhaps?
static void UseNativeStatusBar(bool useNative)
{ m_useNativeStatusBar = useNative; }
static bool UsesNativeStatusBar()
{ return m_useNativeStatusBar; }
#endif // wxUSE_STATUSBAR
// event handlers
bool HandleSize(int x, int y, WXUINT flag);
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
// tooltip management
#if wxUSE_TOOLTIPS
WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
#endif // tooltips
// override the base class function to handle iconized/maximized frames
virtual void SendSizeEvent(int flags = 0) wxOVERRIDE;
virtual wxPoint GetClientAreaOrigin() const wxOVERRIDE;
// override base class version to add menu bar accel processing
virtual bool MSWTranslateMessage(WXMSG *msg) wxOVERRIDE
{
return MSWDoTranslateMessage(this, msg);
}
// window proc for the frames
virtual WXLRESULT MSWWindowProc(WXUINT message,
WXWPARAM wParam,
WXLPARAM lParam) wxOVERRIDE;
#if wxUSE_MENUS
// get the currently active menu: this is the same as the frame menu for
// normal frames but is overridden by wxMDIParentFrame
virtual WXHMENU MSWGetActiveMenu() const { return m_hMenu; }
virtual bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu) wxOVERRIDE;
virtual bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu) wxOVERRIDE;
// Look up the menu in the menu bar.
virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu) wxOVERRIDE;
#endif // wxUSE_MENUS
#if wxUSE_TASKBARBUTTON
// Return the taskbar button of the window.
//
// The pointer returned by this method belongs to the window and will be
// deleted when the window itself is, do not delete it yourself. May return
// NULL if the initialization of taskbar button failed.
wxTaskBarButton* MSWGetTaskBarButton();
#endif // wxUSE_TASKBARBUTTON
protected:
// common part of all ctors
void Init();
// override base class virtuals
virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE;
virtual void DoSetClientSize(int width, int height) wxOVERRIDE;
#if wxUSE_MENUS_NATIVE
// perform MSW-specific action when menubar is changed
virtual void AttachMenuBar(wxMenuBar *menubar) wxOVERRIDE;
// a plug in for MDI frame classes which need to do something special when
// the menubar is set
virtual void InternalSetMenuBar();
#endif // wxUSE_MENUS_NATIVE
// propagate our state change to all child frames
void IconizeChildFrames(bool bIconize);
// the real implementation of MSWTranslateMessage(), also used by
// wxMDIChildFrame
bool MSWDoTranslateMessage(wxFrame *frame, WXMSG *msg);
virtual bool IsMDIChild() const { return false; }
// get default (wxWidgets) icon for the frame
virtual WXHICON GetDefaultIcon() const;
#if wxUSE_TOOLBAR
virtual void PositionToolBar() wxOVERRIDE;
#endif // wxUSE_TOOLBAR
#if wxUSE_STATUSBAR
virtual void PositionStatusBar() wxOVERRIDE;
static bool m_useNativeStatusBar;
#endif // wxUSE_STATUSBAR
#if wxUSE_MENUS
// frame menu, NULL if none
WXHMENU m_hMenu;
// The number of currently opened menus: 0 initially, 1 when a top level
// menu is opened, 2 when its submenu is opened and so on.
int m_menuDepth;
#endif // wxUSE_MENUS
private:
#if wxUSE_TOOLTIPS
WXHWND m_hwndToolTip;
#endif // tooltips
// used by IconizeChildFrames(), see comments there
bool m_wasMinimized;
#if wxUSE_TASKBARBUTTON
wxTaskBarButton* m_taskBarButton;
#endif
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame);
};
#endif
// _WX_FRAME_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/bmpcbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/bmpcbox.h
// Purpose: wxBitmapComboBox
// Author: Jaakko Salli
// Created: 2008-04-06
// Copyright: (c) 2008 Jaakko Salli
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_BMPCBOX_H_
#define _WX_MSW_BMPCBOX_H_
#include "wx/combobox.h"
// ----------------------------------------------------------------------------
// wxBitmapComboBox: a wxComboBox that allows images to be shown
// in front of string items.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxComboBox,
public wxBitmapComboBoxBase
{
public:
// ctors and such
wxBitmapComboBox() : wxComboBox(), wxBitmapComboBoxBase()
{
Init();
}
wxBitmapComboBox(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0,
const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr)
: wxComboBox(),
wxBitmapComboBoxBase()
{
Init();
(void)Create(parent, id, value, pos, size, n,
choices, style, validator, name);
}
wxBitmapComboBox(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
int n,
const wxString choices[],
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr);
virtual ~wxBitmapComboBox();
// Sets the image for the given item.
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) wxOVERRIDE;
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
// Adds item with image to the end of the combo box.
int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap);
int Append(const wxString& item, const wxBitmap& bitmap, void *clientData);
int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData);
// Inserts item with image into the list before pos. Not valid for wxCB_SORT
// styles, use Append instead.
int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos);
int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos, void *clientData);
int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos, wxClientData *clientData);
protected:
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item) wxOVERRIDE;
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item) wxOVERRIDE;
// Event handlers
void OnSize(wxSizeEvent& event);
virtual wxItemContainer* GetItemContainer() wxOVERRIDE { return this; }
virtual wxWindow* GetControl() wxOVERRIDE { return this; }
// wxItemContainer implementation
virtual int DoInsertItems(const wxArrayStringsAdapter & items,
unsigned int pos,
void **clientData, wxClientDataType type) wxOVERRIDE;
virtual void DoClear() wxOVERRIDE;
virtual void DoDeleteOneItem(unsigned int n) wxOVERRIDE;
virtual bool OnAddBitmap(const wxBitmap& bitmap) wxOVERRIDE;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
void RecreateControl();
private:
void Init();
bool m_inResize;
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS(wxBitmapComboBox);
};
#endif // _WX_MSW_BMPCBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/statusbar.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/statusbar.h
// Purpose: native implementation of wxStatusBar
// Author: Vadim Zeitlin
// Modified by:
// Created: 04.04.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_STATUSBAR_H_
#define _WX_MSW_STATUSBAR_H_
#if wxUSE_NATIVE_STATUSBAR
#include "wx/vector.h"
#include "wx/tooltip.h"
class WXDLLIMPEXP_FWD_CORE wxClientDC;
class WXDLLIMPEXP_CORE wxStatusBar : public wxStatusBarBase
{
public:
// ctors and such
wxStatusBar();
wxStatusBar(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = wxSTB_DEFAULT_STYLE,
const wxString& name = wxStatusBarNameStr)
{
m_pDC = NULL;
(void)Create(parent, id, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id = wxID_ANY,
long style = wxSTB_DEFAULT_STYLE,
const wxString& name = wxStatusBarNameStr);
virtual ~wxStatusBar();
// implement base class methods
virtual void SetFieldsCount(int number = 1, const int *widths = NULL) wxOVERRIDE;
virtual void SetStatusWidths(int n, const int widths_field[]) wxOVERRIDE;
virtual void SetStatusStyles(int n, const int styles[]) wxOVERRIDE;
virtual void SetMinHeight(int height) wxOVERRIDE;
virtual bool GetFieldRect(int i, wxRect& rect) const wxOVERRIDE;
virtual int GetBorderX() const wxOVERRIDE;
virtual int GetBorderY() const wxOVERRIDE;
// override some wxWindow virtual methods too
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam) wxOVERRIDE;
protected:
// implement base class pure virtual method
virtual void DoUpdateStatusText(int number) wxOVERRIDE;
// override some base class virtuals
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const wxOVERRIDE;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
#if wxUSE_TOOLTIPS
virtual bool MSWProcessMessage(WXMSG* pMsg) wxOVERRIDE;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result) wxOVERRIDE;
#endif
// implementation of the public SetStatusWidths()
void MSWUpdateFieldsWidths();
// used by DoUpdateStatusText()
wxClientDC *m_pDC;
#if wxUSE_TOOLTIPS
// the tooltips used when wxSTB_SHOW_TIPS is given
wxVector<wxToolTip*> m_tooltips;
#endif
private:
struct MSWBorders
{
int horz,
vert,
between;
};
// retrieve all status bar borders using SB_GETBORDERS
MSWBorders MSWGetBorders() const;
// return the size of the border between the fields
int MSWGetBorderWidth() const;
struct MSWMetrics
{
int gripWidth,
textMargin;
};
// return the various status bar metrics
static const MSWMetrics& MSWGetMetrics();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar);
};
#endif // wxUSE_NATIVE_STATUSBAR
#endif // _WX_MSW_STATUSBAR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/statbox.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/statbox.h
// Purpose: wxStaticBox class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_STATBOX_H_
#define _WX_MSW_STATBOX_H_
#include "wx/compositewin.h"
// Group box
class WXDLLIMPEXP_CORE wxStaticBox : public wxCompositeWindowSettersOnly<wxStaticBoxBase>
{
public:
wxStaticBox()
: wxCompositeWindowSettersOnly<wxStaticBoxBase>()
{
}
wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr)
: wxCompositeWindowSettersOnly<wxStaticBoxBase>()
{
Create(parent, id, label, pos, size, style, name);
}
wxStaticBox(wxWindow* parent, wxWindowID id,
wxWindow* label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString &name = wxStaticBoxNameStr)
: wxCompositeWindowSettersOnly<wxStaticBoxBase>()
{
Create(parent, id, label, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
wxWindow* label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
/// Implementation only
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const wxOVERRIDE;
virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE;
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }
protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
public:
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
protected:
virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE;
// return the region with all the windows inside this static box excluded
virtual WXHRGN MSWGetRegionWithoutChildren();
// remove the parts which are painted by static box itself from the given
// region which is embedded in a rectangle (0, 0)-(w, h)
virtual void MSWGetRegionWithoutSelf(WXHRGN hrgn, int w, int h);
// paint the given rectangle with our background brush/colour
virtual void PaintBackground(wxDC& dc, const struct tagRECT& rc);
// paint the foreground of the static box
virtual void PaintForeground(wxDC& dc, const struct tagRECT& rc);
void OnPaint(wxPaintEvent& event);
private:
void PositionLabelWindow();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticBox);
};
// Indicate that we have the ctor overload taking wxWindow as label.
#define wxHAS_WINDOW_LABEL_IN_STATIC_BOX
#endif // _WX_MSW_STATBOX_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/richmsgdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/richmsgdlg.h
// Purpose: wxRichMessageDialog
// Author: Rickard Westerlund
// Created: 2010-07-04
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_RICHMSGDLG_H_
#define _WX_MSW_RICHMSGDLG_H_
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)
{ }
// overridden base class method showing the native task dialog if possible
virtual int ShowModal() wxOVERRIDE;
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog);
};
#endif // _WX_MSW_RICHMSGDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/control.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/control.h
// Purpose: wxControl class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONTROL_H_
#define _WX_CONTROL_H_
#include "wx/dynarray.h"
// General item class
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
{
public:
wxControl() { }
wxControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr)
{
Create(parent, id, pos, size, style, validator, name);
}
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);
// Simulates an event
virtual void Command(wxCommandEvent& event) wxOVERRIDE { ProcessCommand(event); }
// implementation from now on
// --------------------------
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE
{
return GetClassDefaultAttributes(GetWindowVariant());
}
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// Calls the callback and appropriate event handlers
bool ProcessCommand(wxCommandEvent& event);
// MSW-specific
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxOVERRIDE;
// For ownerdraw items
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return false; }
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return false; }
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
// default handling of WM_CTLCOLORxxx: this is public so that wxWindow
// could call it
virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
// default style for the control include WS_TABSTOP if it AcceptsFocus()
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
protected:
// Hook for common controls for which we don't want to set the default font
// as if we do set it, the controls don't update their font size
// automatically in response to WM_SETTINGCHANGE if it's changed in the
// display properties in the control panel, so avoid doing this for them.
virtual bool MSWShouldSetDefaultFont() const { return true; }
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE;
// return default best size (doesn't really make any sense, override this)
virtual wxSize DoGetBestSize() const wxOVERRIDE;
// create the control of the given Windows class: this is typically called
// from Create() method of the derived class passing its label, pos and
// size parameter (style parameter is not needed because m_windowStyle is
// supposed to had been already set and so is used instead when this
// function is called)
bool MSWCreateControl(const wxChar *classname,
const wxString& label,
const wxPoint& pos,
const wxSize& size);
// NB: the method below is deprecated now, with MSWGetStyle() the method
// above should be used instead! Once all the controls are updated to
// implement MSWGetStyle() this version will disappear.
//
// create the control of the given class with the given style (combination
// of WS_XXX flags, i.e. Windows style, not wxWidgets one), returns
// false if creation failed
//
// All parameters except classname and style are optional, if the
// size/position are not given, they should be set later with SetSize()
// and, label (the title of the window), of course, is left empty. The
// extended style is determined from the style and the app 3D settings
// automatically if it's not specified explicitly.
bool MSWCreateControl(const wxChar *classname,
WXDWORD style,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& label = wxEmptyString,
WXDWORD exstyle = (WXDWORD)-1);
// call this from the derived class MSWControlColor() if you want to show
// the control greyed out (and opaque)
WXHBRUSH MSWControlColorDisabled(WXHDC pDC);
// common part of the 3 functions above: pass wxNullColour to use the
// appropriate background colour (meaning ours or our parents) or a fixed
// one
virtual WXHBRUSH DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd);
// Look in our GetSubcontrols() for the windows with the given ID.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const wxOVERRIDE;
// for controls like radiobuttons which are really composite this array
// holds the ids (not HWNDs!) of the sub controls
wxArrayLong m_subControls;
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxControl);
};
#endif // _WX_CONTROL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/fdrepdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/fdrepdlg.h
// Purpose: wxFindReplaceDialog class
// Author: Markus Greither
// Modified by: 31.07.01: VZ: integrated into wxWidgets
// Created: 23/03/2001
// Copyright: (c) Markus Greither
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_FDREPDLG_H_
#define _WX_MSW_FDREPDLG_H_
// ----------------------------------------------------------------------------
// wxFindReplaceDialog: dialog for searching / replacing text
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFindReplaceDialog : public wxFindReplaceDialogBase
{
public:
// ctors and such
wxFindReplaceDialog() { Init(); }
wxFindReplaceDialog(wxWindow *parent,
wxFindReplaceData *data,
const wxString &title,
int style = 0);
bool Create(wxWindow *parent,
wxFindReplaceData *data,
const wxString &title,
int style = 0);
virtual ~wxFindReplaceDialog();
// implementation only from now on
wxFindReplaceDialogImpl *GetImpl() const { return m_impl; }
// override some base class virtuals
virtual bool Show(bool show = true) wxOVERRIDE;
virtual void SetTitle( const wxString& title) wxOVERRIDE;
virtual wxString GetTitle() const wxOVERRIDE;
protected:
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
void Init();
wxString m_title;
wxFindReplaceDialogImpl *m_impl;
wxDECLARE_DYNAMIC_CLASS(wxFindReplaceDialog);
wxDECLARE_NO_COPY_CLASS(wxFindReplaceDialog);
};
#endif // _WX_MSW_FDREPDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/chkconf.h | /*
* Name: wx/msw/chkconf.h
* Purpose: Compiler-specific configuration checking
* Author: Julian Smart
* Modified by:
* Created: 01/02/97
* Copyright: (c) Julian Smart
* Licence: wxWindows licence
*/
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
#ifndef _WX_MSW_CHKCONF_H_
#define _WX_MSW_CHKCONF_H_
/* ensure that MSW-specific settings are defined */
#ifndef wxUSE_ACTIVEX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACTIVEX must be defined."
# else
# define wxUSE_ACTIVEX 0
# endif
#endif /* !defined(wxUSE_ACTIVEX) */
#ifndef wxUSE_WINRT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WINRT must be defined."
# else
# define wxUSE_WINRT 0
# endif
#endif /* !defined(wxUSE_ACTIVEX) */
#ifndef wxUSE_CRASHREPORT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CRASHREPORT must be defined."
# else
# define wxUSE_CRASHREPORT 0
# endif
#endif /* !defined(wxUSE_CRASHREPORT) */
#ifndef wxUSE_DBGHELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DBGHELP must be defined"
# else
# define wxUSE_DBGHELP 1
# endif
#endif /* wxUSE_DBGHELP */
#ifndef wxUSE_DC_CACHEING
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_CACHEING must be defined"
# else
# define wxUSE_DC_CACHEING 1
# endif
#endif /* wxUSE_DC_CACHEING */
#ifndef wxUSE_DIALUP_MANAGER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DIALUP_MANAGER must be defined."
# else
# define wxUSE_DIALUP_MANAGER 0
# endif
#endif /* !defined(wxUSE_DIALUP_MANAGER) */
#ifndef wxUSE_MS_HTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MS_HTML_HELP must be defined."
# else
# define wxUSE_MS_HTML_HELP 0
# endif
#endif /* !defined(wxUSE_MS_HTML_HELP) */
#ifndef wxUSE_INICONF
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_INICONF must be defined."
# else
# define wxUSE_INICONF 0
# endif
#endif /* !defined(wxUSE_INICONF) */
#ifndef wxUSE_OLE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_OLE must be defined."
# else
# define wxUSE_OLE 0
# endif
#endif /* !defined(wxUSE_OLE) */
#ifndef wxUSE_OLE_AUTOMATION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_OLE_AUTOMATION must be defined."
# else
# define wxUSE_OLE_AUTOMATION 0
# endif
#endif /* !defined(wxUSE_OLE_AUTOMATION) */
#ifndef wxUSE_TASKBARICON_BALLOONS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TASKBARICON_BALLOONS must be defined."
# else
# define wxUSE_TASKBARICON_BALLOONS 0
# endif
#endif /* wxUSE_TASKBARICON_BALLOONS */
#ifndef wxUSE_TASKBARBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TASKBARBUTTON must be defined."
# else
# define wxUSE_TASKBARBUTTON 0
# endif
#endif /* wxUSE_TASKBARBUTTON */
#ifndef wxUSE_UXTHEME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UXTHEME must be defined."
# else
# define wxUSE_UXTHEME 0
# endif
#endif /* wxUSE_UXTHEME */
/*
* Unfortunately we can't use compiler TLS support if the library can be used
* inside a dynamically loaded DLL under Windows XP, as this can result in hard
* to diagnose crashes due to the bugs in Windows TLS support, see #13116.
*
* So we disable it unless we can be certain that the code will never run under
* XP, as is the case if we're using a compiler which doesn't support XP such
* as MSVC 11+, unless it's used with the special "_xp" toolset, in which case
* _USING_V110_SDK71_ is defined.
*
* However defining wxUSE_COMPILER_TLS as 2 overrides this safety check, see
* the comments in wx/setup.h.
*/
#if wxUSE_COMPILER_TLS == 1
#if !wxCHECK_VISUALC_VERSION(11) || defined(_USING_V110_SDK71_)
#undef wxUSE_COMPILER_TLS
#define wxUSE_COMPILER_TLS 0
#endif
#endif
/*
* disable the settings which don't work for some compilers
*/
/*
* All of the settings below require SEH support (__try/__catch) and can't work
* without it.
*/
#if !defined(_MSC_VER) && \
(!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
# undef wxUSE_ON_FATAL_EXCEPTION
# define wxUSE_ON_FATAL_EXCEPTION 0
# undef wxUSE_CRASHREPORT
# define wxUSE_CRASHREPORT 0
#endif /* compiler doesn't support SEH */
#if defined(__GNUWIN32__)
/* These don't work as expected for mingw32 and cygwin32 */
# undef wxUSE_MEMORY_TRACING
# define wxUSE_MEMORY_TRACING 0
# undef wxUSE_GLOBAL_MEMORY_OPERATORS
# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
# undef wxUSE_DEBUG_NEW_ALWAYS
# define wxUSE_DEBUG_NEW_ALWAYS 0
/* some Cygwin versions don't have wcslen */
# if defined(__CYGWIN__) || defined(__CYGWIN32__)
# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
# undef wxUSE_WCHAR_T
# define wxUSE_WCHAR_T 0
# endif
#endif
#endif /* __GNUWIN32__ */
/* MinGW32 doesn't provide wincred.h defining the API needed by this */
#ifdef __MINGW32_TOOLCHAIN__
#undef wxUSE_SECRETSTORE
#define wxUSE_SECRETSTORE 0
#endif
#if wxUSE_SPINCTRL
# if !wxUSE_SPINBTN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxSpinCtrl requires wxSpinButton on MSW"
# else
# undef wxUSE_SPINBTN
# define wxUSE_SPINBTN 1
# endif
# endif
#endif
/* wxMSW-specific checks: notice that this file is also used with wxUniv
and can even be used with wxGTK, when building it under Windows.
*/
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
# if !wxUSE_OWNER_DRAWN
# undef wxUSE_CHECKLISTBOX
# define wxUSE_CHECKLISTBOX 0
# endif
# if !wxUSE_CHECKLISTBOX
# undef wxUSE_REARRANGECTRL
# define wxUSE_REARRANGECTRL 0
# endif
#endif
/*
Compiler-specific checks.
*/
/* Borland */
#ifdef __BORLANDC__
#if __BORLANDC__ < 0x500
/* BC++ 4.0 can't compile JPEG library */
# undef wxUSE_LIBJPEG
# define wxUSE_LIBJPEG 0
#endif
/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
#if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
# undef wxUSE_DEBUG_NEW_ALWAYS
# define wxUSE_DEBUG_NEW_ALWAYS 0
#endif
#endif /* __BORLANDC__ */
/*
un/redefine the options which we can't compile (after checking that they're
defined
*/
#ifdef __WINE__
# if wxUSE_ACTIVEX
# undef wxUSE_ACTIVEX
# define wxUSE_ACTIVEX 0
# endif /* wxUSE_ACTIVEX */
#endif /* __WINE__ */
/*
Currently wxUSE_GRAPHICS_CONTEXT is only enabled with MSVC by default, so
only check for wxUSE_ACTIVITYINDICATOR dependency on it if it can be
enabled, otherwise turn the latter off to allow the library to compile.
*/
#if !wxUSE_GRAPHICS_CONTEXT && !defined(_MSC_VER)
# undef wxUSE_ACTIVITYINDICATOR
# define wxUSE_ACTIVITYINDICATOR 0
#endif /* !wxUSE_ACTIVITYINDICATOR && !_MSC_VER */
/* check settings consistency for MSW-specific ones */
#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
# else
# undef wxUSE_CRASHREPORT
# define wxUSE_CRASHREPORT 0
# endif
#endif /* wxUSE_CRASHREPORT */
#if !wxUSE_VARIANT
# if wxUSE_ACTIVEX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxActiveXContainer requires wxVariant"
# else
# undef wxUSE_ACTIVEX
# define wxUSE_ACTIVEX 0
# endif
# endif
# if wxUSE_OLE_AUTOMATION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxAutomationObject requires wxVariant"
# else
# undef wxUSE_OLE_AUTOMATION
# define wxUSE_OLE_AUTOMATION 0
# endif
# endif
#endif /* !wxUSE_VARIANT */
#if !wxUSE_DATAOBJ
# if wxUSE_OLE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_OLE requires wxDataObject"
# else
# undef wxUSE_OLE
# define wxUSE_OLE 0
# endif
# endif
#endif /* !wxUSE_DATAOBJ */
#if !wxUSE_DYNAMIC_LOADER
# if wxUSE_MS_HTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
# else
# undef wxUSE_MS_HTML_HELP
# define wxUSE_MS_HTML_HELP 0
# endif
# endif
# if wxUSE_DIALUP_MANAGER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
# else
# undef wxUSE_DIALUP_MANAGER
# define wxUSE_DIALUP_MANAGER 0
# endif
# endif
#endif /* !wxUSE_DYNAMIC_LOADER */
#if !wxUSE_DYNLIB_CLASS
# if wxUSE_DBGHELP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DBGHELP requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_DBGHELP
# define wxUSE_DBGHELP 0
# endif
# endif
# if wxUSE_DC_TRANSFORM_MATRIX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_DC_TRANSFORM_MATRIX
# define wxUSE_DC_TRANSFORM_MATRIX 0
# endif
# endif
# if wxUSE_UXTHEME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_UXTHEME
# define wxUSE_UXTHEME 0
# endif
# endif
# if wxUSE_MEDIACTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_MEDIACTRL
# define wxUSE_MEDIACTRL 0
# endif
# endif
# if wxUSE_INKEDIT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_INKEDIT
# define wxUSE_INKEDIT 0
# endif
# endif
#endif /* !wxUSE_DYNLIB_CLASS */
#if !wxUSE_OLE
# if wxUSE_ACTIVEX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxActiveXContainer requires wxUSE_OLE"
# else
# undef wxUSE_ACTIVEX
# define wxUSE_ACTIVEX 0
# endif
# endif
# if wxUSE_OLE_AUTOMATION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxAutomationObject requires wxUSE_OLE"
# else
# undef wxUSE_OLE_AUTOMATION
# define wxUSE_OLE_AUTOMATION 0
# endif
# endif
# if wxUSE_DRAG_AND_DROP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DRAG_AND_DROP requires wxUSE_OLE"
# else
# undef wxUSE_DRAG_AND_DROP
# define wxUSE_DRAG_AND_DROP 0
# endif
# endif
#endif /* !wxUSE_OLE */
#if !wxUSE_ACTIVEX
# if wxUSE_MEDIACTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxMediaCtl requires wxActiveXContainer"
# else
# undef wxUSE_MEDIACTRL
# define wxUSE_MEDIACTRL 0
# endif
# endif
# if wxUSE_WEBVIEW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxWebView requires wxActiveXContainer under MSW"
# else
# undef wxUSE_WEBVIEW
# define wxUSE_WEBVIEW 0
# endif
# endif
#endif /* !wxUSE_ACTIVEX */
#if wxUSE_ACTIVITYINDICATOR && !wxUSE_GRAPHICS_CONTEXT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACTIVITYINDICATOR requires wxGraphicsContext"
# else
# undef wxUSE_ACTIVITYINDICATOR
# define wxUSE_ACTIVITYINDICATOR 0
# endif
#endif /* wxUSE_ACTIVITYINDICATOR */
#if wxUSE_STACKWALKER && !wxUSE_DBGHELP
/*
Don't give an error in this case because wxUSE_DBGHELP could be 0
because the compiler just doesn't support it, there is really no other
choice than to disable wxUSE_STACKWALKER too in this case.
Unfortunately we can't distinguish between the missing compiler support
and explicitly disabling wxUSE_DBGHELP (which would ideally result in
an error if wxUSE_STACKWALKER is not disabled too), but it's better to
avoid giving a compiler error in the former case even if it means not
giving it neither in the latter one.
*/
#undef wxUSE_STACKWALKER
#define wxUSE_STACKWALKER 0
#endif /* wxUSE_STACKWALKER && !wxUSE_DBGHELP */
#if !wxUSE_THREADS
# if wxUSE_FSWATCHER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxFileSystemWatcher requires wxThread under MSW"
# else
# undef wxUSE_FSWATCHER
# define wxUSE_FSWATCHER 0
# endif
# endif
#endif /* !wxUSE_THREADS */
#if !wxUSE_OLE_AUTOMATION
# if wxUSE_WEBVIEW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
# else
# undef wxUSE_WEBVIEW
# define wxUSE_WEBVIEW 0
# endif
# endif
#endif /* !wxUSE_OLE_AUTOMATION */
#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
# undef wxUSE_POSTSCRIPT
# define wxUSE_POSTSCRIPT 1
#endif
#endif /* _WX_MSW_CHKCONF_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/dcprint.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/dcprint.h
// Purpose: wxPrinterDC class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DCPRINT_H_
#define _WX_MSW_DCPRINT_H_
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/dcprint.h"
#include "wx/cmndata.h"
#include "wx/msw/dc.h"
// ------------------------------------------------------------------------
// wxPrinterDCImpl
//
class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxMSWDCImpl
{
public:
// Create from print data
wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC );
// override some base class virtuals
virtual bool StartDoc(const wxString& message) wxOVERRIDE;
virtual void EndDoc() wxOVERRIDE;
virtual void StartPage() wxOVERRIDE;
virtual void EndPage() wxOVERRIDE;
virtual wxRect GetPaperRect() const wxOVERRIDE;
protected:
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = false) wxOVERRIDE;
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) wxOVERRIDE;
virtual void DoGetSize(int *w, int *h) const wxOVERRIDE
{
GetDeviceSize(w, h);
}
// init the dc
void Init();
wxPrintData m_printData;
private:
wxDECLARE_CLASS(wxPrinterDCImpl);
wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl);
};
// Gets an HDC for the specified printer configuration
WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
// ------------------------------------------------------------------------
// wxPrinterDCromHDC
//
class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC
{
public:
wxPrinterDCFromHDC( WXHDC theDC )
: wxPrinterDC(new wxPrinterDCImpl(this, theDC))
{
}
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif // _WX_MSW_DCPRINT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/printdlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/printdlg.h
// Purpose: wxPrintDialog, wxPageSetupDialog classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINTDLG_H_
#define _WX_PRINTDLG_H_
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/dialog.h"
#include "wx/cmndata.h"
#include "wx/prntbase.h"
#include "wx/printdlg.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
class WinPrinter;
//----------------------------------------------------------------------------
// wxWindowsPrintNativeData
//----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowsPrintNativeData: public wxPrintNativeDataBase
{
public:
wxWindowsPrintNativeData();
virtual ~wxWindowsPrintNativeData();
virtual bool TransferTo( wxPrintData &data ) wxOVERRIDE;
virtual bool TransferFrom( const wxPrintData &data ) wxOVERRIDE;
virtual bool Ok() const wxOVERRIDE { return IsOk(); }
virtual bool IsOk() const wxOVERRIDE;
void InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL);
void* GetDevMode() const { return m_devMode; }
void SetDevMode(void* data) { m_devMode = data; }
void* GetDevNames() const { return m_devNames; }
void SetDevNames(void* data) { m_devNames = data; }
private:
void* m_devMode;
void* m_devNames;
short m_customWindowsPaperId;
private:
wxDECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData);
};
// ---------------------------------------------------------------------------
// wxWindowsPrintDialog: the MSW dialog for printing
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowsPrintDialog : public wxPrintDialogBase
{
public:
wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data);
virtual ~wxWindowsPrintDialog();
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
virtual int ShowModal() wxOVERRIDE;
wxPrintDialogData& GetPrintDialogData() wxOVERRIDE { return m_printDialogData; }
wxPrintData& GetPrintData() wxOVERRIDE { return m_printDialogData.GetPrintData(); }
virtual wxDC *GetPrintDC() wxOVERRIDE;
private:
wxPrintDialogData m_printDialogData;
wxPrinterDC* m_printerDC;
bool m_destroyDC;
wxWindow* m_dialogParent;
private:
bool ConvertToNative( wxPrintDialogData &data );
bool ConvertFromNative( wxPrintDialogData &data );
// holds MSW handle
void* m_printDlg;
private:
wxDECLARE_CLASS(wxWindowsPrintDialog);
wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog);
};
// ---------------------------------------------------------------------------
// wxWindowsPageSetupDialog: the MSW page setup dialog
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog: public wxPageSetupDialogBase
{
public:
wxWindowsPageSetupDialog();
wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
virtual ~wxWindowsPageSetupDialog();
bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
virtual int ShowModal() wxOVERRIDE;
bool ConvertToNative( wxPageSetupDialogData &data );
bool ConvertFromNative( wxPageSetupDialogData &data );
virtual wxPageSetupDialogData& GetPageSetupDialogData() wxOVERRIDE { return m_pageSetupData; }
private:
wxPageSetupDialogData m_pageSetupData;
wxWindow* m_dialogParent;
// holds MSW handle
void* m_pageDlg;
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog);
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_PRINTDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/mimetype.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/mimetype.h
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
// Created: 23.09.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWidgets licence (part of base library)
/////////////////////////////////////////////////////////////////////////////
#ifndef _MIMETYPE_IMPL_H
#define _MIMETYPE_IMPL_H
#include "wx/defs.h"
#if wxUSE_MIMETYPE
#include "wx/mimetype.h"
// ----------------------------------------------------------------------------
// wxFileTypeImpl is the MSW version of wxFileType, this is a private class
// and is never used directly by the application
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxFileTypeImpl
{
public:
// ctor
wxFileTypeImpl() { }
// one of these Init() function must be called (ctor can't take any
// arguments because it's common)
// initialize us with our file type name and extension - in this case
// we will read all other data from the registry
void Init(const wxString& strFileType, const wxString& ext);
// implement accessor functions
bool GetExtensions(wxArrayString& extensions);
bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;
bool GetIcon(wxIconLocation *iconLoc) const;
bool GetDescription(wxString *desc) const;
bool GetOpenCommand(wxString *openCmd,
const wxFileType::MessageParameters& params) const
{
*openCmd = GetExpandedCommand(wxS("open"), params);
return !openCmd->empty();
}
bool GetPrintCommand(wxString *printCmd,
const wxFileType::MessageParameters& params) const
{
*printCmd = GetExpandedCommand(wxS("print"), params);
return !printCmd->empty();
}
size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands,
const wxFileType::MessageParameters& params) const;
bool Unassociate();
// 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);
// this is called by Associate
bool SetDescription (const wxString& desc);
// This is called by all our own methods modifying the registry to let the
// Windows Shell know about the changes.
//
// It is also called from Associate() and Unassociate() which suppress the
// internally generated notifications using the method below, which is why
// it has to be public.
void MSWNotifyShell();
// Call before/after performing several registry changes in a row to
// temporarily suppress multiple notifications that would be generated for
// them and generate a single one at the end using MSWNotifyShell()
// explicitly.
void MSWSuppressNotifications(bool supress);
wxString
GetExpandedCommand(const wxString& verb,
const wxFileType::MessageParameters& params) const;
private:
// helper function: reads the command corresponding to the specified verb
// from the registry (returns an empty string if not found)
wxString GetCommand(const wxString& verb) const;
// get the registry path for the given verb
wxString GetVerbPath(const wxString& verb) const;
// check that the registry key for our extension exists, create it if it
// doesn't, return false if this failed
bool EnsureExtKeyExists();
wxString m_strFileType, // may be empty
m_ext;
bool m_suppressNotify;
// these methods are not publicly accessible (as wxMimeTypesManager
// doesn't know about them), and should only be called by Unassociate
bool RemoveOpenCommand();
bool RemoveCommand(const wxString& verb);
bool RemoveMimeType();
bool RemoveDefaultIcon();
bool RemoveDescription();
};
class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl
{
public:
// nothing to do here, we don't load any data but just go and fetch it from
// the registry when asked for
wxMimeTypesManagerImpl() { }
// implement containing class functions
wxFileType *GetFileTypeFromExtension(const wxString& ext);
wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext);
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
size_t EnumAllFileTypes(wxArrayString& mimetypes);
// create a new filetype association
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
// create a new filetype with the given name and extension
wxFileType *CreateFileType(const wxString& filetype, const wxString& ext);
};
#endif // wxUSE_MIMETYPE
#endif
//_MIMETYPE_IMPL_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/colordlg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/colordlg.h
// Purpose: wxColourDialog class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLORDLG_H_
#define _WX_COLORDLG_H_
#include "wx/dialog.h"
// ----------------------------------------------------------------------------
// wxColourDialog: dialog for choosing a colours
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog
{
public:
wxColourDialog() { Init(); }
wxColourDialog(wxWindow *parent, wxColourData *data = NULL)
{
Init();
Create(parent, data);
}
bool Create(wxWindow *parent, wxColourData *data = NULL);
wxColourData& GetColourData() { return m_colourData; }
// override some base class virtuals
virtual void SetTitle(const wxString& title) wxOVERRIDE;
virtual wxString GetTitle() const wxOVERRIDE;
virtual int ShowModal() wxOVERRIDE;
// wxMSW-specific implementation from now on
// -----------------------------------------
// called from the hook procedure on WM_INITDIALOG reception
virtual void MSWOnInitDone(WXHWND hDlg);
protected:
// common part of all ctors
void Init();
virtual void DoGetPosition( int *x, int *y ) const wxOVERRIDE;
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE;
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
virtual void DoCentre(int dir) wxOVERRIDE;
wxColourData m_colourData;
wxString m_title;
// indicates that the dialog should be centered in this direction if non 0
// (set by DoCentre(), used by MSWOnInitDone())
int m_centreDir;
// true if DoMoveWindow() had been called
bool m_movedWindow;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxColourDialog);
};
#endif // _WX_COLORDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/button.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/button.h
// Purpose: wxButton class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_BUTTON_H_
#define _WX_MSW_BUTTON_H_
// ----------------------------------------------------------------------------
// Pushbutton
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
{
public:
wxButton() { Init(); }
wxButton(wxWindow *parent,
wxWindowID id,
const wxString& label = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Init();
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& label = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~wxButton();
virtual wxWindow *SetDefault() wxOVERRIDE;
// implementation from now on
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
protected:
// send a notification event, return true if processed
bool SendClickEvent();
// default button handling
void SetTmpDefault();
void UnsetTmpDefault();
// set or unset BS_DEFPUSHBUTTON style
static void SetDefaultStyle(wxButton *btn, bool on);
virtual bool DoGetAuthNeeded() const wxOVERRIDE;
virtual void DoSetAuthNeeded(bool show) wxOVERRIDE;
// true if the UAC symbol is shown
bool m_authNeeded;
private:
void Init()
{
m_authNeeded = false;
}
void OnCharHook(wxKeyEvent& event);
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton);
};
#endif // _WX_MSW_BUTTON_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/treectrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/treectrl.h
// Purpose: wxTreeCtrl class
// Author: Julian Smart
// Modified by: Vadim Zeitlin to be less MSW-specific on 10/10/98
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_TREECTRL_H_
#define _WX_MSW_TREECTRL_H_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#if wxUSE_TREECTRL
#include "wx/textctrl.h"
#include "wx/dynarray.h"
#include "wx/treebase.h"
#include "wx/hashmap.h"
#ifdef __GNUWIN32__
// Cygwin windows.h defines these identifiers
#undef GetFirstChild
#undef GetNextSibling
#endif // Cygwin
// fwd decl
class WXDLLIMPEXP_FWD_CORE wxImageList;
class WXDLLIMPEXP_FWD_CORE wxDragImage;
struct WXDLLIMPEXP_FWD_CORE wxTreeViewItem;
// hash storing attributes for our items
class wxItemAttr;
WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxItemAttr *, wxMapTreeAttr);
// ----------------------------------------------------------------------------
// wxTreeCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTreeCtrl : public wxTreeCtrlBase
{
public:
// creation
// --------
wxTreeCtrl() { Init(); }
wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTreeCtrlNameStr)
{
Create(parent, id, pos, size, style, validator, name);
}
virtual ~wxTreeCtrl();
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTreeCtrlNameStr);
// implement base class pure virtuals
// ----------------------------------
virtual unsigned int GetCount() const wxOVERRIDE;
virtual unsigned int GetIndent() const wxOVERRIDE;
virtual void SetIndent(unsigned int indent) wxOVERRIDE;
virtual void SetImageList(wxImageList *imageList) wxOVERRIDE;
virtual void SetStateImageList(wxImageList *imageList) wxOVERRIDE;
virtual wxString GetItemText(const wxTreeItemId& item) const wxOVERRIDE;
virtual int GetItemImage(const wxTreeItemId& item,
wxTreeItemIcon which = wxTreeItemIcon_Normal) const wxOVERRIDE;
virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxColour GetItemTextColour(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxFont GetItemFont(const wxTreeItemId& item) const wxOVERRIDE;
virtual void SetItemText(const wxTreeItemId& item, const wxString& text) wxOVERRIDE;
virtual void SetItemImage(const wxTreeItemId& item, int image,
wxTreeItemIcon which = wxTreeItemIcon_Normal) wxOVERRIDE;
virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data) wxOVERRIDE;
virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true) wxOVERRIDE;
virtual void SetItemBold(const wxTreeItemId& item, bool bold = true) wxOVERRIDE;
virtual void SetItemDropHighlight(const wxTreeItemId& item,
bool highlight = true) wxOVERRIDE;
virtual void SetItemTextColour(const wxTreeItemId& item,
const wxColour& col) wxOVERRIDE;
virtual void SetItemBackgroundColour(const wxTreeItemId& item,
const wxColour& col) wxOVERRIDE;
virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font) wxOVERRIDE;
// item status inquiries
// ---------------------
virtual bool IsVisible(const wxTreeItemId& item) const wxOVERRIDE;
virtual bool ItemHasChildren(const wxTreeItemId& item) const wxOVERRIDE;
virtual bool IsExpanded(const wxTreeItemId& item) const wxOVERRIDE;
virtual bool IsSelected(const wxTreeItemId& item) const wxOVERRIDE;
virtual bool IsBold(const wxTreeItemId& item) const wxOVERRIDE;
virtual size_t GetChildrenCount(const wxTreeItemId& item,
bool recursively = true) const wxOVERRIDE;
// navigation
// ----------
virtual wxTreeItemId GetRootItem() const wxOVERRIDE;
virtual wxTreeItemId GetSelection() const wxOVERRIDE;
virtual size_t GetSelections(wxArrayTreeItemIds& selections) const wxOVERRIDE;
virtual wxTreeItemId GetFocusedItem() const wxOVERRIDE;
virtual void ClearFocusedItem() wxOVERRIDE;
virtual void SetFocusedItem(const wxTreeItemId& item) wxOVERRIDE;
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
wxTreeItemIdValue& cookie) const wxOVERRIDE;
virtual wxTreeItemId GetNextChild(const wxTreeItemId& item,
wxTreeItemIdValue& cookie) const wxOVERRIDE;
virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxTreeItemId GetFirstVisibleItem() const wxOVERRIDE;
virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const wxOVERRIDE;
virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const wxOVERRIDE;
// operations
// ----------
virtual wxTreeItemId AddRoot(const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL) wxOVERRIDE;
virtual void Delete(const wxTreeItemId& item) wxOVERRIDE;
virtual void DeleteChildren(const wxTreeItemId& item) wxOVERRIDE;
virtual void DeleteAllItems() wxOVERRIDE;
virtual void Expand(const wxTreeItemId& item) wxOVERRIDE;
virtual void Collapse(const wxTreeItemId& item) wxOVERRIDE;
virtual void CollapseAndReset(const wxTreeItemId& item) wxOVERRIDE;
virtual void Toggle(const wxTreeItemId& item) wxOVERRIDE;
virtual void Unselect() wxOVERRIDE;
virtual void UnselectAll() wxOVERRIDE;
virtual void SelectItem(const wxTreeItemId& item, bool select = true) wxOVERRIDE;
virtual void SelectChildren(const wxTreeItemId& parent) wxOVERRIDE;
virtual void EnsureVisible(const wxTreeItemId& item) wxOVERRIDE;
virtual void ScrollTo(const wxTreeItemId& item) wxOVERRIDE;
virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)) wxOVERRIDE;
virtual wxTextCtrl *GetEditControl() const wxOVERRIDE;
virtual void EndEditLabel(const wxTreeItemId& WXUNUSED(item),
bool discardChanges = false) wxOVERRIDE
{
DoEndEditLabel(discardChanges);
}
virtual void SortChildren(const wxTreeItemId& item) wxOVERRIDE;
virtual bool GetBoundingRect(const wxTreeItemId& item,
wxRect& rect,
bool textOnly = false) const wxOVERRIDE;
// implementation
// --------------
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE
{
return GetClassDefaultAttributes(GetWindowVariant());
}
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxOVERRIDE;
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxOVERRIDE;
virtual bool MSWShouldPreProcessMessage(WXMSG* msg) wxOVERRIDE;
// override some base class virtuals
virtual bool SetBackgroundColour(const wxColour &colour) wxOVERRIDE;
virtual bool SetForegroundColour(const wxColour &colour) wxOVERRIDE;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }
virtual bool IsDoubleBuffered() const wxOVERRIDE;
virtual void SetDoubleBuffered(bool on) wxOVERRIDE;
protected:
// Implement "update locking" in a custom way for this control.
virtual void DoFreeze() wxOVERRIDE;
virtual void DoThaw() wxOVERRIDE;
virtual bool MSWShouldSetDefaultFont() const wxOVERRIDE { return false; }
// SetImageList helper
void SetAnyImageList(wxImageList *imageList, int which);
// refresh a single item
void RefreshItem(const wxTreeItemId& item);
// end edit label
void DoEndEditLabel(bool discardChanges = false);
virtual int DoGetItemState(const wxTreeItemId& item) const wxOVERRIDE;
virtual void DoSetItemState(const wxTreeItemId& item, int state) wxOVERRIDE;
virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
size_t pos,
const wxString& text,
int image, int selectedImage,
wxTreeItemData *data) wxOVERRIDE;
virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent,
const wxTreeItemId& idPrevious,
const wxString& text,
int image = -1, int selImage = -1,
wxTreeItemData *data = NULL) wxOVERRIDE;
virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const wxOVERRIDE;
// obtain the user data for the lParam member of TV_ITEM
class wxTreeItemParam *GetItemParam(const wxTreeItemId& item) const;
// update the event to include the items client data and pass it to
// HandleWindowEvent(), return true if it processed it
bool HandleTreeEvent(wxTreeEvent& event) const;
// pass the event to HandleTreeEvent() and return true if the event was
// either unprocessed or not vetoed
bool IsTreeEventAllowed(wxTreeEvent& event) const
{
return !HandleTreeEvent(event) || event.IsAllowed();
}
// generate a wxEVT_KEY_DOWN event from the specified WPARAM/LPARAM values
// having the same meaning as for WM_KEYDOWN, return true if it was
// processed
bool MSWHandleTreeKeyDownEvent(WXWPARAM wParam, WXLPARAM lParam);
// handle a key event in a multi-selection control, should be only called
// for keys which can be used to change the selection
//
// return true if the key was processed, false otherwise
bool MSWHandleSelectionKey(unsigned vkey);
// data used only while editing the item label:
wxTextCtrl *m_textCtrl; // text control in which it is edited
wxTreeItemId m_idEdited; // the item being edited
private:
// the common part of all ctors
void Init();
// helper functions
bool DoGetItem(wxTreeViewItem *tvItem) const;
void DoSetItem(wxTreeViewItem *tvItem);
void DoExpand(const wxTreeItemId& item, int flag);
void DoSelectItem(const wxTreeItemId& item, bool select = true);
void DoUnselectItem(const wxTreeItemId& item);
void DoToggleItemSelection(const wxTreeItemId& item);
void DoUnselectAll();
void DoSelectChildren(const wxTreeItemId& parent);
void DeleteTextCtrl();
// return true if the item is the hidden root one (i.e. it's the root item
// and the tree has wxTR_HIDE_ROOT style)
bool IsHiddenRoot(const wxTreeItemId& item) const;
// check if the given flags (taken from TV_HITTESTINFO structure)
// indicate a position "on item": this is less trivial than just checking
// for TVHT_ONITEM because we consider that points to the left and right of
// item text are also "on item" when wxTR_FULL_ROW_HIGHLIGHT is used as the
// item visually spans the entire breadth of the window then
bool MSWIsOnItem(unsigned flags) const;
// Delete the given item from the native control.
bool MSWDeleteItem(const wxTreeItemId& item);
// the hash storing the items attributes (indexed by item ids)
wxMapTreeAttr m_attrs;
// true if the hash above is not empty
bool m_hasAnyAttr;
#if wxUSE_DRAGIMAGE
// used for dragging
wxDragImage *m_dragImage;
#endif
// Virtual root item, if wxTR_HIDE_ROOT is set.
void* m_pVirtualRoot;
// the starting item for selection with Shift
wxTreeItemId m_htSelStart, m_htClickedItem;
wxPoint m_ptClick;
// whether dragging has started
bool m_dragStarted;
// whether focus was lost between subsequent clicks of a single item
bool m_focusLost;
// set when we are changing selection ourselves (only used in multi
// selection mode)
bool m_changingSelection;
// whether we need to trigger a state image click event
bool m_triggerStateImageClick;
// whether we need to deselect other items on mouse up
bool m_mouseUpDeselect;
friend class wxTreeItemIndirectData;
friend class wxTreeSortHelper;
wxDECLARE_DYNAMIC_CLASS(wxTreeCtrl);
wxDECLARE_NO_COPY_CLASS(wxTreeCtrl);
};
#endif // wxUSE_TREECTRL
#endif // _WX_MSW_TREECTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/textctrl.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/textctrl.h
// Purpose: wxTextCtrl class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TEXTCTRL_H_
#define _WX_TEXTCTRL_H_
class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
{
public:
// creation
// --------
wxTextCtrl() { Init(); }
wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
{
Init();
Create(parent, id, value, pos, size, style, validator, name);
}
virtual ~wxTextCtrl();
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
// overridden wxTextEntry methods
// ------------------------------
virtual wxString GetValue() const wxOVERRIDE;
virtual wxString GetRange(long from, long to) const wxOVERRIDE;
virtual bool IsEmpty() const;
virtual void WriteText(const wxString& text) wxOVERRIDE;
virtual void AppendText(const wxString& text) wxOVERRIDE;
virtual void Clear() wxOVERRIDE;
virtual int GetLineLength(long lineNo) const wxOVERRIDE;
virtual wxString GetLineText(long lineNo) const wxOVERRIDE;
virtual int GetNumberOfLines() const wxOVERRIDE;
virtual void SetMaxLength(unsigned long len) wxOVERRIDE;
virtual void GetSelection(long *from, long *to) const wxOVERRIDE;
virtual void Redo() wxOVERRIDE;
virtual bool CanRedo() const wxOVERRIDE;
virtual void SetInsertionPointEnd() wxOVERRIDE;
virtual long GetInsertionPoint() const wxOVERRIDE;
virtual wxTextPos GetLastPosition() const wxOVERRIDE;
// implement base class pure virtuals
// ----------------------------------
virtual bool IsModified() const wxOVERRIDE;
virtual void MarkDirty() wxOVERRIDE;
virtual void DiscardEdits() wxOVERRIDE;
virtual bool EmulateKeyPress(const wxKeyEvent& event) wxOVERRIDE;
#if wxUSE_RICHEDIT
// apply text attribute to the range of text (only works with richedit
// controls)
virtual bool SetStyle(long start, long end, const wxTextAttr& style) wxOVERRIDE;
virtual bool SetDefaultStyle(const wxTextAttr& style) wxOVERRIDE;
virtual bool GetStyle(long position, wxTextAttr& style) wxOVERRIDE;
#endif // wxUSE_RICHEDIT
// translate between the position (which is just an index in the text ctrl
// considering all its contents as a single strings) and (x, y) coordinates
// which represent column and line.
virtual long XYToPosition(long x, long y) const wxOVERRIDE;
virtual bool PositionToXY(long pos, long *x, long *y) const wxOVERRIDE;
virtual void ShowPosition(long pos) wxOVERRIDE;
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const wxOVERRIDE;
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
wxTextCoord *col,
wxTextCoord *row) const wxOVERRIDE
{
return wxTextCtrlBase::HitTest(pt, col, row);
}
virtual void SetLayoutDirection(wxLayoutDirection dir) wxOVERRIDE;
virtual wxLayoutDirection GetLayoutDirection() const wxOVERRIDE;
// Caret handling (Windows only)
bool ShowNativeCaret(bool show = true);
bool HideNativeCaret() { return ShowNativeCaret(false); }
// Implementation from now on
// --------------------------
#if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
virtual void SetDropTarget(wxDropTarget *dropTarget) wxOVERRIDE;
#endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
virtual void SetWindowStyleFlag(long style) wxOVERRIDE;
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd) wxOVERRIDE;
#if wxUSE_RICHEDIT
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxOVERRIDE;
int GetRichVersion() const { return m_verRichEdit; }
bool IsRich() const { return m_verRichEdit != 0; }
// rich edit controls are not compatible with normal ones and we must set
// the colours and font for them otherwise
virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE;
virtual bool SetForegroundColour(const wxColour& colour) wxOVERRIDE;
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
#else
bool IsRich() const { return false; }
#endif // wxUSE_RICHEDIT
#if wxUSE_INKEDIT && wxUSE_RICHEDIT
bool IsInkEdit() const { return m_isInkEdit != 0; }
#else
bool IsInkEdit() const { return false; }
#endif
virtual void AdoptAttributesFromHWND() wxOVERRIDE;
virtual bool AcceptsFocusFromKeyboard() const wxOVERRIDE;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE;
// callbacks
void OnDropFiles(wxDropFilesEvent& event);
void OnChar(wxKeyEvent& event); // Process 'enter' if required
void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event);
void OnPaste(wxCommandEvent& event);
void OnUndo(wxCommandEvent& event);
void OnRedo(wxCommandEvent& event);
void OnDelete(wxCommandEvent& event);
void OnSelectAll(wxCommandEvent& event);
void OnUpdateCut(wxUpdateUIEvent& event);
void OnUpdateCopy(wxUpdateUIEvent& event);
void OnUpdatePaste(wxUpdateUIEvent& event);
void OnUpdateUndo(wxUpdateUIEvent& event);
void OnUpdateRedo(wxUpdateUIEvent& event);
void OnUpdateDelete(wxUpdateUIEvent& event);
void OnUpdateSelectAll(wxUpdateUIEvent& event);
// Show a context menu for Rich Edit controls (the standard
// EDIT control has one already)
void OnContextMenu(wxContextMenuEvent& event);
#if wxUSE_RICHEDIT
// Create context menu for RICHEDIT controls. This may be called once during
// the control's lifetime or every time the menu is shown, depending on
// implementation.
virtual wxMenu *MSWCreateContextMenu();
#endif // wxUSE_RICHEDIT
// be sure the caret remains invisible if the user
// called HideNativeCaret() before
void OnSetFocus(wxFocusEvent& event);
// intercept WM_GETDLGCODE
virtual bool MSWHandleMessage(WXLRESULT *result,
WXUINT message,
WXWPARAM wParam,
WXLPARAM lParam) wxOVERRIDE;
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg) wxOVERRIDE;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
protected:
// common part of all ctors
void Init();
// creates the control of appropriate class (plain or rich edit) with the
// styles corresponding to m_windowStyle
//
// this is used by ctor/Create() and when we need to recreate the control
// later
bool MSWCreateText(const wxString& value,
const wxPoint& pos,
const wxSize& size);
virtual void DoSetValue(const wxString &value, int flags = 0) wxOVERRIDE;
virtual wxPoint DoPositionToCoords(long pos) const wxOVERRIDE;
// return true if this control has a user-set limit on amount of text (i.e.
// the limit is due to a previous call to SetMaxLength() and not built in)
bool HasSpaceLimit(unsigned int *len) const;
#if wxUSE_RICHEDIT && !wxUSE_UNICODE
// replace the selection or the entire control contents with the given text
// in the specified encoding
bool StreamIn(const wxString& value, wxFontEncoding encoding, bool selOnly);
// get the contents of the control out as text in the given encoding
wxString StreamOut(wxFontEncoding encoding, bool selOnly = false) const;
#endif // wxUSE_RICHEDIT
// replace the contents of the selection or of the entire control with the
// given text
void DoWriteText(const wxString& text,
int flags = SetValue_SendEvent | SetValue_SelectionOnly);
// set the selection (possibly without scrolling the caret into view)
void DoSetSelection(long from, long to, int flags) wxOVERRIDE;
// get the length of the line containing the character at the given
// position
long GetLengthOfLineContainingPos(long pos) const;
// send TEXT_UPDATED event, return true if it was handled, false otherwise
bool SendUpdateEvent();
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE;
#if wxUSE_RICHEDIT
// Apply the character-related parts of wxTextAttr to the given selection
// or the entire control if start == end == -1.
//
// This function is private and should only be called for rich edit
// controls and with (from, to) already in correct order, i.e. from <= to.
bool MSWSetCharFormat(const wxTextAttr& attr, long from = -1, long to = -1);
// Same as above for paragraph-related parts of wxTextAttr. Note that this
// can only be applied to the selection as RichEdit doesn't support setting
// the paragraph styles globally.
bool MSWSetParaFormat(const wxTextAttr& attr, long from, long to);
// Send wxEVT_CONTEXT_MENU event from here if the control doesn't do it on
// its own.
void OnRightUp(wxMouseEvent& event);
// we're using RICHEDIT (and not simple EDIT) control if this field is not
// 0, it also gives the version of the RICHEDIT control being used
// (although not directly: 1 is for 1.0, 2 is for either 2.0 or 3.0 as we
// can't nor really need to distinguish between them and 4 is for 4.1)
int m_verRichEdit;
#endif // wxUSE_RICHEDIT
// number of EN_UPDATE events sent by Windows when we change the controls
// text ourselves: we want this to be exactly 1
int m_updatesCount;
private:
virtual void EnableTextChangedEvents(bool enable) wxOVERRIDE
{
m_updatesCount = enable ? -1 : -2;
}
// implement wxTextEntry pure virtual: it implements all the operations for
// the simple EDIT controls
virtual WXHWND GetEditHWND() const wxOVERRIDE { return m_hWnd; }
#if wxUSE_OLE
virtual void MSWProcessSpecialKey(wxKeyEvent& event) wxOVERRIDE;
#endif // wxUSE_OLE
void OnKeyDown(wxKeyEvent& event);
// Used by EN_MAXTEXT handler to increase the size limit (will do nothing
// if the current limit is big enough). Should never be called directly.
//
// Returns true if we increased the limit to allow entering more text,
// false if we hit the limit set by SetMaxLength() and so didn't change it.
bool AdjustSpaceLimit();
wxMenu* m_privateContextMenu;
bool m_isNativeCaretShown;
#if wxUSE_INKEDIT && wxUSE_RICHEDIT
int m_isInkEdit;
#endif
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl);
};
#endif // _WX_TEXTCTRL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/enhmeta.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/enhmeta.h
// Purpose: wxEnhMetaFile class for Win32
// Author: Vadim Zeitlin
// Modified by:
// Created: 13.01.00
// Copyright: (c) 2000 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_ENHMETA_H_
#define _WX_MSW_ENHMETA_H_
#include "wx/defs.h"
#if wxUSE_ENH_METAFILE
#include "wx/dc.h"
#include "wx/gdiobj.h"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#endif
// ----------------------------------------------------------------------------
// wxEnhMetaFile: encapsulation of Win32 HENHMETAFILE
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxEnhMetaFile : public wxGDIObject
{
public:
wxEnhMetaFile(const wxString& file = wxEmptyString) : m_filename(file)
{ Init(); }
wxEnhMetaFile(const wxEnhMetaFile& metafile) : wxGDIObject()
{ Init(); Assign(metafile); }
wxEnhMetaFile& operator=(const wxEnhMetaFile& metafile)
{ Free(); Assign(metafile); return *this; }
virtual ~wxEnhMetaFile()
{ Free(); }
// display the picture stored in the metafile on the given DC
bool Play(wxDC *dc, wxRect *rectBound = NULL);
// accessors
virtual bool IsOk() const wxOVERRIDE { return m_hMF != 0; }
wxSize GetSize() const;
int GetWidth() const { return GetSize().x; }
int GetHeight() const { return GetSize().y; }
const wxString& GetFileName() const { return m_filename; }
// copy the metafile to the clipboard: the width and height parameters are
// for backwards compatibility (with wxMetaFile) only, they are ignored by
// this method
bool SetClipboard(int width = 0, int height = 0);
// Detach the HENHMETAFILE from this object, i.e. don't delete the handle
// in the dtor -- the caller is now responsible for doing this, e.g. using
// Free() method below.
WXHANDLE Detach() { WXHANDLE h = m_hMF; m_hMF = 0; return h; }
// Destroy the given HENHMETAFILE object.
static void Free(WXHANDLE handle);
// implementation
WXHANDLE GetHENHMETAFILE() const { return m_hMF; }
void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; }
protected:
void Init();
void Free() { Free(m_hMF); }
void Assign(const wxEnhMetaFile& mf);
// we don't use these functions (but probably should) but have to implement
// them as they're pure virtual in the base class
virtual wxGDIRefData *CreateGDIRefData() const wxOVERRIDE;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const wxOVERRIDE;
private:
wxString m_filename;
WXHANDLE m_hMF;
wxDECLARE_DYNAMIC_CLASS(wxEnhMetaFile);
};
// ----------------------------------------------------------------------------
// wxEnhMetaFileDC: allows to create a wxEnhMetaFile
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxEnhMetaFileDC : public wxDC
{
public:
// the ctor parameters specify the filename (empty for memory metafiles),
// the metafile picture size and the optional description/comment
wxEnhMetaFileDC(const wxString& filename = wxEmptyString,
int width = 0, int height = 0,
const wxString& description = wxEmptyString);
// as above, but takes reference DC as first argument to take resolution,
// size, font metrics etc. from
explicit
wxEnhMetaFileDC(const wxDC& referenceDC,
const wxString& filename = wxEmptyString,
int width = 0, int height = 0,
const wxString& description = wxEmptyString);
// obtain a pointer to the new metafile (caller should delete it)
wxEnhMetaFile *Close();
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxEnhMetaFileDC);
};
#if wxUSE_DATAOBJ
// ----------------------------------------------------------------------------
// wxEnhMetaFileDataObject is a specialization of wxDataObject for enh metafile
// ----------------------------------------------------------------------------
// notice that we want to support both CF_METAFILEPICT and CF_ENHMETAFILE and
// so we derive from wxDataObject and not from wxDataObjectSimple
class WXDLLIMPEXP_CORE wxEnhMetaFileDataObject : public wxDataObject
{
public:
// ctors
wxEnhMetaFileDataObject() { }
wxEnhMetaFileDataObject(const wxEnhMetaFile& metafile)
: m_metafile(metafile) { }
// virtual functions which you may override if you want to provide data on
// demand only - otherwise, the trivial default versions will be used
virtual void SetMetafile(const wxEnhMetaFile& metafile)
{ m_metafile = metafile; }
virtual wxEnhMetaFile GetMetafile() const
{ return m_metafile; }
// implement base class pure virtuals
virtual wxDataFormat GetPreferredFormat(Direction dir) const wxOVERRIDE;
virtual size_t GetFormatCount(Direction dir) const wxOVERRIDE;
virtual void GetAllFormats(wxDataFormat *formats, Direction dir) 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;
protected:
wxEnhMetaFile m_metafile;
wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileDataObject);
};
// ----------------------------------------------------------------------------
// wxEnhMetaFileSimpleDataObject does derive from wxDataObjectSimple which
// makes it more convenient to use (it can be used with wxDataObjectComposite)
// at the price of not supoprting any more CF_METAFILEPICT but only
// CF_ENHMETAFILE
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxEnhMetaFileSimpleDataObject : public wxDataObjectSimple
{
public:
// ctors
wxEnhMetaFileSimpleDataObject() : wxDataObjectSimple(wxDF_ENHMETAFILE) { }
wxEnhMetaFileSimpleDataObject(const wxEnhMetaFile& metafile)
: wxDataObjectSimple(wxDF_ENHMETAFILE), m_metafile(metafile) { }
// virtual functions which you may override if you want to provide data on
// demand only - otherwise, the trivial default versions will be used
virtual void SetEnhMetafile(const wxEnhMetaFile& metafile)
{ m_metafile = metafile; }
virtual wxEnhMetaFile GetEnhMetafile() const
{ return m_metafile; }
// implement base class pure virtuals
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
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); }
protected:
wxEnhMetaFile m_metafile;
wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileSimpleDataObject);
};
#endif // wxUSE_DATAOBJ
#endif // wxUSE_ENH_METAFILE
#endif // _WX_MSW_ENHMETA_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ownerdrw.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ownerdrw.h
// Purpose: wxOwnerDrawn class
// Author: Marcin Malich
// Modified by:
// Created: 2009-09-22
// Copyright: (c) 2009 Marcin Malich <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OWNERDRW_H_
#define _WX_OWNERDRW_H_
#if wxUSE_OWNER_DRAWN
class WXDLLIMPEXP_CORE wxOwnerDrawn : public wxOwnerDrawnBase
{
public:
wxOwnerDrawn() {}
virtual ~wxOwnerDrawn() {}
virtual bool OnDrawItem(wxDC& dc, const wxRect& rc,
wxODAction act, wxODStatus stat) wxOVERRIDE;
};
#endif // wxUSE_OWNER_DRAWN
#endif // _WX_OWNERDRW_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/fswatcher.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/fswatcher.h
// Purpose: wxMSWFileSystemWatcher
// Author: Bartosz Bekier
// Created: 2009-05-26
// Copyright: (c) 2009 Bartosz Bekier <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FSWATCHER_MSW_H_
#define _WX_FSWATCHER_MSW_H_
#include "wx/defs.h"
#if wxUSE_FSWATCHER
class WXDLLIMPEXP_BASE wxMSWFileSystemWatcher : public wxFileSystemWatcherBase
{
public:
wxMSWFileSystemWatcher();
wxMSWFileSystemWatcher(const wxFileName& path,
int events = wxFSW_EVENT_ALL);
// Override the base class function to provide a much more efficient
// implementation for it using the platform native support for watching the
// entire directory trees.
virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
const wxString& filter = wxEmptyString) wxOVERRIDE;
protected:
bool Init();
};
#endif // wxUSE_FSWATCHER
#endif /* _WX_FSWATCHER_MSW_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/uuid.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/uuid.h
// Purpose: encapsulates an UUID with some added helper functions
// Author: Vadim Zeitlin
// Modified by:
// Created: 11.07.97
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
//
// Notes: you should link your project with RPCRT4.LIB!
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OLEUUID_H
#define _WX_OLEUUID_H
#include "wx/chartype.h"
// ------------------------------------------------------------------
// UUID (Universally Unique IDentifier) definition
// ------------------------------------------------------------------
// ----- taken from RPC.H
#ifndef UUID_DEFINED // in some cases RPC.H will be already
typedef struct
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} UUID; // UUID = GUID = CLSID = LIBID = IID
#endif // UUID_DEFINED
#ifndef GUID_DEFINED
typedef UUID GUID;
#define UUID_DEFINED // prevent redefinition
#endif // GUID_DEFINED
typedef unsigned char uchar;
// ------------------------------------------------------------------
// a class to store UUID and it's string representation
// ------------------------------------------------------------------
// uses RPC functions to create/convert Universally Unique Identifiers
class WXDLLIMPEXP_CORE Uuid
{
private:
UUID m_uuid;
wxUChar *m_pszUuid; // this string is alloc'd and freed by RPC
wxChar *m_pszCForm; // this string is allocated in Set/Create
void UuidToCForm();
// function used to set initial state by all ctors
void Init() { m_pszUuid = NULL; m_pszCForm = NULL; }
public:
// ctors & dtor
Uuid() { Init(); }
Uuid(const wxChar *pc) { Init(); Set(pc); }
Uuid(const UUID &uuid) { Init(); Set(uuid); }
~Uuid();
// copy ctor and assignment operator needed for this class
Uuid(const Uuid& uuid);
Uuid& operator=(const Uuid& uuid);
// create a brand new UUID
void Create();
// set value of UUID
bool Set(const wxChar *pc); // from a string, returns true if ok
void Set(const UUID& uuid); // from another UUID (never fails)
// comparison operators
bool operator==(const Uuid& uuid) const;
bool operator!=(const Uuid& uuid) const { return !(*this == uuid); }
// accessors
operator const UUID*() const { return &m_uuid; }
operator const wxChar*() const { return (wxChar *)(m_pszUuid); }
// return string representation of the UUID in the C form
// (as in DEFINE_GUID macro)
const wxChar *CForm() const { return m_pszCForm; }
};
#endif //_WX_OLEUUID_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/activex.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/activex.h
// Purpose: wxActiveXContainer class
// Author: Ryan Norton <[email protected]>
// Modified by:
// Created: 8/18/05
// Copyright: (c) Ryan Norton
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// Definitions
// ============================================================================
#ifndef _WX_MSW_OLE_ACTIVEXCONTAINER_H_
#define _WX_MSW_OLE_ACTIVEXCONTAINER_H_
#if wxUSE_ACTIVEX
//---------------------------------------------------------------------------
// wx includes
//---------------------------------------------------------------------------
#include "wx/msw/ole/oleutils.h" // wxBasicString &c
#include "wx/msw/ole/uuid.h"
#include "wx/window.h"
#include "wx/variant.h"
class FrameSite;
//---------------------------------------------------------------------------
// MSW COM includes
//---------------------------------------------------------------------------
#include <oleidl.h>
#include <olectl.h>
#include <exdisp.h>
#include <docobj.h>
#ifndef STDMETHOD
#define STDMETHOD(funcname) virtual HRESULT wxSTDCALL funcname
#endif
//
// These defines are from another ole header - but its not in the
// latest sdk. Also the ifndef DISPID_READYSTATE is here because at
// least on my machine with the latest sdk olectl.h defines these 3
//
#ifndef DISPID_READYSTATE
#define DISPID_READYSTATE (-525)
#define DISPID_READYSTATECHANGE (-609)
#define DISPID_AMBIENT_TRANSFERPRIORITY (-728)
#endif
#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED (-5501)
#define DISPID_AMBIENT_SILENT (-5502)
#ifndef DISPID_AMBIENT_CODEPAGE
#define DISPID_AMBIENT_CODEPAGE (-725)
#define DISPID_AMBIENT_CHARSET (-727)
#endif
//---------------------------------------------------------------------------
//
// wxActiveXContainer
//
//---------------------------------------------------------------------------
template<typename I>
class wxAutoOleInterface
{
public:
typedef I Interface;
explicit wxAutoOleInterface(I *pInterface = NULL) : m_interface(pInterface)
{}
wxAutoOleInterface(REFIID riid, IUnknown *pUnk) : m_interface(NULL)
{ QueryInterface(riid, pUnk); }
wxAutoOleInterface(REFIID riid, IDispatch *pDispatch) : m_interface(NULL)
{ QueryInterface(riid, pDispatch); }
wxAutoOleInterface(REFCLSID clsid, REFIID riid) : m_interface(NULL)
{ CreateInstance(clsid, riid); }
wxAutoOleInterface(const wxAutoOleInterface& ti) : m_interface(NULL)
{ operator=(ti); }
wxAutoOleInterface& operator=(const wxAutoOleInterface& ti)
{
if ( ti.m_interface )
ti.m_interface->AddRef();
Free();
m_interface = ti.m_interface;
return *this;
}
wxAutoOleInterface& operator=(I*& ti)
{
Free();
m_interface = ti;
return *this;
}
~wxAutoOleInterface() { Free(); }
void Free()
{
if ( m_interface )
m_interface->Release();
m_interface = NULL;
}
HRESULT QueryInterface(REFIID riid, IUnknown *pUnk)
{
Free();
wxASSERT(pUnk != NULL);
return pUnk->QueryInterface(riid, (void **)&m_interface);
}
HRESULT CreateInstance(REFCLSID clsid, REFIID riid)
{
Free();
return CoCreateInstance
(
clsid,
NULL,
CLSCTX_ALL,
riid,
(void **)&m_interface
);
}
operator I*() const {return m_interface; }
I* operator->() {return m_interface; }
I** GetRef() {return &m_interface; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_interface != NULL; }
protected:
I *m_interface;
};
#if WXWIN_COMPATIBILITY_2_8
// this macro is kept for compatibility with older wx versions
#define WX_DECLARE_AUTOOLE(wxAutoOleInterfaceType, I) \
typedef wxAutoOleInterface<I> wxAutoOleInterfaceType;
#endif // WXWIN_COMPATIBILITY_2_8
typedef wxAutoOleInterface<IDispatch> wxAutoIDispatch;
typedef wxAutoOleInterface<IOleClientSite> wxAutoIOleClientSite;
typedef wxAutoOleInterface<IUnknown> wxAutoIUnknown;
typedef wxAutoOleInterface<IOleObject> wxAutoIOleObject;
typedef wxAutoOleInterface<IOleInPlaceObject> wxAutoIOleInPlaceObject;
typedef wxAutoOleInterface<IOleInPlaceActiveObject> wxAutoIOleInPlaceActiveObject;
typedef wxAutoOleInterface<IOleDocumentView> wxAutoIOleDocumentView;
typedef wxAutoOleInterface<IViewObject> wxAutoIViewObject;
class WXDLLIMPEXP_CORE wxActiveXContainer : public wxWindow
{
public:
wxActiveXContainer(wxWindow * parent, REFIID iid, IUnknown* pUnk);
virtual ~wxActiveXContainer();
void OnSize(wxSizeEvent&);
void OnPaint(wxPaintEvent&);
void OnSetFocus(wxFocusEvent&);
void OnKillFocus(wxFocusEvent&);
virtual bool MSWTranslateMessage(WXMSG* pMsg) wxOVERRIDE;
virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc);
protected:
friend class FrameSite;
friend class wxActiveXEvents;
FrameSite *m_frameSite;
wxAutoIDispatch m_Dispatch;
wxAutoIOleClientSite m_clientSite;
wxAutoIUnknown m_ActiveX;
wxAutoIOleObject m_oleObject;
wxAutoIOleInPlaceObject m_oleInPlaceObject;
wxAutoIOleInPlaceActiveObject m_oleInPlaceActiveObject;
wxAutoIOleDocumentView m_docView;
wxAutoIViewObject m_viewObject;
HWND m_oleObjectHWND;
bool m_bAmbientUserMode;
DWORD m_docAdviseCookie;
wxWindow* m_realparent;
void CreateActiveX(REFIID, IUnknown*);
};
///\brief Store native event parameters.
///\detail Store OLE 'Invoke' parameters for event handlers that need to access them.
/// These are the exact values for the event as they are passed to the wxActiveXContainer.
struct wxActiveXEventNativeMSW
{
DISPID dispIdMember;
REFIID riid;
LCID lcid;
WORD wFlags;
DISPPARAMS *pDispParams;
VARIANT *pVarResult;
EXCEPINFO *pExcepInfo;
unsigned int *puArgErr;
wxActiveXEventNativeMSW
(DISPID a_dispIdMember, REFIID a_riid, LCID a_lcid, WORD a_wFlags, DISPPARAMS *a_pDispParams,
VARIANT *a_pVarResult, EXCEPINFO *a_pExcepInfo, unsigned int *a_puArgErr)
:dispIdMember(a_dispIdMember), riid(a_riid), lcid(a_lcid), wFlags(a_wFlags), pDispParams(a_pDispParams),
pVarResult(a_pVarResult), pExcepInfo(a_pExcepInfo), puArgErr(a_puArgErr)
{ }
};
// Events
class WXDLLIMPEXP_CORE wxActiveXEvent : public wxCommandEvent
{
private:
friend class wxActiveXEvents;
wxVariant m_params;
DISPID m_dispid;
public:
virtual wxEvent *Clone() const wxOVERRIDE
{ return new wxActiveXEvent(*this); }
size_t ParamCount() const;
wxString ParamType(size_t idx) const
{
wxASSERT(idx < ParamCount());
return m_params[idx].GetType();
}
wxString ParamName(size_t idx) const
{
wxASSERT(idx < ParamCount());
return m_params[idx].GetName();
}
wxVariant& operator[] (size_t idx);
DISPID GetDispatchId() const
{ return m_dispid; }
wxActiveXEventNativeMSW *GetNativeParameters() const
{ return (wxActiveXEventNativeMSW*)GetClientData(); }
};
// #define wxACTIVEX_ID 14001
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_ACTIVEX, wxActiveXEvent );
typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&);
#define wxActiveXEventHandler(func) \
wxEVENT_HANDLER_CAST( wxActiveXEventFunction, func )
#define EVT_ACTIVEX(id, fn) wxDECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), NULL ),
#endif // wxUSE_ACTIVEX
#endif // _WX_MSW_OLE_ACTIVEXCONTAINER_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/access.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/access.h
// Purpose: declaration of the wxAccessible class
// Author: Julian Smart
// Modified by:
// Created: 2003-02-12
// Copyright: (c) 2003 Julian Smart
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCESS_H_
#define _WX_ACCESS_H_
#if wxUSE_ACCESSIBILITY
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
struct IAccessible;
class wxIAccessible;
class WXDLLIMPEXP_FWD_CORE wxWindow;
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxAccessible implements accessibility behaviour.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxAccessible : public wxAccessibleBase
{
public:
wxAccessible(wxWindow *win = NULL);
virtual ~wxAccessible();
// Overridables
// Accessors
// Returns the wxIAccessible pointer
wxIAccessible* GetIAccessible() { return m_pIAccessible; }
// Returns the IAccessible standard interface pointer
IAccessible* GetIAccessibleStd();
// Operations
// Sends an event when something changes in an accessible object.
static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
int objectId);
protected:
void Init();
private:
wxIAccessible * m_pIAccessible; // the pointer to COM interface
IAccessible* m_pIAccessibleStd; // the pointer to the standard COM interface,
// for default processing
wxDECLARE_NO_COPY_CLASS(wxAccessible);
};
#endif //wxUSE_ACCESSIBILITY
#endif //_WX_ACCESS_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/dataobj2.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/dataobj2.h
// Purpose: second part of platform specific wxDataObject header -
// declarations of predefined wxDataObjectSimple-derived classes
// Author: Vadim Zeitlin
// Modified by:
// Created: 21.10.99
// Copyright: (c) 1999 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_OLE_DATAOBJ2_H
#define _WX_MSW_OLE_DATAOBJ2_H
// ----------------------------------------------------------------------------
// wxBitmapDataObject is a specialization of wxDataObject for bitmap data
//
// NB: in fact, under MSW we support CF_DIB (and not CF_BITMAP) clipboard
// format and we also provide wxBitmapDataObject2 for CF_BITMAP (which is
// rarely used). This is ugly, but I haven't found a solution for it yet.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase
{
public:
// ctors
wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap)
: wxBitmapDataObjectBase(bitmap)
{
SetFormat(wxDF_DIB);
m_data = NULL;
}
// implement base class pure virtuals
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
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 DIB data
void /* BITMAPINFO */ *m_data;
wxDECLARE_NO_COPY_CLASS(wxBitmapDataObject);
};
// ----------------------------------------------------------------------------
// wxBitmapDataObject2 - a data object for CF_BITMAP
//
// FIXME did I already mention it was ugly?
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapDataObject2 : public wxBitmapDataObjectBase
{
public:
// ctors
wxBitmapDataObject2(const wxBitmap& bitmap = wxNullBitmap)
: wxBitmapDataObjectBase(bitmap)
{
}
// implement base class pure virtuals
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
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:
wxDECLARE_NO_COPY_CLASS(wxBitmapDataObject2);
};
// ----------------------------------------------------------------------------
// wxFileDataObject - data object for CF_HDROP
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase
{
public:
wxFileDataObject() { }
// implement base class pure virtuals
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *pData) const wxOVERRIDE;
virtual void AddFile(const wxString& file);
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:
wxDECLARE_NO_COPY_CLASS(wxFileDataObject);
};
// ----------------------------------------------------------------------------
// wxURLDataObject: data object for URLs
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectComposite
{
public:
// initialize with URL in ctor or use SetURL later
wxURLDataObject(const wxString& url = wxEmptyString);
// return the URL as string
wxString GetURL() const;
// Set a string as the URL in the data object
void SetURL(const wxString& url);
// override to set m_textFormat
virtual bool SetData(const wxDataFormat& format,
size_t len,
const void *buf) wxOVERRIDE;
private:
// last data object we got data in
wxDataObjectSimple *m_dataObjectLast;
wxDECLARE_NO_COPY_CLASS(wxURLDataObject);
};
#endif // _WX_MSW_OLE_DATAOBJ2_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/dataform.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/dataform.h
// Purpose: declaration of the wxDataFormat class
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.10.99 (extracted from msw/ole/dataobj.h)
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_OLE_DATAFORM_H
#define _WX_MSW_OLE_DATAFORM_H
// ----------------------------------------------------------------------------
// wxDataFormat identifies the single format of data
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDataFormat
{
public:
// the clipboard formats under Win32 are WORD's
typedef unsigned short NativeFormat;
wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
// we need constructors from all string types as implicit conversions to
// wxString don't apply when we already rely on implicit conversion of a,
// for example, "char *" string to wxDataFormat, and existing code does it
wxDataFormat(const wxString& format) { SetId(format); }
wxDataFormat(const char *format) { SetId(format); }
wxDataFormat(const wchar_t *format) { SetId(format); }
wxDataFormat(const wxCStrData& format) { SetId(format); }
wxDataFormat& operator=(NativeFormat format)
{ m_format = format; return *this; }
wxDataFormat& operator=(const wxDataFormat& format)
{ m_format = format.m_format; return *this; }
// default copy ctor/assignment operators ok
// comparison (must have both versions)
bool operator==(wxDataFormatId format) const;
bool operator!=(wxDataFormatId format) const;
bool operator==(const wxDataFormat& format) const;
bool operator!=(const wxDataFormat& format) const;
// explicit and implicit conversions to NativeFormat which is one of
// standard data types (implicit conversion is useful for preserving the
// compatibility with old code)
NativeFormat GetFormatId() const { return m_format; }
operator NativeFormat() const { return m_format; }
// this works with standard as well as custom ids
void SetType(NativeFormat format) { m_format = format; }
NativeFormat GetType() const { return m_format; }
// string ids are used for custom types - this SetId() must be used for
// application-specific formats
wxString GetId() const;
void SetId(const wxString& format);
// returns true if the format is one of those defined in wxDataFormatId
bool IsStandard() const { return m_format > 0 && m_format < wxDF_PRIVATE; }
private:
NativeFormat m_format;
};
#endif // _WX_MSW_OLE_DATAFORM_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/comimpl.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/comimpl.h
// Purpose: COM helper routines, COM debugging support &c
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.02.1998
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef WX_COMIMPL_H
#define WX_COMIMPL_H
#include "wx/defs.h"
#include "wx/msw/wrapwin.h"
// get IUnknown, REFIID &c
#include <objbase.h>
// ============================================================================
// General purpose functions and macros
// ============================================================================
// release the interface pointer (if !NULL)
inline void ReleaseInterface(IUnknown *pIUnk)
{
if ( pIUnk != NULL )
pIUnk->Release();
}
// release the interface pointer (if !NULL) and make it NULL
#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; };
// return true if the iid is in the array
extern WXDLLIMPEXP_CORE bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
// ============================================================================
// IUnknown implementation helpers
// ============================================================================
/*
The most dumb implementation of IUnknown methods. We don't support
aggregation nor containment, but for 99% of cases this simple
implementation is quite enough.
Usage is trivial: here is all you should have
1) DECLARE_IUNKNOWN_METHODS in your (IUnknown derived!) class declaration
2) BEGIN/END_IID_TABLE with ADD_IID in between for all interfaces you
support (at least all for which you intent to return 'this' from QI,
i.e. you should derive from IFoo if you have ADD_IID(Foo)) somewhere else
3) IMPLEMENT_IUNKNOWN_METHODS somewhere also
These macros are quite simple: AddRef and Release are trivial and QI does
lookup in a static member array of IIDs and returns 'this' if it founds
the requested interface in it or E_NOINTERFACE if not.
*/
/*
wxAutoULong: this class is used for automatically initalising m_cRef to 0
*/
class wxAutoULong
{
public:
wxAutoULong(ULONG value = 0) : m_Value(value) { }
operator ULONG&() { return m_Value; }
ULONG& operator=(ULONG value) { m_Value = value; return m_Value; }
wxAutoULong& operator++() { ++m_Value; return *this; }
const wxAutoULong operator++( int ) { wxAutoULong temp = *this; ++m_Value; return temp; }
wxAutoULong& operator--() { --m_Value; return *this; }
const wxAutoULong operator--( int ) { wxAutoULong temp = *this; --m_Value; return temp; }
private:
ULONG m_Value;
};
// declare the methods and the member variable containing reference count
// you must also define the ms_aIids array somewhere with BEGIN_IID_TABLE
// and friends (see below)
#define DECLARE_IUNKNOWN_METHODS \
public: \
STDMETHODIMP QueryInterface(REFIID, void **) wxOVERRIDE; \
STDMETHODIMP_(ULONG) AddRef() wxOVERRIDE; \
STDMETHODIMP_(ULONG) Release() wxOVERRIDE; \
private: \
static const IID *ms_aIids[]; \
wxAutoULong m_cRef
// macros for declaring supported interfaces
// NB: ADD_IID prepends IID_I whereas ADD_RAW_IID does not
#define BEGIN_IID_TABLE(cname) const IID *cname::ms_aIids[] = {
#define ADD_IID(iid) &IID_I##iid,
#define ADD_RAW_IID(iid) &iid,
#define END_IID_TABLE }
// implementation is as straightforward as possible
// Parameter: classname - the name of the class
#define IMPLEMENT_IUNKNOWN_METHODS(classname) \
STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \
{ \
wxLogQueryInterface(wxT(#classname), riid); \
\
if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \
*ppv = this; \
AddRef(); \
\
return S_OK; \
} \
else { \
*ppv = NULL; \
\
return (HRESULT) E_NOINTERFACE; \
} \
} \
\
STDMETHODIMP_(ULONG) classname::AddRef() \
{ \
wxLogAddRef(wxT(#classname), m_cRef); \
\
return ++m_cRef; \
} \
\
STDMETHODIMP_(ULONG) classname::Release() \
{ \
wxLogRelease(wxT(#classname), m_cRef); \
\
if ( --m_cRef == wxAutoULong(0) ) { \
delete this; \
return 0; \
} \
else \
return m_cRef; \
}
// ============================================================================
// Debugging support
// ============================================================================
// VZ: I don't know it's not done for compilers other than VC++ but I leave it
// as is. Please note, though, that tracing COM interface calls may be
// incredibly useful when debugging COM programs.
#if defined(__WXDEBUG__) && defined(__VISUALC__)
// ----------------------------------------------------------------------------
// All COM specific log functions have DebugTrace level (as LogTrace)
// ----------------------------------------------------------------------------
// tries to translate riid into a symbolic name, if possible
WXDLLIMPEXP_CORE void wxLogQueryInterface(const wxChar *szInterface, REFIID riid);
// these functions print out the new value of reference counter
WXDLLIMPEXP_CORE void wxLogAddRef (const wxChar *szInterface, ULONG cRef);
WXDLLIMPEXP_CORE void wxLogRelease(const wxChar *szInterface, ULONG cRef);
#else //!__WXDEBUG__
#define wxLogQueryInterface(szInterface, riid)
#define wxLogAddRef(szInterface, cRef)
#define wxLogRelease(szInterface, cRef)
#endif //__WXDEBUG__
#endif // WX_COMIMPL_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/droptgt.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/droptgt.h
// Purpose: declaration of the wxDropTarget class
// Author: Vadim Zeitlin
// Modified by:
// Created: 06.03.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OLEDROPTGT_H
#define _WX_OLEDROPTGT_H
#if wxUSE_DRAG_AND_DROP
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class wxIDropTarget;
struct wxIDropTargetHelper;
struct IDataObject;
// ----------------------------------------------------------------------------
// An instance of the class wxDropTarget may be associated with any wxWindow
// derived object via SetDropTarget() function. If this is done, the virtual
// methods of wxDropTarget are called when something is dropped on the window.
//
// Note that wxDropTarget is an abstract base class (ABC) and you should derive
// your own class from it implementing pure virtual function in order to use it
// (all of them, including protected ones which are called by the class itself)
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase
{
public:
// ctor & dtor
wxDropTarget(wxDataObject *dataObject = NULL);
virtual ~wxDropTarget();
// normally called by wxWindow on window creation/destruction, but might be
// called `manually' as well. Register() returns true on success.
bool Register(WXHWND hwnd);
void Revoke(WXHWND hwnd);
// provide default implementation for base class pure virtuals
virtual bool OnDrop(wxCoord x, wxCoord y) wxOVERRIDE;
virtual bool GetData() wxOVERRIDE;
// Can only be called during OnXXX methods.
wxDataFormat GetMatchingPair();
// implementation only from now on
// -------------------------------
// do we accept this kind of data?
bool MSWIsAcceptedData(IDataObject *pIDataSource) const;
// give us the data source from IDropTarget::Drop() - this is later used by
// GetData() when it's called from inside OnData()
void MSWSetDataSource(IDataObject *pIDataSource);
// These functions take care of all things necessary to support native drag
// images.
//
// {Init,End}DragImageSupport() are called during Register/Revoke,
// UpdateDragImageOnXXX() functions are called on the corresponding drop
// target events.
void MSWInitDragImageSupport();
void MSWEndDragImageSupport();
void MSWUpdateDragImageOnData(wxCoord x, wxCoord y, wxDragResult res);
void MSWUpdateDragImageOnDragOver(wxCoord x, wxCoord y, wxDragResult res);
void MSWUpdateDragImageOnEnter(wxCoord x, wxCoord y, wxDragResult res);
void MSWUpdateDragImageOnLeave();
private:
// helper used by IsAcceptedData() and GetData()
wxDataFormat MSWGetSupportedFormat(IDataObject *pIDataSource) const;
wxIDropTarget *m_pIDropTarget; // the pointer to our COM interface
IDataObject *m_pIDataSource; // the pointer to the source data object
wxIDropTargetHelper *m_dropTargetHelper; // the drop target helper
wxDECLARE_NO_COPY_CLASS(wxDropTarget);
};
#endif //wxUSE_DRAG_AND_DROP
#endif //_WX_OLEDROPTGT_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/oleutils.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/oleutils.h
// Purpose: OLE helper routines, OLE debugging support &c
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.02.1998
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OLEUTILS_H
#define _WX_OLEUTILS_H
#include "wx/defs.h"
#if wxUSE_OLE
// ole2.h includes windows.h, so include wrapwin.h first
#include "wx/msw/wrapwin.h"
// get IUnknown, REFIID &c
#include <ole2.h>
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/variant.h"
#include "wx/msw/ole/comimpl.h"
// ============================================================================
// General purpose functions and macros
// ============================================================================
// ----------------------------------------------------------------------------
// initialize/cleanup OLE
// ----------------------------------------------------------------------------
// call OleInitialize() or CoInitialize[Ex]() depending on the platform
//
// return true if ok, false otherwise
inline bool wxOleInitialize()
{
const HRESULT
hr = ::OleInitialize(NULL);
// RPC_E_CHANGED_MODE indicates that OLE had been already initialized
// before, albeit with different mode. Don't consider it to be an error as
// we don't actually care ourselves about the mode used so this allows the
// main application to call OleInitialize() on its own before we do if it
// needs non-default mode.
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
{
wxLogError(wxGetTranslation("Cannot initialize OLE"));
return false;
}
return true;
}
inline void wxOleUninitialize()
{
::OleUninitialize();
}
// wrapper around BSTR type (by Vadim Zeitlin)
class WXDLLIMPEXP_CORE wxBasicString
{
public:
// Constructs with the owned BSTR set to NULL
wxBasicString() : m_bstrBuf(NULL) {}
// Constructs with the owned BSTR created from a wxString
wxBasicString(const wxString& str)
: m_bstrBuf(SysAllocString(str.wc_str(*wxConvCurrent))) {}
// Constructs with the owned BSTR as a copy of the BSTR owned by bstr
wxBasicString(const wxBasicString& bstr) : m_bstrBuf(bstr.Copy()) {}
// Frees the owned BSTR
~wxBasicString() { SysFreeString(m_bstrBuf); }
// Creates the owned BSTR from a wxString
void AssignFromString(const wxString& str);
// Returns the owned BSTR and gives up its ownership,
// the caller is responsible for freeing it
BSTR Detach();
// Returns a copy of the owned BSTR,
// the caller is responsible for freeing it
BSTR Copy() const { return SysAllocString(m_bstrBuf); }
// Returns the address of the owned BSTR, not to be called
// when wxBasicString already contains a non-NULL BSTR
BSTR* ByRef();
// Sets its BSTR to a copy of the BSTR owned by bstr
wxBasicString& operator=(const wxBasicString& bstr);
/// Returns the owned BSTR while keeping its ownership
operator BSTR() const { return m_bstrBuf; }
// retrieve a copy of our string - caller must SysFreeString() it later!
wxDEPRECATED_MSG("use Copy() instead")
BSTR Get() const { return Copy(); }
private:
// actual string
BSTR m_bstrBuf;
};
#if wxUSE_VARIANT
// Convert variants
class WXDLLIMPEXP_FWD_BASE wxVariant;
// wrapper for CURRENCY type used in VARIANT (VARIANT.vt == VT_CY)
class WXDLLIMPEXP_CORE wxVariantDataCurrency : public wxVariantData
{
public:
wxVariantDataCurrency() { VarCyFromR8(0.0, &m_value); }
wxVariantDataCurrency(CURRENCY value) { m_value = value; }
CURRENCY GetValue() const { return m_value; }
void SetValue(CURRENCY value) { m_value = value; }
virtual bool Eq(wxVariantData& data) const wxOVERRIDE;
#if wxUSE_STD_IOSTREAM
virtual bool Write(wxSTD ostream& str) const wxOVERRIDE;
#endif
virtual bool Write(wxString& str) const wxOVERRIDE;
wxVariantData* Clone() const wxOVERRIDE { return new wxVariantDataCurrency(m_value); }
virtual wxString GetType() const wxOVERRIDE { return wxS("currency"); }
DECLARE_WXANY_CONVERSION()
private:
CURRENCY m_value;
};
// wrapper for SCODE type used in VARIANT (VARIANT.vt == VT_ERROR)
class WXDLLIMPEXP_CORE wxVariantDataErrorCode : public wxVariantData
{
public:
wxVariantDataErrorCode(SCODE value = S_OK) { m_value = value; }
SCODE GetValue() const { return m_value; }
void SetValue(SCODE value) { m_value = value; }
virtual bool Eq(wxVariantData& data) const wxOVERRIDE;
#if wxUSE_STD_IOSTREAM
virtual bool Write(wxSTD ostream& str) const wxOVERRIDE;
#endif
virtual bool Write(wxString& str) const wxOVERRIDE;
wxVariantData* Clone() const wxOVERRIDE { return new wxVariantDataErrorCode(m_value); }
virtual wxString GetType() const wxOVERRIDE { return wxS("errorcode"); }
DECLARE_WXANY_CONVERSION()
private:
SCODE m_value;
};
// wrapper for SAFEARRAY, used for passing multidimensional arrays in wxVariant
class WXDLLIMPEXP_CORE wxVariantDataSafeArray : public wxVariantData
{
public:
explicit wxVariantDataSafeArray(SAFEARRAY* value = NULL)
{
m_value = value;
}
SAFEARRAY* GetValue() const { return m_value; }
void SetValue(SAFEARRAY* value) { m_value = value; }
virtual bool Eq(wxVariantData& data) const wxOVERRIDE;
#if wxUSE_STD_IOSTREAM
virtual bool Write(wxSTD ostream& str) const wxOVERRIDE;
#endif
virtual bool Write(wxString& str) const wxOVERRIDE;
wxVariantData* Clone() const wxOVERRIDE { return new wxVariantDataSafeArray(m_value); }
virtual wxString GetType() const wxOVERRIDE { return wxS("safearray"); }
DECLARE_WXANY_CONVERSION()
private:
SAFEARRAY* m_value;
};
// Used by wxAutomationObject for its wxConvertOleToVariant() calls.
enum wxOleConvertVariantFlags
{
wxOleConvertVariant_Default = 0,
// If wxOleConvertVariant_ReturnSafeArrays flag is set, SAFEARRAYs
// contained in OLE VARIANTs will be returned as wxVariants
// with wxVariantDataSafeArray type instead of wxVariants
// with the list type containing the (flattened) SAFEARRAY's elements.
wxOleConvertVariant_ReturnSafeArrays = 1
};
WXDLLIMPEXP_CORE
bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
WXDLLIMPEXP_CORE
bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant,
long flags = wxOleConvertVariant_Default);
#endif // wxUSE_VARIANT
// Convert string to Unicode
WXDLLIMPEXP_CORE BSTR wxConvertStringToOle(const wxString& str);
// Convert string from BSTR to wxString
WXDLLIMPEXP_CORE wxString wxConvertStringFromOle(BSTR bStr);
#else // !wxUSE_OLE
// ----------------------------------------------------------------------------
// stub functions to avoid #if wxUSE_OLE in the main code
// ----------------------------------------------------------------------------
inline bool wxOleInitialize() { return false; }
inline void wxOleUninitialize() { }
#endif // wxUSE_OLE/!wxUSE_OLE
// RAII class initializing OLE in its ctor and undoing it in its dtor.
class wxOleInitializer
{
public:
wxOleInitializer()
: m_ok(wxOleInitialize())
{
}
bool IsOk() const
{
return m_ok;
}
~wxOleInitializer()
{
if ( m_ok )
wxOleUninitialize();
}
private:
const bool m_ok;
wxDECLARE_NO_COPY_CLASS(wxOleInitializer);
};
#endif //_WX_OLEUTILS_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/automtn.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/automtn.h
// Purpose: OLE automation utilities
// Author: Julian Smart
// Modified by:
// Created: 11/6/98
// Copyright: (c) 1998, Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AUTOMTN_H_
#define _WX_AUTOMTN_H_
#include "wx/defs.h"
#if wxUSE_OLE_AUTOMATION
#include "wx/object.h"
#include "wx/variant.h"
typedef void WXIDISPATCH;
typedef unsigned short* WXBSTR;
typedef unsigned long WXLCID;
#ifdef GetObject
#undef GetObject
#endif
// Flags used with wxAutomationObject::GetInstance()
enum wxAutomationInstanceFlags
{
// Only use the existing instance, never create a new one.
wxAutomationInstance_UseExistingOnly = 0,
// Create a new instance if there are no existing ones.
wxAutomationInstance_CreateIfNeeded = 1,
// Do not log errors if we failed to get the existing instance because none
// is available.
wxAutomationInstance_SilentIfNone = 2
};
/*
* wxAutomationObject
* Wraps up an IDispatch pointer and invocation; does variant conversion.
*/
class WXDLLIMPEXP_CORE wxAutomationObject: public wxObject
{
public:
wxAutomationObject(WXIDISPATCH* dispatchPtr = NULL);
virtual ~wxAutomationObject();
// Set/get dispatch pointer
void SetDispatchPtr(WXIDISPATCH* dispatchPtr) { m_dispatchPtr = dispatchPtr; }
WXIDISPATCH* GetDispatchPtr() const { return m_dispatchPtr; }
bool IsOk() const { return m_dispatchPtr != NULL; }
// Get a dispatch pointer from the current object associated
// with a ProgID, such as "Excel.Application"
bool GetInstance(const wxString& progId,
int flags = wxAutomationInstance_CreateIfNeeded) const;
// Get a dispatch pointer from a new instance of the class
bool CreateInstance(const wxString& progId) const;
// Low-level invocation function. Pass either an array of variants,
// or an array of pointers to variants.
bool Invoke(const wxString& member, int action,
wxVariant& retValue, int noArgs, wxVariant args[], const wxVariant* ptrArgs[] = 0) const;
// Invoke a member function
wxVariant CallMethod(const wxString& method, int noArgs, wxVariant args[]);
wxVariant CallMethodArray(const wxString& method, int noArgs, const wxVariant **args);
// Convenience function
wxVariant CallMethod(const wxString& method,
const wxVariant& arg1 = wxNullVariant, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
// Get/Put property
wxVariant GetProperty(const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const;
wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const;
wxVariant GetProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
bool PutPropertyArray(const wxString& property, int noArgs, const wxVariant **args);
bool PutProperty(const wxString& property, int noArgs, wxVariant args[]) ;
bool PutProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
// Uses DISPATCH_PROPERTYGET
// and returns a dispatch pointer. The calling code should call Release
// on the pointer, though this could be implicit by constructing an wxAutomationObject
// with it and letting the destructor call Release.
WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, wxVariant args[]) const;
WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, const wxVariant **args) const;
// A way of initialising another wxAutomationObject with a dispatch object,
// without having to deal with nasty IDispatch pointers.
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const;
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const;
// Returns the locale identifier used in automation calls. The default is
// LOCALE_SYSTEM_DEFAULT. Objects obtained by GetObject() inherit the
// locale identifier from the one that created them.
WXLCID GetLCID() const;
// Sets the locale identifier to be used in automation calls performed by
// this object. The default is LOCALE_SYSTEM_DEFAULT.
void SetLCID(WXLCID lcid);
// Returns the flags used for conversions between wxVariant and OLE
// VARIANT, see wxOleConvertVariantFlags. The default value is
// wxOleConvertVariant_Default but all the objects obtained by GetObject()
// inherit the flags from the one that created them.
long GetConvertVariantFlags() const;
// Sets the flags used for conversions between wxVariant and OLE VARIANT,
// see wxOleConvertVariantFlags (default is wxOleConvertVariant_Default.
void SetConvertVariantFlags(long flags);
public: // public for compatibility only, don't use m_dispatchPtr directly.
WXIDISPATCH* m_dispatchPtr;
private:
WXLCID m_lcid;
long m_convertVariantFlags;
wxDECLARE_NO_COPY_CLASS(wxAutomationObject);
};
#endif // wxUSE_OLE_AUTOMATION
#endif // _WX_AUTOMTN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/dropsrc.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/dropsrc.h
// Purpose: declaration of the wxDropSource class
// Author: Vadim Zeitlin
// Modified by:
// Created: 06.03.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OLEDROPSRC_H
#define _WX_OLEDROPSRC_H
#if wxUSE_DRAG_AND_DROP
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class wxIDropSource;
class WXDLLIMPEXP_FWD_CORE wxDataObject;
class WXDLLIMPEXP_FWD_CORE wxWindow;
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
// this macro may be used instead for wxDropSource ctor arguments: it will use
// the cursor 'name' from the resources under MSW, but will expand to
// something else under GTK. If you don't use it, you will have to use #ifdef
// in the application code.
#define wxDROP_ICON(name) wxCursor(wxT(#name))
// ----------------------------------------------------------------------------
// wxDropSource is used to start the drag-&-drop operation on associated
// wxDataObject object. It's responsible for giving UI feedback while dragging.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDropSource : public wxDropSourceBase
{
public:
// ctors: if you use default ctor you must call SetData() later!
//
// NB: the "wxWindow *win" parameter is unused and is here only for wxGTK
// compatibility, as well as both icon parameters
wxDropSource(wxWindow *win = NULL,
const wxCursor &cursorCopy = wxNullCursor,
const wxCursor &cursorMove = wxNullCursor,
const wxCursor &cursorStop = wxNullCursor);
wxDropSource(wxDataObject& data,
wxWindow *win = NULL,
const wxCursor &cursorCopy = wxNullCursor,
const wxCursor &cursorMove = wxNullCursor,
const wxCursor &cursorStop = wxNullCursor);
virtual ~wxDropSource();
// do it (call this in response to a mouse button press, for example)
// params: if bAllowMove is false, data can be only copied
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) wxOVERRIDE;
// overridable: you may give some custom UI feedback during d&d operation
// in this function (it's called on each mouse move, so it shouldn't be
// too slow). Just return false if you want default feedback.
virtual bool GiveFeedback(wxDragResult effect) wxOVERRIDE;
protected:
void Init();
private:
wxIDropSource *m_pIDropSource; // the pointer to COM interface
wxDECLARE_NO_COPY_CLASS(wxDropSource);
};
#endif //wxUSE_DRAG_AND_DROP
#endif //_WX_OLEDROPSRC_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/dataobj.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/ole/dataobj.h
// Purpose: declaration of the wxDataObject class
// Author: Vadim Zeitlin
// Modified by:
// Created: 10.05.98
// Copyright: (c) 1998 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_OLE_DATAOBJ_H
#define _WX_MSW_OLE_DATAOBJ_H
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
struct IDataObject;
// ----------------------------------------------------------------------------
// wxDataObject is a "smart" and polymorphic piece of data.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
{
public:
// ctor & dtor
wxDataObject();
virtual ~wxDataObject();
// retrieve IDataObject interface (for other OLE related classes)
IDataObject *GetInterface() const { return m_pIDataObject; }
// tell the object that it should be now owned by IDataObject - i.e. when
// it is deleted, it should delete us as well
void SetAutoDelete();
// return true if we support this format in "Get" direction
bool IsSupportedFormat(const wxDataFormat& format) const
{ return wxDataObjectBase::IsSupported(format, Get); }
// if this method returns false, this wxDataObject will be copied to
// the clipboard with its size prepended to it, which is compatible with
// older wx versions
//
// if returns true, then this wxDataObject will be copied to the clipboard
// without any additional information and ::HeapSize() function will be used
// to get the size of that data
virtual bool NeedsVerbatimData(const wxDataFormat& WXUNUSED(format)) const
{
// return false from here only for compatibility with earlier wx versions
return true;
}
// function to return symbolic name of clipboard format (for debug messages)
#ifdef __WXDEBUG__
static const wxChar *GetFormatName(wxDataFormat format);
#define wxGetFormatName(format) wxDataObject::GetFormatName(format)
#else // !Debug
#define wxGetFormatName(format) wxT("")
#endif // Debug/!Debug
// they need to be accessed from wxIDataObject, so made them public,
// or wxIDataObject friend
public:
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
const wxDataFormat& format );
virtual void* SetSizeInBuffer( void* buffer, size_t size,
const wxDataFormat& format );
virtual size_t GetBufferOffset( const wxDataFormat& format );
private:
IDataObject *m_pIDataObject; // pointer to the COM interface
wxDECLARE_NO_COPY_CLASS(wxDataObject);
};
#endif //_WX_MSW_OLE_DATAOBJ_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/ole/safearray.h | ///////////////////////////////////////////////////////////////////////////////
// Name: msw/ole/safearray.h
// Purpose: Helpers for working with OLE SAFEARRAYs.
// Author: PB
// Created: 2012-09-23
// Copyright: (c) 2012 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSW_OLE_SAFEARRAY_H_
#define _MSW_OLE_SAFEARRAY_H_
#include "wx/msw/ole/oleutils.h"
#if wxUSE_OLE && wxUSE_VARIANT
/*
wxSafeArray is wxWidgets wrapper for working with MS Windows SAFEARRAYs.
It also has convenience functions for converting between SAFEARRAY
and wxVariant with list type or wxArrayString.
*/
// The base class with type-independent methods. It exists solely in order to
// reduce the template bloat.
class WXDLLIMPEXP_CORE wxSafeArrayBase
{
public:
// If owns a SAFEARRAY, it's unlocked and destroyed.
virtual ~wxSafeArrayBase() { Destroy(); }
// Unlocks and destroys the owned SAFEARRAY.
void Destroy();
// Unlocks the owned SAFEARRAY, returns it and gives up its ownership.
SAFEARRAY* Detach();
// Returns true if has a valid SAFEARRAY.
bool HasArray() const { return m_array != NULL; }
// Returns the number of dimensions.
size_t GetDim() const;
// Returns lower bound for dimension dim in bound. Dimensions start at 1.
bool GetLBound(size_t dim, long& bound) const;
// Returns upper bound for dimension dim in bound. Dimensions start at 1.
bool GetUBound(size_t dim, long& bound) const;
// Returns element count for dimension dim. Dimensions start at 1.
size_t GetCount(size_t dim) const;
protected:
// Default constructor, protected so the class can't be used on its own,
// it's only used as a base class of wxSafeArray<>.
wxSafeArrayBase()
{
m_array = NULL;
}
bool Lock();
bool Unlock();
SAFEARRAY* m_array;
};
// wxSafeArrayConvertor<> must be specialized for the type in order to allow
// using it with wxSafeArray<>.
//
// We specialize it below for the standard types.
template <VARTYPE varType>
struct wxSafeArrayConvertor {};
/**
Macro for specializing wxSafeArrayConvertor for simple types.
The template parameters are:
- externType: basic C data type, e.g. wxFloat64 or wxInt32
- varType: corresponding VARIANT type constant, e.g. VT_R8 or VT_I4.
*/
#define wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(externType, varType) \
template <> \
struct wxSafeArrayConvertor<varType> \
{ \
typedef externType externT; \
typedef externT internT; \
static bool ToArray(const externT& from, internT& to) \
{ \
to = from; \
return true; \
} \
static bool FromArray(const internT& from, externT& to) \
{ \
to = from; \
return true; \
} \
}
wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt16, VT_I2);
wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt32, VT_I4);
wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat32, VT_R4);
wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat64, VT_R8);
// Specialization for VT_BSTR using wxString.
template <>
struct wxSafeArrayConvertor<VT_BSTR>
{
typedef wxString externT;
typedef BSTR internT;
static bool ToArray(const wxString& from, BSTR& to)
{
BSTR bstr = wxConvertStringToOle(from);
if ( !bstr && !from.empty() )
{
// BSTR can be NULL for empty strings but if the string was
// not empty, it means we failed to allocate memory for it.
return false;
}
to = bstr;
return true;
}
static bool FromArray(const BSTR from, wxString& to)
{
to = wxConvertStringFromOle(from);
return true;
}
};
// Specialization for VT_VARIANT using wxVariant.
template <>
struct wxSafeArrayConvertor<VT_VARIANT>
{
typedef wxVariant externT;
typedef VARIANT internT;
static bool ToArray(const wxVariant& from, VARIANT& to)
{
return wxConvertVariantToOle(from, to);
}
static bool FromArray(const VARIANT& from, wxVariant& to)
{
return wxConvertOleToVariant(from, to);
}
};
template <VARTYPE varType>
class wxSafeArray : public wxSafeArrayBase
{
public:
typedef wxSafeArrayConvertor<varType> Convertor;
typedef typename Convertor::internT internT;
typedef typename Convertor::externT externT;
// Default constructor.
wxSafeArray()
{
m_array = NULL;
}
// Creates and locks a zero-based one-dimensional SAFEARRAY with the given
// number of elements.
bool Create(size_t count)
{
SAFEARRAYBOUND bound;
bound.lLbound = 0;
bound.cElements = count;
return Create(&bound, 1);
}
// Creates and locks a SAFEARRAY. See SafeArrayCreate() in MSDN
// documentation for more information.
bool Create(SAFEARRAYBOUND* bound, size_t dimensions)
{
wxCHECK_MSG( !m_array, false, wxS("Can't be created twice") );
m_array = SafeArrayCreate(varType, dimensions, bound);
if ( !m_array )
return false;
return Lock();
}
/**
Creates a 0-based one-dimensional SAFEARRAY from wxVariant with the
list type.
Can be called only for wxSafeArray<VT_VARIANT>.
*/
bool CreateFromListVariant(const wxVariant& variant)
{
wxCHECK(varType == VT_VARIANT, false);
wxCHECK(variant.GetType() == wxS("list"), false);
if ( !Create(variant.GetCount()) )
return false;
VARIANT* data = static_cast<VARIANT*>(m_array->pvData);
for ( size_t i = 0; i < variant.GetCount(); i++)
{
if ( !Convertor::ToArray(variant[i], data[i]) )
return false;
}
return true;
}
/**
Creates a 0-based one-dimensional SAFEARRAY from wxArrayString.
Can be called only for wxSafeArray<VT_BSTR>.
*/
bool CreateFromArrayString(const wxArrayString& strings)
{
wxCHECK(varType == VT_BSTR, false);
if ( !Create(strings.size()) )
return false;
BSTR* data = static_cast<BSTR*>(m_array->pvData);
for ( size_t i = 0; i < strings.size(); i++ )
{
if ( !Convertor::ToArray(strings[i], data[i]) )
return false;
}
return true;
}
/**
Attaches and locks an existing SAFEARRAY.
The array must have the same VARTYPE as this wxSafeArray was
instantiated with.
*/
bool Attach(SAFEARRAY* array)
{
wxCHECK_MSG(!m_array && array, false,
wxS("Can only attach a valid array to an uninitialized one") );
VARTYPE vt;
HRESULT hr = SafeArrayGetVartype(array, &vt);
if ( FAILED(hr) )
{
wxLogApiError(wxS("SafeArrayGetVarType()"), hr);
return false;
}
wxCHECK_MSG(vt == varType, false,
wxS("Attaching array of invalid type"));
m_array = array;
return Lock();
}
/**
Indices have the same row-column order as rgIndices in
SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones.
*/
bool SetElement(long* indices, const externT& element)
{
wxCHECK_MSG( m_array, false, wxS("Uninitialized array") );
wxCHECK_MSG( indices, false, wxS("Invalid index") );
internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false;
return Convertor::ToArray(element, *data);
}
/**
Indices have the same row-column order as rgIndices in
SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones.
*/
bool GetElement(long* indices, externT& element) const
{
wxCHECK_MSG( m_array, false, wxS("Uninitialized array") );
wxCHECK_MSG( indices, false, wxS("Invalid index") );
internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false;
return Convertor::FromArray(*data, element);
}
/**
Converts the array to a wxVariant with the list type, regardless of the
underlying SAFEARRAY type.
If the array is multidimensional, it is flattened using the algorithm
originally employed in wxConvertOleToVariant().
*/
bool ConvertToVariant(wxVariant& variant) const
{
wxCHECK_MSG( m_array, false, wxS("Uninitialized array") );
size_t dims = m_array->cDims;
size_t count = 1;
for ( size_t i = 0; i < dims; i++ )
count *= m_array->rgsabound[i].cElements;
const internT* data = static_cast<const internT*>(m_array->pvData);
externT element;
variant.ClearList();
for ( size_t i1 = 0; i1 < count; i1++ )
{
if ( !Convertor::FromArray(data[i1], element) )
{
variant.ClearList();
return false;
}
variant.Append(element);
}
return true;
}
/**
Converts an array to an ArrayString.
Can be called only for wxSafeArray<VT_BSTR>. If the array is
multidimensional, it is flattened using the algorithm originally
employed in wxConvertOleToVariant().
*/
bool ConvertToArrayString(wxArrayString& strings) const
{
wxCHECK_MSG( m_array, false, wxS("Uninitialized array") );
wxCHECK(varType == VT_BSTR, false);
size_t dims = m_array->cDims;
size_t count = 1;
for ( size_t i = 0; i < dims; i++ )
count *= m_array->rgsabound[i].cElements;
const BSTR* data = static_cast<const BSTR*>(m_array->pvData);
wxString element;
strings.clear();
strings.reserve(count);
for ( size_t i1 = 0; i1 < count; i1++ )
{
if ( !Convertor::FromArray(data[i1], element) )
{
strings.clear();
return false;
}
strings.push_back(element);
}
return true;
}
static bool ConvertToVariant(SAFEARRAY* psa, wxVariant& variant)
{
wxSafeArray<varType> sa;
bool result = false;
if ( sa.Attach(psa) )
result = sa.ConvertToVariant(variant);
if ( sa.HasArray() )
sa.Detach();
return result;
}
static bool ConvertToArrayString(SAFEARRAY* psa, wxArrayString& strings)
{
wxSafeArray<varType> sa;
bool result = false;
if ( sa.Attach(psa) )
result = sa.ConvertToArrayString(strings);
if ( sa.HasArray() )
sa.Detach();
return result;
}
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxSafeArray, varType);
};
#endif // wxUSE_OLE && wxUSE_VARIANT
#endif // _MSW_OLE_SAFEARRAY_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/rt/utils.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/rt/utils.h
// Purpose: Windows Runtime Objects helper functions and objects
// Author: Tobias Taschner
// Created: 2015-09-05
// Copyright: (c) 2015 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_RTUTILS_H
#define _WX_MSW_RTUTILS_H
#include "wx/defs.h"
#if wxUSE_WINRT
#include "wx/string.h"
#include "wx/msw/wrapwin.h"
#include <winstring.h>
namespace wxWinRT
{
bool WXDLLIMPEXP_CORE IsAvailable();
bool WXDLLIMPEXP_CORE Initialize();
void WXDLLIMPEXP_CORE Uninitialize();
bool WXDLLIMPEXP_CORE GetActivationFactory(const wxString& activatableClassId, REFIID iid, void ** factory);
// RAII class initializing WinRT in its ctor and undoing it in its dtor.
class WXDLLIMPEXP_CORE Initializer
{
public:
Initializer()
: m_ok(Initialize())
{
}
bool IsOk() const
{
return m_ok;
}
~Initializer()
{
if (m_ok)
Uninitialize();
}
private:
const bool m_ok;
wxDECLARE_NO_COPY_CLASS(Initializer);
};
// Simple class to convert wxString to HSTRING
// This just wraps a reference to the wxString object,
// which needs a life time greater than the TempStringRef object
class WXDLLIMPEXP_CORE TempStringRef
{
public:
HSTRING Get() const { return m_hstring; }
operator HSTRING() const { return m_hstring; };
static const TempStringRef Make(const wxString &str);
private:
TempStringRef(const wxString &str);
HSTRING m_hstring;
HSTRING_HEADER m_header;
wxDECLARE_NO_COPY_CLASS(TempStringRef);
};
} // namespace wxWinRT
#endif // wxUSE_WINRT
#endif // _WX_MSW_RTUTILS_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/rt/private/notifmsg.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/rt/private/notifmsg.h
// Purpose: WinRT implementation of wxNotificationMessageImpl
// Author: Tobias Taschner
// Created: 2015-09-13
// Copyright: (c) 2015 wxWidgets development team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_RT_PRIVATE_NOTIFMSG_H_
#define _WX_MSW_RT_PRIVATE_NOTIFMSG_H_
#include "wx/notifmsg.h"
#include "wx/private/notifmsg.h"
class wxToastNotificationHelper
{
public:
static bool UseToasts(const wxString& shortcutPath,
const wxString& appId);
static bool IsEnabled();
static wxNotificationMessageImpl* CreateInstance(wxNotificationMessageBase* notification);
};
#endif // _WX_MSW_RT_PRIVATE_NOTIFMSG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/winstyle.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/winstyle.h
// Purpose: Small helper class for updating MSW windows style
// Author: Vadim Zeitlin
// Created: 2017-12-09
// Copyright: (c) 2017 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_WINSTYLE_H_
#define _WX_MSW_PRIVATE_WINSTYLE_H_
// ----------------------------------------------------------------------------
// wxMSWWinLongUpdater
// ----------------------------------------------------------------------------
/*
This class is not used directly, but either as wxMSWWinStyleUpdater or
wxMSWWinExStyleUpdater, both of which inherit from it and can be used like
this:
void SomeFunction()
{
wxMSWWinStyleUpdater updateStyle(GetHwndOf(m_win));
if ( some-condition )
updateStyle.TurnOn(XX_YYY);
// Style update happens here implicitly -- or call Apply().
}
*/
class wxMSWWinLongUpdater
{
public:
// Get the current style.
LONG_PTR Get() const
{
return m_styleCurrent;
}
// Check if the given style bit(s) is (are all) currently turned on.
bool IsOn(LONG_PTR style) const
{
return (m_styleCurrent & style) == style;
}
// Turn on some bit(s) in the style.
wxMSWWinLongUpdater& TurnOn(LONG_PTR on)
{
m_style |= on;
return *this;
}
// Turn off some bit(s) in the style.
wxMSWWinLongUpdater& TurnOff(LONG_PTR off)
{
m_style &= ~off;
return *this;
}
// Turn some bit(s) on or off depending on the condition.
wxMSWWinLongUpdater& TurnOnOrOff(bool cond, LONG_PTR style)
{
return cond ? TurnOn(style) : TurnOff(style);
}
// Perform the style update (only if necessary, i.e. if the style really
// changed).
//
// Notice that if this method is not called, it's still done from the dtor,
// so it's just a convenient way to do it sooner and avoid having to create
// a new scope for ensuring that the dtor runs at the right place, but
// otherwise is equivalent to do this.
bool Apply()
{
if ( m_style == m_styleCurrent )
return false;
::SetWindowLongPtr(m_hwnd, m_gwlSlot, m_style);
m_styleCurrent = m_style;
return true;
}
~wxMSWWinLongUpdater()
{
Apply();
}
protected:
// Create the object for updating the style or extended style of the given
// window.
//
// Ctor is protected, this class can only be used as wxMSWWinStyleUpdater
// or wxMSWWinExStyleUpdater.
wxMSWWinLongUpdater(HWND hwnd, int gwlSlot)
: m_hwnd(hwnd),
m_gwlSlot(gwlSlot),
m_styleCurrent(::GetWindowLongPtr(hwnd, gwlSlot)),
m_style(m_styleCurrent)
{
}
private:
const HWND m_hwnd;
const int m_gwlSlot;
LONG_PTR m_styleCurrent;
LONG_PTR m_style;
wxDECLARE_NO_COPY_CLASS(wxMSWWinLongUpdater);
};
// A variant of wxMSWWinLongUpdater which updates the extended style.
class wxMSWWinStyleUpdater : public wxMSWWinLongUpdater
{
public:
explicit wxMSWWinStyleUpdater(HWND hwnd)
: wxMSWWinLongUpdater(hwnd, GWL_STYLE)
{
}
};
// A variant of wxMSWWinLongUpdater which updates the extended style.
class wxMSWWinExStyleUpdater : public wxMSWWinLongUpdater
{
public:
explicit wxMSWWinExStyleUpdater(HWND hwnd)
: wxMSWWinLongUpdater(hwnd, GWL_EXSTYLE)
{
}
};
#endif // _WX_MSW_PRIVATE_WINSTYLE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/comptr.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/comptr.h
// Purpose: Smart pointer for COM interfaces.
// Author: PB
// Created: 2012-04-16
// Copyright: (c) 2012 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_COMPTR_H_
#define _WX_MSW_PRIVATE_COMPTR_H_
// ----------------------------------------------------------------------------
// wxCOMPtr: A minimalistic smart pointer for use with COM interfaces.
// ----------------------------------------------------------------------------
template <class T>
class wxCOMPtr
{
public:
typedef T element_type;
wxCOMPtr()
: m_ptr(NULL)
{
}
explicit wxCOMPtr(T* ptr)
: m_ptr(ptr)
{
if ( m_ptr )
m_ptr->AddRef();
}
wxCOMPtr(const wxCOMPtr& ptr)
: m_ptr(ptr.get())
{
if ( m_ptr )
m_ptr->AddRef();
}
~wxCOMPtr()
{
if ( m_ptr )
m_ptr->Release();
}
void reset(T* ptr = NULL)
{
if ( m_ptr != ptr)
{
if ( ptr )
ptr->AddRef();
if ( m_ptr )
m_ptr->Release();
m_ptr = ptr;
}
}
wxCOMPtr& operator=(const wxCOMPtr& ptr)
{
reset(ptr.get());
return *this;
}
wxCOMPtr& operator=(T* ptr)
{
reset(ptr);
return *this;
}
operator T*() const
{
return m_ptr;
}
T& operator*() const
{
return *m_ptr;
}
T* operator->() const
{
return m_ptr;
}
// It would be better to forbid direct access completely but we do need
// for QueryInterface() and similar functions, so provide it but it can
// only be used to initialize the pointer, not to modify an existing one.
T** operator&()
{
wxASSERT_MSG(!m_ptr,
wxS("Can't get direct access to initialized pointer"));
return &m_ptr;
}
T* get() const
{
return m_ptr;
}
bool operator<(T* ptr) const
{
return get() < ptr;
}
private:
T* m_ptr;
};
// Define a helper for the macro below: we just need a function taking a
// pointer and not returning anything to avoid warnings about unused return
// value of the cast in the macro itself.
namespace wxPrivate { inline void PPV_ARGS_CHECK(void*) { } }
// Takes the interface name and a pointer to a pointer of the interface type
// and expands into the IID of this interface and the same pointer but after a
// type-safety check.
//
// This is similar to the standard IID_PPV_ARGS macro but takes the pointer
// type instead of relying on the non-standard Microsoft __uuidof().
#define wxIID_PPV_ARGS(IType, pType) \
IID_##IType, \
(wxPrivate::PPV_ARGS_CHECK(static_cast<IType*>(*pType)), \
reinterpret_cast<void**>(pType))
#endif // _WX_MSW_PRIVATE_COMPTR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/event.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/event.h
// Purpose: Simple Windows 'event object' wrapper.
// Author: Troelsk, Vadim Zeitlin
// Created: 2014-05-07
// Copyright: (c) 2014 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_EVENT_H_
#define _WX_MSW_PRIVATE_EVENT_H_
#include "wx/msw/private.h"
namespace wxWinAPI
{
class Event : public AutoHANDLE<0>
{
public:
enum Kind
{
ManualReset,
AutomaticReset
};
enum InitialState
{
Signaled,
Nonsignaled
};
Event()
{
}
// Wrappers around {Create,Set,Reset}Event() Windows API functions, with
// the same semantics.
bool Create(Kind kind = AutomaticReset,
InitialState initialState = Nonsignaled,
const wxChar* name = NULL);
bool Set();
bool Reset();
private:
wxDECLARE_NO_COPY_CLASS(Event);
};
} // namespace wxWinAPI
// ----------------------------------------------------------------------------
// Implementations requiring windows.h; these are to moved out-of-line if
// this class is moved to a public header, or if [parts of] msw/private.h is
// changed to not depend on windows.h being included.
// ----------------------------------------------------------------------------
inline bool
wxWinAPI::Event::Create(wxWinAPI::Event::Kind kind,
wxWinAPI::Event::InitialState initialState,
const wxChar* name)
{
wxCHECK_MSG( !IsOk(), false, wxS("Event can't be created twice") );
WXHANDLE handle = ::CreateEvent(NULL,
kind == ManualReset,
initialState == Signaled,
name);
if ( !handle )
{
wxLogLastError(wxS("CreateEvent"));
return false;
}
m_handle = handle;
return true;
}
inline bool wxWinAPI::Event::Set()
{
wxCHECK_MSG( m_handle, false, wxS("Event must be valid") );
if ( !::SetEvent(m_handle) )
{
wxLogLastError(wxS("SetEvent"));
return false;
}
return true;
}
inline bool wxWinAPI::Event::Reset()
{
wxCHECK_MSG( m_handle, false, wxS("Event must be valid") );
if ( !::ResetEvent(m_handle) )
{
wxLogLastError(wxS("ResetEvent"));
return false;
}
return true;
}
#endif // _WX_MSW_PRIVATE_EVENT_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/hiddenwin.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/hiddenwin.h
// Purpose: Helper for creating a hidden window used by wxMSW internally.
// Author: Vadim Zeitlin
// Created: 2011-09-16
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_HIDDENWIN_H_
#define _WX_MSW_PRIVATE_HIDDENWIN_H_
#include "wx/msw/private.h"
/*
Creates a hidden window with supplied window proc registering the class for
it if necessary (i.e. the first time only). Caller is responsible for
destroying the window and unregistering the class (note that this must be
done because wxWidgets may be used as a DLL and so may be loaded/unloaded
multiple times into/from the same process so we can't rely on automatic
Windows class unregistration).
pclassname is a pointer to a caller stored classname, which must initially be
NULL. classname is the desired wndclass classname. If function successfully
registers the class, pclassname will be set to classname.
*/
extern "C" WXDLLIMPEXP_BASE HWND
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
#endif // _WX_MSW_PRIVATE_HIDDENWIN_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/tlwgeom.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/tlwgeom.h
// Purpose: wxMSW-specific wxTLWGeometry class.
// Author: Vadim Zeitlin
// Created: 2018-04-29
// Copyright: (c) 2018 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_TLWGEOM_H_
#define _WX_MSW_PRIVATE_TLWGEOM_H_
#include "wx/log.h"
#include "wx/msw/private.h"
// names for MSW-specific options
#define wxPERSIST_TLW_MAX_X "xmax"
#define wxPERSIST_TLW_MAX_Y "ymax"
class wxTLWGeometry : public wxTLWGeometryBase
{
public:
wxTLWGeometry()
{
wxZeroMemory(m_placement);
m_placement.length = sizeof(m_placement);
}
virtual bool Save(const Serializer& ser) const wxOVERRIDE
{
// For compatibility with the existing saved positions/sizes, use the
// same keys as the generic version (which was previously used under
// MSW too).
// Normal position and size.
const RECT& rc = m_placement.rcNormalPosition;
if ( !ser.SaveField(wxPERSIST_TLW_X, rc.left) ||
!ser.SaveField(wxPERSIST_TLW_Y, rc.top) )
return false;
if ( !ser.SaveField(wxPERSIST_TLW_W, rc.right - rc.left) ||
!ser.SaveField(wxPERSIST_TLW_H, rc.bottom - rc.top) )
return false;
// Maximized/minimized state.
UINT show = m_placement.showCmd;
if ( !ser.SaveField(wxPERSIST_TLW_MAXIMIZED, show == SW_SHOWMAXIMIZED) )
return false;
if ( !ser.SaveField(wxPERSIST_TLW_ICONIZED, show == SW_SHOWMINIMIZED) )
return false;
// Maximized window position.
const POINT pt = m_placement.ptMaxPosition;
if ( !ser.SaveField(wxPERSIST_TLW_MAX_X, pt.x) ||
!ser.SaveField(wxPERSIST_TLW_MAX_Y, pt.y) )
return false;
// We don't currently save the minimized window position, it doesn't
// seem useful for anything and is probably just a left over from
// Windows 3.1 days, when icons were positioned on the desktop instead
// of being located in the taskbar.
return true;
}
virtual bool Restore(Serializer& ser) wxOVERRIDE
{
// Normal position and size.
wxRect r;
if ( !ser.RestoreField(wxPERSIST_TLW_X, &r.x) ||
!ser.RestoreField(wxPERSIST_TLW_Y, &r.y) ||
!ser.RestoreField(wxPERSIST_TLW_W, &r.width) ||
!ser.RestoreField(wxPERSIST_TLW_H, &r.height) )
return false;
wxCopyRectToRECT(r, m_placement.rcNormalPosition);
// Maximized/minimized state.
//
// Note the special case of SW_MINIMIZE: while GetWindowPlacement()
// returns SW_SHOWMINIMIZED when the window is iconized, we restore it
// as SW_MINIMIZE as this is what the code in wxTLW checks to determine
// whether the window is supposed to be iconized or not.
//
// Just to confuse matters further, note that SW_MAXIMIZE is exactly
// the same thing as SW_SHOWMAXIMIZED.
int tmp;
UINT& show = m_placement.showCmd;
if ( ser.RestoreField(wxPERSIST_TLW_MAXIMIZED, &tmp) && tmp )
show = SW_MAXIMIZE;
else if ( ser.RestoreField(wxPERSIST_TLW_ICONIZED, &tmp) && tmp )
show = SW_MINIMIZE;
else
show = SW_SHOWNORMAL;
// Maximized window position.
if ( ser.RestoreField(wxPERSIST_TLW_MAX_X, &r.x) &&
ser.RestoreField(wxPERSIST_TLW_MAX_Y, &r.y) )
{
m_placement.ptMaxPosition.x = r.x;
m_placement.ptMaxPosition.y = r.y;
}
return true;
}
virtual bool GetFrom(const wxTopLevelWindow* tlw) wxOVERRIDE
{
if ( !::GetWindowPlacement(GetHwndOf(tlw), &m_placement) )
{
wxLogLastError(wxS("GetWindowPlacement"));
return false;
}
return true;
}
virtual bool ApplyTo(wxTopLevelWindow* tlw) wxOVERRIDE
{
// There is a subtlety here: if the window is currently hidden,
// restoring its geometry shouldn't show it, so we must use SW_HIDE as
// show command, but showing it later should restore it to the correct
// state, so we need to remember it in wxTLW itself. And even if it's
// currently shown, we still need to update its show command, so that
// it matches the real window state after SetWindowPlacement() call.
tlw->MSWSetShowCommand(m_placement.showCmd);
if ( !tlw->IsShown() )
{
m_placement.showCmd = SW_HIDE;
}
if ( !::SetWindowPlacement(GetHwndOf(tlw), &m_placement) )
{
wxLogLastError(wxS("SetWindowPlacement"));
return false;
}
return true;
}
private:
WINDOWPLACEMENT m_placement;
};
#endif // _WX_MSW_PRIVATE_TLWGEOM_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/datecontrols.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/datecontrols.h
// Purpose: implementation helpers for wxDatePickerCtrl and wxCalendarCtrl
// Author: Vadim Zeitlin
// Created: 2008-04-04
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSW_PRIVATE_DATECONTROLS_H_
#define _MSW_PRIVATE_DATECONTROLS_H_
#include "wx/datetime.h"
#include "wx/msw/wrapwin.h"
// namespace for the helper functions related to the date controls
namespace wxMSWDateControls
{
// do the one time only initialization of date classes of comctl32.dll, return
// true if ok or log an error and return false if we failed (this can only
// happen with a very old version of common controls DLL, i.e. before 4.70)
extern bool CheckInitialization();
} // namespace wxMSWDateControls
#endif // _MSW_PRIVATE_DATECONTROLS_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/customdraw.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/customdraw.h
// Purpose: Helper for implementing custom drawing support in wxMSW
// Author: Vadim Zeitlin
// Created: 2016-04-16
// Copyright: (c) 2016 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_CUSTOMDRAW_H_
#define _WX_MSW_CUSTOMDRAW_H_
#include "wx/itemattr.h"
#include "wx/msw/wrapcctl.h"
namespace wxMSWImpl
{
// ----------------------------------------------------------------------------
// CustomDraw: inherit from this class and forward NM_CUSTOMDRAW to it
// ----------------------------------------------------------------------------
class CustomDraw
{
public:
// Trivial default ctor needed for non-copyable class.
CustomDraw()
{
}
// Virtual dtor for the base class.
virtual ~CustomDraw()
{
}
// Implementation of NM_CUSTOMDRAW handler, returns one of CDRF_XXX
// constants, possibly CDRF_DODEFAULT if custom drawing is not necessary.
LPARAM HandleCustomDraw(LPARAM lParam);
private:
// Return true if we need custom drawing at all.
virtual bool HasCustomDrawnItems() const = 0;
// Return the attribute to use for the given item, can return NULL if this
// item doesn't need to be custom-drawn.
virtual const wxItemAttr* GetItemAttr(DWORD_PTR dwItemSpec) const = 0;
// Set the colours and font for the specified HDC, return CDRF_NEWFONT if
// the font was changed.
LPARAM HandleItemPrepaint(const wxItemAttr& attr, HDC hdc);
wxDECLARE_NO_COPY_CLASS(CustomDraw);
};
} // namespace wxMSWImpl
#endif // _WX_MSW_CUSTOMDRAW_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/sockmsw.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/gsockmsw.h
// Purpose: MSW-specific socket implementation
// Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin
// Created: April 1997
// Copyright: (C) 1999-1997, Guilhem Lavaux
// (C) 1999-2000, Guillermo Rodriguez Garcia
// (C) 2008 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_GSOCKMSW_H_
#define _WX_MSW_GSOCKMSW_H_
#include "wx/msw/wrapwin.h"
#if defined(__CYGWIN__)
//CYGWIN gives annoying warning about runtime stuff if we don't do this
# define USE_SYS_TYPES_FD_SET
# include <sys/types.h>
#endif
#if defined(__CYGWIN__)
#include <winsock.h>
#ifdef __LP64__
// We can't use long in this case because it is 64 bits with Cygwin, so
// use their special type used for working around this instead.
#define wxIoctlSocketArg_t __ms_u_long
#endif
#endif
#ifndef wxIoctlSocketArg_t
#define wxIoctlSocketArg_t u_long
#endif
// ----------------------------------------------------------------------------
// MSW-specific socket implementation
// ----------------------------------------------------------------------------
class wxSocketImplMSW : public wxSocketImpl
{
public:
wxSocketImplMSW(wxSocketBase& wxsocket);
virtual ~wxSocketImplMSW();
virtual wxSocketError GetLastError() const wxOVERRIDE;
virtual void ReenableEvents(wxSocketEventFlags WXUNUSED(flags)) wxOVERRIDE
{
// notifications are never disabled in this implementation, there is no
// need for this as WSAAsyncSelect() only sends notification once when
// the new data becomes available anyhow, so there is no need to do
// anything here
}
private:
virtual void DoClose() wxOVERRIDE;
virtual void UnblockAndRegisterWithEventLoop() wxOVERRIDE
{
if ( GetSocketFlags() & wxSOCKET_BLOCK )
{
// Counter-intuitively, we make the socket non-blocking even in
// this case as it is necessary e.g. for Read() to return
// immediately if there is no data available. However we must not
// install a callback for it as blocking sockets don't use any
// events and generating them would actually be harmful (and not
// just useless) as they would be dispatched by the main thread
// while this blocking socket can be used from a worker one, so it
// would result in data races and other unpleasantness.
wxIoctlSocketArg_t trueArg = 1;
ioctlsocket(m_fd, FIONBIO, &trueArg);
}
else
{
// No need to make the socket non-blocking, Install_Callback() will
// do it as a side effect of calling WSAAsyncSelect().
wxSocketManager::Get()->Install_Callback(this);
}
}
int m_msgnumber;
friend class wxSocketMSWManager;
wxDECLARE_NO_COPY_CLASS(wxSocketImplMSW);
};
#endif /* _WX_MSW_GSOCKMSW_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/textmeasure.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/textmeasure.h
// Purpose: wxMSW-specific declaration of wxTextMeasure class
// Author: Manuel Martin
// Created: 2012-10-05
// Copyright: (c) 1997-2012 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_
#define _WX_MSW_PRIVATE_TEXTMEASURE_H_
#include "wx/msw/wrapwin.h"
// ----------------------------------------------------------------------------
// wxTextMeasure for MSW.
// ----------------------------------------------------------------------------
class wxTextMeasure : public wxTextMeasureBase
{
public:
explicit wxTextMeasure(const wxDC *dc, const wxFont *font = NULL)
: wxTextMeasureBase(dc, font)
{
Init();
}
explicit wxTextMeasure(const wxWindow *win, const wxFont *font = NULL)
: wxTextMeasureBase(win, font)
{
Init();
}
protected:
void Init();
virtual void BeginMeasuring() wxOVERRIDE;
virtual void EndMeasuring() wxOVERRIDE;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *width,
wxCoord *height,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL) wxOVERRIDE;
virtual bool DoGetPartialTextExtents(const wxString& text,
wxArrayInt& widths,
double scaleX) wxOVERRIDE;
// We use either the HDC of the provided wxDC or an HDC created for our
// window.
HDC m_hdc;
// If we change the font in BeginMeasuring(), we restore it to the old one
// in EndMeasuring().
HFONT m_hfontOld;
wxDECLARE_NO_COPY_CLASS(wxTextMeasure);
};
#endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/timer.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/timer.h
// Purpose: wxTimer class
// Author: Julian Smart
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_TIMER_H_
#define _WX_MSW_PRIVATE_TIMER_H_
#if wxUSE_TIMER
#include "wx/private/timer.h"
#include "wx/msw/wrapwin.h" // for WPARAM
class WXDLLIMPEXP_BASE wxMSWTimerImpl : public wxTimerImpl
{
public:
wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; }
virtual bool Start(int milliseconds = -1, bool oneShot = false) wxOVERRIDE;
virtual void Stop() wxOVERRIDE;
virtual bool IsRunning() const wxOVERRIDE { return m_id != 0; }
protected:
// this must be 64 bit under Win64 as WPARAM (storing timer ids) is 64 bit
// there and so the ids may possibly not fit in 32 bits
WPARAM m_id;
};
#endif // wxUSE_TIMER
#endif // _WX_TIMERH_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/graphicsd2d.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/graphicsd2d.h
// Purpose: Allow functions from graphicsd2d.cpp to be used in othe files
// Author: New Pagodi
// Created: 2017-10-31
// Copyright: (c) 2017 wxWidgets development team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef WX_MSW_PRIVATE_GRAPHICSD2D_H_
#define WX_MSW_PRIVATE_GRAPHICSD2D_H_
#if wxUSE_GRAPHICS_DIRECT2D
// Ensure no previous defines interfere with the Direct2D API headers
#undef GetHwnd
// include before wincodec.h to prevent winsock/winsock2 redefinition warnings
#include "wx/msw/wrapwin.h"
#include <d2d1.h>
#include <dwrite.h>
#include <wincodec.h>
WXDLLIMPEXP_CORE IWICImagingFactory* wxWICImagingFactory();
WXDLLIMPEXP_CORE ID2D1Factory* wxD2D1Factory();
WXDLLIMPEXP_CORE IDWriteFactory* wxDWriteFactory();
#endif // wxUSE_GRAPHICS_DIRECT2D
#endif // WX_MSW_PRIVATE_GRAPHICSD2D_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/keyboard.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/keyboard.h
// Purpose: Helper keyboard-related functions.
// Author: Vadim Zeitlin
// Created: 2010-09-09
// Copyright: (c) 2010 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_KEYBOARD_H_
#define _WX_MSW_PRIVATE_KEYBOARD_H_
#include "wx/defs.h"
namespace wxMSWKeyboard
{
// ----------------------------------------------------------------------------
// Functions for translating between MSW virtual keys codes and wx key codes
//
// These functions are currently implemented in src/msw/window.cpp.
// ----------------------------------------------------------------------------
// Translate MSW virtual key code to wx key code. lParam is used to distinguish
// between numpad and extended version of the keys, extended is assumed by
// default if lParam == 0.
//
// Returns WXK_NONE if translation couldn't be done at all (this happens e.g.
// for dead keys and in this case uc will be WXK_NONE too) or if the key
// corresponds to a non-Latin-1 character in which case uc is filled with its
// Unicode value.
WXDLLIMPEXP_CORE int VKToWX(WXWORD vk, WXLPARAM lParam = 0, wchar_t *uc = NULL);
// Translate wxKeyCode enum element (passed as int for compatibility reasons)
// to MSW virtual key code. isExtended is set to true if the key corresponds to
// a non-numpad version of a key that exists both on numpad and outside it.
WXDLLIMPEXP_CORE WXWORD WXToVK(int id, bool *isExtended = NULL);
} // namespace wxMSWKeyboard
#endif // _WX_MSW_PRIVATE_KEYBOARD_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/metrics.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/metrics.h
// Purpose: various helper functions to retrieve system metrics
// Author: Vadim Zeitlin
// Created: 2008-09-05
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_METRICS_H_
#define _WX_MSW_PRIVATE_METRICS_H_
namespace wxMSWImpl
{
// return NONCLIENTMETRICS as retrieved by SystemParametersInfo()
//
// currently this is not cached as the values may change when system settings
// do and we don't react to this to invalidate the cache but it could be done
// in the future
//
// MT-safety: this function is only meant to be called from the main thread
inline const NONCLIENTMETRICS& GetNonClientMetrics()
{
static WinStruct<NONCLIENTMETRICS> nm;
if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0) )
{
#if WINVER >= 0x0600
// a new field has been added to NONCLIENTMETRICS under Vista, so
// the call to SystemParametersInfo() fails if we use the struct
// size incorporating this new value on an older system -- retry
// without it
nm.cbSize -= sizeof(int);
if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0) )
#endif // WINVER >= 0x0600
{
// maybe we should initialize the struct with some defaults?
wxLogLastError(wxT("SystemParametersInfo(SPI_GETNONCLIENTMETRICS)"));
}
}
return nm;
}
} // namespace wxMSWImpl
#endif // _WX_MSW_PRIVATE_METRICS_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/pipestream.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/pipestream.h
// Purpose: MSW wxPipeInputStream and wxPipeOutputStream declarations
// Author: Vadim Zeitlin
// Created: 2013-06-08 (extracted from src/msw/utilsexc.cpp)
// Copyright: (c) 2013 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_
#define _WX_MSW_PRIVATE_PIPESTREAM_H_
class wxPipeInputStream : public wxInputStream
{
public:
explicit wxPipeInputStream(HANDLE hInput);
virtual ~wxPipeInputStream();
// returns true if the pipe is still opened
bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; }
// returns true if there is any data to be read from the pipe
virtual bool CanRead() const wxOVERRIDE;
protected:
virtual size_t OnSysRead(void *buffer, size_t len) wxOVERRIDE;
protected:
HANDLE m_hInput;
wxDECLARE_NO_COPY_CLASS(wxPipeInputStream);
};
class wxPipeOutputStream: public wxOutputStream
{
public:
explicit wxPipeOutputStream(HANDLE hOutput);
virtual ~wxPipeOutputStream() { Close(); }
bool Close() wxOVERRIDE;
protected:
size_t OnSysWrite(const void *buffer, size_t len) wxOVERRIDE;
protected:
HANDLE m_hOutput;
wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream);
};
#endif // _WX_MSW_PRIVATE_PIPESTREAM_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/dc.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/dc.h
// Purpose: private wxMSW helpers for working with HDCs
// Author: Vadim Zeitlin
// Created: 2009-06-16 (extracted from src/msw/dc.cpp)
// Copyright: (c) 2009 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSW_PRIVATE_DC_H_
#define _MSW_PRIVATE_DC_H_
#include "wx/msw/dc.h"
#include "wx/msw/wrapwin.h"
namespace wxMSWImpl
{
// various classes to change some DC property temporarily
// text background and foreground colours
class wxTextColoursChanger
{
public:
wxTextColoursChanger(HDC hdc, const wxMSWDCImpl& dc)
: m_hdc(hdc)
{
Change(dc.GetTextForeground(), dc.GetTextBackground());
}
wxTextColoursChanger(HDC hdc, const wxColour& colFg, const wxColour& colBg)
: m_hdc(hdc)
{
Change(colFg, colBg);
}
wxTextColoursChanger(HDC hdc, COLORREF colFg, COLORREF colBg)
: m_hdc(hdc)
{
Change(colFg, colBg);
}
~wxTextColoursChanger()
{
if ( m_oldColFg != CLR_INVALID )
::SetTextColor(m_hdc, m_oldColFg);
if ( m_oldColBg != CLR_INVALID )
::SetBkColor(m_hdc, m_oldColBg);
}
protected:
// this ctor doesn't change mode immediately, call Change() later to do it
// only if needed
wxTextColoursChanger(HDC hdc)
: m_hdc(hdc)
{
m_oldColFg =
m_oldColBg = CLR_INVALID;
}
void Change(const wxColour& colFg, const wxColour& colBg)
{
Change(colFg.IsOk() ? colFg.GetPixel() : CLR_INVALID,
colBg.IsOk() ? colBg.GetPixel() : CLR_INVALID);
}
void Change(COLORREF colFg, COLORREF colBg)
{
if ( colFg != CLR_INVALID )
{
m_oldColFg = ::SetTextColor(m_hdc, colFg);
if ( m_oldColFg == CLR_INVALID )
{
wxLogLastError(wxT("SetTextColor"));
}
}
else
{
m_oldColFg = CLR_INVALID;
}
if ( colBg != CLR_INVALID )
{
m_oldColBg = ::SetBkColor(m_hdc, colBg);
if ( m_oldColBg == CLR_INVALID )
{
wxLogLastError(wxT("SetBkColor"));
}
}
else
{
m_oldColBg = CLR_INVALID;
}
}
private:
const HDC m_hdc;
COLORREF m_oldColFg,
m_oldColBg;
wxDECLARE_NO_COPY_CLASS(wxTextColoursChanger);
};
// background mode
class wxBkModeChanger
{
public:
// set background mode to opaque if mode != wxBRUSHSTYLE_TRANSPARENT
wxBkModeChanger(HDC hdc, int mode)
: m_hdc(hdc)
{
Change(mode);
}
~wxBkModeChanger()
{
if ( m_oldMode )
::SetBkMode(m_hdc, m_oldMode);
}
protected:
// this ctor doesn't change mode immediately, call Change() later to do it
// only if needed
wxBkModeChanger(HDC hdc) : m_hdc(hdc) { m_oldMode = 0; }
void Change(int mode)
{
m_oldMode = ::SetBkMode(m_hdc, mode == wxBRUSHSTYLE_TRANSPARENT
? TRANSPARENT
: OPAQUE);
if ( !m_oldMode )
{
wxLogLastError(wxT("SetBkMode"));
}
}
private:
const HDC m_hdc;
int m_oldMode;
wxDECLARE_NO_COPY_CLASS(wxBkModeChanger);
};
} // namespace wxMSWImpl
#endif // _MSW_PRIVATE_DC_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/msgdlg.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/msgdlg.h
// Purpose: helper functions used with native message dialog
// Author: Rickard Westerlund
// Created: 2010-07-12
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_MSGDLG_H_
#define _WX_MSW_PRIVATE_MSGDLG_H_
#include "wx/msw/wrapcctl.h"
#include "wx/scopedarray.h"
// Macro to help identify if task dialogs are available: we rely on
// TD_WARNING_ICON being defined in the headers for this as this symbol is used
// by the task dialogs only. Also notice that task dialogs are available for
// Unicode applications only.
#if defined(TD_WARNING_ICON) && wxUSE_UNICODE
#define wxHAS_MSW_TASKDIALOG
#endif
// Provides methods for creating a task dialog.
namespace wxMSWMessageDialog
{
#ifdef wxHAS_MSW_TASKDIALOG
class wxMSWTaskDialogConfig
{
public:
enum { MAX_BUTTONS = 4 };
wxMSWTaskDialogConfig()
: buttons(new TASKDIALOG_BUTTON[MAX_BUTTONS]),
parent(NULL),
iconId(0),
style(0),
useCustomLabels(false)
{ }
// initializes the object from a message dialog.
wxMSWTaskDialogConfig(const wxMessageDialogBase& dlg);
wxScopedArray<TASKDIALOG_BUTTON> buttons;
wxWindow *parent;
wxString caption;
wxString message;
wxString extendedMessage;
long iconId;
long style;
bool useCustomLabels;
wxString btnYesLabel;
wxString btnNoLabel;
wxString btnOKLabel;
wxString btnCancelLabel;
wxString btnHelpLabel;
// Will create a task dialog with it's parameters for it's creation
// stored in the provided TASKDIALOGCONFIG parameter.
// NOTE: The wxMSWTaskDialogConfig object needs to remain accessible
// during the subsequent call to TaskDialogIndirect().
void MSWCommonTaskDialogInit(TASKDIALOGCONFIG &tdc);
// Used by MSWCommonTaskDialogInit() to add a regular button or a
// button with a custom label if used.
void AddTaskDialogButton(TASKDIALOGCONFIG &tdc,
int btnCustomId,
int btnCommonId,
const wxString& customLabel);
}; // class wxMSWTaskDialogConfig
typedef HRESULT (WINAPI *TaskDialogIndirect_t)(const TASKDIALOGCONFIG *,
int *, int *, BOOL *);
// Return the pointer to TaskDialogIndirect(). This should only be called
// if HasNativeTaskDialog() returned true and is normally guaranteed to
// succeed in this case.
TaskDialogIndirect_t GetTaskDialogIndirectFunc();
#endif // wxHAS_MSW_TASKDIALOG
// Check if the task dialog is available: this simply checks the OS version
// as we know that it's only present in Vista and later.
bool HasNativeTaskDialog();
// Translates standard MSW button IDs like IDCANCEL into an equivalent
// wx constant such as wxCANCEL.
int MSWTranslateReturnCode(int msAns);
}; // namespace wxMSWMessageDialog
#endif // _WX_MSW_PRIVATE_MSGDLG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/dcdynwrap.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/dcdynwrap.h
// Purpose: Private dynamically loaded HDC-related functions
// Author: Vadim Zeitlin
// Created: 2016-05-26 (extracted from src/msw/dc.cpp)
// Copyright: (c) 2016 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_DCDYNWRAP_H_
#define _WX_MSW_PRIVATE_DCDYNWRAP_H_
#include "wx/msw/wrapwin.h"
// Namespace for the wrapper functions, hopefully one day we'll be able to get
// rid of all of them and then it will be easy to find all occurrences of their
// use by just searching for this namespace name.
//
// All of the functions in this namespace must work *exactly* like the standard
// functions with the same name and just return an error if dynamically loading
// them failed.
//
// And they're all implemented in src/msw/dc.cpp.
namespace wxDynLoadWrappers
{
DWORD GetLayout(HDC hdc);
DWORD SetLayout(HDC hdc, DWORD dwLayout);
BOOL AlphaBlend(HDC hdcDest, int xDest, int yDest, int wDest, int hDest,
HDC hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc,
BLENDFUNCTION bf);
BOOL GradientFill(HDC hdc, PTRIVERTEX pVert, ULONG numVert,
PVOID pMesh, ULONG numMesh, ULONG mode);
} // namespace wxDynLoadWrappers
#endif // _WX_MSW_PRIVATE_DCDYNWRAP_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/button.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/button.h
// Purpose: helper functions used with native BUTTON control
// Author: Vadim Zeitlin
// Created: 2008-06-07
// Copyright: (c) 2008 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_BUTTON_H_
#define _WX_MSW_PRIVATE_BUTTON_H_
// define some standard button constants which may be missing in the headers
#ifndef BS_PUSHLIKE
#define BS_PUSHLIKE 0x00001000L
#endif
#ifndef BST_UNCHECKED
#define BST_UNCHECKED 0x0000
#endif
#ifndef BST_CHECKED
#define BST_CHECKED 0x0001
#endif
#ifndef BST_INDETERMINATE
#define BST_INDETERMINATE 0x0002
#endif
namespace wxMSWButton
{
// returns BS_MULTILINE if the label contains new lines or 0 otherwise
inline int GetMultilineStyle(const wxString& label)
{
return label.find(wxT('\n')) == wxString::npos ? 0 : BS_MULTILINE;
}
// update the style of the specified HWND to include or exclude BS_MULTILINE
// depending on whether the label contains the new lines
void UpdateMultilineStyle(HWND hwnd, const wxString& label);
// flags for ComputeBestSize() and GetFittingSize()
enum
{
Size_AuthNeeded = 1,
Size_ExactFit = 2
};
// NB: All the functions below are implemented in src/msw/button.cpp
// Compute the button size (as if wxBU_EXACTFIT were specified, i.e. without
// adjusting it to be of default size if it's smaller) for the given label size
WXDLLIMPEXP_CORE wxSize
GetFittingSize(wxWindow *win, const wxSize& sizeLabel, int flags = 0);
// Compute the button size (as if wxBU_EXACTFIT were specified) by computing
// its label size and then calling GetFittingSize().
wxSize ComputeBestFittingSize(wxControl *btn, int flags = 0);
// Increase the size passed as parameter to be at least the standard button
// size if the control doesn't have wxBU_EXACTFIT style and also cache it as
// the best size and return its value -- this is used in DoGetBestSize()
// implementation.
wxSize IncreaseToStdSizeAndCache(wxControl *btn, const wxSize& size);
// helper of wxToggleButton::DoGetBestSize()
inline wxSize ComputeBestSize(wxControl *btn, int flags = 0)
{
return IncreaseToStdSizeAndCache(btn, ComputeBestFittingSize(btn, flags));
}
} // namespace wxMSWButton
#endif // _WX_MSW_PRIVATE_BUTTON_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/msw/private/fswatcher.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/fswatcher.h
// Purpose: File system watcher impl classes
// Author: Bartosz Bekier
// Created: 2009-05-26
// Copyright: (c) 2009 Bartosz Bekier <[email protected]>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef WX_MSW_PRIVATE_FSWATCHER_H_
#define WX_MSW_PRIVATE_FSWATCHER_H_
#include "wx/filename.h"
#include "wx/vector.h"
#include "wx/msw/private.h"
// ============================================================================
// wxFSWatcherEntry implementation & helper declarations
// ============================================================================
class wxFSWatcherImplMSW;
class wxFSWatchEntryMSW : public wxFSWatchInfo
{
public:
enum
{
BUFFER_SIZE = 4096 // TODO parametrize
};
wxFSWatchEntryMSW(const wxFSWatchInfo& winfo) :
wxFSWatchInfo(winfo)
{
// get handle for this path
m_handle = OpenDir(m_path);
m_overlapped = (OVERLAPPED*)calloc(1, sizeof(OVERLAPPED));
wxZeroMemory(m_buffer);
}
virtual ~wxFSWatchEntryMSW()
{
wxLogTrace(wxTRACE_FSWATCHER, "Deleting entry '%s'", m_path);
if (m_handle != INVALID_HANDLE_VALUE)
{
if (!CloseHandle(m_handle))
{
wxLogSysError(_("Unable to close the handle for '%s'"),
m_path);
}
}
free(m_overlapped);
}
bool IsOk() const
{
return m_handle != INVALID_HANDLE_VALUE;
}
HANDLE GetHandle() const
{
return m_handle;
}
void* GetBuffer()
{
return m_buffer;
}
OVERLAPPED* GetOverlapped() const
{
return m_overlapped;
}
private:
// opens dir with all flags, attributes etc. necessary to be later
// asynchronous watched with ReadDirectoryChangesW
static HANDLE OpenDir(const wxString& path)
{
HANDLE handle = CreateFile(path.t_str(),
FILE_LIST_DIRECTORY,
FILE_SHARE_READ |
FILE_SHARE_WRITE |
FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS |
FILE_FLAG_OVERLAPPED,
NULL);
if (handle == INVALID_HANDLE_VALUE)
{
wxLogSysError(_("Failed to open directory \"%s\" for monitoring."),
path);
}
return handle;
}
HANDLE m_handle; // handle to opened directory
char m_buffer[BUFFER_SIZE]; // buffer for fs events
OVERLAPPED* m_overlapped;
wxDECLARE_NO_COPY_CLASS(wxFSWatchEntryMSW);
};
// ============================================================================
// wxFSWatcherImplMSW helper classes implementations
// ============================================================================
class wxIOCPService
{
public:
wxIOCPService() :
m_iocp(INVALID_HANDLE_VALUE)
{
Init();
}
~wxIOCPService()
{
if (m_iocp != INVALID_HANDLE_VALUE)
{
if (!CloseHandle(m_iocp))
{
wxLogSysError(_("Unable to close I/O completion port handle"));
}
}
m_watches.clear();
}
// associates a wxFSWatchEntryMSW with completion port
bool Add(wxSharedPtr<wxFSWatchEntryMSW> watch)
{
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" );
// associate with IOCP
HANDLE ret = CreateIoCompletionPort(watch->GetHandle(), m_iocp,
(ULONG_PTR)watch.get(), 0);
if (ret == NULL)
{
wxLogSysError(_("Unable to associate handle with "
"I/O completion port"));
return false;
}
else if (ret != m_iocp)
{
wxFAIL_MSG(_("Unexpectedly new I/O completion port was created"));
return false;
}
// add to watch map
wxFSWatchEntries::value_type val(watch->GetPath(), watch);
return m_watches.insert(val).second;
}
// Removes a watch we're currently using. Notice that this doesn't happen
// immediately, CompleteRemoval() must be called later when it's really
// safe to delete the watch, i.e. after completion of the IO operation
// using it.
bool ScheduleForRemoval(const wxSharedPtr<wxFSWatchEntryMSW>& watch)
{
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" );
const wxString path = watch->GetPath();
wxFSWatchEntries::iterator it = m_watches.find(path);
wxCHECK_MSG( it != m_watches.end(), false,
"Can't remove a watch we don't use" );
// We can't just delete the watch here as we can have pending events
// for it and if we destroyed it now, we could get a dangling (or,
// worse, reused to point to another object) pointer in ReadEvents() so
// just remember that this one should be removed when CompleteRemoval()
// is called later.
m_removedWatches.push_back(watch);
m_watches.erase(it);
return true;
}
// Really remove the watch previously passed to ScheduleForRemoval().
//
// It's ok to call this for a watch that hadn't been removed before, in
// this case we'll just return false and do nothing.
bool CompleteRemoval(wxFSWatchEntryMSW* watch)
{
for ( Watches::iterator it = m_removedWatches.begin();
it != m_removedWatches.end();
++it )
{
if ( (*it).get() == watch )
{
// Removing the object from here will result in deleting the
// watch itself as it's not referenced from anywhere else now.
m_removedWatches.erase(it);
return true;
}
}
return false;
}
// post completion packet
bool PostEmptyStatus()
{
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
// The special values of 0 will make GetStatus() return Status_Exit.
const int ret = PostQueuedCompletionStatus(m_iocp, 0, 0, NULL);
if (!ret)
{
wxLogSysError(_("Unable to post completion status"));
}
return ret != 0;
}
// Possible return values of GetStatus()
enum Status
{
// Status successfully retrieved into the provided arguments.
Status_OK,
// Special status indicating that we should exit retrieved.
Status_Exit,
// An error occurred because the watched directory was deleted.
Status_Deleted,
// Some other error occurred.
Status_Error
};
// Wait for completion status to arrive.
// This function can block forever in it's wait for completion status.
// Use PostEmptyStatus() to wake it up (and end the worker thread)
Status
GetStatus(DWORD* count, wxFSWatchEntryMSW** watch,
OVERLAPPED** overlapped)
{
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, Status_Error,
"Invalid IOCP object" );
wxCHECK_MSG( count && watch && overlapped, Status_Error,
"Output parameters can't be NULL" );
const int ret = GetQueuedCompletionStatus(m_iocp, count, (ULONG_PTR *)watch,
overlapped, INFINITE);
if ( ret != 0 )
{
return *count || *watch || *overlapped ? Status_OK : Status_Exit;
}
// An error is returned if the underlying directory has been deleted,
// but this is not really an unexpected failure, so handle it
// specially.
if ( wxSysErrorCode() == ERROR_ACCESS_DENIED &&
*watch && !wxFileName::DirExists((*watch)->GetPath()) )
return Status_Deleted;
// Some other error, at least log it.
wxLogSysError(_("Unable to dequeue completion packet"));
return Status_Error;
}
protected:
bool Init()
{
m_iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
if (m_iocp == NULL)
{
wxLogSysError(_("Unable to create I/O completion port"));
}
return m_iocp != NULL;
}
HANDLE m_iocp;
// The hash containing all the wxFSWatchEntryMSW objects currently being
// watched keyed by their paths.
wxFSWatchEntries m_watches;
// Contains the watches which had been removed but are still pending.
typedef wxVector< wxSharedPtr<wxFSWatchEntryMSW> > Watches;
Watches m_removedWatches;
};
class wxIOCPThread : public wxThread
{
public:
wxIOCPThread(wxFSWatcherImplMSW* service, wxIOCPService* iocp);
// finishes this thread
bool Finish();
protected:
// structure to hold information needed to process one native event
// this is just a dummy holder, so it doesn't take ownership of it's data
struct wxEventProcessingData
{
wxEventProcessingData(const FILE_NOTIFY_INFORMATION* ne,
const wxFSWatchEntryMSW* watch_) :
nativeEvent(ne), watch(watch_)
{}
const FILE_NOTIFY_INFORMATION* nativeEvent;
const wxFSWatchEntryMSW* watch;
};
virtual ExitCode Entry() wxOVERRIDE;
// wait for events to occur, read them and send to interested parties
// returns false it empty status was read, which means we would exit
// true otherwise
bool ReadEvents();
void ProcessNativeEvents(wxVector<wxEventProcessingData>& events);
void SendEvent(wxFileSystemWatcherEvent& evt);
static int Native2WatcherFlags(int flags);
static wxString FileNotifyInformationToString(
const FILE_NOTIFY_INFORMATION& e);
static wxFileName GetEventPath(const wxFSWatchEntryMSW& watch,
const FILE_NOTIFY_INFORMATION& e);
wxFSWatcherImplMSW* m_service;
wxIOCPService* m_iocp;
};
#endif /* WX_MSW_PRIVATE_FSWATCHER_H_ */
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/protocol/ftp.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/protocol/ftp.h
// Purpose: FTP protocol
// Author: Vadim Zeitlin
// Modified by: Mark Johnson, [email protected]
// 20000917 : RmDir, GetLastResult, GetList
// Created: 07/07/1997
// Copyright: (c) 1997, 1998 Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_FTP_H__
#define __WX_FTP_H__
#include "wx/defs.h"
#if wxUSE_PROTOCOL_FTP
#include "wx/sckaddr.h"
#include "wx/protocol/protocol.h"
#include "wx/url.h"
class WXDLLIMPEXP_NET wxFTP : public wxProtocol
{
public:
enum TransferMode
{
NONE, // not set by user explicitly
ASCII,
BINARY
};
wxFTP();
virtual ~wxFTP();
// Connecting and disconnecting
virtual bool Connect(const wxSockAddress& addr, bool wait = true) wxOVERRIDE;
virtual bool Connect(const wxString& host) wxOVERRIDE { return Connect(host, 0); }
virtual bool Connect(const wxString& host, unsigned short port);
// disconnect
virtual bool Close() wxOVERRIDE;
// Parameters set up
// set transfer mode now
void SetPassive(bool pasv) { m_bPassive = pasv; }
bool SetBinary() { return SetTransferMode(BINARY); }
bool SetAscii() { return SetTransferMode(ASCII); }
bool SetTransferMode(TransferMode mode);
// Generic FTP interface
// FTP doesn't know the MIME type of the last downloaded/uploaded file
virtual wxString GetContentType() const wxOVERRIDE { return wxEmptyString; }
// the last FTP server reply
const wxString& GetLastResult() const { return m_lastResult; }
// send any FTP command (should be full FTP command line but without
// trailing "\r\n") and return its return code
char SendCommand(const wxString& command);
// check that the command returned the given code
bool CheckCommand(const wxString& command, char expectedReturn)
{
// SendCommand() does updates m_lastError
return SendCommand(command) == expectedReturn;
}
// Filesystem commands
bool ChDir(const wxString& dir);
bool MkDir(const wxString& dir);
bool RmDir(const wxString& dir);
wxString Pwd();
bool Rename(const wxString& src, const wxString& dst);
bool RmFile(const wxString& path);
// Get the size of a file in the current dir.
// this function tries its best to deliver the size in bytes using BINARY
// (the SIZE command reports different sizes depending on whether
// type is set to ASCII or BINARY)
// returns -1 if file is non-existent or size could not be found
int GetFileSize(const wxString& fileName);
// Check to see if a file exists in the current dir
bool FileExists(const wxString& fileName);
// Download methods
bool Abort() wxOVERRIDE;
virtual wxInputStream *GetInputStream(const wxString& path) wxOVERRIDE;
virtual wxOutputStream *GetOutputStream(const wxString& path);
// Directory listing
// get the list of full filenames, the format is fixed: one file name per
// line
bool GetFilesList(wxArrayString& files,
const wxString& wildcard = wxEmptyString)
{
return GetList(files, wildcard, false);
}
// get a directory list in server dependent format - this can be shown
// directly to the user
bool GetDirList(wxArrayString& files,
const wxString& wildcard = wxEmptyString)
{
return GetList(files, wildcard, true);
}
// equivalent to either GetFilesList() (default) or GetDirList()
bool GetList(wxArrayString& files,
const wxString& wildcard = wxEmptyString,
bool details = false);
protected:
// this executes a simple ftp command with the given argument and returns
// true if it its return code starts with '2'
bool DoSimpleCommand(const wxChar *command,
const wxString& arg = wxEmptyString);
// get the server reply, return the first character of the reply code,
// '1'..'5' for normal FTP replies, 0 (*not* '0') if an error occurred
char GetResult();
// check that the result is equal to expected value
bool CheckResult(char ch) { return GetResult() == ch; }
// return the socket to be used, Passive/Active versions are used only by
// GetPort()
wxSocketBase *GetPort();
wxSocketBase *GetPassivePort();
wxSocketBase *GetActivePort();
// helper for GetPort()
wxString GetPortCmdArgument(const wxIPV4address& Local, const wxIPV4address& New);
// accept connection from server in active mode, returns the same socket as
// passed in passive mode
wxSocketBase *AcceptIfActive(wxSocketBase *sock);
// internal variables:
wxString m_lastResult;
// true if there is an FTP transfer going on
bool m_streaming;
// although this should be set to ASCII by default according to STD9,
// we will use BINARY transfer mode by default for backwards compatibility
TransferMode m_currentTransfermode;
bool m_bPassive;
// following is true when a read or write times out, we then assume
// the connection is dead and abort. we avoid additional delays this way
bool m_bEncounteredError;
friend class wxInputFTPStream;
friend class wxOutputFTPStream;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxFTP);
DECLARE_PROTOCOL(wxFTP)
};
// the trace mask used by assorted wxLogTrace() in ftp code, do
// wxLog::AddTraceMask(FTP_TRACE_MASK) to see them in output
#define FTP_TRACE_MASK wxT("ftp")
#endif // wxUSE_PROTOCOL_FTP
#endif // __WX_FTP_H__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/protocol/file.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/protocol/file.h
// Purpose: File protocol
// Author: Guilhem Lavaux
// Modified by:
// Created: 1997
// Copyright: (c) 1997, 1998 Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_PROTO_FILE_H__
#define __WX_PROTO_FILE_H__
#include "wx/defs.h"
#if wxUSE_PROTOCOL_FILE
#include "wx/protocol/protocol.h"
class WXDLLIMPEXP_NET wxFileProto: public wxProtocol
{
public:
wxFileProto();
virtual ~wxFileProto();
bool Abort() wxOVERRIDE { return true; }
wxString GetContentType() const wxOVERRIDE { return wxEmptyString; }
wxInputStream *GetInputStream(const wxString& path) wxOVERRIDE;
protected:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxFileProto);
DECLARE_PROTOCOL(wxFileProto)
};
#endif // wxUSE_PROTOCOL_FILE
#endif // __WX_PROTO_FILE_H__
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/protocol/protocol.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/protocol/protocol.h
// Purpose: Protocol base class
// Author: Guilhem Lavaux
// Modified by:
// Created: 10/07/1997
// Copyright: (c) 1997, 1998 Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PROTOCOL_PROTOCOL_H
#define _WX_PROTOCOL_PROTOCOL_H
#include "wx/defs.h"
#if wxUSE_PROTOCOL
#include "wx/object.h"
#include "wx/string.h"
#include "wx/stream.h"
#if wxUSE_SOCKETS
#include "wx/socket.h"
#endif
class WXDLLIMPEXP_FWD_NET wxProtocolLog;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
enum wxProtocolError
{
wxPROTO_NOERR = 0,
wxPROTO_NETERR,
wxPROTO_PROTERR,
wxPROTO_CONNERR,
wxPROTO_INVVAL,
wxPROTO_NOHNDLR,
wxPROTO_NOFILE,
wxPROTO_ABRT,
wxPROTO_RCNCT,
wxPROTO_STREAMING
};
// ----------------------------------------------------------------------------
// wxProtocol: abstract base class for all protocols
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_NET wxProtocol
#if wxUSE_SOCKETS
: public wxSocketClient
#else
: public wxObject
#endif
{
public:
wxProtocol();
virtual ~wxProtocol();
#if wxUSE_SOCKETS
bool Reconnect();
virtual bool Connect( const wxString& WXUNUSED(host) ) { return false; }
virtual bool Connect( const wxSockAddress& addr, bool WXUNUSED(wait) = true) wxOVERRIDE
{ return wxSocketClient::Connect(addr); }
// read a '\r\n' terminated line from the given socket and put it in
// result (without the terminators)
static wxProtocolError ReadLine(wxSocketBase *socket, wxString& result);
// read a line from this socket - this one can be overridden in the
// derived classes if different line termination convention is to be used
virtual wxProtocolError ReadLine(wxString& result);
#endif // wxUSE_SOCKETS
virtual bool Abort() = 0;
virtual wxInputStream *GetInputStream(const wxString& path) = 0;
virtual wxString GetContentType() const = 0;
// the error code
virtual wxProtocolError GetError() const { return m_lastError; }
void SetUser(const wxString& user) { m_username = user; }
void SetPassword(const wxString& passwd) { m_password = passwd; }
virtual void SetDefaultTimeout(wxUint32 Value);
// override wxSocketBase::SetTimeout function to avoid that the internal
// m_uiDefaultTimeout goes out-of-sync:
virtual void SetTimeout(long seconds) wxOVERRIDE
{ SetDefaultTimeout(seconds); }
// logging support: each wxProtocol object may have the associated logger
// (by default there is none) which is used to log network requests and
// responses
// set the logger, deleting the old one and taking ownership of this one
void SetLog(wxProtocolLog *log);
// return the current logger, may be NULL
wxProtocolLog *GetLog() const { return m_log; }
// detach the existing logger without deleting it, the caller is
// responsible for deleting the returned pointer if it's non-NULL
wxProtocolLog *DetachLog()
{
wxProtocolLog * const log = m_log;
m_log = NULL;
return log;
}
// these functions forward to the same functions with the same names in
// wxProtocolLog if we have a valid logger and do nothing otherwise
void LogRequest(const wxString& str);
void LogResponse(const wxString& str);
protected:
// the timeout associated with the protocol:
wxUint32 m_uiDefaultTimeout;
wxString m_username;
wxString m_password;
// this must be always updated by the derived classes!
wxProtocolError m_lastError;
private:
wxProtocolLog *m_log;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxProtocol);
};
// ----------------------------------------------------------------------------
// macros for protocol classes
// ----------------------------------------------------------------------------
#define DECLARE_PROTOCOL(class) \
public: \
static wxProtoInfo g_proto_##class;
#define IMPLEMENT_PROTOCOL(class, name, serv, host) \
wxProtoInfo class::g_proto_##class(name, serv, host, wxCLASSINFO(class)); \
bool wxProtocolUse##class = true;
#define USE_PROTOCOL(class) \
extern bool wxProtocolUse##class ; \
static struct wxProtocolUserFor##class \
{ \
wxProtocolUserFor##class() { wxProtocolUse##class = true; } \
} wxProtocolDoUse##class;
class WXDLLIMPEXP_NET wxProtoInfo : public wxObject
{
public:
wxProtoInfo(const wxChar *name,
const wxChar *serv_name,
const bool need_host1,
wxClassInfo *info);
protected:
wxProtoInfo *next;
wxString m_protoname;
wxString prefix;
wxString m_servname;
wxClassInfo *m_cinfo;
bool m_needhost;
friend class wxURL;
wxDECLARE_DYNAMIC_CLASS(wxProtoInfo);
wxDECLARE_NO_COPY_CLASS(wxProtoInfo);
};
#endif // wxUSE_PROTOCOL
#endif // _WX_PROTOCOL_PROTOCOL_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/protocol/log.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/protocol/log.h
// Purpose: wxProtocolLog class for logging network exchanges
// Author: Troelsk, Vadim Zeitlin
// Created: 2009-03-06
// Copyright: (c) 2009 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PROTOCOL_LOG_H_
#define _WX_PROTOCOL_LOG_H_
#include "wx/string.h"
// ----------------------------------------------------------------------------
// wxProtocolLog: simple class for logging network requests and responses
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_NET wxProtocolLog
{
public:
// Create object doing the logging using wxLogTrace() with the specified
// trace mask.
wxProtocolLog(const wxString& traceMask)
: m_traceMask(traceMask)
{
}
// Virtual dtor for the base class
virtual ~wxProtocolLog() { }
// Called by wxProtocol-derived classes to actually log something
virtual void LogRequest(const wxString& str)
{
DoLogString("==> " + str);
}
virtual void LogResponse(const wxString& str)
{
DoLogString("<== " + str);
}
protected:
// Can be overridden by the derived classes.
virtual void DoLogString(const wxString& str);
private:
const wxString m_traceMask;
wxDECLARE_NO_COPY_CLASS(wxProtocolLog);
};
#endif // _WX_PROTOCOL_LOG_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/protocol/http.h | /////////////////////////////////////////////////////////////////////////////
// Name: wx/protocol/http.h
// Purpose: HTTP protocol
// Author: Guilhem Lavaux
// Modified by: Simo Virokannas (authentication, Dec 2005)
// Created: August 1997
// Copyright: (c) 1997, 1998 Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HTTP_H
#define _WX_HTTP_H
#include "wx/defs.h"
#if wxUSE_PROTOCOL_HTTP
#include "wx/hashmap.h"
#include "wx/protocol/protocol.h"
#include "wx/buffer.h"
class WXDLLIMPEXP_NET wxHTTP : public wxProtocol
{
public:
wxHTTP();
virtual ~wxHTTP();
virtual bool Connect(const wxString& host, unsigned short port);
virtual bool Connect(const wxString& host) wxOVERRIDE { return Connect(host, 0); }
virtual bool Connect(const wxSockAddress& addr, bool wait = true) wxOVERRIDE;
bool Abort() wxOVERRIDE;
wxInputStream *GetInputStream(const wxString& path) wxOVERRIDE;
wxString GetContentType() const wxOVERRIDE;
wxString GetHeader(const wxString& header) const;
int GetResponse() const { return m_http_response; }
void SetMethod(const wxString& method) { m_method = method; }
void SetHeader(const wxString& header, const wxString& h_data);
bool SetPostText(const wxString& contentType,
const wxString& data,
const wxMBConv& conv = wxConvUTF8);
bool SetPostBuffer(const wxString& contentType, const wxMemoryBuffer& data);
void SetProxyMode(bool on);
/* Cookies */
wxString GetCookie(const wxString& cookie) const;
bool HasCookies() const { return m_cookies.size() > 0; }
// Use the other SetPostBuffer() overload or SetPostText() instead.
wxDEPRECATED(void SetPostBuffer(const wxString& post_buf));
protected:
typedef wxStringToStringHashMap::iterator wxHeaderIterator;
typedef wxStringToStringHashMap::const_iterator wxHeaderConstIterator;
typedef wxStringToStringHashMap::iterator wxCookieIterator;
typedef wxStringToStringHashMap::const_iterator wxCookieConstIterator;
bool BuildRequest(const wxString& path, const wxString& method);
void SendHeaders();
bool ParseHeaders();
wxString GenerateAuthString(const wxString& user, const wxString& pass) const;
// find the header in m_headers
wxHeaderIterator FindHeader(const wxString& header);
wxHeaderConstIterator FindHeader(const wxString& header) const;
wxCookieIterator FindCookie(const wxString& cookie);
wxCookieConstIterator FindCookie(const wxString& cookie) const;
// deletes the header value strings
void ClearHeaders();
void ClearCookies();
// internal variables:
wxString m_method;
wxStringToStringHashMap m_cookies;
wxStringToStringHashMap m_headers;
bool m_read,
m_proxy_mode;
wxSockAddress *m_addr;
wxMemoryBuffer m_postBuffer;
wxString m_contentType;
int m_http_response;
wxDECLARE_DYNAMIC_CLASS(wxHTTP);
DECLARE_PROTOCOL(wxHTTP)
wxDECLARE_NO_COPY_CLASS(wxHTTP);
};
#endif // wxUSE_PROTOCOL_HTTP
#endif // _WX_HTTP_H
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/art_internal.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/art_internal.h
// Purpose: Helper functions & classes used by ribbon art providers
// Author: Peter Cawley
// Modified by:
// Created: 2009-08-04
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_ART_INTERNAL_H_
#define _WX_RIBBON_ART_INTERNAL_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
WXDLLIMPEXP_RIBBON wxColour wxRibbonInterpolateColour(
const wxColour& start_colour,
const wxColour& end_colour,
int position,
int start_position,
int end_position);
WXDLLIMPEXP_RIBBON bool wxRibbonCanLabelBreakAtPosition(
const wxString& label,
size_t pos);
WXDLLIMPEXP_RIBBON void wxRibbonDrawParallelGradientLines(
wxDC& dc,
int nlines,
const wxPoint* line_origins,
int stepx,
int stepy,
int numsteps,
int offset_x,
int offset_y,
const wxColour& start_colour,
const wxColour& end_colour);
WXDLLIMPEXP_RIBBON wxBitmap wxRibbonLoadPixmap(
const char* const* bits,
wxColour fore);
/*
HSL colour class, using interface as discussed in wx-dev. Provided mainly
for art providers to perform colour scheme calculations in the HSL colour
space. If such a class makes it into base / core, then this class should be
removed and users switched over to the one in base / core.
0.0 <= Hue < 360.0
0.0 <= Saturation <= 1.0
0.0 <= Luminance <= 1.0
*/
class WXDLLIMPEXP_RIBBON wxRibbonHSLColour
{
public:
wxRibbonHSLColour()
: hue(0.0), saturation(0.0), luminance(0.0) {}
wxRibbonHSLColour(float H, float S, float L)
: hue(H), saturation(S), luminance(L) { }
wxRibbonHSLColour(const wxColour& C);
wxColour ToRGB() const;
wxRibbonHSLColour& MakeDarker(float delta);
wxRibbonHSLColour Darker(float delta) const;
wxRibbonHSLColour Lighter(float delta) const;
wxRibbonHSLColour Saturated(float delta) const;
wxRibbonHSLColour Desaturated(float delta) const;
wxRibbonHSLColour ShiftHue(float delta) const;
float hue, saturation, luminance;
};
WXDLLIMPEXP_RIBBON wxRibbonHSLColour wxRibbonShiftLuminance(
wxRibbonHSLColour colour, float amount);
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_ART_INTERNAL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/panel.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/panel.h
// Purpose: Ribbon-style container for a group of related tools / controls
// Author: Peter Cawley
// Modified by:
// Created: 2009-05-25
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_PANEL_H_
#define _WX_RIBBON_PANEL_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/bitmap.h"
#include "wx/ribbon/control.h"
enum wxRibbonPanelOption
{
wxRIBBON_PANEL_NO_AUTO_MINIMISE = 1 << 0,
wxRIBBON_PANEL_EXT_BUTTON = 1 << 3,
wxRIBBON_PANEL_MINIMISE_BUTTON = 1 << 4,
wxRIBBON_PANEL_STRETCH = 1 << 5,
wxRIBBON_PANEL_FLEXIBLE = 1 << 6,
wxRIBBON_PANEL_DEFAULT_STYLE = 0
};
class WXDLLIMPEXP_RIBBON wxRibbonPanel : public wxRibbonControl
{
public:
wxRibbonPanel();
wxRibbonPanel(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& label = wxEmptyString,
const wxBitmap& minimised_icon = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxRIBBON_PANEL_DEFAULT_STYLE);
virtual ~wxRibbonPanel();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& label = wxEmptyString,
const wxBitmap& icon = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxRIBBON_PANEL_DEFAULT_STYLE);
wxBitmap& GetMinimisedIcon() {return m_minimised_icon;}
const wxBitmap& GetMinimisedIcon() const {return m_minimised_icon;}
bool IsMinimised() const;
bool IsMinimised(wxSize at_size) const;
bool IsHovered() const;
bool IsExtButtonHovered() const;
bool CanAutoMinimise() const;
bool ShowExpanded();
bool HideExpanded();
void SetArtProvider(wxRibbonArtProvider* art) wxOVERRIDE;
virtual bool Realize() wxOVERRIDE;
virtual bool Layout() wxOVERRIDE;
virtual wxSize GetMinSize() const wxOVERRIDE;
virtual bool IsSizingContinuous() const wxOVERRIDE;
virtual void AddChild(wxWindowBase *child) wxOVERRIDE;
virtual void RemoveChild(wxWindowBase *child) wxOVERRIDE;
virtual bool HasExtButton() const;
wxRibbonPanel* GetExpandedDummy();
wxRibbonPanel* GetExpandedPanel();
// Finds the best width and height given the parent's width and height
virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const wxOVERRIDE;
long GetFlags() { return m_flags; }
void HideIfExpanded();
protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual wxSize GetPanelSizerBestSize() const;
wxSize GetPanelSizerMinSize() const;
wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
wxSize GetMinNotMinimisedSize() const;
virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
virtual wxSize DoGetNextLargerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
void OnSize(wxSizeEvent& evt);
void OnEraseBackground(wxEraseEvent& evt);
void OnPaint(wxPaintEvent& evt);
void OnMouseEnter(wxMouseEvent& evt);
void OnMouseEnterChild(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
void OnMouseLeaveChild(wxMouseEvent& evt);
void OnMouseClick(wxMouseEvent& evt);
void OnMotion(wxMouseEvent& evt);
void OnKillFocus(wxFocusEvent& evt);
void OnChildKillFocus(wxFocusEvent& evt);
void TestPositionForHover(const wxPoint& pos);
bool ShouldSendEventToDummy(wxEvent& evt);
virtual bool TryAfter(wxEvent& evt) wxOVERRIDE;
void CommonInit(const wxString& label, const wxBitmap& icon, long style);
static wxRect GetExpandedPosition(wxRect panel,
wxSize expanded_size,
wxDirection direction);
wxBitmap m_minimised_icon;
wxBitmap m_minimised_icon_resized;
wxSize m_smallest_unminimised_size;
wxSize m_minimised_size;
wxDirection m_preferred_expand_direction;
wxRibbonPanel* m_expanded_dummy;
wxRibbonPanel* m_expanded_panel;
wxWindow* m_child_with_focus;
long m_flags;
bool m_minimised;
bool m_hovered;
bool m_ext_button_hovered;
wxRect m_ext_button_rect;
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonPanel);
wxDECLARE_EVENT_TABLE();
#endif
};
class WXDLLIMPEXP_RIBBON wxRibbonPanelEvent : public wxCommandEvent
{
public:
wxRibbonPanelEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
wxRibbonPanel* panel = NULL)
: wxCommandEvent(command_type, win_id)
, m_panel(panel)
{
}
#ifndef SWIG
wxRibbonPanelEvent(const wxRibbonPanelEvent& e) : wxCommandEvent(e)
{
m_panel = e.m_panel;
}
#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonPanelEvent(*this); }
wxRibbonPanel* GetPanel() {return m_panel;}
void SetPanel(wxRibbonPanel* panel) {m_panel = panel;}
protected:
wxRibbonPanel* m_panel;
#ifndef SWIG
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonPanelEvent);
#endif
};
#ifndef SWIG
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent);
typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&);
#define wxRibbonPanelEventHandler(func) \
wxEVENT_HANDLER_CAST(wxRibbonPanelEventFunction, func)
#define EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED;
%pythoncode {
EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 )
}
#endif
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_PANEL_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/toolbar.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/toolbar.h
// Purpose: Ribbon-style tool bar
// Author: Peter Cawley
// Modified by:
// Created: 2009-07-06
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_TOOLBAR_H_
#define _WX_RIBBON_TOOLBAR_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/ribbon/control.h"
#include "wx/ribbon/art.h"
class wxRibbonToolBarToolBase;
class wxRibbonToolBarToolGroup;
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonToolBarToolGroup*, wxArrayRibbonToolBarToolGroup, class WXDLLIMPEXP_RIBBON);
enum wxRibbonToolBarToolState
{
wxRIBBON_TOOLBAR_TOOL_FIRST = 1 << 0,
wxRIBBON_TOOLBAR_TOOL_LAST = 1 << 1,
wxRIBBON_TOOLBAR_TOOL_POSITION_MASK = wxRIBBON_TOOLBAR_TOOL_FIRST | wxRIBBON_TOOLBAR_TOOL_LAST,
wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED = 1 << 3,
wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED = 1 << 4,
wxRIBBON_TOOLBAR_TOOL_HOVER_MASK = wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED | wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED,
wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE = 1 << 5,
wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE = 1 << 6,
wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK = wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE | wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE,
wxRIBBON_TOOLBAR_TOOL_DISABLED = 1 << 7,
wxRIBBON_TOOLBAR_TOOL_TOGGLED = 1 << 8,
wxRIBBON_TOOLBAR_TOOL_STATE_MASK = 0x1F8
};
class WXDLLIMPEXP_RIBBON wxRibbonToolBar : public wxRibbonControl
{
public:
wxRibbonToolBar();
wxRibbonToolBar(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual ~wxRibbonToolBar();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual wxRibbonToolBarToolBase* AddTool(
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL);
virtual wxRibbonToolBarToolBase* AddDropdownTool(
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* AddHybridTool(
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* AddToggleTool(
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* AddTool(
int tool_id,
const wxBitmap& bitmap,
const wxBitmap& bitmap_disabled = wxNullBitmap,
const wxString& help_string = wxEmptyString,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
wxObject* client_data = NULL);
virtual wxRibbonToolBarToolBase* AddSeparator();
virtual wxRibbonToolBarToolBase* InsertTool(
size_t pos,
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL);
virtual wxRibbonToolBarToolBase* InsertDropdownTool(
size_t pos,
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* InsertHybridTool(
size_t pos,
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* InsertToggleTool(
size_t pos,
int tool_id,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonToolBarToolBase* InsertTool(
size_t pos,
int tool_id,
const wxBitmap& bitmap,
const wxBitmap& bitmap_disabled = wxNullBitmap,
const wxString& help_string = wxEmptyString,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
wxObject* client_data = NULL);
virtual wxRibbonToolBarToolBase* InsertSeparator(size_t pos);
virtual void ClearTools();
virtual bool DeleteTool(int tool_id);
virtual bool DeleteToolByPos(size_t pos);
virtual wxRibbonToolBarToolBase* FindById(int tool_id)const;
virtual wxRibbonToolBarToolBase* GetToolByPos(size_t pos)const;
virtual size_t GetToolCount() const;
virtual int GetToolId(const wxRibbonToolBarToolBase* tool)const;
virtual wxObject* GetToolClientData(int tool_id)const;
virtual bool GetToolEnabled(int tool_id)const;
virtual wxString GetToolHelpString(int tool_id)const;
virtual wxRibbonButtonKind GetToolKind(int tool_id)const;
virtual int GetToolPos(int tool_id)const;
virtual bool GetToolState(int tool_id)const;
virtual bool Realize() wxOVERRIDE;
virtual void SetRows(int nMin, int nMax = -1);
virtual void SetToolClientData(int tool_id, wxObject* clientData);
virtual void SetToolDisabledBitmap(int tool_id, const wxBitmap &bitmap);
virtual void SetToolHelpString(int tool_id, const wxString& helpString);
virtual void SetToolNormalBitmap(int tool_id, const wxBitmap &bitmap);
virtual bool IsSizingContinuous() const wxOVERRIDE;
virtual void EnableTool(int tool_id, bool enable = true);
virtual void ToggleTool(int tool_id, bool checked);
// Finds the best width and height given the parent's width and height
virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const wxOVERRIDE;
protected:
friend class wxRibbonToolBarEvent;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
void OnEraseBackground(wxEraseEvent& evt);
void OnMouseDown(wxMouseEvent& evt);
void OnMouseEnter(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseUp(wxMouseEvent& evt);
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
virtual wxSize DoGetNextLargerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
void CommonInit(long style);
void AppendGroup();
wxRibbonToolBarToolGroup* InsertGroup(size_t pos);
virtual void UpdateWindowUI(long flags) wxOVERRIDE;
static wxBitmap MakeDisabledBitmap(const wxBitmap& original);
wxArrayRibbonToolBarToolGroup m_groups;
wxRibbonToolBarToolBase* m_hover_tool;
wxRibbonToolBarToolBase* m_active_tool;
wxSize* m_sizes;
int m_nrows_min;
int m_nrows_max;
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonToolBar);
wxDECLARE_EVENT_TABLE();
#endif
};
class WXDLLIMPEXP_RIBBON wxRibbonToolBarEvent : public wxCommandEvent
{
public:
wxRibbonToolBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
wxRibbonToolBar* bar = NULL)
: wxCommandEvent(command_type, win_id)
, m_bar(bar)
{
}
#ifndef SWIG
wxRibbonToolBarEvent(const wxRibbonToolBarEvent& e) : wxCommandEvent(e)
{
m_bar = e.m_bar;
}
#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonToolBarEvent(*this); }
wxRibbonToolBar* GetBar() {return m_bar;}
void SetBar(wxRibbonToolBar* bar) {m_bar = bar;}
bool PopupMenu(wxMenu* menu);
protected:
wxRibbonToolBar* m_bar;
#ifndef SWIG
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonToolBarEvent);
#endif
};
#ifndef SWIG
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_CLICKED, wxRibbonToolBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, wxRibbonToolBarEvent);
typedef void (wxEvtHandler::*wxRibbonToolBarEventFunction)(wxRibbonToolBarEvent&);
#define wxRibbonToolBarEventHandler(func) \
wxEVENT_HANDLER_CAST(wxRibbonToolBarEventFunction, func)
#define EVT_RIBBONTOOLBAR_CLICKED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_CLICKED, winid, wxRibbonToolBarEventHandler(fn))
#define EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, winid, wxRibbonToolBarEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_RIBBONTOOLBAR_CLICKED;
%constant wxEventType wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED;
%pythoncode {
EVT_RIBBONTOOLBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_CLICKED, 1 )
EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, 1 )
}
#endif
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_RIBBONTOOL_CLICKED wxEVT_RIBBONTOOLBAR_CLICKED
#define wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_TOOLBAR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/buttonbar.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/buttonbar.h
// Purpose: Ribbon control similar to a tool bar
// Author: Peter Cawley
// Modified by:
// Created: 2009-07-01
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_BUTTON_BAR_H_
#define _WX_RIBBON_BUTTON_BAR_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/ribbon/art.h"
#include "wx/ribbon/control.h"
#include "wx/dynarray.h"
class wxRibbonButtonBarButtonBase;
class wxRibbonButtonBarLayout;
class wxRibbonButtonBarButtonInstance;
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonButtonBarLayout*, wxArrayRibbonButtonBarLayout, class WXDLLIMPEXP_RIBBON);
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonButtonBarButtonBase*, wxArrayRibbonButtonBarButtonBase, class WXDLLIMPEXP_RIBBON);
class WXDLLIMPEXP_RIBBON wxRibbonButtonBar : public wxRibbonControl
{
public:
wxRibbonButtonBar();
wxRibbonButtonBar(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual ~wxRibbonButtonBar();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual wxRibbonButtonBarButtonBase* AddButton(
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL);
// NB: help_string cannot be optional as that would cause the signature
// to be identical to the full version of AddButton when 3 arguments are
// given.
virtual wxRibbonButtonBarButtonBase* AddDropdownButton(
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* AddHybridButton(
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* AddToggleButton(
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* AddButton(
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bitmap_small = wxNullBitmap,
const wxBitmap& bitmap_disabled = wxNullBitmap,
const wxBitmap& bitmap_small_disabled = wxNullBitmap,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* InsertButton(
size_t pos,
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL);
virtual wxRibbonButtonBarButtonBase* InsertDropdownButton(
size_t pos,
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* InsertHybridButton(
size_t pos,
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* InsertToggleButton(
size_t pos,
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
virtual wxRibbonButtonBarButtonBase* InsertButton(
size_t pos,
int button_id,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bitmap_small = wxNullBitmap,
const wxBitmap& bitmap_disabled = wxNullBitmap,
const wxBitmap& bitmap_small_disabled = wxNullBitmap,
wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
const wxString& help_string = wxEmptyString);
void SetItemClientObject(wxRibbonButtonBarButtonBase* item, wxClientData* data);
wxClientData* GetItemClientObject(const wxRibbonButtonBarButtonBase* item) const;
void SetItemClientData(wxRibbonButtonBarButtonBase* item, void* data);
void* GetItemClientData(const wxRibbonButtonBarButtonBase* item) const;
virtual size_t GetButtonCount() const;
virtual wxRibbonButtonBarButtonBase *GetItem(size_t n) const;
virtual wxRibbonButtonBarButtonBase *GetItemById(int id) const;
virtual int GetItemId(wxRibbonButtonBarButtonBase *button) const;
virtual bool Realize() wxOVERRIDE;
virtual void ClearButtons();
virtual bool DeleteButton(int button_id);
virtual void EnableButton(int button_id, bool enable = true);
virtual void ToggleButton(int button_id, bool checked);
virtual void SetButtonIcon(
int button_id,
const wxBitmap& bitmap,
const wxBitmap& bitmap_small = wxNullBitmap,
const wxBitmap& bitmap_disabled = wxNullBitmap,
const wxBitmap& bitmap_small_disabled = wxNullBitmap);
virtual void SetButtonText(int button_id, const wxString& label);
virtual void SetButtonTextMinWidth(int button_id,
int min_width_medium, int min_width_large);
virtual void SetButtonTextMinWidth(int button_id, const wxString& label);
virtual void SetButtonMinSizeClass(int button_id,
wxRibbonButtonBarButtonState min_size_class);
virtual void SetButtonMaxSizeClass(int button_id,
wxRibbonButtonBarButtonState max_size_class);
virtual wxRibbonButtonBarButtonBase *GetActiveItem() const;
virtual wxRibbonButtonBarButtonBase *GetHoveredItem() const;
virtual void SetArtProvider(wxRibbonArtProvider* art) wxOVERRIDE;
virtual bool IsSizingContinuous() const wxOVERRIDE;
virtual wxSize GetMinSize() const wxOVERRIDE;
void SetShowToolTipsForDisabled(bool show);
bool GetShowToolTipsForDisabled() const;
protected:
friend class wxRibbonButtonBarEvent;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
void OnEraseBackground(wxEraseEvent& evt);
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseEnter(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
void OnMouseDown(wxMouseEvent& evt);
void OnMouseUp(wxMouseEvent& evt);
virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
virtual wxSize DoGetNextLargerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
void CommonInit(long style);
void MakeLayouts();
void TryCollapseLayout(wxRibbonButtonBarLayout* original,
size_t first_btn, size_t* last_button,
wxRibbonButtonBarButtonState target_size);
void MakeBitmaps(wxRibbonButtonBarButtonBase* base,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_large_disabled,
const wxBitmap& bitmap_small,
const wxBitmap& bitmap_small_disabled);
static wxBitmap MakeResizedBitmap(const wxBitmap& original, wxSize size);
static wxBitmap MakeDisabledBitmap(const wxBitmap& original);
void FetchButtonSizeInfo(wxRibbonButtonBarButtonBase* button,
wxRibbonButtonBarButtonState size, wxDC& dc);
virtual void UpdateWindowUI(long flags) wxOVERRIDE;
wxArrayRibbonButtonBarLayout m_layouts;
wxArrayRibbonButtonBarButtonBase m_buttons;
wxRibbonButtonBarButtonInstance* m_hovered_button;
wxRibbonButtonBarButtonInstance* m_active_button;
wxPoint m_layout_offset;
wxSize m_bitmap_size_large;
wxSize m_bitmap_size_small;
int m_current_layout;
bool m_layouts_valid;
bool m_lock_active_state;
bool m_show_tooltips_for_disabled;
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonButtonBar);
wxDECLARE_EVENT_TABLE();
#endif
};
class WXDLLIMPEXP_RIBBON wxRibbonButtonBarEvent : public wxCommandEvent
{
public:
wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
wxRibbonButtonBar* bar = NULL,
wxRibbonButtonBarButtonBase* button = NULL)
: wxCommandEvent(command_type, win_id)
, m_bar(bar), m_button(button)
{
}
#ifndef SWIG
wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e)
{
m_bar = e.m_bar;
m_button = e.m_button;
}
#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonButtonBarEvent(*this); }
wxRibbonButtonBar* GetBar() {return m_bar;}
wxRibbonButtonBarButtonBase *GetButton() { return m_button; }
void SetBar(wxRibbonButtonBar* bar) {m_bar = bar;}
void SetButton(wxRibbonButtonBarButtonBase* button) { m_button = button; }
bool PopupMenu(wxMenu* menu);
protected:
wxRibbonButtonBar* m_bar;
wxRibbonButtonBarButtonBase *m_button;
#ifndef SWIG
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonButtonBarEvent);
#endif
};
#ifndef SWIG
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_CLICKED, wxRibbonButtonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, wxRibbonButtonBarEvent);
typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEvent&);
#define wxRibbonButtonBarEventHandler(func) \
wxEVENT_HANDLER_CAST(wxRibbonButtonBarEventFunction, func)
#define EVT_RIBBONBUTTONBAR_CLICKED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_CLICKED, winid, wxRibbonButtonBarEventHandler(fn))
#define EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_RIBBONBUTTONBAR_CLICKED;
%constant wxEventType wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED;
%pythoncode {
EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_CLICKED, 1 )
EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, 1 )
}
#endif
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_RIBBONBUTTON_CLICKED wxEVT_RIBBONBUTTONBAR_CLICKED
#define wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_BUTTON_BAR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/gallery.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/gallery.h
// Purpose: Ribbon control which displays a gallery of items to choose from
// Author: Peter Cawley
// Modified by:
// Created: 2009-07-22
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_GALLERY_H_
#define _WX_RIBBON_GALLERY_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/ribbon/art.h"
#include "wx/ribbon/control.h"
class wxRibbonGalleryItem;
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonGalleryItem*, wxArrayRibbonGalleryItem, class WXDLLIMPEXP_RIBBON);
class WXDLLIMPEXP_RIBBON wxRibbonGallery : public wxRibbonControl
{
public:
wxRibbonGallery();
wxRibbonGallery(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual ~wxRibbonGallery();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
void Clear();
bool IsEmpty() const;
unsigned int GetCount() const;
wxRibbonGalleryItem* GetItem(unsigned int n);
wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id);
wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id, void* clientData);
wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id, wxClientData* clientData);
void SetItemClientObject(wxRibbonGalleryItem* item, wxClientData* data);
wxClientData* GetItemClientObject(const wxRibbonGalleryItem* item) const;
void SetItemClientData(wxRibbonGalleryItem* item, void* data);
void* GetItemClientData(const wxRibbonGalleryItem* item) const;
void SetSelection(wxRibbonGalleryItem* item);
wxRibbonGalleryItem* GetSelection() const;
wxRibbonGalleryItem* GetHoveredItem() const;
wxRibbonGalleryItem* GetActiveItem() const;
wxRibbonGalleryButtonState GetUpButtonState() const;
wxRibbonGalleryButtonState GetDownButtonState() const;
wxRibbonGalleryButtonState GetExtensionButtonState() const;
bool IsHovered() const;
virtual bool IsSizingContinuous() const wxOVERRIDE;
virtual bool Realize() wxOVERRIDE;
virtual bool Layout() wxOVERRIDE;
virtual bool ScrollLines(int lines) wxOVERRIDE;
bool ScrollPixels(int pixels);
void EnsureVisible(const wxRibbonGalleryItem* item);
protected:
wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
void CommonInit(long style);
void CalculateMinSize();
bool TestButtonHover(const wxRect& rect, wxPoint pos,
wxRibbonGalleryButtonState* state);
void OnEraseBackground(wxEraseEvent& evt);
void OnMouseEnter(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
void OnMouseDown(wxMouseEvent& evt);
void OnMouseUp(wxMouseEvent& evt);
void OnMouseDClick(wxMouseEvent& evt);
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
int GetScrollLineSize() const;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
virtual wxSize DoGetNextLargerSize(wxOrientation direction,
wxSize relative_to) const wxOVERRIDE;
wxArrayRibbonGalleryItem m_items;
wxRibbonGalleryItem* m_selected_item;
wxRibbonGalleryItem* m_hovered_item;
wxRibbonGalleryItem* m_active_item;
wxSize m_bitmap_size;
wxSize m_bitmap_padded_size;
wxSize m_best_size;
wxRect m_client_rect;
wxRect m_scroll_up_button_rect;
wxRect m_scroll_down_button_rect;
wxRect m_extension_button_rect;
const wxRect* m_mouse_active_rect;
int m_item_separation_x;
int m_item_separation_y;
int m_scroll_amount;
int m_scroll_limit;
wxRibbonGalleryButtonState m_up_button_state;
wxRibbonGalleryButtonState m_down_button_state;
wxRibbonGalleryButtonState m_extension_button_state;
bool m_hovered;
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonGallery);
wxDECLARE_EVENT_TABLE();
#endif
};
class WXDLLIMPEXP_RIBBON wxRibbonGalleryEvent : public wxCommandEvent
{
public:
wxRibbonGalleryEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
wxRibbonGallery* gallery = NULL,
wxRibbonGalleryItem* item = NULL)
: wxCommandEvent(command_type, win_id)
, m_gallery(gallery), m_item(item)
{
}
#ifndef SWIG
wxRibbonGalleryEvent(const wxRibbonGalleryEvent& e) : wxCommandEvent(e)
{
m_gallery = e.m_gallery;
m_item = e.m_item;
}
#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonGalleryEvent(*this); }
wxRibbonGallery* GetGallery() {return m_gallery;}
wxRibbonGalleryItem* GetGalleryItem() {return m_item;}
void SetGallery(wxRibbonGallery* gallery) {m_gallery = gallery;}
void SetGalleryItem(wxRibbonGalleryItem* item) {m_item = item;}
protected:
wxRibbonGallery* m_gallery;
wxRibbonGalleryItem* m_item;
#ifndef SWIG
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonGalleryEvent);
#endif
};
#ifndef SWIG
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent);
typedef void (wxEvtHandler::*wxRibbonGalleryEventFunction)(wxRibbonGalleryEvent&);
#define wxRibbonGalleryEventHandler(func) \
wxEVENT_HANDLER_CAST(wxRibbonGalleryEventFunction, func)
#define EVT_RIBBONGALLERY_HOVER_CHANGED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_HOVER_CHANGED, winid, wxRibbonGalleryEventHandler(fn))
#define EVT_RIBBONGALLERY_SELECTED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_SELECTED, winid, wxRibbonGalleryEventHandler(fn))
#define EVT_RIBBONGALLERY_CLICKED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_CLICKED, winid, wxRibbonGalleryEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED;
%constant wxEventType wxEVT_RIBBONGALLERY_SELECTED;
%constant wxEventType wxEVT_RIBBONGALLERY_CLICKED;
%pythoncode {
EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_HOVER_CHANGED, 1 )
EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_SELECTED, 1 )
EVT_RIBBONGALLERY_CLICKED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_CLICKED, 1 )
}
#endif // SWIG
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED wxEVT_RIBBONGALLERY_HOVER_CHANGED
#define wxEVT_COMMAND_RIBBONGALLERY_SELECTED wxEVT_RIBBONGALLERY_SELECTED
#define wxEVT_COMMAND_RIBBONGALLERY_CLICKED wxEVT_RIBBONGALLERY_CLICKED
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_GALLERY_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/bar.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/bar.h
// Purpose: Top-level component of the ribbon-bar-style interface
// Author: Peter Cawley
// Modified by:
// Created: 2009-05-23
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_BAR_H_
#define _WX_RIBBON_BAR_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/ribbon/control.h"
#include "wx/ribbon/page.h"
enum wxRibbonBarOption
{
wxRIBBON_BAR_SHOW_PAGE_LABELS = 1 << 0,
wxRIBBON_BAR_SHOW_PAGE_ICONS = 1 << 1,
wxRIBBON_BAR_FLOW_HORIZONTAL = 0,
wxRIBBON_BAR_FLOW_VERTICAL = 1 << 2,
wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS = 1 << 3,
wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS = 1 << 4,
wxRIBBON_BAR_ALWAYS_SHOW_TABS = 1 << 5,
wxRIBBON_BAR_SHOW_TOGGLE_BUTTON = 1 << 6,
wxRIBBON_BAR_SHOW_HELP_BUTTON = 1 << 7,
wxRIBBON_BAR_DEFAULT_STYLE = wxRIBBON_BAR_FLOW_HORIZONTAL
| wxRIBBON_BAR_SHOW_PAGE_LABELS
| wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS
| wxRIBBON_BAR_SHOW_TOGGLE_BUTTON
| wxRIBBON_BAR_SHOW_HELP_BUTTON,
wxRIBBON_BAR_FOLDBAR_STYLE = wxRIBBON_BAR_FLOW_VERTICAL
| wxRIBBON_BAR_SHOW_PAGE_ICONS
| wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS
| wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS
};
enum wxRibbonDisplayMode
{
wxRIBBON_BAR_PINNED,
wxRIBBON_BAR_MINIMIZED,
wxRIBBON_BAR_EXPANDED
};
class WXDLLIMPEXP_RIBBON wxRibbonBarEvent : public wxNotifyEvent
{
public:
wxRibbonBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
wxRibbonPage* page = NULL)
: wxNotifyEvent(command_type, win_id)
, m_page(page)
{
}
#ifndef SWIG
wxRibbonBarEvent(const wxRibbonBarEvent& c) : wxNotifyEvent(c)
{
m_page = c.m_page;
}
#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonBarEvent(*this); }
wxRibbonPage* GetPage() {return m_page;}
void SetPage(wxRibbonPage* page) {m_page = page;}
protected:
wxRibbonPage* m_page;
#ifndef SWIG
private:
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonBarEvent);
#endif
};
class WXDLLIMPEXP_RIBBON wxRibbonPageTabInfo
{
public:
wxRect rect;
wxRibbonPage *page;
int ideal_width;
int small_begin_need_separator_width;
int small_must_have_separator_width;
int minimum_width;
bool active;
bool hovered;
bool highlight;
bool shown;
};
#ifndef SWIG
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRibbonPageTabInfo, wxRibbonPageTabInfoArray, WXDLLIMPEXP_RIBBON);
#endif
class WXDLLIMPEXP_RIBBON wxRibbonBar : public wxRibbonControl
{
public:
wxRibbonBar();
wxRibbonBar(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxRIBBON_BAR_DEFAULT_STYLE);
virtual ~wxRibbonBar();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxRIBBON_BAR_DEFAULT_STYLE);
void SetTabCtrlMargins(int left, int right);
void SetArtProvider(wxRibbonArtProvider* art) wxOVERRIDE;
bool SetActivePage(size_t page);
bool SetActivePage(wxRibbonPage* page);
int GetActivePage() const;
wxRibbonPage* GetPage(int n);
size_t GetPageCount() const;
bool DismissExpandedPanel();
int GetPageNumber(wxRibbonPage* page) const;
void DeletePage(size_t n);
void ClearPages();
bool IsPageShown(size_t page) const;
void ShowPage(size_t page, bool show = true);
void HidePage(size_t page) { ShowPage(page, false); }
bool IsPageHighlighted(size_t page) const;
void AddPageHighlight(size_t page, bool highlight = true);
void RemovePageHighlight(size_t page) { AddPageHighlight(page, false); }
void ShowPanels(wxRibbonDisplayMode mode);
void ShowPanels(bool show = true);
void HidePanels() { ShowPanels(wxRIBBON_BAR_MINIMIZED); }
bool ArePanelsShown() const { return m_arePanelsShown; }
wxRibbonDisplayMode GetDisplayMode() const { return m_ribbon_state; }
virtual bool HasMultiplePages() const wxOVERRIDE { return true; }
void SetWindowStyleFlag(long style) wxOVERRIDE;
long GetWindowStyleFlag() const wxOVERRIDE;
virtual bool Realize() wxOVERRIDE;
// Implementation only.
bool IsToggleButtonHovered() const { return m_toggle_button_hovered; }
bool IsHelpButtonHovered() const { return m_help_button_hovered; }
void HideIfExpanded();
protected:
friend class wxRibbonPage;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
wxRibbonPageTabInfo* HitTestTabs(wxPoint position, int* index = NULL);
void HitTestRibbonButton(const wxRect& rect, const wxPoint& position, bool &hover_flag);
void CommonInit(long style);
void AddPage(wxRibbonPage *page);
void RecalculateTabSizes();
void RecalculateMinSize();
void ScrollTabBar(int npixels);
void RefreshTabBar();
void RepositionPage(wxRibbonPage *page);
void OnPaint(wxPaintEvent& evt);
void OnEraseBackground(wxEraseEvent& evt);
void DoEraseBackground(wxDC& dc);
void OnSize(wxSizeEvent& evt);
void OnMouseLeftDown(wxMouseEvent& evt);
void OnMouseLeftUp(wxMouseEvent& evt);
void OnMouseMiddleDown(wxMouseEvent& evt);
void OnMouseMiddleUp(wxMouseEvent& evt);
void OnMouseRightDown(wxMouseEvent& evt);
void OnMouseRightUp(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
void OnMouseDoubleClick(wxMouseEvent& evt);
void DoMouseButtonCommon(wxMouseEvent& evt, wxEventType tab_event_type);
void OnKillFocus(wxFocusEvent& evt);
wxRibbonPageTabInfoArray m_pages;
wxRect m_tab_scroll_left_button_rect;
wxRect m_tab_scroll_right_button_rect;
wxRect m_toggle_button_rect;
wxRect m_help_button_rect;
long m_flags;
int m_tabs_total_width_ideal;
int m_tabs_total_width_minimum;
int m_tab_margin_left;
int m_tab_margin_right;
int m_tab_height;
int m_tab_scroll_amount;
int m_current_page;
int m_current_hovered_page;
int m_tab_scroll_left_button_state;
int m_tab_scroll_right_button_state;
bool m_tab_scroll_buttons_shown;
bool m_arePanelsShown;
bool m_bar_hovered;
bool m_toggle_button_hovered;
bool m_help_button_hovered;
wxRibbonDisplayMode m_ribbon_state;
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonBar);
wxDECLARE_EVENT_TABLE();
#endif
};
#ifndef SWIG
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TOGGLED, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_HELP_CLICK, wxRibbonBarEvent);
typedef void (wxEvtHandler::*wxRibbonBarEventFunction)(wxRibbonBarEvent&);
#define wxRibbonBarEventHandler(func) \
wxEVENT_HANDLER_CAST(wxRibbonBarEventFunction, func)
#define EVT_RIBBONBAR_PAGE_CHANGED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGED, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_PAGE_CHANGING(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGING, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_MIDDLE_DOWN(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_MIDDLE_UP(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_UP, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_RIGHT_DOWN(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_RIGHT_UP(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_UP, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_LEFT_DCLICK(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TOGGLED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TOGGLED, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_HELP_CLICK(winid, fn) \
wx__DECLARE_EVT1(wxEVT_RIBBONBAR_HELP_CLICK, winid, wxRibbonBarEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGED;
%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGING;
%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN;
%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_UP;
%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_DOWN;
%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_UP;
%constant wxEventType wxEVT_RIBBONBAR_TAB_LEFT_DCLICK;
%constant wxEventType wxEVT_RIBBONBAR_TOGGLED;
%constant wxEventType wxEVT_RIBBONBAR_HELP_CLICK;
%pythoncode {
EVT_RIBBONBAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGED, 1 )
EVT_RIBBONBAR_PAGE_CHANGING = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGING, 1 )
EVT_RIBBONBAR_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, 1 )
EVT_RIBBONBAR_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_UP, 1 )
EVT_RIBBONBAR_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, 1 )
EVT_RIBBONBAR_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_UP, 1 )
EVT_RIBBONBAR_TAB_LEFT_DCLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, 1 )
EVT_RIBBONBAR_TOGGLED = wx.PyEventBinder( wxEVT_RIBBONBAR_TOGGLED, 1 )
EVT_RIBBONBAR_HELP_CLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_HELP_CLICK, 1 )
}
#endif
// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED wxEVT_RIBBONBAR_PAGE_CHANGED
#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING wxEVT_RIBBONBAR_PAGE_CHANGING
#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN
#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP wxEVT_RIBBONBAR_TAB_MIDDLE_UP
#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN wxEVT_RIBBONBAR_TAB_RIGHT_DOWN
#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP wxEVT_RIBBONBAR_TAB_RIGHT_UP
#define wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK wxEVT_RIBBONBAR_TAB_LEFT_DCLICK
#define wxEVT_COMMAND_RIBBONBAR_TOGGLED wxEVT_RIBBONBAR_TOGGLED
#define wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED wxEVT_RIBBONBAR_HELP_CLICK
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_BAR_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/art.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/art.h
// Purpose: Art providers for ribbon-bar-style interface
// Author: Peter Cawley
// Modified by:
// Created: 2009-05-25
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_ART_H_
#define _WX_RIBBON_ART_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/brush.h"
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/pen.h"
#include "wx/bitmap.h"
#include "wx/ribbon/bar.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxWindow;
enum wxRibbonArtSetting
{
wxRIBBON_ART_TAB_SEPARATION_SIZE,
wxRIBBON_ART_PAGE_BORDER_LEFT_SIZE,
wxRIBBON_ART_PAGE_BORDER_TOP_SIZE,
wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE,
wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE,
wxRIBBON_ART_PANEL_X_SEPARATION_SIZE,
wxRIBBON_ART_PANEL_Y_SEPARATION_SIZE,
wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE,
wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE,
wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE,
wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE,
wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE,
wxRIBBON_ART_PANEL_LABEL_FONT,
wxRIBBON_ART_BUTTON_BAR_LABEL_FONT,
wxRIBBON_ART_TAB_LABEL_FONT,
wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_ACTIVE_BORDER_COLOUR,
wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_COLOUR,
wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_GALLERY_BORDER_COLOUR,
wxRIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR,
wxRIBBON_ART_GALLERY_ITEM_BORDER_COLOUR,
wxRIBBON_ART_TAB_LABEL_COLOUR,
wxRIBBON_ART_TAB_SEPARATOR_COLOUR,
wxRIBBON_ART_TAB_SEPARATOR_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_CTRL_BACKGROUND_COLOUR,
wxRIBBON_ART_TAB_CTRL_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_TAB_HOVER_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_COLOUR,
wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TAB_BORDER_COLOUR,
wxRIBBON_ART_PANEL_BORDER_COLOUR,
wxRIBBON_ART_PANEL_BORDER_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_MINIMISED_BORDER_COLOUR,
wxRIBBON_ART_PANEL_MINIMISED_BORDER_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_LABEL_BACKGROUND_COLOUR,
wxRIBBON_ART_PANEL_LABEL_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_LABEL_COLOUR,
wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_COLOUR,
wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_HOVER_LABEL_COLOUR,
wxRIBBON_ART_PANEL_MINIMISED_LABEL_COLOUR,
wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_COLOUR,
wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR,
wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR,
wxRIBBON_ART_PAGE_TOGGLE_FACE_COLOUR,
wxRIBBON_ART_PAGE_TOGGLE_HOVER_FACE_COLOUR,
wxRIBBON_ART_PAGE_BORDER_COLOUR,
wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_PAGE_BACKGROUND_COLOUR,
wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TOOLBAR_BORDER_COLOUR,
wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR,
wxRIBBON_ART_TOOLBAR_FACE_COLOUR,
wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_BACKGROUND_COLOUR,
wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR,
wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR,
wxRIBBON_ART_BUTTON_BAR_LABEL_HIGHLIGHT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_LABEL_HIGHLIGHT_GRADIENT_COLOUR,
wxRIBBON_ART_BUTTON_BAR_LABEL_HIGHLIGHT_TOP_COLOUR,
wxRIBBON_ART_BUTTON_BAR_LABEL_HIGHLIGHT_GRADIENT_TOP_COLOUR
};
enum wxRibbonScrollButtonStyle
{
wxRIBBON_SCROLL_BTN_LEFT = 0,
wxRIBBON_SCROLL_BTN_RIGHT = 1,
wxRIBBON_SCROLL_BTN_UP = 2,
wxRIBBON_SCROLL_BTN_DOWN = 3,
wxRIBBON_SCROLL_BTN_DIRECTION_MASK = 3,
wxRIBBON_SCROLL_BTN_NORMAL = 0,
wxRIBBON_SCROLL_BTN_HOVERED = 4,
wxRIBBON_SCROLL_BTN_ACTIVE = 8,
wxRIBBON_SCROLL_BTN_STATE_MASK = 12,
wxRIBBON_SCROLL_BTN_FOR_OTHER = 0,
wxRIBBON_SCROLL_BTN_FOR_TABS = 16,
wxRIBBON_SCROLL_BTN_FOR_PAGE = 32,
wxRIBBON_SCROLL_BTN_FOR_MASK = 48
};
enum wxRibbonButtonKind
{
wxRIBBON_BUTTON_NORMAL = 1 << 0,
wxRIBBON_BUTTON_DROPDOWN = 1 << 1,
wxRIBBON_BUTTON_HYBRID = wxRIBBON_BUTTON_NORMAL | wxRIBBON_BUTTON_DROPDOWN,
wxRIBBON_BUTTON_TOGGLE = 1 << 2
};
enum wxRibbonButtonBarButtonState
{
wxRIBBON_BUTTONBAR_BUTTON_SMALL = 0 << 0,
wxRIBBON_BUTTONBAR_BUTTON_MEDIUM = 1 << 0,
wxRIBBON_BUTTONBAR_BUTTON_LARGE = 2 << 0,
wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK = 3 << 0,
wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED = 1 << 3,
wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED = 1 << 4,
wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK = wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED | wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED,
wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE = 1 << 5,
wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE = 1 << 6,
wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK = wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE | wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE,
wxRIBBON_BUTTONBAR_BUTTON_DISABLED = 1 << 7,
wxRIBBON_BUTTONBAR_BUTTON_TOGGLED = 1 << 8,
wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK = 0x1F8
};
enum wxRibbonGalleryButtonState
{
wxRIBBON_GALLERY_BUTTON_NORMAL,
wxRIBBON_GALLERY_BUTTON_HOVERED,
wxRIBBON_GALLERY_BUTTON_ACTIVE,
wxRIBBON_GALLERY_BUTTON_DISABLED
};
class wxRibbonBar;
class wxRibbonPage;
class wxRibbonPanel;
class wxRibbonGallery;
class wxRibbonGalleryItem;
class wxRibbonPageTabInfo;
class wxRibbonPageTabInfoArray;
class WXDLLIMPEXP_RIBBON wxRibbonArtProvider
{
public:
wxRibbonArtProvider();
virtual ~wxRibbonArtProvider();
virtual wxRibbonArtProvider* Clone() const = 0;
virtual void SetFlags(long flags) = 0;
virtual long GetFlags() const = 0;
virtual int GetMetric(int id) const = 0;
virtual void SetMetric(int id, int new_val) = 0;
virtual void SetFont(int id, const wxFont& font) = 0;
virtual wxFont GetFont(int id) const = 0;
virtual wxColour GetColour(int id) const = 0;
virtual void SetColour(int id, const wxColor& colour) = 0;
wxColour GetColor(int id) const { return GetColour(id); }
void SetColor(int id, const wxColour& color) { SetColour(id, color); }
virtual void GetColourScheme(wxColour* primary,
wxColour* secondary,
wxColour* tertiary) const = 0;
virtual void SetColourScheme(const wxColour& primary,
const wxColour& secondary,
const wxColour& tertiary) = 0;
virtual void DrawTabCtrlBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) = 0;
virtual void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfo& tab) = 0;
virtual void DrawTabSeparator(wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
double visibility) = 0;
virtual void DrawPageBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) = 0;
virtual void DrawScrollButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
long style) = 0;
virtual void DrawPanelBackground(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect) = 0;
virtual void DrawGalleryBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect) = 0;
virtual void DrawGalleryItemBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect,
wxRibbonGalleryItem* item) = 0;
virtual void DrawMinimisedPanel(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect,
wxBitmap& bitmap) = 0;
virtual void DrawButtonBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) = 0;
virtual void DrawButtonBarButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
wxRibbonButtonKind kind,
long state,
const wxString& label,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small) = 0;
virtual void DrawToolBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) = 0;
virtual void DrawToolGroupBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) = 0;
virtual void DrawTool(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
const wxBitmap& bitmap,
wxRibbonButtonKind kind,
long state) = 0;
virtual void DrawToggleButton(
wxDC& dc,
wxRibbonBar* wnd,
const wxRect& rect,
wxRibbonDisplayMode mode) = 0;
virtual void DrawHelpButton(
wxDC& dc,
wxRibbonBar* wnd,
const wxRect& rect) = 0;
virtual void GetBarTabWidth(
wxDC& dc,
wxWindow* wnd,
const wxString& label,
const wxBitmap& bitmap,
int* ideal,
int* small_begin_need_separator,
int* small_must_have_separator,
int* minimum) = 0;
virtual int GetTabCtrlHeight(
wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfoArray& pages) = 0;
virtual wxSize GetScrollButtonMinimumSize(
wxDC& dc,
wxWindow* wnd,
long style) = 0;
virtual wxSize GetPanelSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize client_size,
wxPoint* client_offset) = 0;
virtual wxSize GetPanelClientSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize size,
wxPoint* client_offset) = 0;
virtual wxRect GetPanelExtButtonArea(
wxDC& dc,
const wxRibbonPanel* wnd,
wxRect rect) = 0;
virtual wxSize GetGallerySize(
wxDC& dc,
const wxRibbonGallery* wnd,
wxSize client_size) = 0;
virtual wxSize GetGalleryClientSize(
wxDC& dc,
const wxRibbonGallery* wnd,
wxSize size,
wxPoint* client_offset,
wxRect* scroll_up_button,
wxRect* scroll_down_button,
wxRect* extension_button) = 0;
virtual wxRect GetPageBackgroundRedrawArea(
wxDC& dc,
const wxRibbonPage* wnd,
wxSize page_old_size,
wxSize page_new_size) = 0;
virtual bool GetButtonBarButtonSize(
wxDC& dc,
wxWindow* wnd,
wxRibbonButtonKind kind,
wxRibbonButtonBarButtonState size,
const wxString& label,
wxCoord text_min_width,
wxSize bitmap_size_large,
wxSize bitmap_size_small,
wxSize* button_size,
wxRect* normal_region,
wxRect* dropdown_region) = 0;
virtual wxCoord GetButtonBarButtonTextWidth(
wxDC& dc, const wxString& label,
wxRibbonButtonKind kind,
wxRibbonButtonBarButtonState size) = 0;
virtual wxSize GetMinimisedPanelMinimumSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize* desired_bitmap_size,
wxDirection* expanded_panel_direction) = 0;
virtual wxSize GetToolSize(
wxDC& dc,
wxWindow* wnd,
wxSize bitmap_size,
wxRibbonButtonKind kind,
bool is_first,
bool is_last,
wxRect* dropdown_region) = 0;
virtual wxRect GetBarToggleButtonArea(const wxRect& rect)= 0;
virtual wxRect GetRibbonHelpButtonArea(const wxRect& rect) = 0;
};
class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider
{
public:
wxRibbonMSWArtProvider(bool set_colour_scheme = true);
virtual ~wxRibbonMSWArtProvider();
wxRibbonArtProvider* Clone() const wxOVERRIDE;
void SetFlags(long flags) wxOVERRIDE;
long GetFlags() const wxOVERRIDE;
int GetMetric(int id) const wxOVERRIDE;
void SetMetric(int id, int new_val) wxOVERRIDE;
void SetFont(int id, const wxFont& font) wxOVERRIDE;
wxFont GetFont(int id) const wxOVERRIDE;
wxColour GetColour(int id) const wxOVERRIDE;
void SetColour(int id, const wxColor& colour) wxOVERRIDE;
void GetColourScheme(wxColour* primary,
wxColour* secondary,
wxColour* tertiary) const wxOVERRIDE;
void SetColourScheme(const wxColour& primary,
const wxColour& secondary,
const wxColour& tertiary) wxOVERRIDE;
int GetTabCtrlHeight(
wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfoArray& pages) wxOVERRIDE;
void DrawTabCtrlBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfo& tab) wxOVERRIDE;
void DrawTabSeparator(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
double visibility) wxOVERRIDE;
void DrawPageBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawScrollButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
long style) wxOVERRIDE;
void DrawPanelBackground(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawGalleryBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawGalleryItemBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect,
wxRibbonGalleryItem* item) wxOVERRIDE;
void DrawMinimisedPanel(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect,
wxBitmap& bitmap) wxOVERRIDE;
void DrawButtonBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawButtonBarButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
wxRibbonButtonKind kind,
long state,
const wxString& label,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small) wxOVERRIDE;
void DrawToolBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawToolGroupBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawTool(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
const wxBitmap& bitmap,
wxRibbonButtonKind kind,
long state) wxOVERRIDE;
void DrawToggleButton(
wxDC& dc,
wxRibbonBar* wnd,
const wxRect& rect,
wxRibbonDisplayMode mode) wxOVERRIDE;
void DrawHelpButton(wxDC& dc,
wxRibbonBar* wnd,
const wxRect& rect) wxOVERRIDE;
void GetBarTabWidth(
wxDC& dc,
wxWindow* wnd,
const wxString& label,
const wxBitmap& bitmap,
int* ideal,
int* small_begin_need_separator,
int* small_must_have_separator,
int* minimum) wxOVERRIDE;
wxSize GetScrollButtonMinimumSize(
wxDC& dc,
wxWindow* wnd,
long style) wxOVERRIDE;
wxSize GetPanelSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize client_size,
wxPoint* client_offset) wxOVERRIDE;
wxSize GetPanelClientSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize size,
wxPoint* client_offset) wxOVERRIDE;
wxRect GetPanelExtButtonArea(
wxDC& dc,
const wxRibbonPanel* wnd,
wxRect rect) wxOVERRIDE;
wxSize GetGallerySize(
wxDC& dc,
const wxRibbonGallery* wnd,
wxSize client_size) wxOVERRIDE;
wxSize GetGalleryClientSize(
wxDC& dc,
const wxRibbonGallery* wnd,
wxSize size,
wxPoint* client_offset,
wxRect* scroll_up_button,
wxRect* scroll_down_button,
wxRect* extension_button) wxOVERRIDE;
wxRect GetPageBackgroundRedrawArea(
wxDC& dc,
const wxRibbonPage* wnd,
wxSize page_old_size,
wxSize page_new_size) wxOVERRIDE;
bool GetButtonBarButtonSize(
wxDC& dc,
wxWindow* wnd,
wxRibbonButtonKind kind,
wxRibbonButtonBarButtonState size,
const wxString& label,
wxCoord text_min_width,
wxSize bitmap_size_large,
wxSize bitmap_size_small,
wxSize* button_size,
wxRect* normal_region,
wxRect* dropdown_region) wxOVERRIDE;
wxCoord GetButtonBarButtonTextWidth(
wxDC& dc, const wxString& label,
wxRibbonButtonKind kind,
wxRibbonButtonBarButtonState size) wxOVERRIDE;
wxSize GetMinimisedPanelMinimumSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize* desired_bitmap_size,
wxDirection* expanded_panel_direction) wxOVERRIDE;
wxSize GetToolSize(
wxDC& dc,
wxWindow* wnd,
wxSize bitmap_size,
wxRibbonButtonKind kind,
bool is_first,
bool is_last,
wxRect* dropdown_region) wxOVERRIDE;
wxRect GetBarToggleButtonArea(const wxRect& rect) wxOVERRIDE;
wxRect GetRibbonHelpButtonArea(const wxRect& rect) wxOVERRIDE;
protected:
void ReallyDrawTabSeparator(wxWindow* wnd, const wxRect& rect, double visibility);
void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect,
bool allow_hovered = true);
void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect,
wxRibbonPage* page, wxPoint offset, bool hovered = false);
void DrawPanelBorder(wxDC& dc, const wxRect& rect, wxPen& primary_colour,
wxPen& secondary_colour);
void RemovePanelPadding(wxRect* rect);
void DrawDropdownArrow(wxDC& dc, int x, int y, const wxColour& colour);
void DrawGalleryBackgroundCommon(wxDC& dc, wxRibbonGallery* wnd,
const wxRect& rect);
virtual void DrawGalleryButton(wxDC& dc, wxRect rect,
wxRibbonGalleryButtonState state, wxBitmap* bitmaps);
void DrawButtonBarButtonForeground(
wxDC& dc,
const wxRect& rect,
wxRibbonButtonKind kind,
long state,
const wxString& label,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small);
void DrawMinimisedPanelCommon(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect,
wxRect* preview_rect);
void CloneTo(wxRibbonMSWArtProvider* copy) const;
wxBitmap m_cached_tab_separator;
wxBitmap m_gallery_up_bitmap[4];
wxBitmap m_gallery_down_bitmap[4];
wxBitmap m_gallery_extension_bitmap[4];
wxBitmap m_toolbar_drop_bitmap;
wxBitmap m_panel_extension_bitmap[2];
wxBitmap m_ribbon_toggle_up_bitmap[2];
wxBitmap m_ribbon_toggle_down_bitmap[2];
wxBitmap m_ribbon_toggle_pin_bitmap[2];
wxBitmap m_ribbon_bar_help_button_bitmap[2];
wxColour m_primary_scheme_colour;
wxColour m_secondary_scheme_colour;
wxColour m_tertiary_scheme_colour;
wxColour m_button_bar_label_colour;
wxColour m_button_bar_label_disabled_colour;
wxColour m_tab_label_colour;
wxColour m_tab_separator_colour;
wxColour m_tab_separator_gradient_colour;
wxColour m_tab_active_background_colour;
wxColour m_tab_active_background_gradient_colour;
wxColour m_tab_hover_background_colour;
wxColour m_tab_hover_background_gradient_colour;
wxColour m_tab_hover_background_top_colour;
wxColour m_tab_hover_background_top_gradient_colour;
wxColour m_tab_highlight_top_colour;
wxColour m_tab_highlight_top_gradient_colour;
wxColour m_tab_highlight_colour;
wxColour m_tab_highlight_gradient_colour;
wxColour m_panel_label_colour;
wxColour m_panel_minimised_label_colour;
wxColour m_panel_hover_label_colour;
wxColour m_panel_active_background_colour;
wxColour m_panel_active_background_gradient_colour;
wxColour m_panel_active_background_top_colour;
wxColour m_panel_active_background_top_gradient_colour;
wxColour m_panel_button_face_colour;
wxColour m_panel_button_hover_face_colour;
wxColour m_page_toggle_face_colour;
wxColour m_page_toggle_hover_face_colour;
wxColour m_page_background_colour;
wxColour m_page_background_gradient_colour;
wxColour m_page_background_top_colour;
wxColour m_page_background_top_gradient_colour;
wxColour m_page_hover_background_colour;
wxColour m_page_hover_background_gradient_colour;
wxColour m_page_hover_background_top_colour;
wxColour m_page_hover_background_top_gradient_colour;
wxColour m_button_bar_hover_background_colour;
wxColour m_button_bar_hover_background_gradient_colour;
wxColour m_button_bar_hover_background_top_colour;
wxColour m_button_bar_hover_background_top_gradient_colour;
wxColour m_button_bar_active_background_colour;
wxColour m_button_bar_active_background_gradient_colour;
wxColour m_button_bar_active_background_top_colour;
wxColour m_button_bar_active_background_top_gradient_colour;
wxColour m_gallery_button_background_colour;
wxColour m_gallery_button_background_gradient_colour;
wxColour m_gallery_button_hover_background_colour;
wxColour m_gallery_button_hover_background_gradient_colour;
wxColour m_gallery_button_active_background_colour;
wxColour m_gallery_button_active_background_gradient_colour;
wxColour m_gallery_button_disabled_background_colour;
wxColour m_gallery_button_disabled_background_gradient_colour;
wxColour m_gallery_button_face_colour;
wxColour m_gallery_button_hover_face_colour;
wxColour m_gallery_button_active_face_colour;
wxColour m_gallery_button_disabled_face_colour;
wxColour m_tool_face_colour;
wxColour m_tool_background_top_colour;
wxColour m_tool_background_top_gradient_colour;
wxColour m_tool_background_colour;
wxColour m_tool_background_gradient_colour;
wxColour m_tool_hover_background_top_colour;
wxColour m_tool_hover_background_top_gradient_colour;
wxColour m_tool_hover_background_colour;
wxColour m_tool_hover_background_gradient_colour;
wxColour m_tool_active_background_top_colour;
wxColour m_tool_active_background_top_gradient_colour;
wxColour m_tool_active_background_colour;
wxColour m_tool_active_background_gradient_colour;
wxBrush m_tab_ctrl_background_brush;
wxBrush m_panel_label_background_brush;
wxBrush m_panel_hover_label_background_brush;
wxBrush m_panel_hover_button_background_brush;
wxBrush m_gallery_hover_background_brush;
wxBrush m_gallery_button_background_top_brush;
wxBrush m_gallery_button_hover_background_top_brush;
wxBrush m_gallery_button_active_background_top_brush;
wxBrush m_gallery_button_disabled_background_top_brush;
wxBrush m_ribbon_toggle_brush;
wxFont m_tab_label_font;
wxFont m_panel_label_font;
wxFont m_button_bar_label_font;
wxPen m_page_border_pen;
wxPen m_panel_border_pen;
wxPen m_panel_border_gradient_pen;
wxPen m_panel_minimised_border_pen;
wxPen m_panel_minimised_border_gradient_pen;
wxPen m_panel_hover_button_border_pen;
wxPen m_tab_border_pen;
wxPen m_button_bar_hover_border_pen;
wxPen m_button_bar_active_border_pen;
wxPen m_gallery_border_pen;
wxPen m_gallery_item_border_pen;
wxPen m_toolbar_border_pen;
wxPen m_ribbon_toggle_pen;
double m_cached_tab_separator_visibility;
long m_flags;
int m_tab_separation_size;
int m_page_border_left;
int m_page_border_top;
int m_page_border_right;
int m_page_border_bottom;
int m_panel_x_separation_size;
int m_panel_y_separation_size;
int m_tool_group_separation_size;
int m_gallery_bitmap_padding_left_size;
int m_gallery_bitmap_padding_right_size;
int m_gallery_bitmap_padding_top_size;
int m_gallery_bitmap_padding_bottom_size;
int m_toggle_button_offset;
int m_help_button_offset;
};
class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider : public wxRibbonMSWArtProvider
{
public:
wxRibbonAUIArtProvider();
virtual ~wxRibbonAUIArtProvider();
wxRibbonArtProvider* Clone() const wxOVERRIDE;
wxColour GetColour(int id) const wxOVERRIDE;
void SetColour(int id, const wxColor& colour) wxOVERRIDE;
void SetColourScheme(const wxColour& primary,
const wxColour& secondary,
const wxColour& tertiary) wxOVERRIDE;
void SetFont(int id, const wxFont& font) wxOVERRIDE;
wxSize GetScrollButtonMinimumSize(
wxDC& dc,
wxWindow* wnd,
long style) wxOVERRIDE;
void DrawScrollButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
long style) wxOVERRIDE;
wxSize GetPanelSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize client_size,
wxPoint* client_offset) wxOVERRIDE;
wxSize GetPanelClientSize(
wxDC& dc,
const wxRibbonPanel* wnd,
wxSize size,
wxPoint* client_offset) wxOVERRIDE;
wxRect GetPanelExtButtonArea(
wxDC& dc,
const wxRibbonPanel* wnd,
wxRect rect) wxOVERRIDE;
void DrawTabCtrlBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
int GetTabCtrlHeight(
wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfoArray& pages) wxOVERRIDE;
void GetBarTabWidth(
wxDC& dc,
wxWindow* wnd,
const wxString& label,
const wxBitmap& bitmap,
int* ideal,
int* small_begin_need_separator,
int* small_must_have_separator,
int* minimum) wxOVERRIDE;
void DrawTab(wxDC& dc,
wxWindow* wnd,
const wxRibbonPageTabInfo& tab) wxOVERRIDE;
void DrawTabSeparator(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
double visibility) wxOVERRIDE;
void DrawPageBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawPanelBackground(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawMinimisedPanel(
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect,
wxBitmap& bitmap) wxOVERRIDE;
void DrawGalleryBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawGalleryItemBackground(
wxDC& dc,
wxRibbonGallery* wnd,
const wxRect& rect,
wxRibbonGalleryItem* item) wxOVERRIDE;
void DrawButtonBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawButtonBarButton(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
wxRibbonButtonKind kind,
long state,
const wxString& label,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small) wxOVERRIDE;
void DrawToolBarBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawToolGroupBackground(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect) wxOVERRIDE;
void DrawTool(
wxDC& dc,
wxWindow* wnd,
const wxRect& rect,
const wxBitmap& bitmap,
wxRibbonButtonKind kind,
long state) wxOVERRIDE;
protected:
void DrawPartialPanelBackground(wxDC& dc, wxWindow* wnd,
const wxRect& rect);
void DrawGalleryButton(wxDC& dc, wxRect rect,
wxRibbonGalleryButtonState state, wxBitmap* bitmaps) wxOVERRIDE;
wxColour m_tab_ctrl_background_colour;
wxColour m_tab_ctrl_background_gradient_colour;
wxColour m_panel_label_background_colour;
wxColour m_panel_label_background_gradient_colour;
wxColour m_panel_hover_label_background_colour;
wxColour m_panel_hover_label_background_gradient_colour;
wxBrush m_background_brush;
wxBrush m_tab_active_top_background_brush;
wxBrush m_tab_hover_background_brush;
wxBrush m_button_bar_hover_background_brush;
wxBrush m_button_bar_active_background_brush;
wxBrush m_gallery_button_active_background_brush;
wxBrush m_gallery_button_hover_background_brush;
wxBrush m_gallery_button_disabled_background_brush;
wxBrush m_tool_hover_background_brush;
wxBrush m_tool_active_background_brush;
wxPen m_toolbar_hover_borden_pen;
wxFont m_tab_active_label_font;
};
#if defined(__WXMSW__)
typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider;
#elif defined(__WXOSX_COCOA__) || \
defined(__WXOSX_IPHONE__)
// TODO: Once implemented, change typedef to OSX
// typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider;
typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider;
#else
// TODO: Once implemented, change typedef to AUI
typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider;
#endif
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_ART_H_
| h |
rticonnextdds-usecases | data/projects/rticonnextdds-usecases/VehicleTracking/ExampleCode/thirdparty/wxWidgets-3.1.2/Linux/include/wx/ribbon/control.h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/ribbon/control.h
// Purpose: Extension of wxControl with common ribbon methods
// Author: Peter Cawley
// Modified by:
// Created: 2009-06-05
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RIBBON_CONTROL_H_
#define _WX_RIBBON_CONTROL_H_
#include "wx/defs.h"
#if wxUSE_RIBBON
#include "wx/control.h"
#include "wx/dynarray.h"
class wxRibbonBar;
class wxRibbonArtProvider;
class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl
{
public:
wxRibbonControl() { Init(); }
wxRibbonControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr)
{
Init();
Create(parent, id, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr);
virtual void SetArtProvider(wxRibbonArtProvider* art);
wxRibbonArtProvider* GetArtProvider() const {return m_art;}
virtual bool IsSizingContinuous() const {return true;}
wxSize GetNextSmallerSize(wxOrientation direction, wxSize relative_to) const;
wxSize GetNextLargerSize(wxOrientation direction, wxSize relative_to) const;
wxSize GetNextSmallerSize(wxOrientation direction) const;
wxSize GetNextLargerSize(wxOrientation direction) const;
virtual bool Realize();
bool Realise() {return Realize();}
virtual wxRibbonBar* GetAncestorRibbonBar()const;
// Finds the best width and height given the parent's width and height
virtual wxSize GetBestSizeForParentSize(const wxSize& WXUNUSED(parentSize)) const { return GetBestSize(); }
protected:
wxRibbonArtProvider* m_art;
virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
wxSize relative_to) const;
virtual wxSize DoGetNextLargerSize(wxOrientation direction,
wxSize relative_to) const;
private:
void Init() { m_art = NULL; }
#ifndef SWIG
wxDECLARE_CLASS(wxRibbonControl);
#endif
};
WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON);
#endif // wxUSE_RIBBON
#endif // _WX_RIBBON_CONTROL_H_
| h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.