Add wx headers and ext
This commit is contained in:
parent
6390dcef6a
commit
66d3c7b811
1531 changed files with 295895 additions and 0 deletions
39
wxheaders/wx/motif/accel.h
Normal file
39
wxheaders/wx/motif/accel.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/accel.h
|
||||
// Purpose: wxAcceleratorTable class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_
|
||||
#define _WX_ACCEL_H_
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable);
|
||||
public:
|
||||
wxAcceleratorTable();
|
||||
wxAcceleratorTable(const wxString& resource); // Load from .rc resource
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
|
||||
|
||||
virtual ~wxAcceleratorTable();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
// Implementation only
|
||||
int GetCount() const;
|
||||
wxAcceleratorEntry* GetEntries() const;
|
||||
};
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(wxAcceleratorTable) wxNullAcceleratorTable;
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_
|
||||
94
wxheaders/wx/motif/app.h
Normal file
94
wxheaders/wx/motif/app.h
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/app.h
|
||||
// Purpose: wxApp class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APP_H_
|
||||
#define _WX_APP_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/hashmap.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxApp;
|
||||
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
||||
class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
|
||||
class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPerDisplayData;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the wxApp class for Motif - see wxAppBase for more details
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap );
|
||||
|
||||
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxApp);
|
||||
|
||||
public:
|
||||
wxApp();
|
||||
virtual ~wxApp();
|
||||
|
||||
// override base class (pure) virtuals
|
||||
// -----------------------------------
|
||||
|
||||
virtual int MainLoop();
|
||||
|
||||
virtual void Exit();
|
||||
|
||||
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
protected:
|
||||
bool m_showOnInit;
|
||||
|
||||
public:
|
||||
// Implementation
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
virtual void CleanUp();
|
||||
|
||||
// Motif-specific
|
||||
WXAppContext GetAppContext() const { return m_appContext; }
|
||||
WXWidget GetTopLevelWidget();
|
||||
WXWidget GetTopLevelRealizedWidget();
|
||||
WXColormap GetMainColormap(WXDisplay* display);
|
||||
WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
|
||||
|
||||
void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
|
||||
void SetTopLevelRealizedWidget(WXDisplay* display,
|
||||
WXWidget widget);
|
||||
|
||||
// This handler is called when a property change event occurs
|
||||
virtual void HandlePropertyChange(WXEvent *event);
|
||||
|
||||
wxXVisualInfo* GetVisualInfo(WXDisplay* display);
|
||||
virtual void* GetXVisualInfo() { return NULL; }
|
||||
|
||||
private:
|
||||
// Motif-specific
|
||||
WXAppContext m_appContext;
|
||||
WXColormap m_mainColormap;
|
||||
WXDisplay* m_initialDisplay;
|
||||
wxPerDisplayDataMap* m_perDisplayData;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_APP_H_
|
||||
63
wxheaders/wx/motif/bmpbuttn.h
Normal file
63
wxheaders/wx/motif/bmpbuttn.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPBUTTN_H_
|
||||
#define _WX_BMPBUTTN_H_
|
||||
|
||||
#include "wx/motif/bmpmotif.h"
|
||||
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapButton();
|
||||
virtual ~wxBitmapButton();
|
||||
wxBitmapButton(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmapBundle& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxButtonNameStr))
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmapBundle& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxButtonNameStr));
|
||||
|
||||
bool CreateCloseButton(wxWindow* parent,
|
||||
wxWindowID winid,
|
||||
const wxString& name = wxString());
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual void DoSetBitmap(const wxBitmapBundle& bitmap, State which);
|
||||
virtual void OnSetBitmap();
|
||||
|
||||
// original bitmaps may be different from the ones we were initialized with
|
||||
// if they were changed to reflect button background colour
|
||||
wxBitmapBundle m_bitmapsOriginal[State_Max];
|
||||
|
||||
wxBitmapCache m_bitmapCache;
|
||||
|
||||
WXPixmap m_insensPixmap;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxBitmapButton);
|
||||
};
|
||||
|
||||
#endif // _WX_BMPBUTTN_H_
|
||||
56
wxheaders/wx/motif/bmpmotif.h
Normal file
56
wxheaders/wx/motif/bmpmotif.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/bmpmotif.h
|
||||
// Purpose: Motif-specific bitmap routines
|
||||
// Author: Julian Smart, originally in bitmap.h
|
||||
// Modified by:
|
||||
// Created: 25/03/2003
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPMOTIF_H_
|
||||
#define _WX_BMPMOTIF_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapCache
|
||||
{
|
||||
public:
|
||||
wxBitmapCache()
|
||||
{
|
||||
m_labelPixmap = (WXPixmap)NULL;
|
||||
m_armPixmap = (WXPixmap)NULL;
|
||||
m_insensPixmap = (WXPixmap)NULL;
|
||||
m_image = (WXImage)NULL;
|
||||
m_display = NULL;
|
||||
SetColoursChanged();
|
||||
}
|
||||
|
||||
~wxBitmapCache();
|
||||
|
||||
void SetColoursChanged();
|
||||
void SetBitmap( const wxBitmap& bitmap );
|
||||
|
||||
WXPixmap GetLabelPixmap( WXWidget w );
|
||||
WXPixmap GetInsensPixmap( WXWidget w = (WXWidget)NULL );
|
||||
WXPixmap GetArmPixmap( WXWidget w );
|
||||
private:
|
||||
void InvalidateCache();
|
||||
void CreateImageIfNeeded( WXWidget w );
|
||||
|
||||
WXPixmap GetPixmapFromCache(WXWidget w);
|
||||
|
||||
struct
|
||||
{
|
||||
bool label : 1;
|
||||
bool arm : 1;
|
||||
bool insens : 1;
|
||||
} m_recalcPixmaps;
|
||||
wxBitmap m_bitmap;
|
||||
WXDisplay* m_display;
|
||||
WXPixmap m_labelPixmap, m_armPixmap, m_insensPixmap;
|
||||
WXImage m_image;
|
||||
};
|
||||
|
||||
#endif // _WX_BMPMOTIF_H_
|
||||
56
wxheaders/wx/motif/button.h
Normal file
56
wxheaders/wx/motif/button.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/button.h
|
||||
// Purpose: wxButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_
|
||||
#define _WX_BUTTON_H_
|
||||
|
||||
// Pushbutton
|
||||
class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() { }
|
||||
wxButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxButtonNameStr))
|
||||
{
|
||||
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 = wxASCII_STR(wxButtonNameStr));
|
||||
|
||||
virtual wxWindow *SetDefault();
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
// Implementation
|
||||
virtual wxSize GetMinSize() const;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
wxSize OldGetBestSize() const;
|
||||
wxSize OldGetMinSize() const;
|
||||
void SetDefaultShadowThicknessAndResize();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxButton);
|
||||
};
|
||||
|
||||
#endif // _WX_BUTTON_H_
|
||||
61
wxheaders/wx/motif/checkbox.h
Normal file
61
wxheaders/wx/motif/checkbox.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_
|
||||
#define _WX_CHECKBOX_H_
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxCheckBox);
|
||||
|
||||
public:
|
||||
inline wxCheckBox() { Init(); }
|
||||
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxCheckBoxNameStr))
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxCheckBoxNameStr));
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const ;
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
private:
|
||||
// common part of all constructors
|
||||
void Init()
|
||||
{
|
||||
m_evtType = wxEVT_CHECKBOX;
|
||||
}
|
||||
|
||||
virtual void DoSet3StateValue(wxCheckBoxState state);
|
||||
|
||||
virtual wxCheckBoxState DoGet3StateValue() const;
|
||||
|
||||
// public for the callback
|
||||
public:
|
||||
// either wxEVT_CHECKBOX or ..._TOGGLEBUTTON
|
||||
wxEventType m_evtType;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
||||
76
wxheaders/wx/motif/checklst.h
Normal file
76
wxheaders/wx/motif/checklst.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Note: this is an optional class.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKLST_H_
|
||||
#define _WX_CHECKLST_H_
|
||||
|
||||
#include "wx/listbox.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxCheckListBox);
|
||||
|
||||
public:
|
||||
// ctors
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
// items may be checked
|
||||
bool IsChecked(unsigned int uiIndex) const;
|
||||
void Check(unsigned int uiIndex, bool bCheck = true);
|
||||
|
||||
// override base class functions
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
|
||||
private:
|
||||
void DoToggleItem( int item, int x );
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CHECKLST_H_
|
||||
21
wxheaders/wx/motif/chkconf.h
Normal file
21
wxheaders/wx/motif/chkconf.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Name: wx/motif/chkconf.h
|
||||
* Purpose: Motif-specific config settings checks
|
||||
* Author: Vadim Zeitlin
|
||||
* Modified by:
|
||||
* Created: 2005-04-05 (extracted from wx/chkconf.h)
|
||||
* Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||
|
||||
#if !defined(wxUSE_GADGETS)
|
||||
# define wxUSE_GADGETS 0
|
||||
#endif
|
||||
|
||||
/* wxGraphicsContext is not implemented in wxMotif */
|
||||
#if wxUSE_GRAPHICS_CONTEXT
|
||||
# undef wxUSE_GRAPHICS_CONTEXT
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
124
wxheaders/wx/motif/choice.h
Normal file
124
wxheaders/wx/motif/choice.h
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_
|
||||
#define _WX_CHOICE_H_
|
||||
|
||||
#include "wx/clntdata.h"
|
||||
|
||||
#ifndef wxWIDGET_ARRAY_DEFINED
|
||||
#define wxWIDGET_ARRAY_DEFINED
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
WX_DEFINE_ARRAY_PTR(WXWidget, wxWidgetArray);
|
||||
#endif
|
||||
|
||||
// Choice item
|
||||
class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxChoice);
|
||||
|
||||
public:
|
||||
wxChoice();
|
||||
virtual ~wxChoice();
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxChoiceNameStr))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxChoiceNameStr))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxChoiceNameStr));
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxChoiceNameStr));
|
||||
|
||||
// implementation of wxControlWithItems
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual int GetSelection() const;
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
|
||||
// implementation of wxChoiceBase
|
||||
virtual void SetSelection(int n);
|
||||
virtual void SetColumns(int n = 1 );
|
||||
virtual int GetColumns() const ;
|
||||
|
||||
// Original API
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
void SetFocus();
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
WXWidget GetMainWidget() const { return m_buttonWidget; }
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// implementation, for wxChoiceCallback
|
||||
const wxWidgetArray& GetWidgets() const { return m_widgetArray; }
|
||||
const wxArrayString& GetStrings() const { return m_stringArray; }
|
||||
protected:
|
||||
// minimum size for the text ctrl
|
||||
wxSize GetItemsSize() const;
|
||||
// common part of all constructors
|
||||
void Init();
|
||||
|
||||
WXWidget m_menuWidget;
|
||||
WXWidget m_buttonWidget;
|
||||
wxWidgetArray m_widgetArray;
|
||||
WXWidget m_formWidget;
|
||||
wxArrayString m_stringArray;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// implementation of wxControlWithItems
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
};
|
||||
|
||||
#endif // _WX_CHOICE_H_
|
||||
80
wxheaders/wx/motif/clipbrd.h
Normal file
80
wxheaders/wx/motif/clipbrd.h
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/clipbrd.h
|
||||
// Purpose: Clipboard functionality.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLIPBRD_H_
|
||||
#define _WX_CLIPBRD_H_
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataObject;
|
||||
struct wxDataIdToDataObject;
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
WX_DECLARE_LIST(wxDataObject, wxDataObjectList);
|
||||
WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList);
|
||||
|
||||
WXDLLIMPEXP_CORE bool wxOpenClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxClipboardOpen();
|
||||
WXDLLIMPEXP_CORE bool wxCloseClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxEmptyClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
|
||||
WXDLLIMPEXP_CORE wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
|
||||
WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE wxDataFormat wxRegisterClipboardFormat(char *formatName);
|
||||
WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
|
||||
{
|
||||
public:
|
||||
wxClipboard();
|
||||
virtual ~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// opened?
|
||||
virtual bool IsOpened() const { return m_open; }
|
||||
|
||||
// replaces the data on the clipboard with data
|
||||
virtual bool SetData( wxDataObject *data );
|
||||
|
||||
// adds data to the clipboard
|
||||
virtual bool AddData( wxDataObject *data );
|
||||
|
||||
// format available on the clipboard ?
|
||||
virtual bool IsSupported( const wxDataFormat& format );
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data );
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear();
|
||||
|
||||
// implementation from now on
|
||||
bool m_open;
|
||||
wxDataObjectList m_data;
|
||||
wxDataIdToDataObjectList m_idToObject;
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxClipboard);
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
#endif // _WX_CLIPBRD_H_
|
||||
75
wxheaders/wx/motif/colour.h
Normal file
75
wxheaders/wx/motif/colour.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLOUR_H_
|
||||
#define _WX_COLOUR_H_
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
// Colour
|
||||
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxColour);
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
||||
|
||||
// copy ctors and assignment operators
|
||||
wxColour( const wxColour& col );
|
||||
wxColour& operator = ( const wxColour& col );
|
||||
|
||||
// dtor
|
||||
virtual ~wxColour();
|
||||
|
||||
|
||||
// accessors
|
||||
virtual bool IsOk() const {return m_isInit; }
|
||||
unsigned char Red() const { return m_red; }
|
||||
unsigned char Green() const { return m_green; }
|
||||
unsigned char Blue() const { return m_blue; }
|
||||
|
||||
WXPixel GetPixel() const { return m_pixel; }
|
||||
void SetPixel(WXPixel pixel) { m_pixel = pixel; m_isInit = true; }
|
||||
|
||||
inline bool operator == (const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
|
||||
|
||||
inline bool operator != (const wxColour& colour) const { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); }
|
||||
|
||||
// Allocate a colour, or nearest colour, using the given display.
|
||||
// If realloc is true, ignore the existing pixel, otherwise just return
|
||||
// the existing one.
|
||||
// Returns the allocated pixel.
|
||||
|
||||
// TODO: can this handle mono displays? If not, we should have an extra
|
||||
// flag to specify whether this should be black or white by default.
|
||||
|
||||
WXPixel AllocColour(WXDisplay* display, bool realloc = false);
|
||||
|
||||
protected:
|
||||
// Helper function
|
||||
void Init();
|
||||
|
||||
virtual void
|
||||
InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||
|
||||
private:
|
||||
bool m_isInit;
|
||||
unsigned char m_red;
|
||||
unsigned char m_blue;
|
||||
unsigned char m_green;
|
||||
|
||||
public:
|
||||
WXPixel m_pixel;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLOUR_H_
|
||||
134
wxheaders/wx/motif/combobox.h
Normal file
134
wxheaders/wx/motif/combobox.h
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COMBOBOX_H_
|
||||
#define _WX_COMBOBOX_H_
|
||||
|
||||
#include "wx/choice.h"
|
||||
#include "wx/textentry.h"
|
||||
|
||||
// Combobox item
|
||||
class WXDLLIMPEXP_CORE wxComboBox : public wxChoice,
|
||||
public wxTextEntry
|
||||
{
|
||||
public:
|
||||
wxComboBox() { m_inSetSelection = false; }
|
||||
virtual ~wxComboBox();
|
||||
|
||||
inline 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 = wxASCII_STR(wxComboBoxNameStr))
|
||||
{
|
||||
m_inSetSelection = false;
|
||||
Create(parent, id, value, pos, size, n, choices,
|
||||
style, validator, name);
|
||||
}
|
||||
|
||||
inline 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 = wxASCII_STR(wxComboBoxNameStr))
|
||||
{
|
||||
m_inSetSelection = false;
|
||||
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 = wxASCII_STR(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 = wxASCII_STR(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();
|
||||
virtual wxString GetValue() const { return wxTextEntry::GetValue(); }
|
||||
virtual void SetValue(const wxString& value);
|
||||
virtual wxString GetStringSelection() const
|
||||
{ return wxChoice::GetStringSelection(); }
|
||||
|
||||
virtual void SetSelection(long from, long to)
|
||||
{ wxTextEntry::SetSelection(from, to); }
|
||||
virtual void GetSelection(long *from, long *to) const
|
||||
{ wxTextEntry::GetSelection(from, to); }
|
||||
|
||||
|
||||
// implementation of wxControlWithItems
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(unsigned int n) const ;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
|
||||
//Copied from wxComboBoxBase because for wxMOTIF wxComboBox does not inherit from it.
|
||||
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }
|
||||
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }
|
||||
|
||||
virtual const wxTextEntry* WXGetTextEntry() const { return this; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// implement wxTextEntry pure virtual methods
|
||||
virtual wxWindow *GetEditableWindow() { return this; }
|
||||
virtual WXWidget GetTextWidget() const;
|
||||
|
||||
private:
|
||||
// only implemented for native combo box
|
||||
void AdjustDropDownListSize();
|
||||
|
||||
// implementation detail, should really be private
|
||||
public:
|
||||
bool m_inSetSelection;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxComboBox);
|
||||
};
|
||||
|
||||
#endif // _WX_COMBOBOX_H_
|
||||
74
wxheaders/wx/motif/control.h
Normal file
74
wxheaders/wx/motif/control.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CONTROL_H_
|
||||
#define _WX_CONTROL_H_
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/validate.h"
|
||||
|
||||
// General item class
|
||||
class WXDLLIMPEXP_CORE wxControl: public wxControlBase
|
||||
{
|
||||
wxDECLARE_ABSTRACT_CLASS(wxControl);
|
||||
|
||||
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 = wxASCII_STR(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 = wxASCII_STR(wxControlNameStr));
|
||||
|
||||
// simulates the event, returns true if the event was processed
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
|
||||
|
||||
// calls the callback and appropriate event handlers, returns true if
|
||||
// event was processed
|
||||
virtual bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const ;
|
||||
|
||||
bool InSetValue() const { return m_inSetValue; }
|
||||
|
||||
protected:
|
||||
// calls wxControlBase::CreateControl, also sets foreground, background and
|
||||
// font to parent's values
|
||||
bool CreateControl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name);
|
||||
|
||||
// native implementation using XtQueryGeometry
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// Motif: prevent callbacks being called while in SetValue
|
||||
bool m_inSetValue;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif // _WX_CONTROL_H_
|
||||
39
wxheaders/wx/motif/ctrlsub.h
Normal file
39
wxheaders/wx/motif/ctrlsub.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/ctrlsub.h
|
||||
// Purpose: common functionality of wxItemContainer-derived controls
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2007-07-25
|
||||
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_CTRLSUB_H_
|
||||
#define _WX_MOTIF_CTRLSUB_H_
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/generic/ctrlsub.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxControlWithItems
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsGeneric
|
||||
{
|
||||
public:
|
||||
wxControlWithItems() { }
|
||||
|
||||
protected:
|
||||
// Motif functions inserting items in the control interpret positions
|
||||
// differently from wx: they're 1-based and 0 means to append
|
||||
unsigned int GetMotifPosition(unsigned int pos) const
|
||||
{
|
||||
return pos == GetCount() ? 0 : pos + 1;
|
||||
}
|
||||
|
||||
private:
|
||||
wxDECLARE_ABSTRACT_CLASS(wxControlWithItems);
|
||||
wxDECLARE_NO_COPY_CLASS(wxControlWithItems);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_CTRLSUB_H_
|
||||
|
||||
72
wxheaders/wx/motif/cursor.h
Normal file
72
wxheaders/wx/motif/cursor.h
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
||||
wxCursor(const char bits[], int width, int height,
|
||||
int hotSpotX = -1, int hotSpotY = -1,
|
||||
const char maskBits[] = NULL,
|
||||
const wxColour* fg = NULL, const wxColour* bg = NULL);
|
||||
|
||||
wxCursor(const wxString& name,
|
||||
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor(const wxImage& image);
|
||||
wxCursor(const char* const* xpmData);
|
||||
#endif
|
||||
|
||||
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
||||
#endif
|
||||
|
||||
virtual ~wxCursor();
|
||||
|
||||
// Motif-specific.
|
||||
// Create/get a cursor for the current display
|
||||
WXCursor GetXCursor(WXDisplay* display) const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
void InitFromStock(wxStockCursor);
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
void InitFromImage(const wxImage& image);
|
||||
#endif
|
||||
|
||||
void Create(const char bits[], int width, int height,
|
||||
int hotSpotX = -1, int hotSpotY = -1,
|
||||
const char maskBits[] = NULL);
|
||||
void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
|
||||
|
||||
// Make a cursor from standard id
|
||||
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxCursor);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CURSOR_H_
|
||||
63
wxheaders/wx/motif/dataform.h
Normal file
63
wxheaders/wx/motif/dataform.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dataform.h
|
||||
// Purpose: declaration of the wxDataFormat class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 19.10.99 (extracted from motif/dataobj.h)
|
||||
// Copyright: (c) 1999 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_DATAFORM_H
|
||||
#define _WX_MOTIF_DATAFORM_H
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataFormat
|
||||
{
|
||||
public:
|
||||
// the clipboard formats under Xt are Atoms
|
||||
typedef Atom NativeFormat;
|
||||
|
||||
wxDataFormat();
|
||||
wxDataFormat( wxDataFormatId type );
|
||||
wxDataFormat( const wxString &id );
|
||||
wxDataFormat( NativeFormat format );
|
||||
|
||||
wxDataFormat& operator=(NativeFormat format)
|
||||
{ SetId(format); return *this; }
|
||||
|
||||
// comparison (must have both versions)
|
||||
bool operator==(NativeFormat format) const
|
||||
{ return m_format == (NativeFormat)format; }
|
||||
bool operator!=(NativeFormat format) const
|
||||
{ return m_format != (NativeFormat)format; }
|
||||
bool operator==(wxDataFormatId format) const
|
||||
{ return m_type == (wxDataFormatId)format; }
|
||||
bool operator!=(wxDataFormatId format) const
|
||||
{ return m_type != (wxDataFormatId)format; }
|
||||
|
||||
// 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; }
|
||||
|
||||
void SetId( NativeFormat format );
|
||||
|
||||
// string ids are used for custom types - this SetId() must be used for
|
||||
// application-specific formats
|
||||
wxString GetId() const;
|
||||
void SetId( const wxString& id );
|
||||
|
||||
// implementation
|
||||
wxDataFormatId GetType() const;
|
||||
|
||||
private:
|
||||
wxDataFormatId m_type;
|
||||
NativeFormat m_format;
|
||||
|
||||
void PrepareFormats();
|
||||
void SetType( wxDataFormatId type );
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_MOTIF_DATAFORM_H
|
||||
23
wxheaders/wx/motif/dataobj.h
Normal file
23
wxheaders/wx/motif/dataobj.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dataobj.h
|
||||
// Purpose: declaration of the wxDataObject class for Motif
|
||||
// Author: Julian Smart
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_DATAOBJ_H_
|
||||
#define _WX_MOTIF_DATAOBJ_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataObject is the same as wxDataObjectBase under wxMotif
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
|
||||
{
|
||||
public:
|
||||
virtual ~wxDataObject();
|
||||
};
|
||||
|
||||
#endif //_WX_MOTIF_DATAOBJ_H_
|
||||
|
||||
43
wxheaders/wx/motif/dataobj2.h
Normal file
43
wxheaders/wx/motif/dataobj2.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dataobj2.h
|
||||
// Purpose: declaration of standard wxDataObjectSimple-derived classes
|
||||
// Author: Mattia Barbon
|
||||
// Created: 27.04.03
|
||||
// Copyright: (c) 2003 Mattia Barbon
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_DATAOBJ2_H_
|
||||
#define _WX_MOTIF_DATAOBJ2_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxBitmapDataObject()
|
||||
: wxBitmapDataObjectBase() { }
|
||||
wxBitmapDataObject(const wxBitmap& bitmap)
|
||||
: wxBitmapDataObjectBase(bitmap) { }
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
|
||||
// unhide base class virtual functions
|
||||
virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
|
||||
{ return GetDataSize(); }
|
||||
virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
|
||||
void *buf) const
|
||||
{ return GetDataHere(buf); }
|
||||
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
|
||||
size_t len, const void *buf)
|
||||
{ return SetData(len, buf); }
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_DATAOBJ2_H_
|
||||
61
wxheaders/wx/motif/dc.h
Normal file
61
wxheaders/wx/motif/dc.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dc.h
|
||||
// Purpose: wxMotifDCImpl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DC_H_
|
||||
#define _WX_DC_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMotifDCImpl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxMotifDCImpl(wxDC *owner);
|
||||
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
protected:
|
||||
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = false);
|
||||
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height);
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
public:
|
||||
// implementation
|
||||
wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
|
||||
wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
|
||||
wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
|
||||
wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
|
||||
wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
|
||||
wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
|
||||
wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
|
||||
wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
|
||||
|
||||
// Without device translation, for backing pixmap purposes
|
||||
wxCoord XLOG2DEV_2(wxCoord x) const
|
||||
{
|
||||
return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX;
|
||||
}
|
||||
wxCoord YLOG2DEV_2(wxCoord y) const
|
||||
{
|
||||
return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY;
|
||||
}
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMotifDCImpl);
|
||||
};
|
||||
|
||||
#endif // _WX_DC_H_
|
||||
181
wxheaders/wx/motif/dcclient.h
Normal file
181
wxheaders/wx/motif/dcclient.h
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dcclient.h
|
||||
// Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCCLIENT_H_
|
||||
#define _WX_DCCLIENT_H_
|
||||
|
||||
#include "wx/motif/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindowDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMotifDCImpl
|
||||
{
|
||||
public:
|
||||
wxWindowDCImpl(wxDC *owner);
|
||||
wxWindowDCImpl(wxDC *owner, wxWindow *win);
|
||||
|
||||
virtual ~wxWindowDCImpl();
|
||||
|
||||
// TODO this function is Motif-only for now - should it go into base class?
|
||||
void Clear(const wxRect& rect);
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual void SetFont(const wxFont& font);
|
||||
virtual void SetPen(const wxPen& pen);
|
||||
virtual void SetBrush(const wxBrush& brush);
|
||||
virtual void SetBackground(const wxBrush& brush);
|
||||
virtual void SetBackgroundMode(int mode);
|
||||
virtual void SetPalette(const wxPalette& palette);
|
||||
virtual void SetLogicalFunction( wxRasterOperationMode function );
|
||||
|
||||
virtual void SetTextForeground(const wxColour& colour);
|
||||
virtual void SetTextBackground(const wxColour& colour);
|
||||
|
||||
virtual wxCoord GetCharHeight() const;
|
||||
virtual wxCoord GetCharWidth() const;
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL) const;
|
||||
|
||||
virtual bool CanDrawBitmap() const;
|
||||
virtual bool CanGetTextExtent() const;
|
||||
|
||||
virtual int GetDepth() const;
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
virtual void DestroyClippingRegion();
|
||||
|
||||
// Helper function for setting clipping
|
||||
void SetDCClipping(WXRegion region);
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
WXGC GetGC() const { return m_gc; }
|
||||
WXGC GetBackingGC() const { return m_gcBacking; }
|
||||
WXDisplay* GetDisplay() const { return m_display; }
|
||||
bool GetAutoSetting() const { return (m_autoSetting != 0); } // See comment in dcclient.cpp
|
||||
void SetAutoSetting(bool flag) { m_autoSetting = flag; }
|
||||
|
||||
protected:
|
||||
// note that this function will call colour.SetPixel,
|
||||
// and will do one of curCol = colour, curCol = wxWHITE, curCol = wxBLACK
|
||||
// roundToWhite has an effect for monochrome display only
|
||||
// if roundToWhite == true then the colour will be set to white unless
|
||||
// it is RGB 0x000000;if roundToWhite == true the colour wull be set to
|
||||
// black unless it id RGB 0xffffff
|
||||
WXPixel CalculatePixel(wxColour& colour, wxColour& curCol,
|
||||
bool roundToWhite) const;
|
||||
// sets the foreground pixel taking into account the
|
||||
// currently selected logical operation
|
||||
void SetForegroundPixelWithLogicalFunction(WXPixel pixel);
|
||||
|
||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
wxFloodFillStyle style = wxFLOOD_SURFACE);
|
||||
|
||||
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
|
||||
|
||||
virtual void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
|
||||
|
||||
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
|
||||
wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc);
|
||||
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
double sa, double ea);
|
||||
|
||||
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height,
|
||||
double radius);
|
||||
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
||||
virtual void DoCrossHair(wxCoord x, wxCoord y);
|
||||
|
||||
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
|
||||
virtual void DoDrawRotatedText(const wxString &text, wxCoord x, wxCoord y, double angle);
|
||||
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height);
|
||||
virtual void DoSetDeviceClippingRegion(const wxRegion& region);
|
||||
|
||||
virtual void DoDrawLines(int n, const wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset);
|
||||
virtual void DoDrawPolygon(int n, const wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
|
||||
|
||||
void DoGetSize( int *width, int *height ) const;
|
||||
|
||||
// common part of constructors
|
||||
void Init();
|
||||
|
||||
WXGC m_gc;
|
||||
WXGC m_gcBacking;
|
||||
WXDisplay* m_display;
|
||||
wxWindow* m_window;
|
||||
// Pixmap for drawing on
|
||||
WXPixmap m_pixmap;
|
||||
// Last clipping region set on th GC, this is the combination
|
||||
// of paint clipping region and all user-defined clipping regions
|
||||
WXRegion m_clipRegion;
|
||||
|
||||
// Not sure if we'll need all of these
|
||||
WXPixel m_backgroundPixel;
|
||||
wxColour m_currentColour;
|
||||
int m_currentPenWidth ;
|
||||
int m_currentPenJoin ;
|
||||
int m_currentPenCap ;
|
||||
int m_currentPenDashCount ;
|
||||
wxX11Dash* m_currentPenDash ;
|
||||
wxBitmap m_currentStipple ;
|
||||
int m_currentStyle ;
|
||||
int m_currentFill ;
|
||||
int m_autoSetting ; // See comment in dcclient.cpp
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxWindowDCImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { }
|
||||
wxPaintDCImpl(wxDC *owner, wxWindow* win);
|
||||
|
||||
virtual ~wxPaintDCImpl();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxPaintDCImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { }
|
||||
wxClientDCImpl(wxDC *owner, wxWindow* win)
|
||||
: wxWindowDCImpl(owner, win) { }
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxClientDCImpl);
|
||||
};
|
||||
|
||||
#endif // _WX_DCCLIENT_H_
|
||||
44
wxheaders/wx/motif/dcmemory.h
Normal file
44
wxheaders/wx/motif/dcmemory.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dcmemory.h
|
||||
// Purpose: wxMemoryDCImpl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCMEMORY_H_
|
||||
#define _WX_DCMEMORY_H_
|
||||
|
||||
#include "wx/motif/dcclient.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDCImpl(wxMemoryDC *owner) : wxWindowDCImpl(owner) { Init(); }
|
||||
wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
|
||||
: wxWindowDCImpl(owner)
|
||||
{
|
||||
Init();
|
||||
DoSelect(bitmap);
|
||||
}
|
||||
|
||||
wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc);
|
||||
virtual ~wxMemoryDCImpl();
|
||||
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
private:
|
||||
friend class wxPaintDC;
|
||||
|
||||
void Init();
|
||||
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMemoryDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCMEMORY_H_
|
||||
31
wxheaders/wx/motif/dcprint.h
Normal file
31
wxheaders/wx/motif/dcprint.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dcprint.h
|
||||
// Purpose: wxPrinterDC class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCPRINT_H_
|
||||
#define _WX_DCPRINT_H_
|
||||
|
||||
#include "wx/motif/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrinterDC : public wxMotifDCImpl
|
||||
{
|
||||
public:
|
||||
// Create a printer DC
|
||||
wxPrinterDCImpl(const wxString& driver, const wxString& device,
|
||||
const wxString& output,
|
||||
bool interactive = true,
|
||||
wxPrintOrientation orientation = wxPORTRAIT);
|
||||
virtual ~wxPrinterDC();
|
||||
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
wxDECLARE_CLASS(wxPrinterDCImpl);
|
||||
};
|
||||
|
||||
#endif // _WX_DCPRINT_H_
|
||||
41
wxheaders/wx/motif/dcscreen.h
Normal file
41
wxheaders/wx/motif/dcscreen.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dcscreen.h
|
||||
// Purpose: wxScreenDCImpl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCSCREEN_H_
|
||||
#define _WX_DCSCREEN_H_
|
||||
|
||||
#include "wx/motif/dcclient.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDCImpl(wxScreenDC *owner);
|
||||
virtual ~wxScreenDCImpl();
|
||||
|
||||
// Compatibility with X's requirements for
|
||||
// drawing on top of all windows
|
||||
static bool StartDrawingOnTop(wxWindow* window);
|
||||
static bool StartDrawingOnTop(wxRect* rect = NULL);
|
||||
static bool EndDrawingOnTop();
|
||||
|
||||
private:
|
||||
static WXWindow sm_overlayWindow;
|
||||
|
||||
// If we have started transparent drawing at a non-(0,0) point
|
||||
// then we will have to adjust the device origin in the
|
||||
// constructor.
|
||||
static int sm_overlayWindowX;
|
||||
static int sm_overlayWindowY;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxScreenDCImpl);
|
||||
};
|
||||
|
||||
#endif // _WX_DCSCREEN_H_
|
||||
88
wxheaders/wx/motif/dialog.h
Normal file
88
wxheaders/wx/motif/dialog.h
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIALOG_H_
|
||||
#define _WX_DIALOG_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
|
||||
|
||||
// Dialog boxes
|
||||
class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase
|
||||
{
|
||||
public:
|
||||
wxDialog();
|
||||
|
||||
wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxASCII_STR(wxDialogNameStr))
|
||||
{
|
||||
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 = wxASCII_STR(wxDialogNameStr));
|
||||
|
||||
virtual ~wxDialog();
|
||||
|
||||
virtual bool Destroy();
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
|
||||
void SetModal(bool flag);
|
||||
|
||||
virtual bool IsModal() const
|
||||
{ return m_modalShowing; }
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
WXWidget GetClientWidget() const { return m_mainWidget; }
|
||||
|
||||
private:
|
||||
virtual bool XmDoCreateTLW(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name);
|
||||
|
||||
|
||||
//// Motif-specific
|
||||
bool m_modalShowing;
|
||||
wxEventLoop* m_eventLoop;
|
||||
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxDialog);
|
||||
};
|
||||
|
||||
#endif // _WX_DIALOG_H_
|
||||
171
wxheaders/wx/motif/dnd.h
Normal file
171
wxheaders/wx/motif/dnd.h
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/dnd.h
|
||||
// Purpose: declaration of wxDropTarget, wxDropSource classes
|
||||
// Author: Julian Smart
|
||||
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DND_H_
|
||||
#define _WX_DND_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/dataobj.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// classes
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDropTarget;
|
||||
class WXDLLIMPEXP_FWD_CORE wxTextDropTarget;
|
||||
class WXDLLIMPEXP_FWD_CORE wxFileDropTarget;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPrivateDropTarget;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDropSource;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropTarget: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
wxDropTarget();
|
||||
virtual ~wxDropTarget();
|
||||
|
||||
virtual void OnEnter() { }
|
||||
virtual void OnLeave() { }
|
||||
virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0;
|
||||
|
||||
// Override these to indicate what kind of data you support:
|
||||
|
||||
virtual size_t GetFormatCount() const = 0;
|
||||
virtual wxDataFormat GetFormat(size_t n) const = 0;
|
||||
|
||||
// implementation
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxTextDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTextDropTarget: public wxDropTarget
|
||||
{
|
||||
public:
|
||||
|
||||
wxTextDropTarget() {}
|
||||
virtual bool OnDrop( long x, long y, const void *data, size_t size );
|
||||
virtual bool OnDropText( long x, long y, const char *psz );
|
||||
|
||||
protected:
|
||||
|
||||
virtual size_t GetFormatCount() const;
|
||||
virtual wxDataFormat GetFormat(size_t n) const;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxPrivateDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrivateDropTarget: public wxDropTarget
|
||||
{
|
||||
public:
|
||||
|
||||
wxPrivateDropTarget();
|
||||
|
||||
// you have to override OnDrop to get at the data
|
||||
|
||||
// the string ID identifies the format of clipboard or DnD data. a word
|
||||
// processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
|
||||
// to the clipboard - the latter with the Id "WXWORD_FORMAT".
|
||||
|
||||
void SetId( const wxString& id )
|
||||
{ m_id = id; }
|
||||
|
||||
wxString GetId()
|
||||
{ return m_id; }
|
||||
|
||||
private:
|
||||
|
||||
virtual size_t GetFormatCount() const;
|
||||
virtual wxDataFormat GetFormat(size_t n) const;
|
||||
|
||||
wxString m_id;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A drop target which accepts files (dragged from File Manager or Explorer)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDropTarget: public wxDropTarget
|
||||
{
|
||||
public:
|
||||
|
||||
wxFileDropTarget() {}
|
||||
|
||||
virtual bool OnDrop( long x, long y, const void *data, size_t size );
|
||||
virtual bool OnDropFiles( long x, long y,
|
||||
size_t nFiles, const char * const aszFiles[] );
|
||||
|
||||
protected:
|
||||
|
||||
virtual size_t GetFormatCount() const;
|
||||
virtual wxDataFormat GetFormat(size_t n) const;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropSource
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
enum wxDragResult
|
||||
{
|
||||
wxDragError, // error prevented the d&d operation from completing
|
||||
wxDragNone, // drag target didn't accept the data
|
||||
wxDragCopy, // the data was successfully copied
|
||||
wxDragMove, // the data was successfully moved
|
||||
wxDragCancel // the operation was cancelled by user (not an error)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropSource: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
wxDropSource( wxWindow *win );
|
||||
wxDropSource( wxDataObject &data, wxWindow *win );
|
||||
|
||||
virtual ~wxDropSource(void);
|
||||
|
||||
void SetData( wxDataObject &data );
|
||||
wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||
|
||||
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return true; }
|
||||
|
||||
// implementation
|
||||
#if 0
|
||||
void RegisterWindow(void);
|
||||
void UnregisterWindow(void);
|
||||
|
||||
wxWindow *m_window;
|
||||
wxDragResult m_retValue;
|
||||
wxDataObject *m_data;
|
||||
|
||||
wxCursor m_defaultCursor;
|
||||
wxCursor m_goaheadCursor;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif
|
||||
//_WX_DND_H_
|
||||
41
wxheaders/wx/motif/filedlg.h
Normal file
41
wxheaders/wx/motif/filedlg.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/filedlg.h
|
||||
// Purpose: wxFileDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FILEDLG_H_
|
||||
#define _WX_FILEDLG_H_
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxFileDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFileDialog);
|
||||
public:
|
||||
|
||||
// For Motif
|
||||
static wxString m_fileSelectorAnswer;
|
||||
static bool m_fileSelectorReturned;
|
||||
|
||||
public:
|
||||
wxFileDialog(wxWindow *parent,
|
||||
const wxString& message = wxASCII_STR(wxFileSelectorPromptStr),
|
||||
const wxString& defaultDir = wxEmptyString,
|
||||
const wxString& defaultFile = wxEmptyString,
|
||||
const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr),
|
||||
long style = wxFD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
const wxString& name = wxASCII_STR(wxFileDialogNameStr));
|
||||
|
||||
virtual int ShowModal();
|
||||
};
|
||||
|
||||
#endif // _WX_FILEDLG_H_
|
||||
153
wxheaders/wx/motif/font.h
Normal file
153
wxheaders/wx/motif/font.h
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/font.h
|
||||
// Purpose: wxFont class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FONT_H_
|
||||
#define _WX_FONT_H_
|
||||
|
||||
#if __WXMOTIF20__ && !__WXLESSTIF__
|
||||
#define wxMOTIF_USE_RENDER_TABLE 1
|
||||
#else
|
||||
#define wxMOTIF_USE_RENDER_TABLE 0
|
||||
#endif
|
||||
#define wxMOTIF_NEW_FONT_HANDLING wxMOTIF_USE_RENDER_TABLE
|
||||
|
||||
class wxXFont;
|
||||
|
||||
// Font
|
||||
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
wxFont(const wxFontInfo& info);
|
||||
|
||||
wxFont(const wxString& nativeFontInfoString);
|
||||
|
||||
wxFont(const wxNativeFontInfo& info);
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(size, family, style, weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
wxFont(const wxSize& pixelSize,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(10, family, style, weight, underlined, face, encoding);
|
||||
SetPixelSize(pixelSize);
|
||||
}
|
||||
|
||||
bool Create(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
// wxMOTIF-specific
|
||||
bool Create(const wxString& fontname,
|
||||
wxFontEncoding fontenc = wxFONTENCODING_DEFAULT);
|
||||
bool Create(const wxNativeFontInfo& fontinfo);
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual double GetFractionalPointSize() const;
|
||||
virtual wxFontStyle GetStyle() const;
|
||||
virtual int GetNumericWeight() const;
|
||||
virtual bool GetUnderlined() const;
|
||||
virtual wxString GetFaceName() const;
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
|
||||
virtual void SetFractionalPointSize(double pointSize);
|
||||
virtual void SetFamily(wxFontFamily family);
|
||||
virtual void SetStyle(wxFontStyle style);
|
||||
virtual void SetNumericWeight(int weight);
|
||||
virtual bool SetFaceName(const wxString& faceName);
|
||||
virtual void SetUnderlined(bool underlined);
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
wxDECLARE_COMMON_FONT_METHODS();
|
||||
|
||||
wxDEPRECATED_MSG("use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants")
|
||||
wxFont(int size,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
(void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
|
||||
// Implementation
|
||||
|
||||
// Find an existing, or create a new, XFontStruct
|
||||
// based on this wxFont and the given scale. Append the
|
||||
// font to list in the private data for future reference.
|
||||
|
||||
// TODO This is a fairly basic implementation, that doesn't
|
||||
// allow for different facenames, and also doesn't do a mapping
|
||||
// between 'standard' facenames (e.g. Arial, Helvetica, Times Roman etc.)
|
||||
// and the fonts that are available on a particular system.
|
||||
// Maybe we need to scan the user's machine to build up a profile
|
||||
// of the fonts and a mapping file.
|
||||
|
||||
// Return font struct, and optionally the Motif font list
|
||||
wxXFont *GetInternalFont(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
|
||||
// These two are helper functions for convenient access of the above.
|
||||
#if wxMOTIF_USE_RENDER_TABLE
|
||||
WXFontSet GetFontSet(double scale, WXDisplay* display = NULL) const;
|
||||
WXRenderTable GetRenderTable(WXDisplay* display) const;
|
||||
#else // if !wxMOTIF_USE_RENDER_TABLE
|
||||
WXFontStructPtr GetFontStruct(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
WXFontList GetFontList(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
#endif // !wxMOTIF_USE_RENDER_TABLE
|
||||
// returns either a XmFontList or XmRenderTable, depending
|
||||
// on Motif version
|
||||
WXFontType GetFontType(WXDisplay* display) const;
|
||||
// like the function above but does a copy for XmFontList
|
||||
WXFontType GetFontTypeC(WXDisplay* display) const;
|
||||
static WXString GetFontTag();
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
|
||||
virtual wxFontFamily DoGetFamily() const;
|
||||
|
||||
void Unshare();
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFont);
|
||||
};
|
||||
|
||||
#endif // _WX_FONT_H_
|
||||
128
wxheaders/wx/motif/frame.h
Normal file
128
wxheaders/wx/motif/frame.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/frame.h
|
||||
// Purpose: wxFrame class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_FRAME_H_
|
||||
#define _WX_MOTIF_FRAME_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
||||
{
|
||||
public:
|
||||
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 = wxASCII_STR(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 = wxASCII_STR(wxFrameNameStr));
|
||||
|
||||
virtual ~wxFrame();
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Create toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& name = wxASCII_STR(wxToolBarNameStr));
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// Implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetMenuBarWidget() const;
|
||||
WXWidget GetShellWidget() const { return m_frameShell; }
|
||||
WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
||||
WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
||||
WXWidget GetTopWidget() const { return m_frameShell; }
|
||||
|
||||
virtual WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
|
||||
// The widget that can have children on it
|
||||
WXWidget GetClientWidget() const;
|
||||
bool GetVisibleStatus() const { return m_visibleStatus; }
|
||||
void SetVisibleStatus( bool status ) { m_visibleStatus = status; }
|
||||
|
||||
bool PreResize();
|
||||
|
||||
// for generic/mdig.h
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// set a single icon for the frame
|
||||
void DoSetIcon( const wxIcon& icon );
|
||||
|
||||
//// Motif-specific
|
||||
WXWidget m_frameShell;
|
||||
WXWidget m_workArea;
|
||||
WXWidget m_clientArea;
|
||||
bool m_visibleStatus;
|
||||
bool m_iconized;
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
private:
|
||||
virtual bool XmDoCreateTLW(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name);
|
||||
|
||||
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFrame);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_FRAME_H_
|
||||
|
||||
55
wxheaders/wx/motif/gauge.h
Normal file
55
wxheaders/wx/motif/gauge.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/gauge.h
|
||||
// Purpose: wxGauge class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GAUGE_H_
|
||||
#define _WX_GAUGE_H_
|
||||
|
||||
// Group box
|
||||
class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxGauge);
|
||||
|
||||
public:
|
||||
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
||||
|
||||
inline wxGauge(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxGaugeNameStr))
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxGaugeNameStr));
|
||||
|
||||
void SetRange(int r);
|
||||
void SetValue(int pos);
|
||||
|
||||
int GetRange() const ;
|
||||
int GetValue() const ;
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
private:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GAUGE_H_
|
||||
58
wxheaders/wx/motif/icon.h
Normal file
58
wxheaders/wx/motif/icon.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/icon.h
|
||||
// Purpose: wxIcon class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ICON_H_
|
||||
#define _WX_ICON_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Icon
|
||||
class WXDLLIMPEXP_CORE wxIcon : public wxBitmap
|
||||
{
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
// Initialize with XBM data
|
||||
wxIcon(const char bits[], int width, int height);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxIcon(const char* const* data);
|
||||
|
||||
wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
|
||||
int desiredWidth = -1, int desiredHeight = -1)
|
||||
{
|
||||
LoadFile(name, type, desiredWidth, desiredHeight);
|
||||
}
|
||||
|
||||
wxIcon(const wxIconLocation& loc)
|
||||
{
|
||||
LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ANY);
|
||||
}
|
||||
|
||||
virtual ~wxIcon();
|
||||
|
||||
bool LoadFile(const wxString& name, wxBitmapType type,
|
||||
int desiredWidth, int desiredHeight);
|
||||
|
||||
// unhide the base class version
|
||||
virtual bool LoadFile(const wxString& name,
|
||||
wxBitmapType flags = wxICON_DEFAULT_TYPE)
|
||||
{ return LoadFile(name, flags); }
|
||||
|
||||
// create from bitmap (which should have a mask unless it's monochrome):
|
||||
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
|
||||
// ctors, assignment operators...), but it's ok to have such function
|
||||
void CopyFromBitmap(const wxBitmap& bmp);
|
||||
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxIcon);
|
||||
};
|
||||
|
||||
#endif // _WX_ICON_H_
|
||||
104
wxheaders/wx/motif/listbox.h
Normal file
104
wxheaders/wx/motif/listbox.h
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTBOX_H_
|
||||
#define _WX_LISTBOX_H_
|
||||
|
||||
#include "wx/ctrlsub.h"
|
||||
#include "wx/clntdata.h"
|
||||
|
||||
// forward decl for GetSelections()
|
||||
class WXDLLIMPEXP_FWD_BASE wxArrayInt;
|
||||
|
||||
// List box item
|
||||
class WXDLLIMPEXP_CORE wxListBox: public wxListBoxBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxListBox);
|
||||
|
||||
public:
|
||||
wxListBox();
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr))
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr))
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxListBoxNameStr));
|
||||
|
||||
// implementation of wxControlWithItems
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
virtual int GetSelection() const;
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void DoClear();
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
|
||||
// implementation of wxListBoxbase
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
virtual void DoSetFirstItem(int n);
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
virtual bool IsSelected(int n) const;
|
||||
|
||||
// For single or multiple choice list item
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const;
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
virtual void DoToggleItem(int WXUNUSED(item), int WXUNUSED(x)) {}
|
||||
#endif
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
unsigned int m_noItems;
|
||||
|
||||
private:
|
||||
void SetSelectionPolicy();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_LISTBOX_H_
|
||||
174
wxheaders/wx/motif/menu.h
Normal file
174
wxheaders/wx/motif/menu.h
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/menu.h
|
||||
// Purpose: wxMenu, wxMenuBar classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_MENU_H_
|
||||
#define _WX_MOTIF_MENU_H_
|
||||
|
||||
#include "wx/colour.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
wxMenu(const wxString& title, long style = 0)
|
||||
: wxMenuBase(title, style) { Init(); }
|
||||
|
||||
wxMenu(long style = 0) : wxMenuBase(style) { Init(); }
|
||||
|
||||
virtual ~wxMenu();
|
||||
|
||||
// implement base class virtuals
|
||||
virtual wxMenuItem* DoAppend(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem* DoRemove(wxMenuItem *item);
|
||||
|
||||
virtual void Break();
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
|
||||
bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
//// Motif-specific
|
||||
WXWidget GetButtonWidget() const { return m_buttonWidget; }
|
||||
void SetButtonWidget(WXWidget buttonWidget) { m_buttonWidget = buttonWidget; }
|
||||
|
||||
WXWidget GetMainWidget() const { return m_menuWidget; }
|
||||
|
||||
int GetId() const { return m_menuId; }
|
||||
void SetId(int id) { m_menuId = id; }
|
||||
|
||||
void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; }
|
||||
wxMenuBar* GetMenuBar() const { return m_menuBar; }
|
||||
|
||||
void CreatePopup(WXWidget logicalParent, int x, int y);
|
||||
void DestroyPopup();
|
||||
void ShowPopup(int x, int y);
|
||||
void HidePopup();
|
||||
|
||||
WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu,
|
||||
size_t index, const wxString& title = wxEmptyString,
|
||||
bool isPulldown = false);
|
||||
|
||||
// For popups, need to destroy, then recreate menu for a different (or
|
||||
// possibly same) window, since the parent may change.
|
||||
void DestroyMenu(bool full);
|
||||
WXWidget FindMenuItem(int id, wxMenuItem **it = NULL) const;
|
||||
|
||||
const wxColour& GetBackgroundColour() const { return m_backgroundColour; }
|
||||
const wxColour& GetForegroundColour() const { return m_foregroundColour; }
|
||||
const wxFont& GetFont() const { return m_font; }
|
||||
|
||||
void SetBackgroundColour(const wxColour& colour);
|
||||
void SetForegroundColour(const wxColour& colour);
|
||||
void SetFont(const wxFont& colour);
|
||||
void ChangeFont(bool keepOriginalSize = false);
|
||||
|
||||
WXWidget GetHandle() const { return m_menuWidget; }
|
||||
|
||||
bool IsTearOff() const { return (m_style & wxMENU_TEAROFF) != 0; }
|
||||
|
||||
void DestroyWidgetAndDetach();
|
||||
public:
|
||||
// Motif-specific data
|
||||
int m_numColumns;
|
||||
WXWidget m_menuWidget;
|
||||
WXWidget m_popupShell; // For holding the popup shell widget
|
||||
WXWidget m_buttonWidget; // The actual string, so we can grey it etc.
|
||||
int m_menuId;
|
||||
wxMenu* m_topLevelMenu ;
|
||||
bool m_ownedByMenuBar;
|
||||
wxColour m_foregroundColour;
|
||||
wxColour m_backgroundColour;
|
||||
wxFont m_font;
|
||||
|
||||
private:
|
||||
// common code for both constructors:
|
||||
void Init();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMenu);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu Bar
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
|
||||
{
|
||||
public:
|
||||
wxMenuBar() { Init(); }
|
||||
wxMenuBar(long WXUNUSED(style)) { Init(); }
|
||||
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
|
||||
wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long style = 0);
|
||||
virtual ~wxMenuBar();
|
||||
|
||||
// implement base class (pure) virtuals
|
||||
// ------------------------------------
|
||||
|
||||
virtual bool Append( wxMenu *menu, const wxString &title );
|
||||
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Remove(size_t pos);
|
||||
|
||||
virtual int FindMenuItem(const wxString& menuString,
|
||||
const wxString& itemString) const;
|
||||
virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const;
|
||||
|
||||
virtual void EnableTop( size_t pos, bool flag );
|
||||
virtual void SetMenuLabel( size_t pos, const wxString& label );
|
||||
virtual wxString GetMenuLabel( size_t pos ) const;
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
wxFrame* GetMenuBarFrame() const { return m_menuBarFrame; }
|
||||
void SetMenuBarFrame(wxFrame* frame) { m_menuBarFrame = frame; }
|
||||
WXWidget GetMainWidget() const { return m_mainWidget; }
|
||||
void SetMainWidget(WXWidget widget) { m_mainWidget = widget; }
|
||||
|
||||
// Create menubar
|
||||
bool CreateMenuBar(wxFrame* frame);
|
||||
|
||||
// Destroy menubar, but keep data structures intact so we can recreate it.
|
||||
bool DestroyMenuBar();
|
||||
|
||||
const wxColour& GetBackgroundColour() const { return m_backgroundColour; }
|
||||
const wxColour& GetForegroundColour() const { return m_foregroundColour; }
|
||||
const wxFont& GetFont() const { return m_font; }
|
||||
|
||||
virtual bool SetBackgroundColour(const wxColour& colour);
|
||||
virtual bool SetForegroundColour(const wxColour& colour);
|
||||
virtual bool SetFont(const wxFont& colour);
|
||||
void ChangeFont(bool keepOriginalSize = false);
|
||||
|
||||
public:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxArrayString m_titles;
|
||||
wxFrame *m_menuBarFrame;
|
||||
|
||||
WXWidget m_mainWidget;
|
||||
|
||||
wxColour m_foregroundColour;
|
||||
wxColour m_backgroundColour;
|
||||
wxFont m_font;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMenuBar);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_MENU_H_
|
||||
60
wxheaders/wx/motif/menuitem.h
Normal file
60
wxheaders/wx/motif/menuitem.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/menuitem.h
|
||||
// Purpose: wxMenuItem class
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 11.11.97
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_MENUITEM_H
|
||||
#define _WX_MOTIF_MENUITEM_H
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuBar;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
|
||||
{
|
||||
public:
|
||||
// ctor & dtor
|
||||
wxMenuItem(wxMenu *parentMenu = NULL,
|
||||
int id = wxID_SEPARATOR,
|
||||
const wxString& text = wxEmptyString,
|
||||
const wxString& help = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
wxMenu *subMenu = NULL);
|
||||
virtual ~wxMenuItem();
|
||||
|
||||
// accessors (some more are inherited from wxOwnerDrawn or are below)
|
||||
virtual void SetItemLabel(const wxString& label);
|
||||
virtual void Enable(bool enable = true);
|
||||
virtual void Check(bool check = true);
|
||||
|
||||
// implementation from now on
|
||||
void CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMenu,
|
||||
size_t index);
|
||||
void DestroyItem(bool full);
|
||||
|
||||
WXWidget GetButtonWidget() const { return m_buttonWidget; }
|
||||
|
||||
wxMenuBar* GetMenuBar() const { return m_menuBar; }
|
||||
void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; }
|
||||
|
||||
wxMenu* GetTopMenu() const { return m_topMenu; }
|
||||
void SetTopMenu(wxMenu* menu) { m_topMenu = menu; }
|
||||
|
||||
private:
|
||||
WXWidget m_buttonWidget;
|
||||
wxMenuBar* m_menuBar;
|
||||
wxMenu* m_topMenu; // Top-level menu e.g. popup-menu
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMenuItem);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_MENUITEM_H
|
||||
41
wxheaders/wx/motif/minifram.h
Normal file
41
wxheaders/wx/motif/minifram.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/minifram.h
|
||||
// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars.
|
||||
// If there is no equivalent on your platform, just make it a
|
||||
// normal frame.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// 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 {
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMiniFrame);
|
||||
|
||||
public:
|
||||
inline wxMiniFrame() {}
|
||||
inline wxMiniFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION,
|
||||
const wxString& name = wxASCII_STR(wxFrameNameStr))
|
||||
{
|
||||
// Use wxFrame constructor in absence of more specific code.
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxMiniFrame() {}
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_MINIFRAM_H_
|
||||
43
wxheaders/wx/motif/msgdlg.h
Normal file
43
wxheaders/wx/motif/msgdlg.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/msgdlg.h
|
||||
// Purpose: wxMessageDialog class. Use generic version if no
|
||||
// platform-specific implementation.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSGBOXDLG_H_
|
||||
#define _WX_MSGBOXDLG_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Message box dialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
|
||||
{
|
||||
public:
|
||||
wxMessageDialog(wxWindow *parent,
|
||||
const wxString& message,
|
||||
const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr),
|
||||
long style = wxOK | wxCENTRE,
|
||||
const wxPoint& WXUNUSED(pos) = wxDefaultPosition)
|
||||
: wxMessageDialogBase(parent, message, caption, style)
|
||||
{
|
||||
}
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
// implementation only from now on
|
||||
// called by the Motif callback
|
||||
void SetResult(long result) { m_result = result; }
|
||||
|
||||
protected:
|
||||
long m_result;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMessageDialog);
|
||||
};
|
||||
|
||||
#endif // _WX_MSGBOXDLG_H_
|
||||
35
wxheaders/wx/motif/popupwin.h
Normal file
35
wxheaders/wx/motif/popupwin.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/popupwin.h
|
||||
// Purpose: wxPopupWindow class for wxMotif
|
||||
// Author: Mattia Barbon
|
||||
// Modified by:
|
||||
// Created: 28.08.03
|
||||
// Copyright: (c) 2003 Mattia Barbon
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_POPUPWIN_H_
|
||||
#define _WX_MOTIF_POPUPWIN_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPopupWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase
|
||||
{
|
||||
public:
|
||||
wxPopupWindow() { Init(); }
|
||||
|
||||
wxPopupWindow( wxWindow *parent, int flags = wxBORDER_NONE )
|
||||
{ Init(); (void)Create( parent, flags ); }
|
||||
|
||||
bool Create( wxWindow *parent, int flags = wxBORDER_NONE );
|
||||
|
||||
virtual bool Show( bool show = true );
|
||||
private:
|
||||
void Init() { m_isShown = false; }
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_POPUPWIN_H_
|
||||
51
wxheaders/wx/motif/print.h
Normal file
51
wxheaders/wx/motif/print.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/print.h
|
||||
// Purpose: wxPrinter, wxPrintPreview classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRINT_H_
|
||||
#define _WX_PRINT_H_
|
||||
|
||||
#include "wx/prntbase.h"
|
||||
|
||||
/*
|
||||
* Represents the printer: manages printing a wxPrintout object
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxPrinter);
|
||||
|
||||
public:
|
||||
wxPrinter(wxPrintData *data = NULL);
|
||||
virtual ~wxPrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
|
||||
virtual bool PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintPreview
|
||||
* Programmer creates an object of this class to preview a wxPrintout.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase
|
||||
{
|
||||
wxDECLARE_CLASS(wxPrintPreview);
|
||||
|
||||
public:
|
||||
wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
|
||||
virtual ~wxPrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PRINT_H_
|
||||
222
wxheaders/wx/motif/private.h
Normal file
222
wxheaders/wx/motif/private.h
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/private.h
|
||||
// Purpose: Private declarations for wxMotif port
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRIVATE_H_
|
||||
#define _WX_PRIVATE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFont;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxSize;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
|
||||
#include "wx/x11/privx.h"
|
||||
|
||||
// Put any private declarations here: native Motif types may be used because
|
||||
// this header is included after Xm/Xm.h
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// convenience macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCHECK_MOTIF_VERSION( major, minor ) \
|
||||
( XmVersion >= (major) * 1000 + (minor) )
|
||||
|
||||
#define wxCHECK_LESSTIF_VERSION( major, minor ) \
|
||||
( LesstifVersion >= (major) * 1000 + (minor) )
|
||||
|
||||
#define wxCHECK_LESSTIF() ( __WXLESSTIF__ )
|
||||
|
||||
// some compilers (e.g. Sun CC) give warnings when treating string literals as
|
||||
// (non const) "char *" but many Motif functions take "char *" parameters which
|
||||
// are really "const char *" so use this macro to suppress the warnings when we
|
||||
// know it's ok
|
||||
#define wxMOTIF_STR(x) const_cast<char *>(x)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Miscellaneous functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
WXWidget wxCreateBorderWidget( WXWidget parent, long style );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// common callbacks
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// All widgets should have this as their resize proc.
|
||||
extern void wxWidgetResizeProc(Widget w, XConfigureEvent *event,
|
||||
String args[], int *num_args);
|
||||
|
||||
// For repainting arbitrary windows
|
||||
void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data),
|
||||
XEvent *event, char *);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// we maintain a hash table which contains the mapping from Widget to wxWindow
|
||||
// corresponding to the window for this widget
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern void wxDeleteWindowFromTable(Widget w);
|
||||
extern wxWindow *wxGetWindowFromTable(Widget w);
|
||||
extern bool wxAddWindowToTable(Widget w, wxWindow *win);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmap related functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Creates a bitmap with transparent areas drawn in the given colour.
|
||||
wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// key events related functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern char wxFindMnemonic(const char* s);
|
||||
|
||||
extern char * wxFindAccelerator (const char *s);
|
||||
extern XmString wxFindAcceleratorText (const char *s);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// TranslateXXXEvent() functions - translate Motif event to wxWindow one
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
|
||||
Widget widget, const XEvent *xevent);
|
||||
extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
|
||||
Widget widget, const XEvent *xevent);
|
||||
|
||||
extern void wxDoChangeForegroundColour(WXWidget widget,
|
||||
wxColour& foregroundColour);
|
||||
extern void wxDoChangeBackgroundColour(WXWidget widget,
|
||||
const wxColour& backgroundColour,
|
||||
bool changeArmColour = false);
|
||||
extern void wxDoChangeFont(WXWidget widget, const wxFont& font);
|
||||
extern void wxGetTextExtent(WXDisplay* display, const wxFont& font,
|
||||
double scale,
|
||||
const wxString& string, int* width, int* height,
|
||||
int* ascent, int* descent);
|
||||
extern void wxGetTextExtent(const wxWindow* window, const wxString& str,
|
||||
int* width, int* height,
|
||||
int* ascent, int* descent);
|
||||
|
||||
#define wxNO_COLORS 0x00
|
||||
#define wxBACK_COLORS 0x01
|
||||
#define wxFORE_COLORS 0x02
|
||||
|
||||
extern XColor itemColors[5] ;
|
||||
|
||||
#define wxBACK_INDEX 0
|
||||
#define wxFORE_INDEX 1
|
||||
#define wxSELE_INDEX 2
|
||||
#define wxTOPS_INDEX 3
|
||||
#define wxBOTS_INDEX 4
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// XmString/wxString conversion utilities
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxString wxXmStringToString( const XmString& xmString );
|
||||
XmString wxStringToXmString( const char* string );
|
||||
inline XmString wxStringToXmString( const wxScopedCharBuffer& string )
|
||||
{ return wxStringToXmString(string.data()); }
|
||||
inline XmString wxStringToXmString( const wxString& string )
|
||||
{ return wxStringToXmString((const char*)string.mb_str()); }
|
||||
|
||||
// XmString made easy to use in wxWidgets (and has an added benefit of
|
||||
// cleaning up automatically)
|
||||
class wxXmString
|
||||
{
|
||||
void Init(const char *str)
|
||||
{
|
||||
m_string = XmStringCreateLtoR
|
||||
(
|
||||
const_cast<char *>(str),
|
||||
const_cast<char *>(XmSTRING_DEFAULT_CHARSET)
|
||||
);
|
||||
}
|
||||
|
||||
public:
|
||||
wxXmString(const char* str)
|
||||
{
|
||||
Init(str);
|
||||
}
|
||||
|
||||
wxXmString(const wchar_t* str)
|
||||
{
|
||||
Init(wxConvLibc.cWC2MB(str));
|
||||
}
|
||||
|
||||
wxXmString(const wxString& str)
|
||||
{
|
||||
Init(str.mb_str());
|
||||
}
|
||||
|
||||
wxXmString(const wxCStrData& str)
|
||||
{
|
||||
Init(str);
|
||||
}
|
||||
|
||||
// just to avoid calling XmStringFree()
|
||||
wxXmString(const XmString& string) { m_string = string; }
|
||||
|
||||
~wxXmString() { XmStringFree(m_string); }
|
||||
|
||||
// semi-implicit conversion to XmString (shouldn't rely on implicit
|
||||
// conversion because many of Motif functions are macros)
|
||||
XmString operator()() const { return m_string; }
|
||||
|
||||
private:
|
||||
XmString m_string;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Routines used in both wxTextCtrl/wxListBox and nativa wxComboBox
|
||||
// (defined in src/motif/listbox.cpp or src/motif/textctrl.cpp
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int wxDoFindStringInList( Widget listWidget, const wxString& str );
|
||||
int wxDoGetSelectionInList( Widget listWidget );
|
||||
wxString wxDoGetStringInList( Widget listWidget, int n );
|
||||
wxSize wxDoGetListBoxBestSize( Widget listWidget, const wxWindow* window );
|
||||
|
||||
wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget,
|
||||
const wxWindow* window );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event-related functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// executes one main loop iteration (implemented in src/motif/evtloop.cpp)
|
||||
// returns true if the loop should be exited
|
||||
bool wxDoEventLoopIteration( wxGUIEventLoop& evtLoop );
|
||||
|
||||
// Consume all events until no more left
|
||||
void wxFlushEvents(WXDisplay* display);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros to avoid casting WXFOO to Foo all the time
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// argument is of type "wxWindow *"
|
||||
#define GetWidget(w) ((Widget)(w)->GetHandle())
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// accessors for C modules
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern "C" XtAppContext wxGetAppContext();
|
||||
|
||||
#endif
|
||||
// _WX_PRIVATE_H_
|
||||
36
wxheaders/wx/motif/private/timer.h
Normal file
36
wxheaders/wx/motif/private/timer.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/private/timer.h
|
||||
// Purpose: wxTimer class
|
||||
// Author: Julian Smart
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_PRIVATE_TIMER_H_
|
||||
#define _WX_MOTIF_PRIVATE_TIMER_H_
|
||||
|
||||
#include "wx/private/timer.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMotifTimerImpl : public wxTimerImpl
|
||||
{
|
||||
public:
|
||||
wxMotifTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_id = 0; }
|
||||
virtual ~wxMotifTimerImpl();
|
||||
|
||||
virtual bool Start(int milliseconds = -1, bool oneShot = false);
|
||||
virtual void Stop();
|
||||
virtual bool IsRunning() const { return m_id != 0; }
|
||||
|
||||
// override this to rearm the timer if necessary (i.e. if not one shot) as
|
||||
// X timeouts are removed automatically when they expire
|
||||
virtual void Notify();
|
||||
|
||||
protected:
|
||||
// common part of Start() and Notify()
|
||||
void DoStart();
|
||||
|
||||
long m_id;
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_PRIVATE_TIMER_H_
|
||||
134
wxheaders/wx/motif/radiobox.h
Normal file
134
wxheaders/wx/motif/radiobox.h
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/radiobox.h
|
||||
// Purpose: wxRadioBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_RADIOBOX_H_
|
||||
#define _WX_MOTIF_RADIOBOX_H_
|
||||
|
||||
#ifndef wxWIDGET_ARRAY_DEFINED
|
||||
#define wxWIDGET_ARRAY_DEFINED
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
WX_DEFINE_ARRAY_PTR(WXWidget, wxWidgetArray);
|
||||
#endif // wxWIDGET_ARRAY_DEFINED
|
||||
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, public wxRadioBoxBase
|
||||
{
|
||||
public:
|
||||
wxRadioBox() { Init(); }
|
||||
|
||||
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxRadioBoxNameStr))
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, n, choices,
|
||||
majorDim, style, val, name);
|
||||
}
|
||||
|
||||
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
int majorDim = 0, long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxRadioBoxNameStr))
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, choices,
|
||||
majorDim, style, val, name);
|
||||
}
|
||||
|
||||
virtual ~wxRadioBox();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
int majorDim = 0, long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxRadioBoxNameStr));
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
int majorDim = 0, long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxRadioBoxNameStr));
|
||||
|
||||
// Enabling
|
||||
virtual bool Enable(bool enable = true);
|
||||
virtual bool Enable(unsigned int item, bool enable = true);
|
||||
virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const
|
||||
{
|
||||
/* TODO */
|
||||
return true;
|
||||
}
|
||||
|
||||
// Showing
|
||||
virtual bool Show(bool show = true);
|
||||
virtual bool Show(unsigned int item, bool show = true);
|
||||
virtual bool IsItemShown(unsigned int WXUNUSED(n)) const
|
||||
{
|
||||
/* TODO */
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void SetSelection(int n);
|
||||
int GetSelection() const;
|
||||
|
||||
virtual void SetString(unsigned int item, const wxString& label);
|
||||
virtual wxString GetString(unsigned int item) const;
|
||||
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
virtual unsigned int GetCount() const { return m_noItems; } ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
const wxWidgetArray& GetRadioButtons() const { return m_radioButtons; }
|
||||
void SetSel(int i) { m_selectedButton = i; }
|
||||
virtual WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
unsigned int m_noItems;
|
||||
int m_noRowsOrCols;
|
||||
int m_selectedButton;
|
||||
|
||||
wxWidgetArray m_radioButtons;
|
||||
WXWidget m_labelWidget;
|
||||
wxArrayString m_radioButtonLabels;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxRadioBox);
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_RADIOBOX_H_
|
||||
61
wxheaders/wx/motif/radiobut.h
Normal file
61
wxheaders/wx/motif/radiobut.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/radiobut.h
|
||||
// Purpose: wxRadioButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_RADIOBUT_H_
|
||||
#define _WX_RADIOBUT_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxRadioButton);
|
||||
public:
|
||||
wxRadioButton();
|
||||
virtual ~wxRadioButton() { RemoveFromCycle(); }
|
||||
|
||||
inline wxRadioButton(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxRadioButtonNameStr))
|
||||
{
|
||||
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 = wxASCII_STR(wxRadioButtonNameStr));
|
||||
|
||||
virtual void SetValue(bool val);
|
||||
virtual bool GetValue() const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
|
||||
// *this function is an implementation detail*
|
||||
// clears the selection in the radiobuttons in the cycle
|
||||
// and returns the old selection (if any)
|
||||
wxRadioButton* ClearSelections();
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
private:
|
||||
wxRadioButton* AddInCycle(wxRadioButton* cycle);
|
||||
void RemoveFromCycle();
|
||||
wxRadioButton* NextInCycle() { return m_cycle; }
|
||||
|
||||
wxRadioButton *m_cycle;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_RADIOBUT_H_
|
||||
61
wxheaders/wx/motif/scrolbar.h
Normal file
61
wxheaders/wx/motif/scrolbar.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/scrolbar.h
|
||||
// Purpose: wxScrollBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SCROLBAR_H_
|
||||
#define _WX_SCROLBAR_H_
|
||||
|
||||
// Scrollbar item
|
||||
class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxScrollBar);
|
||||
|
||||
public:
|
||||
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
|
||||
virtual ~wxScrollBar();
|
||||
|
||||
inline wxScrollBar(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxScrollBarNameStr))
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxScrollBarNameStr));
|
||||
|
||||
int GetThumbPosition() const ;
|
||||
inline int GetThumbSize() const { return m_pageSize; }
|
||||
inline int GetPageSize() const { return m_viewSize; }
|
||||
inline int GetRange() const { return m_objectSize; }
|
||||
|
||||
virtual void SetThumbPosition(int viewStart);
|
||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||
bool refresh = true);
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
|
||||
protected:
|
||||
int m_pageSize;
|
||||
int m_viewSize;
|
||||
int m_objectSize;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_SCROLBAR_H_
|
||||
1632
wxheaders/wx/motif/setup.h
Normal file
1632
wxheaders/wx/motif/setup.h
Normal file
File diff suppressed because it is too large
Load diff
78
wxheaders/wx/motif/slider.h
Normal file
78
wxheaders/wx/motif/slider.h
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/slider.h
|
||||
// Purpose: wxSlider class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SLIDER_H_
|
||||
#define _WX_SLIDER_H_
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
// Slider
|
||||
class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxSlider);
|
||||
|
||||
public:
|
||||
wxSlider();
|
||||
|
||||
wxSlider(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxSliderNameStr))
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxSlider();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxSliderNameStr));
|
||||
|
||||
virtual int GetValue() const ;
|
||||
virtual void SetValue(int);
|
||||
|
||||
void SetRange(int minValue, int maxValue);
|
||||
|
||||
inline int GetMin() const { return m_rangeMin; }
|
||||
inline int GetMax() const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetPageSize(int pageSize);
|
||||
int GetPageSize() const ;
|
||||
void SetLineSize(int lineSize);
|
||||
int GetLineSize() const ;
|
||||
void SetThumbLength(int len) ;
|
||||
int GetThumbLength() const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
protected:
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_SLIDER_H_
|
||||
75
wxheaders/wx/motif/spinbutt.h
Normal file
75
wxheaders/wx/motif/spinbutt.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/spinbutt.h
|
||||
// Purpose: wxSpinButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SPINBUTT_H_
|
||||
#define _WX_SPINBUTT_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxArrowButton; // internal
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxSpinButton);
|
||||
|
||||
public:
|
||||
wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
|
||||
|
||||
wxSpinButton(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL,
|
||||
const wxString& name = wxASCII_STR("wxSpinButton"))
|
||||
: m_up( 0 ),
|
||||
m_down( 0 ),
|
||||
m_pos( 0 )
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
virtual ~wxSpinButton();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL,
|
||||
const wxString& name = wxASCII_STR("wxSpinButton"));
|
||||
|
||||
// accessors
|
||||
int GetValue() const;
|
||||
int GetMin() const { return m_min; }
|
||||
int GetMax() const { return m_max; }
|
||||
|
||||
// operations
|
||||
void SetValue(int val);
|
||||
void SetRange(int minVal, int maxVal);
|
||||
|
||||
// Implementation
|
||||
virtual void Command(wxCommandEvent& event)
|
||||
{ (void)ProcessCommand(event); }
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
public:
|
||||
// implementation detail
|
||||
void Increment( int delta );
|
||||
|
||||
private:
|
||||
virtual void DoSetSize(int x, int y, int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
wxArrowButton* m_up;
|
||||
wxArrowButton* m_down;
|
||||
int m_pos;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_SPINBUTT_H_
|
||||
63
wxheaders/wx/motif/statbmp.h
Normal file
63
wxheaders/wx/motif/statbmp.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/statbmp.h
|
||||
// Purpose: wxStaticBitmap class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_STATBMP_H_
|
||||
#define _WX_STATBMP_H_
|
||||
|
||||
#include "wx/motif/bmpmotif.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxStaticBitmap);
|
||||
|
||||
public:
|
||||
wxStaticBitmap() { }
|
||||
virtual ~wxStaticBitmap();
|
||||
|
||||
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmapBundle& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxStaticBitmapNameStr))
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmapBundle& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxStaticBitmapNameStr));
|
||||
|
||||
virtual void SetBitmap(const wxBitmapBundle& bitmap);
|
||||
|
||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
void DoSetBitmap();
|
||||
|
||||
protected:
|
||||
wxBitmap m_messageBitmap;
|
||||
wxBitmapBundle m_messageBitmapOriginal;
|
||||
wxBitmapCache m_bitmapCache;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_STATBMP_H_
|
||||
58
wxheaders/wx/motif/statbox.h
Normal file
58
wxheaders/wx/motif/statbox.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/statbox.h
|
||||
// Purpose: wxStaticBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_STATBOX_H_
|
||||
#define _WX_STATBOX_H_
|
||||
|
||||
// Group box
|
||||
class WXDLLIMPEXP_CORE wxStaticBox: public wxStaticBoxBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxStaticBox);
|
||||
|
||||
public:
|
||||
wxStaticBox();
|
||||
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxStaticBoxNameStr))
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxStaticBox();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxStaticBoxNameStr));
|
||||
|
||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
|
||||
|
||||
private:
|
||||
WXWidget m_labelWidget;
|
||||
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_STATBOX_H_
|
||||
63
wxheaders/wx/motif/stattext.h
Normal file
63
wxheaders/wx/motif/stattext.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/stattext.h
|
||||
// Purpose: wxStaticText class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_STATTEXT_H_
|
||||
#define _WX_STATTEXT_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxStaticText);
|
||||
|
||||
public:
|
||||
wxStaticText() { }
|
||||
|
||||
wxStaticText(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxStaticTextNameStr))
|
||||
{
|
||||
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 = wxASCII_STR(wxStaticTextNameStr));
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
// operations
|
||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
// Get the widget that corresponds to the label
|
||||
// (for font setting, label setting etc.)
|
||||
virtual WXWidget GetLabelWidget() const
|
||||
{ return m_labelWidget; }
|
||||
|
||||
virtual void WXSetVisibleLabel(const wxString& str);
|
||||
virtual wxString WXGetVisibleLabel() const;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
protected:
|
||||
WXWidget m_labelWidget;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_STATTEXT_H_
|
||||
114
wxheaders/wx/motif/textctrl.h
Normal file
114
wxheaders/wx/motif/textctrl.h
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/textctrl.h
|
||||
// Purpose: wxTextCtrl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TEXTCTRL_H_
|
||||
#define _WX_TEXTCTRL_H_
|
||||
|
||||
// Single-line text item
|
||||
class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
|
||||
{
|
||||
public:
|
||||
// creation
|
||||
// --------
|
||||
|
||||
wxTextCtrl();
|
||||
wxTextCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxTextCtrlNameStr))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
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 = wxASCII_STR(wxTextCtrlNameStr));
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
virtual wxString GetValue() const;
|
||||
|
||||
virtual int GetLineLength(long lineNo) const;
|
||||
virtual wxString GetLineText(long lineNo) const;
|
||||
virtual int GetNumberOfLines() const;
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
virtual void MarkDirty();
|
||||
virtual void DiscardEdits();
|
||||
virtual bool IsModified() const;
|
||||
|
||||
virtual long XYToPosition(long x, long y) const;
|
||||
virtual bool PositionToXY(long pos, long *x, long *y) const;
|
||||
virtual void ShowPosition(long pos);
|
||||
|
||||
// callbacks
|
||||
// ---------
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
void OnChar(wxKeyEvent& event);
|
||||
// void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
void OnCut(wxCommandEvent& event);
|
||||
void OnCopy(wxCommandEvent& event);
|
||||
void OnPaste(wxCommandEvent& event);
|
||||
void OnUndo(wxCommandEvent& event);
|
||||
void OnRedo(wxCommandEvent& event);
|
||||
|
||||
void OnUpdateCut(wxUpdateUIEvent& event);
|
||||
void OnUpdateCopy(wxUpdateUIEvent& event);
|
||||
void OnUpdatePaste(wxUpdateUIEvent& event);
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// implementation from here to the end
|
||||
// -----------------------------------
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
void SetModified(bool mod) { m_modified = mod; }
|
||||
virtual WXWidget GetTopWidget() const;
|
||||
|
||||
// send the CHAR and TEXT_UPDATED events
|
||||
void DoSendEvents(void /* XmTextVerifyCallbackStruct */ *cbs,
|
||||
long keycode);
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual void DoSetValue(const wxString& value, int flags = 0);
|
||||
|
||||
virtual WXWidget GetTextWidget() const { return m_mainWidget; }
|
||||
|
||||
public:
|
||||
// Motif-specific
|
||||
void* m_tempCallbackStruct;
|
||||
bool m_modified;
|
||||
wxString m_value; // Required for password text controls
|
||||
|
||||
// Did we call wxTextCtrl::OnChar? If so, generate a command event.
|
||||
bool m_processedDefault;
|
||||
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_DYNAMIC_CLASS(wxTextCtrl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_TEXTCTRL_H_
|
||||
59
wxheaders/wx/motif/textentry.h
Normal file
59
wxheaders/wx/motif/textentry.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/textentry.h
|
||||
// Purpose: wxMotif-specific wxTextEntry implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2007-11-05
|
||||
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MOTIF_TEXTENTRY_H_
|
||||
#define _WX_MOTIF_TEXTENTRY_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTextEntry wraps XmTextXXX() methods suitable for single-line controls
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
|
||||
{
|
||||
public:
|
||||
wxTextEntry() { }
|
||||
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual long GetLastPosition() const;
|
||||
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void GetSelection(long *from, long *to) const;
|
||||
|
||||
virtual bool IsEditable() const;
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
// translate wx text position (which may be -1 meaning "last one") to a
|
||||
// valid Motif text position
|
||||
long GetMotifPos(long pos) const;
|
||||
|
||||
private:
|
||||
// implement this to return the associated xmTextWidgetClass widget
|
||||
virtual WXWidget GetTextWidget() const = 0;
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_TEXTENTRY_H_
|
||||
|
||||
53
wxheaders/wx/motif/tglbtn.h
Normal file
53
wxheaders/wx/motif/tglbtn.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/tglbtn.h
|
||||
// Purpose: Declaration of the wxToggleButton class, which implements a
|
||||
// toggle button under wxMotif.
|
||||
// Author: Mattia Barbon
|
||||
// Modified by:
|
||||
// Created: 10.02.03
|
||||
// Copyright: (c) 2003 Mattia Barbon
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TOGGLEBUTTON_H_
|
||||
#define _WX_TOGGLEBUTTON_H_
|
||||
|
||||
#include "wx/checkbox.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToggleButton : public wxCheckBox
|
||||
{
|
||||
public:
|
||||
wxToggleButton() { Init(); }
|
||||
wxToggleButton( wxWindow* parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxASCII_STR(wxCheckBoxNameStr) )
|
||||
{
|
||||
Init();
|
||||
|
||||
Create( parent, id, label, pos, size, style, val, name );
|
||||
}
|
||||
|
||||
bool Create( wxWindow* parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString &name = wxASCII_STR(wxCheckBoxNameStr) );
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxToggleButton);
|
||||
|
||||
// common part of all constructors
|
||||
void Init()
|
||||
{
|
||||
m_evtType = wxEVT_TOGGLEBUTTON;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _WX_TOGGLEBUTTON_H_
|
||||
82
wxheaders/wx/motif/toolbar.h
Normal file
82
wxheaders/wx/motif/toolbar.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/toolbar.h
|
||||
// Purpose: wxToolBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by: 13.12.99 by VZ during toolbar classes reorganization
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TOOLBAR_H_
|
||||
#define _WX_TOOLBAR_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
|
||||
{
|
||||
public:
|
||||
// ctors and dtor
|
||||
wxToolBar() { Init(); }
|
||||
|
||||
wxToolBar(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxASCII_STR(wxToolBarNameStr))
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxASCII_STR(wxToolBarNameStr));
|
||||
|
||||
virtual ~wxToolBar();
|
||||
|
||||
// override/implement base class virtuals
|
||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
|
||||
|
||||
virtual bool Realize();
|
||||
|
||||
// implementation from now on
|
||||
|
||||
// find tool by widget
|
||||
wxToolBarToolBase *FindToolByWidget(WXWidget w) const;
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
||||
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
|
||||
|
||||
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
|
||||
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
|
||||
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
|
||||
|
||||
virtual wxToolBarToolBase *CreateTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmapBundle& bmpNormal,
|
||||
const wxBitmapBundle& bmpDisabled,
|
||||
wxItemKind kind,
|
||||
wxObject *clientData,
|
||||
const wxString& shortHelp,
|
||||
const wxString& longHelp);
|
||||
virtual wxToolBarToolBase *CreateTool(wxControl *control,
|
||||
const wxString& label);
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxToolBar);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_TOOLBAR_H_
|
||||
82
wxheaders/wx/motif/toplevel.h
Normal file
82
wxheaders/wx/motif/toplevel.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/toplevel.h
|
||||
// Purpose: wxTopLevelWindow Motif implementation
|
||||
// Author: Mattia Barbon
|
||||
// Modified by:
|
||||
// Created: 12/10/2002
|
||||
// Copyright: (c) Mattia Barbon
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MOTIFTOPLEVELH__
|
||||
#define __MOTIFTOPLEVELH__
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTopLevelWindowMotif : public wxTopLevelWindowBase
|
||||
{
|
||||
public:
|
||||
wxTopLevelWindowMotif() { Init(); }
|
||||
wxTopLevelWindowMotif( wxWindow* parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxASCII_STR(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 = wxASCII_STR(wxFrameNameStr) );
|
||||
|
||||
virtual ~wxTopLevelWindowMotif();
|
||||
|
||||
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
||||
virtual bool IsFullScreen() const;
|
||||
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual void Restore();
|
||||
virtual void Iconize(bool iconize = true);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
virtual void SetTitle( const wxString& title ) { m_title = title; }
|
||||
|
||||
virtual bool SetShape( const wxRegion& region );
|
||||
|
||||
WXWidget GetShellWidget() const;
|
||||
protected:
|
||||
// common part of all constructors
|
||||
void Init();
|
||||
// common part of wxDialog/wxFrame destructors
|
||||
void PreDestroy();
|
||||
|
||||
virtual void DoGetPosition(int* x, int* y) const;
|
||||
virtual void DoSetSizeHints(int minW, int minH,
|
||||
int maxW, int maxH,
|
||||
int incW, int incH);
|
||||
|
||||
private:
|
||||
// really create the Motif widget for TLW
|
||||
virtual bool XmDoCreateTLW(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name) = 0;
|
||||
|
||||
|
||||
wxString m_title;
|
||||
};
|
||||
|
||||
#endif // __MOTIFTOPLEVELH__
|
||||
329
wxheaders/wx/motif/window.h
Normal file
329
wxheaders/wx/motif/window.h
Normal file
|
|
@ -0,0 +1,329 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/motif/window.h
|
||||
// Purpose: wxWindow class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_WINDOW_H_
|
||||
#define _WX_WINDOW_H_
|
||||
|
||||
#include "wx/region.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWindow class for Motif - see also wxWindowBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindow : public wxWindowBase
|
||||
{
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxDC;
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxWindowDC;
|
||||
|
||||
public:
|
||||
wxWindow() { Init(); }
|
||||
|
||||
wxWindow(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxPanelNameStr))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxWindow();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxPanelNameStr));
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
||||
virtual bool Show( bool show = true );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
virtual void WarpPointer(int x, int y);
|
||||
|
||||
virtual void Refresh( bool eraseBackground = true,
|
||||
const wxRect *rect = (const wxRect *) NULL );
|
||||
|
||||
virtual bool SetBackgroundColour( const wxColour &colour );
|
||||
virtual bool SetForegroundColour( const wxColour &colour );
|
||||
|
||||
virtual bool SetCursor( const wxCursor &cursor );
|
||||
virtual bool SetFont( const wxFont &font );
|
||||
|
||||
virtual int GetCharHeight() const;
|
||||
virtual int GetCharWidth() const;
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = true );
|
||||
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
||||
virtual int GetScrollPos( int orient ) const;
|
||||
virtual int GetScrollThumb( int orient ) const;
|
||||
virtual int GetScrollRange( int orient ) const;
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = NULL );
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
// Accept files for dragging
|
||||
virtual void DragAcceptFiles(bool accept);
|
||||
|
||||
// Get the unique identifier of a window
|
||||
virtual WXWidget GetHandle() const { return GetMainWidget(); }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// Get main widget for this window, e.g. a text widget
|
||||
virtual WXWidget GetMainWidget() const;
|
||||
// Get the widget that corresponds to the label (for font setting,
|
||||
// label setting etc.)
|
||||
virtual WXWidget GetLabelWidget() const;
|
||||
// Get the client widget for this window (something we can create other
|
||||
// windows on)
|
||||
virtual WXWidget GetClientWidget() const;
|
||||
// Get the top widget for this window, e.g. the scrolled widget parent of a
|
||||
// multi-line text widget. Top means, top in the window hierarchy that
|
||||
// implements this window.
|
||||
virtual WXWidget GetTopWidget() const;
|
||||
|
||||
// Get the underlying X window and display
|
||||
WXWindow GetClientXWindow() const;
|
||||
WXWindow GetXWindow() const;
|
||||
WXDisplay *GetXDisplay() const;
|
||||
|
||||
void SetLastClick(int button, long timestamp)
|
||||
{ m_lastButton = button; m_lastTS = timestamp; }
|
||||
|
||||
int GetLastClickedButton() const { return m_lastButton; }
|
||||
long GetLastClickTime() const { return m_lastTS; }
|
||||
|
||||
// Gives window a chance to do something in response to a size message,
|
||||
// e.g. arrange status bar, toolbar etc.
|
||||
virtual bool PreResize();
|
||||
|
||||
// Generates a paint event
|
||||
virtual void DoPaint();
|
||||
|
||||
// update rectangle/region manipulation
|
||||
// (for wxWindowDC and Motif callbacks only)
|
||||
// -----------------------------------------
|
||||
|
||||
// Adds a rectangle to the updates list
|
||||
void AddUpdateRect(int x, int y, int w, int h);
|
||||
|
||||
void ClearUpdateRegion() { m_updateRegion.Clear(); }
|
||||
void SetUpdateRegion(const wxRegion& region) { m_updateRegion = region; }
|
||||
|
||||
// post-creation activities
|
||||
void PostCreation();
|
||||
|
||||
// pre-creation activities
|
||||
void PreCreation();
|
||||
|
||||
protected:
|
||||
// Responds to colour changes: passes event on to children.
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Motif-specific
|
||||
|
||||
void SetMainWidget(WXWidget w) { m_mainWidget = w; }
|
||||
|
||||
// See src/motif/window.cpp, near the top, for an explanation
|
||||
// why this is necessary
|
||||
void CanvasSetSizeIntr(int x, int y, int width, int height,
|
||||
int sizeFlags, bool fromCtor);
|
||||
void DoSetSizeIntr(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags, bool fromCtor);
|
||||
|
||||
// for DoMoveWindowIntr flags
|
||||
enum
|
||||
{
|
||||
wxMOVE_X = 1,
|
||||
wxMOVE_Y = 2,
|
||||
wxMOVE_WIDTH = 4,
|
||||
wxMOVE_HEIGHT = 8
|
||||
};
|
||||
|
||||
void DoMoveWindowIntr(int x, int y, int width, int height,
|
||||
int flags);
|
||||
|
||||
// helper function, to remove duplicate code, used in wxScrollBar
|
||||
WXWidget DoCreateScrollBar(WXWidget parent, wxOrientation orientation,
|
||||
void (*callback)());
|
||||
public:
|
||||
WXPixmap GetBackingPixmap() const { return m_backingPixmap; }
|
||||
void SetBackingPixmap(WXPixmap pixmap) { m_backingPixmap = pixmap; }
|
||||
int GetPixmapWidth() const { return m_pixmapWidth; }
|
||||
int GetPixmapHeight() const { return m_pixmapHeight; }
|
||||
void SetPixmapWidth(int w) { m_pixmapWidth = w; }
|
||||
void SetPixmapHeight(int h) { m_pixmapHeight = h; }
|
||||
|
||||
// Change properties
|
||||
// Change to the current font (often overridden)
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
|
||||
// Change background and foreground colour using current background colour
|
||||
// setting (Motif generates foreground based on background)
|
||||
virtual void ChangeBackgroundColour();
|
||||
// Change foreground colour using current foreground colour setting
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
protected:
|
||||
// Adds the widget to the hash table and adds event handlers.
|
||||
bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
|
||||
WXWidget formWidget, int x, int y, int width, int height);
|
||||
bool DetachWidget(WXWidget widget);
|
||||
|
||||
// How to implement accelerators. If we find a key event, translate to
|
||||
// wxWidgets wxKeyEvent form. Find a widget for the window. Now find a
|
||||
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
|
||||
// trying to find one. Once one is found, call ProcessAccelerator for the
|
||||
// window. If it returns true (processed the event), skip the X event,
|
||||
// otherwise carry on up the wxWidgets window hierarchy calling
|
||||
// ProcessAccelerator. If all return false, process the X event as normal.
|
||||
// Eventually we can implement OnCharHook the same way, but concentrate on
|
||||
// accelerators for now. ProcessAccelerator must look at the current
|
||||
// accelerator table, and try to find what menu id or window (beneath it)
|
||||
// has this ID. Then construct an appropriate command
|
||||
// event and send it.
|
||||
public:
|
||||
virtual bool ProcessAccelerator(wxKeyEvent& event);
|
||||
|
||||
protected:
|
||||
// unmanage and destroy an X widget f it's !NULL (passing NULL is ok)
|
||||
void UnmanageAndDestroy(WXWidget widget);
|
||||
|
||||
// map or unmap an X widget (passing NULL is ok),
|
||||
// returns true if widget was mapped/unmapped
|
||||
bool MapOrUnmap(WXWidget widget, bool map);
|
||||
|
||||
// scrolling stuff
|
||||
// ---------------
|
||||
|
||||
// create/destroy window scrollbars
|
||||
void CreateScrollbar(wxOrientation orientation);
|
||||
void DestroyScrollbar(wxOrientation orientation);
|
||||
|
||||
// get either hor or vert scrollbar widget
|
||||
WXWidget GetScrollbar(wxOrientation orient) const
|
||||
{ return orient == wxHORIZONTAL ? m_hScrollBar : m_vScrollBar; }
|
||||
|
||||
// set the scroll pos
|
||||
void SetInternalScrollPos(wxOrientation orient, int pos)
|
||||
{
|
||||
if ( orient == wxHORIZONTAL )
|
||||
m_scrollPosX = pos;
|
||||
else
|
||||
m_scrollPosY = pos;
|
||||
}
|
||||
|
||||
// Motif-specific flags
|
||||
// --------------------
|
||||
|
||||
bool m_needsRefresh:1; // repaint backing store?
|
||||
|
||||
// For double-click detection
|
||||
long m_lastTS; // last timestamp
|
||||
unsigned m_lastButton:2; // last pressed button
|
||||
|
||||
protected:
|
||||
WXWidget m_mainWidget;
|
||||
WXWidget m_hScrollBar;
|
||||
WXWidget m_vScrollBar;
|
||||
WXWidget m_borderWidget;
|
||||
WXWidget m_scrolledWindow;
|
||||
WXWidget m_drawingArea;
|
||||
bool m_winCaptured:1;
|
||||
WXPixmap m_backingPixmap;
|
||||
int m_pixmapWidth;
|
||||
int m_pixmapHeight;
|
||||
int m_pixmapOffsetX;
|
||||
int m_pixmapOffsetY;
|
||||
|
||||
// Store the last scroll pos, since in wxWin the pos isn't set
|
||||
// automatically by system
|
||||
int m_scrollPosX;
|
||||
int m_scrollPosY;
|
||||
|
||||
// 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;
|
||||
virtual void DoClientToScreen( int *x, int *y ) const;
|
||||
virtual void DoScreenToClient( int *x, int *y ) const;
|
||||
virtual void DoGetPosition( int *x, int *y ) const;
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
|
||||
virtual void DoCaptureMouse();
|
||||
virtual void DoReleaseMouse();
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxWindow);
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindow);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A little class to switch off `size optimization' while an instance of the
|
||||
// object exists: this may be useful to temporarily disable the optimisation
|
||||
// which consists to do nothing when the new size is equal to the old size -
|
||||
// although quite useful usually to avoid flicker, sometimes it leads to
|
||||
// undesired effects.
|
||||
//
|
||||
// Usage: create an instance of this class on the stack to disable the size
|
||||
// optimisation, it will be re-enabled as soon as the object goes out
|
||||
// from scope.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNoOptimize
|
||||
{
|
||||
public:
|
||||
wxNoOptimize() { ms_count++; }
|
||||
~wxNoOptimize() { ms_count--; }
|
||||
|
||||
static bool CanOptimize() { return ms_count == 0; }
|
||||
|
||||
protected:
|
||||
static int ms_count;
|
||||
};
|
||||
|
||||
#endif // _WX_WINDOW_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue