/////////////////////////////////////////////////////////////////////////////
-// Name: accel.h
+// Name: wx/motif/accel.h
// Purpose: wxAcceleratorTable class
// Author: Julian Smart
// Modified by:
bool operator == (const wxAcceleratorTable& accel) const { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) const { return m_refData != accel.m_refData; }
-
+
bool Ok() const;
-
+
// Implementation only
int GetCount() const;
wxAcceleratorEntry* GetEntries() const;
/////////////////////////////////////////////////////////////////////////////
-// Name: app.h
+// Name: wx/motif/app.h
// Purpose: wxApp class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxApp : public wxAppBase
{
DECLARE_DYNAMIC_CLASS(wxApp)
-
+
public:
wxApp();
virtual ~wxApp();
-
+
// override base class (pure) virtuals
// -----------------------------------
-
+
virtual int MainLoop();
virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = false);
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
-
+
virtual bool OnInitGui();
-
+
// 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();
#endif
// _WX_APP_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: bmpbuttn.h
+// Name: wx/motif/bmpbuttn.h
// Purpose: wxBitmapButton class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPBUTTN_H_
{
Create(parent, id, bitmap, pos, size, style, validator, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
-
+
virtual void SetLabel(const wxBitmap& bitmap)
{
SetBitmapLabel(bitmap);
{
wxControl::SetLabel(label);
}
-
+
virtual void SetBitmapLabel(const wxBitmap& bitmap);
-
+
void SetBitmapSelected(const wxBitmap& sel);
void SetBitmapFocus(const wxBitmap& focus);
void SetBitmapDisabled(const wxBitmap& disabled);
-
+
// Implementation
void DoSetBitmap();
virtual void ChangeBackgroundColour();
virtual wxSize DoGetBestSize() const;
-
+
protected:
wxBitmap m_bmpNormalOriginal; // May be different from m_buttonBitmap
// if m_buttonBitmap has been changed
// to reflect button background colour
- wxBitmap m_bmpSelectedOriginal;
+ wxBitmap m_bmpSelectedOriginal;
wxBitmap m_bmpDisabledOriginal;
wxBitmapCache m_bitmapCache;
/////////////////////////////////////////////////////////////////////////////
-// Name: bmpmotif.h
+// Name: wx/motif/bmpmotif.h
// Purpose: Motif-specific bitmap routines
// Author: Julian Smart, originally in bitmap.h
// Modified by:
// Created: 25/03/2003
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPMOTIF_H_
/////////////////////////////////////////////////////////////////////////////
-// Name: button.h
+// Name: wx/motif/button.h
// Purpose: wxButton class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxButton: public wxButtonBase
{
DECLARE_DYNAMIC_CLASS(wxButton)
-
+
public:
wxButton() { }
wxButton(wxWindow *parent,
{
Create(parent, id, label, pos, size, style, validator, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
-
+
virtual void SetDefault();
virtual void Command(wxCommandEvent& event);
-
+
static wxSize GetDefaultSize();
-
+
// Implementation
protected:
/////////////////////////////////////////////////////////////////////////////
-// Name: checkbox.h
+// Name: wx/motif/checkbox.h
// Purpose: wxCheckBox class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKBOX_H_
class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
-
+
public:
inline wxCheckBox() { Init(); }
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
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,
virtual void SetValue(bool);
virtual bool GetValue() const ;
virtual void Command(wxCommandEvent& event);
-
+
// Implementation
virtual void ChangeBackgroundColour();
private:
/////////////////////////////////////////////////////////////////////////////
-// Name: clipbrd.h
+// Name: wx/motif/clipbrd.h
// Purpose: Clipboard functionality.
// Author: Julian Smart
// Modified by:
public:
wxClipboard();
~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();
-
+
virtual void UsePrimarySelection(bool primary = true)
{ m_usePrimary = primary; }
-
+
// implementation from now on
bool m_open;
wxDataObjectList m_data;
/////////////////////////////////////////////////////////////////////////////
-// Name: control.h
+// Name: wx/motif/control.h
// Purpose: wxControl class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxControl: public wxControlBase
{
DECLARE_ABSTRACT_CLASS(wxControl)
-
+
public:
wxControl();
wxControl( wxWindow *parent,
{
Create(parent, id, pos, size, style, validator, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr);
-
+
// simulates 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
// Motif: prevent callbacks being called while in SetValue
bool m_inSetValue;
-
+
DECLARE_EVENT_TABLE()
};
#endif // _WX_CONTROL_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.h
+// Name: wx/motif/cursor.h
// Purpose: wxCursor class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CURSOR_H_
class WXDLLEXPORT wxCursor: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxCursor)
-
+
public:
wxCursor();
wxCursor(const char bits[], int width, int height,
int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
-
+
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
int hotSpotX = 0, int hotSpotY = 0);
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE
wxCursor(const wxImage& image);
#endif
-
+
wxCursor(wxStockCursor id);
~wxCursor();
-
+
virtual bool Ok() const;
-
+
bool operator == (const wxCursor& cursor) const
{ return m_refData == cursor.m_refData; }
bool operator != (const wxCursor& cursor) const
///////////////////////////////////////////////////////////////////////////////
-// Name: motif/dataform.h
+// Name: wx/motif/dataform.h
// Purpose: declaration of the wxDataFormat class
// Author: Robert Roebling
// Modified by:
public:
// the clipboard formats under Xt are Atoms
typedef Atom NativeFormat;
-
+
wxDataFormat();
wxDataFormat( wxDataFormatId type );
wxDataFormat( const wxString &id );
wxDataFormat( const wxChar *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; }
{ 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 wxChar *id );
-
+
// implementation
wxDataFormatId GetType() const;
-
+
private:
wxDataFormatId m_type;
NativeFormat m_format;
-
+
void PrepareFormats();
void SetType( wxDataFormatId type );
};
#endif // _WX_MOTIF_DATAFORM_H
-
///////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/motif/dataobj2.h
+// Name: wx/motif/dataobj2.h
// Purpose: declaration of standard wxDataObjectSimple-derived classes
// Author: Mattia Barbon
// Created: 27.04.03
};
#endif // _WX_MOTIF_DATAOBJ2_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.h
+// Name: wx/motif/dc.h
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
/////////////////////////////////////////////////////////////////////////////
-// Name: dcclient.h
+// Name: wx/motif/dcclient.h
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
// Author: Julian Smart
// Modified by:
};
#endif // _WX_DCCLIENT_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.h
+// Name: wx/motif/dcmemory.h
// Purpose: wxMemoryDC class
// Author: Julian Smart
// Modified by:
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
-
+
public:
wxMemoryDC();
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC();
-
+
virtual void SelectObject( const wxBitmap& bitmap );
-
+
void DoGetSize( int *width, int *height ) const;
-
+
wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; }
-
+
private:
friend class wxPaintDC;
-
+
wxBitmap m_bitmap;
};
/////////////////////////////////////////////////////////////////////////////
-// Name: dcprint.h
+// Name: wx/motif/dcprint.h
// Purpose: wxPrinterDC class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCPRINT_H_
{
public:
DECLARE_CLASS(wxPrinterDC)
-
+
// Create a printer DC
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT);
-
+
~wxPrinterDC();
};
#endif
// _WX_DCPRINT_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: dcscreen.h
+// Name: wx/motif/dcscreen.h
// Purpose: wxScreenDC class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCSCREEN_H_
class WXDLLEXPORT wxScreenDC: public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxScreenDC)
-
+
public:
// Create a DC representing the whole screen
wxScreenDC();
~wxScreenDC();
-
+
// 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.
#endif
// _WX_DCSCREEN_H_
-
///////////////////////////////////////////////////////////////////////////////
-// Name: dnd.h
+// Name: wx/motif/dnd.h
// Purpose: declaration of wxDropTarget, wxDropSource classes
// Author: Julian Smart
// RCS-ID: $Id$
class WXDLLEXPORT wxDropTarget: public wxObject
{
public:
-
+
wxDropTarget();
~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:
-
+
+ // 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
};
class WXDLLEXPORT 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;
};
class WXDLLEXPORT 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;
};
class WXDLLEXPORT 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,
+ 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;
};
class WXDLLEXPORT wxDropSource: public wxObject
{
public:
-
+
wxDropSource( wxWindow *win );
wxDropSource( wxDataObject &data, wxWindow *win );
-
+
~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
// wxUSE_DRAG_AND_DROP
-#endif
+#endif
//_WX_DND_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: filedlg.h
+// Name: wx/motif/filedlg.h
// Purpose: wxFileDialog class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FILEDLG_H_
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
public:
-
+
// For Motif
static wxString m_fileSelectorAnswer;
static bool m_fileSelectorReturned;
-
+
public:
wxFileDialog(wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& sz = wxDefaultSize,
const wxString& name = wxFileDialogNameStr);
-
+
virtual int ShowModal();
};
/////////////////////////////////////////////////////////////////////////////
-// Name: gauge.h
+// Name: wx/motif/gauge.h
// Purpose: wxGauge class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GAUGE_H_
class WXDLLEXPORT wxGauge : public wxGaugeBase
{
DECLARE_DYNAMIC_CLASS(wxGauge)
-
+
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
-
+
inline wxGauge(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
{
Create(parent, id, range, pos, size, style, validator, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
-
+
void SetShadowWidth(int w);
void SetRange(int r);
void SetValue(int pos);
-
+
int GetShadowWidth() const ;
int GetRange() const ;
int GetValue() const ;
-
+
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
private:
/////////////////////////////////////////////////////////////////////////////
-// Name: icon.h
+// Name: wx/motif/icon.h
// Purpose: wxIcon class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ICON_H_
/////////////////////////////////////////////////////////////////////////////
-// Name: mdi.h
+// Name: wx/motif/mdi.h
// Purpose: MDI (Multiple Document Interface) classes.
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MDI_H_
void ReleaseMouse();
void Raise();
void Lower(void);
- void DoSetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
+ void DoSetSizeHints(int minW = wxDefaultCoord,
+ int minH = wxDefaultCoord,
+ int maxW = wxDefaultCoord,
+ int maxH = wxDefaultCoord,
+ int incW = wxDefaultCoord,
+ int incH = wxDefaultCoord);
// MDI operations
virtual void Maximize();
/////////////////////////////////////////////////////////////////////////////
-// Name: menu.h
+// Name: wx/motif/menu.h
// Purpose: wxMenu, wxMenuBar classes
// Author: Julian Smart
// Modified by:
// 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();
wxColour m_foregroundColour;
wxColour m_backgroundColour;
wxFont m_font;
-
+
private:
// common code for both constructors:
void Init();
-
+
DECLARE_DYNAMIC_CLASS(wxMenu)
};
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 SetLabelTop( size_t pos, const wxString& label );
virtual wxString GetLabelTop( 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;
-
+
DECLARE_DYNAMIC_CLASS(wxMenuBar)
};
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.h
+// Name: wx/motif/menuitem.h
// Purpose: wxMenuItem class
// Author: Vadim Zeitlin
// Modified by:
wxItemKind kind = wxITEM_NORMAL,
wxMenu *subMenu = (wxMenu *)NULL);
~wxMenuItem();
-
+
// accessors (some more are inherited from wxOwnerDrawn or are below)
virtual void SetText(const wxString& label);
virtual void Enable(bool enable = true);
// JJ
virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
-
+
// 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
wxBitmap m_bitmap; // Bitmap for menuitem, if any
-
+
DECLARE_DYNAMIC_CLASS(wxMenuItem)
};
/////////////////////////////////////////////////////////////////////////////
-// Name: minifram.h
+// 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.
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MINIFRAM_H_
#include "wx/frame.h"
class WXDLLEXPORT wxMiniFrame: public wxFrame {
-
+
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
-
+
public:
inline wxMiniFrame() {}
inline wxMiniFrame(wxWindow *parent,
// Use wxFrame constructor in absence of more specific code.
Create(parent, id, title, pos, size, style, name);
}
-
+
~wxMiniFrame() {}
protected:
};
/////////////////////////////////////////////////////////////////////////////
-// Name: print.h
+// Name: wx/motif/print.h
// Purpose: wxPrinter, wxPrintPreview classes
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINT_H_
class WXDLLEXPORT wxPrinter: public wxPrinterBase
{
DECLARE_DYNAMIC_CLASS(wxPrinter)
-
+
public:
wxPrinter(wxPrintData *data = NULL);
~wxPrinter();
-
+
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
virtual bool PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
class WXDLLEXPORT wxPrintPreview: public wxPrintPreviewBase
{
DECLARE_CLASS(wxPrintPreview)
-
+
public:
wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
~wxPrintPreview();
-
+
virtual bool Print(bool interactive);
virtual void DetermineScaling();
};
/////////////////////////////////////////////////////////////////////////////
-// Name: private.h
+// Name: wx/motif/private.h
// Purpose: Private declarations for wxMotif port
// Author: Julian Smart
// Modified by:
// ----------------------------------------------------------------------------
// All widgets should have this as their resize proc.
-extern void wxWidgetResizeProc(Widget w, XConfigureEvent *event,
+extern void wxWidgetResizeProc(Widget w, XConfigureEvent *event,
String args[], int *num_args);
// For repainting arbitrary windows
-void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data),
+void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data),
XEvent *event, char *);
// ----------------------------------------------------------------------------
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;
};
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobut.h
+// Name: wx/motif/radiobut.h
// Purpose: wxRadioButton class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_RADIOBUT_H_
{
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 = wxRadioButtonNameStr);
-
+
virtual void SetValue(bool val);
virtual bool GetValue() const ;
-
+
void Command(wxCommandEvent& event);
-
+
// Implementation
virtual void ChangeBackgroundColour();
/////////////////////////////////////////////////////////////////////////////
-// Name: scrollbar.h
+// Name: wx/motif/scrollbar.h
// Purpose: wxScrollBar class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_SCROLBAR_H_
class WXDLLEXPORT wxScrollBar: public wxScrollBarBase
{
DECLARE_DYNAMIC_CLASS(wxScrollBar)
-
+
public:
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
~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 = wxScrollBarNameStr);
-
+
int GetThumbPosition() const ;
inline int GetThumbSize() const { return m_pageSize; }
inline int GetPageSize() const { return m_viewSize; }
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;
/////////////////////////////////////////////////////////////////////////////
-// Name: slider.h
+// Name: wx/motif/slider.h
// Purpose: wxSlider class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_SLIDER_H_
class WXDLLEXPORT wxSlider: public wxSliderBase
{
DECLARE_DYNAMIC_CLASS(wxSlider)
-
+
public:
wxSlider();
-
+
wxSlider(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
-
+
~wxSlider();
-
+
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = 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 ;
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:
DECLARE_EVENT_TABLE()
};
/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.h
+// Name: wx/motif/spinbutt.h
// Purpose: wxSpinButton class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase
{
DECLARE_DYNAMIC_CLASS(wxSpinButton)
-
+
public:
wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { }
-
+
wxSpinButton(wxWindow *parent,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
Create(parent, id, pos, size, style, name);
}
~wxSpinButton();
-
+
bool Create(wxWindow *parent,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
const wxString& name = "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); };
/////////////////////////////////////////////////////////////////////////////
-// Name: statbmp.h
+// Name: wx/motif/statbmp.h
// Purpose: wxStaticBitmap class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase
{
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
-
+
public:
wxStaticBitmap() { }
~wxStaticBitmap();
-
+
wxStaticBitmap(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
{
Create(parent, id, label, pos, size, style, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr);
-
+
virtual void SetBitmap(const wxBitmap& bitmap);
-
+
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
return false;
}
-
+
wxBitmap GetBitmap() const { return m_messageBitmap; }
-
+
// for compatibility with wxMSW
wxIcon GetIcon() const
{
// don't use wxDynamicCast, icons and bitmaps are really the same thing
return *(wxIcon*)&m_messageBitmap;
}
-
+
// for compatibility with wxMSW
void SetIcon(const wxIcon& icon)
{
SetBitmap( icon );
}
-
+
// Implementation
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
-
+
protected:
void DoSetBitmap();
/////////////////////////////////////////////////////////////////////////////
-// Name: statbox.h
+// Name: wx/motif/statbox.h
// Purpose: wxStaticBox class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxStaticBox: public wxStaticBoxBase
{
DECLARE_DYNAMIC_CLASS(wxStaticBox)
-
+
public:
wxStaticBox();
wxStaticBox(wxWindow *parent, wxWindowID id,
}
~wxStaticBox();
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
-
+
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
return false;
private:
WXWidget m_labelWidget;
-
+
private:
DECLARE_EVENT_TABLE()
};
/////////////////////////////////////////////////////////////////////////////
-// Name: stattext.h
+// Name: wx/motif/stattext.h
// Purpose: wxStaticText class
// Author: Julian Smart
// Modified by:
class WXDLLEXPORT wxStaticText: public wxStaticTextBase
{
DECLARE_DYNAMIC_CLASS(wxStaticText)
-
+
public:
wxStaticText() { }
-
+
wxStaticText(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
{
Create(parent, id, label, pos, size, style, name);
}
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticTextNameStr);
-
+
// 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; }
-
+
protected:
WXWidget m_labelWidget;
};
/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/motif/textctrl.h
// Purpose: wxTextCtrl class
// Author: Julian Smart
// Modified by:
/////////////////////////////////////////////////////////////////////////////
-// Name: timer.h
+// Name: wx/motif/timer.h
// Purpose: wxTimer class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TIMER_H_
class WXDLLEXPORT wxTimer : public wxTimerBase
{
friend void wxTimerCallback(wxTimer * timer);
-
+
public:
wxTimer() { Init(); }
wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
{ Init(); }
~wxTimer();
-
+
virtual bool Start(int milliseconds = -1, bool oneShot = false);
virtual void Stop();
-
+
virtual bool IsRunning() const { return m_id != 0; }
-
+
protected:
void Init();
-
+
long m_id;
-
+
private:
DECLARE_DYNAMIC_CLASS(wxTimer)
};