replaced by stubs files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,138 +1,153 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxApp class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKAPPH__
|
||||
#define __GTKAPPH__
|
||||
#ifndef _WX_APP_H_
|
||||
#define _WX_APP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxApp;
|
||||
class wxLog;
|
||||
class wxConfig; // it's not used #if !USE_WXCONFIG, but fwd decl doesn't harm
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern wxApp *wxTheApp;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void wxExit(void);
|
||||
bool wxYield(void);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxFrame;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
class WXDLLEXPORT wxApp ;
|
||||
class WXDLLEXPORT wxKeyEvent;
|
||||
class WXDLLEXPORT wxLog;
|
||||
|
||||
#define wxPRINT_WINDOWS 1
|
||||
#define wxPRINT_POSTSCRIPT 2
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxApp
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
|
||||
|
||||
class wxApp: public wxEvtHandler
|
||||
void WXDLLEXPORT wxCleanUp();
|
||||
void WXDLLEXPORT wxCommonCleanUp(); // Call this from the platform's wxCleanUp()
|
||||
void WXDLLEXPORT wxCommonInit(); // Call this from the platform's initialization
|
||||
|
||||
// Force an exit from main loop
|
||||
void WXDLLEXPORT wxExit();
|
||||
|
||||
// Yield to other apps/messages
|
||||
bool WXDLLEXPORT wxYield();
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class WXDLLEXPORT wxApp: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
wxApp();
|
||||
inline ~wxApp() {}
|
||||
|
||||
public:
|
||||
|
||||
wxApp(void);
|
||||
~wxApp(void);
|
||||
|
||||
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
|
||||
static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; }
|
||||
|
||||
virtual bool OnInit(void);
|
||||
virtual bool OnInitGui(void);
|
||||
virtual int OnRun(void);
|
||||
virtual int OnExit(void);
|
||||
|
||||
wxWindow *GetTopWindow(void);
|
||||
void SetTopWindow( wxWindow *win );
|
||||
virtual int MainLoop(void);
|
||||
void ExitMainLoop(void);
|
||||
bool Initialized(void);
|
||||
virtual bool Pending(void);
|
||||
virtual void Dispatch(void);
|
||||
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
|
||||
static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; }
|
||||
|
||||
inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; }
|
||||
inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; }
|
||||
virtual int MainLoop();
|
||||
void ExitMainLoop();
|
||||
bool Initialized();
|
||||
virtual bool Pending() ;
|
||||
virtual void Dispatch() ;
|
||||
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
bool SendIdleEvents(void);
|
||||
bool SendIdleEvents( wxWindow* win );
|
||||
|
||||
inline wxString GetAppName(void) const {
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Generic
|
||||
virtual bool OnInit() { return FALSE; };
|
||||
|
||||
// No specific tasks to do here.
|
||||
virtual bool OnInitGui() { return TRUE; }
|
||||
|
||||
// Called to set off the main loop
|
||||
virtual int OnRun() { return MainLoop(); };
|
||||
virtual int OnExit() { return 0; }
|
||||
|
||||
inline void SetPrintMode(int mode) { m_printMode = mode; }
|
||||
inline int GetPrintMode() const { return m_printMode; }
|
||||
|
||||
inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
|
||||
inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; }
|
||||
|
||||
inline wxString GetAppName() const {
|
||||
if (m_appName != "")
|
||||
return m_appName;
|
||||
else return m_className;
|
||||
}
|
||||
inline void SetAppName(const wxString& name) { m_appName = name; };
|
||||
inline wxString GetClassName(void) const { return m_className; }
|
||||
inline void SetClassName(const wxString& name) { m_className = name; }
|
||||
const wxString& GetVendorName() const { return m_vendorName; }
|
||||
void SetVendorName(const wxString& name) { m_vendorName = name; }
|
||||
|
||||
inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
|
||||
inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; }
|
||||
|
||||
void SetPrintMode(int WXUNUSED(mode) ) {};
|
||||
int GetPrintMode(void) const { return wxPRINT_POSTSCRIPT; };
|
||||
|
||||
// override this function to create default log target of arbitrary
|
||||
// user-defined classv (default implementation creates a wxLogGui object)
|
||||
virtual wxLog *CreateLogTarget();
|
||||
|
||||
#if USE_WXCONFIG
|
||||
// override this function to create a global wxConfig object of different
|
||||
// than default type (right now the default implementation returns NULL)
|
||||
virtual wxConfig *CreateConfig() { return NULL; }
|
||||
#endif
|
||||
|
||||
// GTK implementation
|
||||
inline void SetAppName(const wxString& name) { m_appName = name; };
|
||||
inline wxString GetClassName() const { return m_className; }
|
||||
inline void SetClassName(const wxString& name) { m_className = name; }
|
||||
|
||||
static void CommonInit(void);
|
||||
static void CommonCleanUp(void);
|
||||
|
||||
bool ProcessIdle(void);
|
||||
void DeletePendingObjects(void);
|
||||
|
||||
bool m_initialized;
|
||||
bool m_exitOnFrameDelete;
|
||||
bool m_wantDebugOutput;
|
||||
wxWindow *m_topWindow;
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
static wxAppInitializerFunction m_appInitFn;
|
||||
|
||||
private:
|
||||
wxString m_vendorName,
|
||||
m_appName,
|
||||
m_className;
|
||||
void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }
|
||||
const wxString& GetVendorName() const { return m_vendorName; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxWindow *GetTopWindow() const ;
|
||||
inline void SetTopWindow(wxWindow *win) { m_topWindow = win; }
|
||||
|
||||
inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; }
|
||||
inline bool GetWantDebugOutput() { return m_wantDebugOutput; }
|
||||
|
||||
// Send idle event to all top-level windows.
|
||||
// Returns TRUE if more idle time is requested.
|
||||
bool SendIdleEvents();
|
||||
|
||||
// Send idle event to window and all subwindows
|
||||
// Returns TRUE if more idle time is requested.
|
||||
bool SendIdleEvents(wxWindow* win);
|
||||
|
||||
// Windows only, but for compatibility...
|
||||
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
|
||||
inline bool GetAuto3D() const { return m_auto3D; }
|
||||
|
||||
// Creates a log object
|
||||
virtual wxLog* CreateLogTarget();
|
||||
|
||||
public:
|
||||
// Will always be set to the appropriate, main-style values.
|
||||
int argc;
|
||||
char ** argv;
|
||||
|
||||
protected:
|
||||
bool m_wantDebugOutput ;
|
||||
wxString m_className;
|
||||
wxString m_appName,
|
||||
m_vendorName;
|
||||
wxWindow * m_topWindow;
|
||||
bool m_exitOnFrameDelete;
|
||||
bool m_showOnInit;
|
||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||
bool m_auto3D ; // Always use 3D controls, except
|
||||
// where overriden
|
||||
static wxAppInitializerFunction m_appInitFn;
|
||||
|
||||
public:
|
||||
|
||||
// Implementation
|
||||
static void CommonInit();
|
||||
static void CommonCleanUp();
|
||||
void DeletePendingObjects();
|
||||
bool ProcessIdle();
|
||||
|
||||
public:
|
||||
static long sm_lastMessageTime;
|
||||
int m_nCmdShow;
|
||||
|
||||
protected:
|
||||
bool m_keepGoing ;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKAPPH__
|
||||
// TODO: add platform-specific arguments
|
||||
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
|
||||
|
||||
#endif
|
||||
// _WX_APP_H_
|
||||
|
||||
|
@@ -1,125 +1,198 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bitmap.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Purpose: wxBitmap class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBITMAPH__
|
||||
#define __GTKBITMAPH__
|
||||
#ifndef _WX_BITMAP_H_
|
||||
#define _WX_BITMAP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "bitmap.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
// Bitmap
|
||||
class WXDLLEXPORT wxDC;
|
||||
class WXDLLEXPORT wxControl;
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxBitmapHandler;
|
||||
class WXDLLEXPORT wxIcon;
|
||||
class WXDLLEXPORT wxCursor;
|
||||
|
||||
class wxDC;
|
||||
class wxPaintDC;
|
||||
class wxMemoryDC;
|
||||
class wxToolBar;
|
||||
class wxBitmapButton;
|
||||
class wxStaticBitmap;
|
||||
class wxFrame;
|
||||
|
||||
class wxMask;
|
||||
class wxBitmap;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMask
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMask: public wxObject
|
||||
// A mask is a mono bitmap used for drawing bitmaps
|
||||
// transparently.
|
||||
class WXDLLEXPORT wxMask: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxMask();
|
||||
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
// Construct a mask from a bitmap and a colour indicating
|
||||
// the transparent area
|
||||
wxMask(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
private:
|
||||
// Construct a mask from a bitmap and a palette index indicating
|
||||
// the transparent area
|
||||
wxMask(const wxBitmap& bitmap, int paletteIndex);
|
||||
|
||||
friend wxBitmap;
|
||||
friend wxDC;
|
||||
friend wxPaintDC;
|
||||
friend wxToolBar;
|
||||
friend wxBitmapButton;
|
||||
friend wxStaticBitmap;
|
||||
friend wxFrame;
|
||||
// Construct a mask from a mono bitmap (copies the bitmap).
|
||||
wxMask(const wxBitmap& bitmap);
|
||||
|
||||
protected:
|
||||
~wxMask();
|
||||
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
bool Create(const wxBitmap& bitmap, int paletteIndex);
|
||||
bool Create(const wxBitmap& bitmap);
|
||||
|
||||
/* TODO: platform-specific data access
|
||||
// Implementation
|
||||
inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
|
||||
inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
|
||||
protected:
|
||||
WXHBITMAP m_maskBitmap;
|
||||
*/
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmap
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxIcon;
|
||||
friend class WXDLLEXPORT wxCursor;
|
||||
public:
|
||||
wxBitmapRefData();
|
||||
~wxBitmapRefData();
|
||||
|
||||
// CMB 20/5/98: added xbm constructor and GetBitmap() method
|
||||
class wxBitmap: public wxObject
|
||||
public:
|
||||
int m_width;
|
||||
int m_height;
|
||||
int m_depth;
|
||||
bool m_ok;
|
||||
int m_numColors;
|
||||
wxPalette m_bitmapPalette;
|
||||
int m_quality;
|
||||
|
||||
/* WXHBITMAP m_hBitmap; TODO: platform-specific handle */
|
||||
wxMask * m_bitmapMask; // Optional mask
|
||||
};
|
||||
|
||||
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
|
||||
|
||||
class WXDLLEXPORT wxBitmapHandler: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
||||
public:
|
||||
wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; };
|
||||
|
||||
virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
|
||||
|
||||
inline void SetName(const wxString& name) { m_name = name; }
|
||||
inline void SetExtension(const wxString& ext) { m_extension = ext; }
|
||||
inline void SetType(long type) { m_type = type; }
|
||||
inline wxString GetName() const { return m_name; }
|
||||
inline wxString GetExtension() const { return m_extension; }
|
||||
inline long GetType() const { return m_type; }
|
||||
protected:
|
||||
wxString m_name;
|
||||
wxString m_extension;
|
||||
long m_type;
|
||||
};
|
||||
|
||||
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
|
||||
|
||||
class WXDLLEXPORT wxBitmap: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
|
||||
public:
|
||||
friend class WXDLLEXPORT wxBitmapHandler;
|
||||
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxBitmap* bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM);
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
public:
|
||||
wxBitmap(); // Platform-specific
|
||||
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
// Copy constructors
|
||||
inline wxBitmap(const wxBitmap& bitmap)
|
||||
{ Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
|
||||
inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
// Initialize with raw data.
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
|
||||
void Resize( int height, int width );
|
||||
/* TODO: maybe implement XPM reading
|
||||
// Initialize with XPM data
|
||||
wxBitmap(const char **data);
|
||||
*/
|
||||
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM);
|
||||
// Load a file or resource
|
||||
// TODO: make default type whatever's appropriate for the platform.
|
||||
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
|
||||
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
{ return GetPalette(); };
|
||||
// Constructor for generalised creation from data
|
||||
wxBitmap(void *data, long type, int width, int height, int depth = 1);
|
||||
|
||||
private:
|
||||
// If depth is omitted, will create a bitmap compatible with the display
|
||||
wxBitmap(int width, int height, int depth = -1);
|
||||
~wxBitmap();
|
||||
|
||||
friend wxDC;
|
||||
friend wxPaintDC;
|
||||
friend wxMemoryDC;
|
||||
friend wxToolBar;
|
||||
friend wxBitmapButton;
|
||||
friend wxStaticBitmap;
|
||||
friend wxFrame;
|
||||
virtual bool Create(int width, int height, int depth = -1);
|
||||
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
|
||||
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
|
||||
|
||||
inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
|
||||
inline int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); }
|
||||
inline int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); }
|
||||
inline int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); }
|
||||
inline int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); }
|
||||
void SetWidth(int w);
|
||||
void SetHeight(int h);
|
||||
void SetDepth(int d);
|
||||
void SetQuality(int q);
|
||||
void SetOk(bool isOk);
|
||||
|
||||
inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); }
|
||||
void SetPalette(const wxPalette& palette);
|
||||
|
||||
inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); }
|
||||
void SetMask(wxMask *mask) ;
|
||||
|
||||
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
|
||||
inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; }
|
||||
inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; }
|
||||
|
||||
// Format handling
|
||||
static inline wxList& GetHandlers() { return sm_handlers; }
|
||||
static void AddHandler(wxBitmapHandler *handler);
|
||||
static void InsertHandler(wxBitmapHandler *handler);
|
||||
static bool RemoveHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType);
|
||||
static wxBitmapHandler *FindHandler(long bitmapType);
|
||||
|
||||
static void InitStandardHandlers();
|
||||
static void CleanUpHandlers();
|
||||
protected:
|
||||
static wxList sm_handlers;
|
||||
|
||||
/*
|
||||
// TODO: Implementation
|
||||
public:
|
||||
void SetHBITMAP(WXHBITMAP bmp);
|
||||
inline WXHBITMAP GetHBITMAP() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); }
|
||||
bool FreeResource(bool force = FALSE);
|
||||
*/
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
#endif // __GTKBITMAPH__
|
||||
#endif
|
||||
// _WX_BITMAP_H_
|
||||
|
@@ -1,62 +1,83 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpbutton.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Name: bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __BMPBUTTONH__
|
||||
#define __BMPBUTTONH__
|
||||
#ifndef _WX_BMPBUTTN_H_
|
||||
#define _WX_BMPBUTTN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
||||
|
||||
class wxBitmapButton;
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxButtonNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmapButton: public wxControl
|
||||
class WXDLLEXPORT wxBitmapButton: public wxButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
public:
|
||||
inline wxBitmapButton() { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; }
|
||||
inline wxBitmapButton(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)
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
public:
|
||||
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);
|
||||
|
||||
wxBitmapButton(void);
|
||||
wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxButtonNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxButtonNameStr );
|
||||
void SetDefault(void);
|
||||
void SetLabel( const wxString &label );
|
||||
wxString GetLabel(void) const;
|
||||
|
||||
public:
|
||||
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
virtual void SetLabel(const wxBitmap& bitmap)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
}
|
||||
|
||||
virtual void SetBitmapLabel(const wxBitmap& bitmap);
|
||||
|
||||
inline wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_buttonBitmap; }
|
||||
inline wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_buttonBitmapSelected; }
|
||||
inline wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_buttonBitmapFocus; }
|
||||
inline wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_buttonBitmapDisabled; }
|
||||
|
||||
inline void SetBitmapSelected(const wxBitmap& sel) { m_buttonBitmapSelected = sel; };
|
||||
inline void SetBitmapFocus(const wxBitmap& focus) { m_buttonBitmapFocus = focus; };
|
||||
inline void SetBitmapDisabled(const wxBitmap& disabled) { m_buttonBitmapDisabled = disabled; };
|
||||
|
||||
inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
|
||||
inline int GetMarginX() { return m_marginX; }
|
||||
inline int GetMarginY() { return m_marginY; }
|
||||
|
||||
/*
|
||||
// TODO: Implementation
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
|
||||
*/
|
||||
|
||||
protected:
|
||||
wxBitmap m_buttonBitmap;
|
||||
wxBitmap m_buttonBitmapSelected;
|
||||
wxBitmap m_buttonBitmapFocus;
|
||||
wxBitmap m_buttonBitmapDisabled;
|
||||
int m_marginX;
|
||||
int m_marginY;
|
||||
};
|
||||
#endif // __BMPBUTTONH__
|
||||
|
||||
#endif
|
||||
// _WX_BMPBUTTN_H_
|
||||
|
@@ -1,60 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxBrush class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBRUSHH__
|
||||
#define __GTKBRUSHH__
|
||||
#ifndef _WX_BRUSH_H_
|
||||
#define _WX_BRUSH_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "brush.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxBrush;
|
||||
|
||||
class wxBrush;
|
||||
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBrush;
|
||||
public:
|
||||
wxBrushRefData();
|
||||
wxBrushRefData(const wxBrushRefData& data);
|
||||
~wxBrushRefData();
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBrush
|
||||
//-----------------------------------------------------------------------------
|
||||
protected:
|
||||
int m_style;
|
||||
wxBitmap m_stipple ;
|
||||
wxColour m_colour;
|
||||
|
||||
class wxBrush: public wxGDIObject
|
||||
/* TODO: implementation
|
||||
WXHBRUSH m_hBrush;
|
||||
*/
|
||||
};
|
||||
|
||||
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
||||
|
||||
// Brush
|
||||
class WXDLLEXPORT wxBrush: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush(const wxColour& col, int style);
|
||||
wxBrush(const wxString& col, int style);
|
||||
wxBrush(const wxBitmap& stipple);
|
||||
inline wxBrush(const wxBrush& brush) { Ref(brush); }
|
||||
inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
|
||||
~wxBrush();
|
||||
|
||||
wxBrush(void);
|
||||
wxBrush( const wxColour &colour, int style );
|
||||
wxBrush( const wxString &colourName, int style );
|
||||
wxBrush( const wxBitmap &stippleBitmap );
|
||||
wxBrush( const wxBrush &brush );
|
||||
wxBrush( const wxBrush *brush );
|
||||
~wxBrush(void);
|
||||
wxBrush& operator = ( const wxBrush& brush );
|
||||
bool operator == ( const wxBrush& brush );
|
||||
bool operator != ( const wxBrush& brush );
|
||||
bool Ok(void) const;
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(const wxString& col) ;
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
virtual void SetStyle(int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
|
||||
int GetStyle(void) const;
|
||||
wxColour &GetColour(void) const;
|
||||
wxBitmap *GetStipple(void) const;
|
||||
|
||||
// no data :-)
|
||||
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
|
||||
inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; }
|
||||
inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; }
|
||||
|
||||
inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); };
|
||||
inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); };
|
||||
inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); };
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Implementation
|
||||
|
||||
// Useful helper: create the brush resource
|
||||
void RealizeResource();
|
||||
|
||||
// When setting properties, we must make sure we're not changing
|
||||
// another object
|
||||
void Unshare();
|
||||
};
|
||||
|
||||
#endif // __GTKBRUSHH__
|
||||
#endif
|
||||
// _WX_BRUSH_H_
|
||||
|
@@ -1,58 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: button.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxButton class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBUTTONH__
|
||||
#define __GTKBUTTONH__
|
||||
#ifndef _WX_BUTTON_H_
|
||||
#define _WX_BUTTON_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "button.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
||||
|
||||
class wxButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxButtonNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxButton: public wxControl
|
||||
// Pushbutton
|
||||
class WXDLLEXPORT wxButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
public:
|
||||
inline wxButton() {}
|
||||
inline wxButton(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 = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
public:
|
||||
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 = wxButtonNameStr);
|
||||
|
||||
wxButton(void);
|
||||
wxButton( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxButtonNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxButtonNameStr );
|
||||
void SetDefault(void);
|
||||
void SetLabel( const wxString &label );
|
||||
wxString GetLabel(void) const;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetDefault();
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const ;
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
};
|
||||
|
||||
#endif // __GTKBUTTONH__
|
||||
#endif
|
||||
// _WX_BUTTON_H_
|
||||
|
@@ -1,57 +1,81 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checkbox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCHECKBOXH__
|
||||
#define __GTKCHECKBOXH__
|
||||
#ifndef _WX_CHECKBOX_H_
|
||||
#define _WX_CHECKBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "checkbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
|
||||
|
||||
class wxCheckBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxCheckBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCheckBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCheckBox: public wxControl
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||
|
||||
public:
|
||||
public:
|
||||
inline wxCheckBox() { }
|
||||
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 = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
wxCheckBox(void);
|
||||
wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxCheckBoxNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxCheckBoxNameStr );
|
||||
void SetValue( bool state );
|
||||
bool GetValue(void) const;
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const ;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
};
|
||||
|
||||
#endif // __GTKCHECKBOXH__
|
||||
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||
|
||||
public:
|
||||
int checkWidth ;
|
||||
int checkHeight ;
|
||||
|
||||
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
|
||||
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const ;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetLabel(const wxBitmap *bitmap);
|
||||
};
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
||||
|
@@ -1,68 +1,72 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxChoice class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCHOICEH__
|
||||
#define __GTKCHOICEH__
|
||||
#ifndef _WX_CHOICE_H_
|
||||
#define _WX_CHOICE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "choice.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
||||
|
||||
class wxChoice;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxChoiceNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxChoice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxChoice: public wxControl
|
||||
// Choice item
|
||||
class WXDLLEXPORT wxChoice: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
public:
|
||||
inline wxChoice() { m_noStrings = 0; }
|
||||
|
||||
wxChoice(void);
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0, const wxString &name = wxChoiceNameStr );
|
||||
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 wxString &name = wxChoiceNameStr );
|
||||
void Append( const wxString &item );
|
||||
void Clear(void);
|
||||
int FindString( const wxString &string ) const;
|
||||
int GetColumns(void) const;
|
||||
int GetSelection(void);
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetStringSelection(void) const;
|
||||
int Number(void) const;
|
||||
void SetColumns( int n = 1 );
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
inline 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 = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, 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 = wxChoiceNameStr);
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
|
||||
virtual inline int Number() const { return m_noStrings; }
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ;
|
||||
virtual inline int GetColumns() const { return 1 ; };
|
||||
|
||||
protected:
|
||||
int m_noStrings;
|
||||
};
|
||||
|
||||
#endif // __GTKCHOICEH__
|
||||
#endif
|
||||
// _WX_CHOICE_H_
|
||||
|
@@ -1,75 +1,68 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxColour class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCOLOURH__
|
||||
#define __GTKCOLOURH__
|
||||
#ifndef _WX_COLOUR_H_
|
||||
#define _WX_COLOUR_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "colour.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDC;
|
||||
class wxPaintDC;
|
||||
class wxBitmap;
|
||||
class wxWindow;
|
||||
|
||||
class wxColour;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColour
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxColour: public wxGDIObject
|
||||
// Colour
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
public:
|
||||
wxColour();
|
||||
wxColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
wxColour(unsigned long colRGB) { Set(colRGB); }
|
||||
wxColour(const wxColour& col);
|
||||
wxColour(const wxString& col);
|
||||
~wxColour() ;
|
||||
wxColour& operator =(const wxColour& src) ;
|
||||
wxColour& operator =(const wxString& src) ;
|
||||
inline int Ok() const { return (m_isInit) ; }
|
||||
|
||||
public:
|
||||
void Set(unsigned char r, unsigned char g, unsigned char b);
|
||||
void Set(unsigned long colRGB)
|
||||
{
|
||||
// we don't need to know sizeof(long) here because we assume that the three
|
||||
// least significant bytes contain the R, G and B values
|
||||
Set((unsigned char)colRGB,
|
||||
(unsigned char)(colRGB >> 8),
|
||||
(unsigned char)(colRGB >> 16));
|
||||
}
|
||||
|
||||
wxColour(void);
|
||||
wxColour( char red, char green, char blue );
|
||||
wxColour( const wxString &colourName );
|
||||
wxColour( const wxColour& col );
|
||||
wxColour( const wxColour* col );
|
||||
~wxColour(void);
|
||||
wxColour& operator = ( const wxColour& col );
|
||||
wxColour& operator = ( const wxString& colourName );
|
||||
bool operator == ( const wxColour& col );
|
||||
bool operator != ( const wxColour& col );
|
||||
void Set( const unsigned char red, const unsigned char green, const unsigned char blue );
|
||||
unsigned char Red(void) const;
|
||||
unsigned char Green(void) const;
|
||||
unsigned char Blue(void) const;
|
||||
bool Ok(void) const;
|
||||
inline unsigned char Red() const { return m_red; }
|
||||
inline unsigned char Green() const { return m_green; }
|
||||
inline unsigned char Blue() const { return m_blue; }
|
||||
|
||||
private:
|
||||
public:
|
||||
|
||||
friend wxDC;
|
||||
friend wxPaintDC;
|
||||
friend wxBitmap;
|
||||
friend wxWindow;
|
||||
|
||||
int GetPixel(void);
|
||||
|
||||
// no data :-)
|
||||
inline bool operator == (const wxColour& colour) { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
|
||||
|
||||
inline bool operator != (const wxColour& colour) { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); }
|
||||
|
||||
WXCOLORREF GetPixel() const { return m_pixel; };
|
||||
|
||||
private:
|
||||
bool m_isInit;
|
||||
unsigned char m_red;
|
||||
unsigned char m_blue;
|
||||
unsigned char m_green;
|
||||
public:
|
||||
/* TODO: implementation
|
||||
WXCOLORREF m_pixel ;
|
||||
*/
|
||||
};
|
||||
|
||||
#endif // __GTKCOLOURH__
|
||||
|
||||
#define wxColor wxColour
|
||||
|
||||
#endif
|
||||
// _WX_COLOUR_H_
|
||||
|
@@ -1,48 +1,33 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxComboBox class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCOMBOBOXH__
|
||||
#define __GTKCOMBOBOXH__
|
||||
#ifndef _WX_COMBOBOX_H_
|
||||
#define _WX_COMBOBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "combobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/choice.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
class wxComboBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char* wxComboBoxNameStr;
|
||||
extern const char* wxEmptyString;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxComboBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxComboBox: public wxControl
|
||||
// Combobox item
|
||||
class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
public:
|
||||
inline wxComboBox(void) {}
|
||||
inline wxComboBox() {}
|
||||
|
||||
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
@@ -50,9 +35,10 @@ class wxComboBox: public wxControl
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, name);
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
@@ -61,40 +47,32 @@ class wxComboBox: public wxControl
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
// List functions
|
||||
void Clear(void);
|
||||
void Append( const wxString &item );
|
||||
void Append( const wxString &item, char* clientData );
|
||||
void Delete( int n );
|
||||
int FindString( const wxString &item );
|
||||
char* GetClientData( int n );
|
||||
void SetClientData( int n, char * clientData );
|
||||
int GetSelection(void) const;
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetStringSelection(void) const;
|
||||
int Number(void) const;
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
|
||||
// List functions: see wxChoice
|
||||
|
||||
// Text field functions
|
||||
wxString GetValue(void) const ;
|
||||
void SetValue(const wxString& value);
|
||||
virtual wxString GetValue() const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
// Clipboard operations
|
||||
void Copy(void);
|
||||
void Cut(void);
|
||||
void Paste(void);
|
||||
void SetInsertionPoint(long pos);
|
||||
void SetInsertionPointEnd(void);
|
||||
long GetInsertionPoint(void) const ;
|
||||
long GetLastPosition(void) const ;
|
||||
void Replace(long from, long to, const wxString& value);
|
||||
void Remove(long from, long to);
|
||||
void SetSelection(long from, long to);
|
||||
void SetEditable(bool editable);
|
||||
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const ;
|
||||
virtual long GetLastPosition() const ;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetSelection(int n)
|
||||
{
|
||||
wxChoice::SetSelection(n);
|
||||
}
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
};
|
||||
|
||||
#endif // __GTKCOMBOBOXH__
|
||||
#endif
|
||||
// _WX_COMBOBOX_H_
|
||||
|
@@ -1,60 +1,50 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxControl class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCONTROLH__
|
||||
#define __GTKCONTROLH__
|
||||
#ifndef _WX_CONTROL_H_
|
||||
#define _WX_CONTROL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "control.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/validate.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxControl;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxControl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxControl: public wxWindow
|
||||
// General item class
|
||||
class WXDLLEXPORT wxControl: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxControl)
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxControl)
|
||||
public:
|
||||
// construction
|
||||
wxControl();
|
||||
wxControl( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxPanelNameStr );
|
||||
|
||||
// overridables
|
||||
virtual void Command( wxCommandEvent &event );
|
||||
wxControl();
|
||||
~wxControl();
|
||||
|
||||
// accessors
|
||||
// this function will filter out '&' characters and will put the accelerator
|
||||
// char (the one immediately after '&') into m_chAccel (@@ not yet)
|
||||
virtual void SetLabel( const wxString &label );
|
||||
virtual wxString GetLabel() const;
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event
|
||||
virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
|
||||
// appropriate event handlers
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const ;
|
||||
|
||||
// Places item in centre of panel - so can't be used BEFORE panel->Fit()
|
||||
void Centre(int direction = wxHORIZONTAL);
|
||||
inline void Callback(const wxFunction function) { m_callback = function; }; // Adds callback
|
||||
|
||||
inline wxFunction GetCallback() { return m_callback; }
|
||||
|
||||
protected:
|
||||
wxString m_label;
|
||||
// when we implement keyboard interface we will make use of this, but not yet
|
||||
//char m_chAccel;
|
||||
wxFunction m_callback; // Callback associated with the window
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKCONTROLH__
|
||||
#endif
|
||||
// _WX_CONTROL_H_
|
||||
|
@@ -1,59 +1,75 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxCursor class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCURSORH__
|
||||
#define __GTKCURSORH__
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "cursor.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxCursor;
|
||||
public:
|
||||
wxCursorRefData();
|
||||
~wxCursorRefData();
|
||||
|
||||
class wxWindow;
|
||||
protected:
|
||||
/* TODO: implementation
|
||||
WXHCURSOR m_hCursor;
|
||||
*/
|
||||
};
|
||||
|
||||
class wxCursor;
|
||||
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
|
||||
#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCursor: public wxObject
|
||||
// Cursor
|
||||
class WXDLLEXPORT wxCursor: public wxBitmap
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxCursor();
|
||||
|
||||
wxCursor(void);
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( const wxCursor &cursor );
|
||||
wxCursor( const wxCursor *cursor );
|
||||
~wxCursor(void);
|
||||
wxCursor& operator = ( const wxCursor& cursor );
|
||||
bool operator == ( const wxCursor& cursor );
|
||||
bool operator != ( const wxCursor& cursor );
|
||||
bool Ok(void) const;
|
||||
|
||||
private:
|
||||
public:
|
||||
|
||||
friend wxWindow;
|
||||
// Copy constructors
|
||||
inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
|
||||
inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
|
||||
|
||||
// no data :-)
|
||||
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
|
||||
const char maskBits[] = NULL);
|
||||
|
||||
/* TODO: make default type suit platform */
|
||||
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
wxCursor(int cursor_type);
|
||||
~wxCursor();
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; }
|
||||
|
||||
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
|
||||
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
|
||||
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
|
||||
|
||||
/* TODO: implementation
|
||||
void SetHCURSOR(WXHCURSOR cursor);
|
||||
inline WXHCURSOR GetHCURSOR() const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
||||
*/
|
||||
};
|
||||
|
||||
#endif // __GTKCURSORH__
|
||||
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
|
||||
|
||||
#endif
|
||||
// _WX_CURSOR_H_
|
||||
|
@@ -1,43 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dc.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxDC class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKDCH__
|
||||
#define __GTKDCH__
|
||||
#ifndef _WX_DC_H_
|
||||
#define _WX_DC_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "dc.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/pen.h"
|
||||
#include "wx/brush.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDC;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define MM_TEXT 0
|
||||
#define MM_ISOTROPIC 1
|
||||
#define MM_ANISOTROPIC 2
|
||||
#define MM_ISOTROPIC 1
|
||||
#define MM_ANISOTROPIC 2
|
||||
#define MM_LOMETRIC 3
|
||||
#define MM_HIMETRIC 4
|
||||
#define MM_TWIPS 5
|
||||
@@ -54,7 +45,7 @@ extern int wxPageNumber;
|
||||
// wxDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDC: public wxObject
|
||||
class WXDLLEXPORT wxDC: public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxDC)
|
||||
|
||||
@@ -69,12 +60,40 @@ class wxDC: public wxObject
|
||||
virtual bool Ok(void) const { return m_ok; };
|
||||
|
||||
virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ) = 0;
|
||||
inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE)
|
||||
{
|
||||
FloodFill(pt.x, pt.y, col, style);
|
||||
}
|
||||
virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0;
|
||||
inline bool GetPixel(const wxPoint& pt, wxColour *col) const
|
||||
{
|
||||
return GetPixel(pt.x, pt.y, col);
|
||||
}
|
||||
|
||||
virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0;
|
||||
inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
|
||||
{
|
||||
DrawLine(pt1.x, pt1.y, pt2.x, pt2.y);
|
||||
}
|
||||
|
||||
virtual void CrossHair( long x, long y ) = 0;
|
||||
virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc );
|
||||
inline void CrossHair(const wxPoint& pt)
|
||||
{
|
||||
CrossHair(pt.x, pt.y);
|
||||
}
|
||||
|
||||
virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ) = 0;
|
||||
inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, double xc, double yc)
|
||||
{
|
||||
DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, xc, yc);
|
||||
}
|
||||
|
||||
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0;
|
||||
virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea)
|
||||
{
|
||||
DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea);
|
||||
}
|
||||
|
||||
virtual void DrawPoint( long x, long y ) = 0;
|
||||
virtual void DrawPoint( wxPoint& point );
|
||||
|
||||
@@ -86,21 +105,67 @@ class wxDC: public wxObject
|
||||
int fillStyle=wxODDEVEN_RULE );
|
||||
|
||||
virtual void DrawRectangle( long x, long y, long width, long height ) = 0;
|
||||
inline void DrawRectangle(const wxPoint& pt, const wxSize& sz)
|
||||
{
|
||||
DrawRectangle(pt.x, pt.y, sz.x, sz.y);
|
||||
}
|
||||
inline void DrawRectangle(const wxRect& rect)
|
||||
{
|
||||
DrawRectangle(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0;
|
||||
inline void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius = 20.0)
|
||||
{
|
||||
DrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius);
|
||||
}
|
||||
inline void DrawRoundedRectangle(const wxRect& rect, double radius = 20.0)
|
||||
{
|
||||
DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, radius);
|
||||
}
|
||||
|
||||
virtual void DrawEllipse( long x, long y, long width, long height ) = 0;
|
||||
|
||||
inline void DrawEllipse(const wxPoint& pt, const wxSize& sz)
|
||||
{
|
||||
DrawEllipse(pt.x, pt.y, sz.x, sz.y);
|
||||
}
|
||||
inline void DrawEllipse(const wxRect& rect)
|
||||
{
|
||||
DrawEllipse(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
|
||||
virtual void DrawIcon(const wxIcon& icon, long x, long y) = 0;
|
||||
|
||||
virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 );
|
||||
virtual void DrawSpline( wxList *points );
|
||||
virtual void DrawSpline( int n, wxPoint points[] );
|
||||
|
||||
virtual bool CanDrawBitmap(void) const = 0;
|
||||
|
||||
virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE );
|
||||
void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE )
|
||||
{ DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); }
|
||||
inline void DrawIcon(const wxIcon& icon, const wxPoint& pt)
|
||||
{
|
||||
DrawIcon(icon, pt.x, pt.y);
|
||||
}
|
||||
|
||||
// TODO DrawBitmap is not always the same as DrawIcon, especially if bitmaps and
|
||||
// icons are implemented differently.
|
||||
void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE )
|
||||
{ DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); }
|
||||
|
||||
virtual bool Blit( long xdest, long ydest, long width, long height,
|
||||
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0;
|
||||
inline bool Blit(const wxPoint& destPt, const wxSize& sz,
|
||||
wxDC *source, const wxPoint& srcPt, int rop = wxCOPY, bool useMask = FALSE)
|
||||
{
|
||||
return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask);
|
||||
}
|
||||
|
||||
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0;
|
||||
inline void DrawText(const wxString& text, const wxPoint& pt, bool use16bit = FALSE)
|
||||
{
|
||||
DrawText(text, pt.x, pt.y, use16bit);
|
||||
}
|
||||
|
||||
virtual bool CanGetTextExtent(void) const = 0;
|
||||
virtual void GetTextExtent( const wxString &string, long *width, long *height,
|
||||
long *descent = NULL, long *externalLeading = NULL,
|
||||
@@ -111,19 +176,19 @@ class wxDC: public wxObject
|
||||
virtual void Clear(void) = 0;
|
||||
|
||||
virtual void SetFont( const wxFont &font ) = 0;
|
||||
virtual wxFont *GetFont(void) { return &m_font; };
|
||||
virtual wxFont *GetFont(void) const { return &m_font; };
|
||||
|
||||
virtual void SetPen( const wxPen &pen ) = 0;
|
||||
virtual wxPen *GetPen(void) { return &m_pen; };
|
||||
virtual wxPen *GetPen(void) const { return &m_pen; };
|
||||
|
||||
virtual void SetBrush( const wxBrush &brush ) = 0;
|
||||
virtual wxBrush *GetBrush(void) { return &m_brush; };
|
||||
virtual wxBrush *GetBrush(void) const { return &m_brush; };
|
||||
|
||||
virtual void SetBackground( const wxBrush &brush ) = 0;
|
||||
virtual wxBrush *GetBackground(void) { return &m_backgroundBrush; };
|
||||
virtual wxBrush *GetBackground(void) const { return &m_backgroundBrush; };
|
||||
|
||||
virtual void SetLogicalFunction( int function ) = 0;
|
||||
virtual int GetLogicalFunction(void) { return m_logicalFunction; };
|
||||
virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
|
||||
|
||||
virtual void SetTextForeground( const wxColour &col );
|
||||
virtual void SetTextBackground( const wxColour &col );
|
||||
@@ -131,10 +196,10 @@ class wxDC: public wxObject
|
||||
virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; };
|
||||
|
||||
virtual void SetBackgroundMode( int mode ) = 0;
|
||||
virtual int GetBackgroundMode(void) { return m_backgroundMode; };
|
||||
virtual int GetBackgroundMode(void) const { return m_backgroundMode; };
|
||||
|
||||
virtual void SetPalette( const wxPalette& palette ) = 0;
|
||||
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
|
||||
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
|
||||
|
||||
// the first two must be overridden and called
|
||||
virtual void SetClippingRegion( long x, long y, long width, long height );
|
||||
@@ -306,4 +371,5 @@ class wxDC: public wxObject
|
||||
long m_minX,m_maxX,m_minY,m_maxY;
|
||||
};
|
||||
|
||||
#endif // __GTKDCH__
|
||||
#endif
|
||||
// _WX_DC_H_
|
||||
|
@@ -1,29 +1,32 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcclient.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKDCCLIENTH__
|
||||
#define __GTKDCCLIENTH__
|
||||
#ifndef _WX_DCCLIENT_H_
|
||||
#define _WX_DCCLIENT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "dcclient.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxPaintDC;
|
||||
class WXDLLEXPORT wxPaintDC;
|
||||
|
||||
// Under Windows, wxClientDC, wxPaintDC and wxWindowDC are implemented differently.
|
||||
// On many platforms, however, they will be the same.
|
||||
|
||||
typedef wxPaintDC wxClientDC;
|
||||
typedef wxPaintDC wxWindowDC;
|
||||
|
||||
@@ -31,7 +34,7 @@ typedef wxPaintDC wxWindowDC;
|
||||
// wxPaintDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxPaintDC: public wxDC
|
||||
class WXDLLEXPORT wxPaintDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
||||
|
||||
@@ -91,7 +94,7 @@ class wxPaintDC: public wxDC
|
||||
virtual void DestroyClippingRegion(void);
|
||||
|
||||
virtual void DrawOpenSpline( wxList *points );
|
||||
|
||||
};
|
||||
|
||||
#endif // __GTKDCCLIENTH__
|
||||
#endif
|
||||
// _WX_DCCLIENT_H_
|
||||
|
@@ -1,34 +1,23 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcmemory.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Purpose: wxMemoryDC class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKDCMEMORYH__
|
||||
#define __GTKDCMEMORYH__
|
||||
#ifndef _WX_DCMEMORY_H_
|
||||
#define _WX_DCMEMORY_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "dcmemory.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dcclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMemoryDC;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMemoryDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMemoryDC: public wxPaintDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
@@ -46,5 +35,4 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GTKDCMEMORYH__
|
||||
|
||||
// _WX_DCMEMORY_H_
|
||||
|
@@ -1,16 +1,20 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcscreen.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxScreenDC class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCSCREEN_H_
|
||||
#define _WX_DCSCREEN_H_
|
||||
|
||||
#ifndef __GTKDCSCREENH__
|
||||
#define __GTKDCSCREENH__
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dcscreen.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
|
||||
@@ -19,14 +23,17 @@ class WXDLLEXPORT wxScreenDC: public wxPaintDC
|
||||
DECLARE_DYNAMIC_CLASS(wxScreenDC)
|
||||
|
||||
public:
|
||||
wxScreenDC(void);
|
||||
~wxScreenDC(void);
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDC();
|
||||
~wxScreenDC();
|
||||
|
||||
static bool StartDrawingOnTop( wxWindow *window );
|
||||
static bool StartDrawingOnTop( wxRectangle *rect = NULL );
|
||||
static bool EndDrawingOnTop(void);
|
||||
// Compatibility with X's requirements for
|
||||
// drawing on top of all windows
|
||||
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; }
|
||||
static bool EndDrawingOnTop() { return TRUE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GTKDCSCREENH__
|
||||
// _WX_DCSCREEN_H_
|
||||
|
||||
|
@@ -1,91 +1,98 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dialog.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxDialog class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKDIALOGH__
|
||||
#define __GTKDIALOGH__
|
||||
#ifndef _WX_DIALOG_H_
|
||||
#define _WX_DIALOG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "dialog.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/panel.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// forward decls
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
||||
|
||||
class wxRadioBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDialog;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxDialogNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDialog: public wxWindow
|
||||
// Dialog boxes
|
||||
class WXDLLEXPORT wxDialog: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
public:
|
||||
|
||||
public:
|
||||
wxDialog();
|
||||
|
||||
wxDialog(void);
|
||||
wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
|
||||
~wxDialog(void);
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle(void) const;
|
||||
bool OnClose(void);
|
||||
void OnApply( wxCommandEvent &event );
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOk( wxCommandEvent &event );
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
bool Destroy(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
/*
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
*/
|
||||
virtual bool Show( bool show );
|
||||
virtual int ShowModal(void);
|
||||
virtual void EndModal(int retCode);
|
||||
virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
virtual void InitDialog(void);
|
||||
|
||||
private:
|
||||
|
||||
friend wxWindow;
|
||||
friend wxDC;
|
||||
friend wxRadioBox;
|
||||
bool m_modalShowing;
|
||||
wxString m_title;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
// Constructor with a modal flag, but no window id - the old convention
|
||||
inline wxDialog(wxWindow *parent,
|
||||
const wxString& title, bool modal,
|
||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
||||
}
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
inline wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
~wxDialog();
|
||||
|
||||
virtual bool Destroy();
|
||||
void SetClientSize(int width, int height);
|
||||
void GetPosition(int *x, int *y) const;
|
||||
bool Show(bool show);
|
||||
void Iconize(bool iconize);
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
void Fit();
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
void SetModal(bool flag);
|
||||
|
||||
virtual void Centre(int direction = wxBOTH);
|
||||
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// Standard buttons
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKDIALOGH__
|
||||
#endif
|
||||
// _WX_DIALOG_H_
|
||||
|
@@ -1,35 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dirdlg.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxDirDialog class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __DIRDIALOGH__
|
||||
#define __DIRDIALOGH__
|
||||
#ifndef _WX_DIRDLG_H_
|
||||
#define _WX_DIRDLG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "dirdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxDirDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultPath = "",
|
||||
long style = 0, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
class wxDirDialog;
|
||||
inline void SetMessage(const wxString& message) { m_message = message; }
|
||||
inline void SetPath(const wxString& path) { m_path = path; }
|
||||
inline void SetStyle(long style) { m_dialogStyle = style; }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDirDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
inline wxString GetMessage() const { return m_message; }
|
||||
inline wxString GetPath() const { return m_path; }
|
||||
inline long GetStyle() const { return m_dialogStyle; }
|
||||
|
||||
#endif // __DIRDIALOGH__
|
||||
int ShowModal();
|
||||
|
||||
protected:
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
wxString m_path;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLG_H_
|
||||
|
@@ -1,42 +1,45 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: filedlg.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxFileDialog class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKFILEDLGH__
|
||||
#define __GTKFILEDLGH__
|
||||
#ifndef _WX_FILEDLG_H_
|
||||
#define _WX_FILEDLG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "filedlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// File selector
|
||||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
* File selector
|
||||
*/
|
||||
|
||||
extern const char *wxFileSelectorPromptStr;
|
||||
extern const char *wxFileSelectorDefaultWildcardStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
|
||||
|
||||
class wxFileDialog: public wxDialog
|
||||
class WXDLLEXPORT wxFileDialog: public wxDialog
|
||||
{
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
|
||||
public:
|
||||
|
||||
wxFileDialog() {};
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
protected:
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
wxString m_dir;
|
||||
wxString m_path; // Full path
|
||||
wxString m_fileName;
|
||||
wxString m_wildCard;
|
||||
int m_filterIndex;
|
||||
public:
|
||||
wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultDir = "", const wxString& defaultFile = "",
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = 0, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
inline void SetMessage(const wxString& message) { m_message = message; }
|
||||
@@ -47,48 +50,40 @@ class wxFileDialog: public wxDialog
|
||||
inline void SetStyle(long style) { m_dialogStyle = style; }
|
||||
inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
|
||||
|
||||
inline wxString GetMessage(void) const { return m_message; }
|
||||
inline wxString GetPath(void) const { return m_path; }
|
||||
inline wxString GetDirectory(void) const { return m_dir; }
|
||||
inline wxString GetFilename(void) const { return m_fileName; }
|
||||
inline wxString GetWildcard(void) const { return m_wildCard; }
|
||||
inline long GetStyle(void) const { return m_dialogStyle; }
|
||||
inline int GetFilterIndex(void) const { return m_filterIndex ; }
|
||||
inline wxString GetMessage() const { return m_message; }
|
||||
inline wxString GetPath() const { return m_path; }
|
||||
inline wxString GetDirectory() const { return m_dir; }
|
||||
inline wxString GetFilename() const { return m_fileName; }
|
||||
inline wxString GetWildcard() const { return m_wildCard; }
|
||||
inline long GetStyle() const { return m_dialogStyle; }
|
||||
inline int GetFilterIndex() const { return m_filterIndex ; }
|
||||
|
||||
int ShowModal(void);
|
||||
|
||||
protected:
|
||||
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
wxString m_dir;
|
||||
wxString m_path; // Full path
|
||||
wxString m_fileName;
|
||||
wxString m_wildCard;
|
||||
int m_filterIndex;
|
||||
int ShowModal();
|
||||
};
|
||||
|
||||
#define wxOPEN 1
|
||||
#define wxSAVE 2
|
||||
#define wxOVERWRITE_PROMPT 4
|
||||
#define wxHIDE_READONLY 8
|
||||
#define wxFILE_MUST_EXIST 16
|
||||
#define wxOPEN 0x0001
|
||||
#define wxSAVE 0x0002
|
||||
#define wxOVERWRITE_PROMPT 0x0004
|
||||
#define wxHIDE_READONLY 0x0008
|
||||
#define wxFILE_MUST_EXIST 0x0010
|
||||
|
||||
// File selector - backward compatibility
|
||||
char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||
const char *default_filename = NULL, const char *default_extension = NULL,
|
||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
||||
wxWindow *parent = NULL, int x = -1, int y = -1);
|
||||
|
||||
char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||
const char *default_filename = NULL, const char *default_extension = NULL,
|
||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
||||
wxWindow *parent = NULL, int x = -1, int y = -1);
|
||||
|
||||
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL,
|
||||
wxWindow *parent = NULL);
|
||||
|
||||
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL,
|
||||
wxWindow *parent = NULL);
|
||||
// An extended version of wxFileSelector
|
||||
char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
|
||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
||||
wxWindow *parent = NULL, int x = -1, int y = -1);
|
||||
|
||||
// Generic file load dialog
|
||||
char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||
|
||||
// Generic file save dialog
|
||||
char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||
|
||||
#endif
|
||||
// __GTKFILEDLGH__
|
||||
// _WX_FILEDLG_H_
|
||||
|
@@ -1,87 +1,88 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: font.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxFont class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKFONTH__
|
||||
#define __GTKFONTH__
|
||||
#ifndef _WX_FONT_H_
|
||||
#define _WX_FONT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "font.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/hash.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxFont;
|
||||
|
||||
class wxDC;
|
||||
class wxPaintDC;
|
||||
class wxWindow;
|
||||
|
||||
class wxFont;
|
||||
class wxFontNameDirectory;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global variables
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// extern wxFontNameDirectory wxTheFontNameDirectory; // defined below
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFont
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxFont: public wxGDIObject
|
||||
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
|
||||
public:
|
||||
wxFont(void);
|
||||
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
|
||||
bool underlined = FALSE, const char *Face=NULL );
|
||||
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
|
||||
bool underlined = FALSE );
|
||||
wxFont( const wxFont& font );
|
||||
wxFont( const wxFont* font );
|
||||
~wxFont(void);
|
||||
wxFont& operator = ( const wxFont& font );
|
||||
bool operator == ( const wxFont& font );
|
||||
bool operator != ( const wxFont& font );
|
||||
bool Ok();
|
||||
|
||||
int GetPointSize(void) const;
|
||||
wxString GetFaceName(void) const;
|
||||
int GetFamily(void) const;
|
||||
wxString GetFamilyString(void) const;
|
||||
int GetFontId(void) const;
|
||||
wxString GetFaceString(void) const;
|
||||
int GetStyle(void) const;
|
||||
wxString GetStyleString(void) const;
|
||||
int GetWeight(void) const;
|
||||
wxString GetWeightString(void) const;
|
||||
bool GetUnderlined(void) const;
|
||||
|
||||
wxFont( char *xFontName );
|
||||
|
||||
private:
|
||||
|
||||
friend wxDC;
|
||||
friend wxPaintDC;
|
||||
friend wxWindow;
|
||||
|
||||
// no data :-)
|
||||
friend class WXDLLEXPORT wxFont;
|
||||
public:
|
||||
wxFontRefData();
|
||||
~wxFontRefData();
|
||||
protected:
|
||||
int m_pointSize;
|
||||
int m_family;
|
||||
int m_style;
|
||||
int m_weight;
|
||||
bool m_underlined;
|
||||
wxString m_faceName;
|
||||
/* TODO: implementation
|
||||
WXHFONT m_hFont;
|
||||
*/
|
||||
};
|
||||
|
||||
#endif // __GTKFONTH__
|
||||
#define M_FONTDATA ((wxFontRefData *)m_refData)
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// Font
|
||||
class WXDLLEXPORT wxFont: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
public:
|
||||
wxFont();
|
||||
wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
|
||||
inline wxFont(const wxFont& font) { Ref(font); }
|
||||
inline wxFont(const wxFont* font) { if (font) Ref(*font); }
|
||||
|
||||
~wxFont();
|
||||
|
||||
bool Create(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
inline int GetPointSize() const { return M_FONTDATA->m_pointSize; }
|
||||
inline int GetFamily() const { return M_FONTDATA->m_family; }
|
||||
inline int GetStyle() const { return M_FONTDATA->m_style; }
|
||||
inline int GetWeight() const { return M_FONTDATA->m_weight; }
|
||||
wxString GetFamilyString() const ;
|
||||
wxString GetFaceName() const ;
|
||||
wxString GetStyleString() const ;
|
||||
wxString GetWeightString() const ;
|
||||
inline bool GetUnderlined() const { return M_FONTDATA->m_underlined; }
|
||||
|
||||
void SetPointSize(int pointSize);
|
||||
void SetFamily(int family);
|
||||
void SetStyle(int style);
|
||||
void SetWeight(int weight);
|
||||
void SetFaceName(const wxString& faceName);
|
||||
void SetUnderlined(bool underlined);
|
||||
|
||||
inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; }
|
||||
inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; }
|
||||
inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; }
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
void Unshare();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_FONT_H_
|
||||
|
@@ -1,112 +1,156 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: frame.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxFrame class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKFRAMEH__
|
||||
#define __GTKFRAMEH__
|
||||
#ifndef _WX_FRAME_H_
|
||||
#define _WX_FRAME_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "frame.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/toolbar.h"
|
||||
#include "wx/accel.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
||||
|
||||
class wxMDIChildFrame;
|
||||
class wxMDIClientWindow;
|
||||
class wxMenu;
|
||||
class wxMenuBar;
|
||||
class wxToolBar;
|
||||
class wxStatusBar;
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
|
||||
class wxFrame;
|
||||
class WXDLLEXPORT wxFrame: public wxWindow {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxFrameNameStr;
|
||||
extern const char *wxToolBarNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxFrame: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
public:
|
||||
|
||||
wxFrame();
|
||||
wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
|
||||
inline wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxFrame();
|
||||
bool Destroy();
|
||||
|
||||
virtual bool Show( bool show );
|
||||
virtual void Enable( bool enable );
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual void GetClientSize( int *width, int *height ) const;
|
||||
|
||||
// set minimal/maxmimal size for the frame
|
||||
virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
|
||||
virtual bool Destroy();
|
||||
void SetClientSize(int width, int height);
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
|
||||
void GetSize(int *width, int *height) const ;
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual bool OnClose();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
bool Show(bool show);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const ;
|
||||
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const ;
|
||||
|
||||
void Centre(int direction = wxBOTH);
|
||||
|
||||
// Call this to simulate a menu command
|
||||
virtual void Command(int id);
|
||||
virtual void ProcessCommand(int id);
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// Create status line
|
||||
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||
const wxString& name = "statusBar");
|
||||
virtual wxStatusBar *GetStatusBar();
|
||||
virtual void SetStatusText( const wxString &text, int number = 0 );
|
||||
virtual void SetStatusWidths( int n, int *width );
|
||||
inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||
virtual void PositionStatusBar();
|
||||
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name);
|
||||
|
||||
virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
virtual wxToolBar *GetToolBar();
|
||||
|
||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||
virtual wxMenuBar *GetMenuBar();
|
||||
// Create toolbar
|
||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
||||
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
||||
// If made known to the frame, the frame will manage it automatically.
|
||||
virtual inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
||||
virtual inline wxToolBar *GetToolBar() const { return m_frameToolBar; }
|
||||
virtual void PositionToolBar();
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
virtual void SetIcon( const wxIcon &icon );
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||
|
||||
void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||
|
||||
private:
|
||||
friend wxWindow;
|
||||
friend wxMDIChildFrame;
|
||||
friend wxMDIClientWindow;
|
||||
// Hint to tell framework which status bar to use
|
||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||
|
||||
// update frame's menus (called from OnIdle)
|
||||
// Fit frame around subwindows
|
||||
virtual void Fit();
|
||||
|
||||
// Iconize
|
||||
virtual void Iconize(bool iconize);
|
||||
|
||||
virtual bool IsIconized() const ;
|
||||
|
||||
// Compatibility
|
||||
inline bool Iconized() const { return IsIconized(); }
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
|
||||
virtual void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Query app for menu item updates (called from OnIdle)
|
||||
void DoMenuUpdates();
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
|
||||
wxMenuBar *m_frameMenuBar;
|
||||
wxStatusBar *m_frameStatusBar;
|
||||
wxToolBar *m_frameToolBar;
|
||||
int m_toolBarHeight;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
protected:
|
||||
wxMenuBar * m_frameMenuBar;
|
||||
wxStatusBar * m_frameStatusBar;
|
||||
wxIcon m_icon;
|
||||
bool m_iconized;
|
||||
static bool m_useNativeStatusBar;
|
||||
wxToolBar * m_frameToolBar ;
|
||||
wxAcceleratorTable m_acceleratorTable;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
#endif
|
||||
// _WX_FRAME_H_
|
||||
|
@@ -1,83 +1,69 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxGauge class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKGAUGEH__
|
||||
#define __GTKGAUGEH__
|
||||
#ifndef _WX_GAUGE_H_
|
||||
#define _WX_GAUGE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "gauge.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||
|
||||
class wxGauge;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char* wxGaugeNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGaugeBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxGauge: public wxControl
|
||||
// Group box
|
||||
class WXDLLEXPORT wxGauge: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
|
||||
public:
|
||||
inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
|
||||
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 = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, name);
|
||||
};
|
||||
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 wxString& name = wxGaugeNameStr );
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
void SetShadowWidth( int WXUNUSED(w) ) {};
|
||||
void SetBezelFace( int WXUNUSED(w) ) {};
|
||||
void SetRange( int r );
|
||||
void SetValue( int pos );
|
||||
int GetShadowWidth(void) const { return 0; };
|
||||
int GetBezelFace(void) const { return 0; };
|
||||
int GetRange(void) const;
|
||||
int GetValue(void) const;
|
||||
void SetShadowWidth(int w);
|
||||
void SetBezelFace(int w);
|
||||
void SetRange(int r);
|
||||
void SetValue(int pos);
|
||||
|
||||
// Are we a Win95/GTK progress bar, or a normal gauge?
|
||||
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
||||
int GetShadowWidth() const ;
|
||||
int GetBezelFace() const ;
|
||||
int GetRange() const ;
|
||||
int GetValue() const ;
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
protected:
|
||||
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
bool m_useProgressBar;
|
||||
};
|
||||
|
||||
#endif // __GTKGAUGEH__
|
||||
#endif
|
||||
// _WX_GAUGE_H_
|
||||
|
@@ -1,31 +1,42 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gdiobj.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxGDIObject class: base class for other GDI classes
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GDIOBJH__
|
||||
#define __GDIOBJH__
|
||||
#ifndef _WX_GDIOBJ_H_
|
||||
#define _WX_GDIOBJ_H_
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "gdiobj.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxGDIRefData: public wxObjectRefData {
|
||||
public:
|
||||
inline wxGDIRefData()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#define M_GDIDATA ((wxGDIRefData *)m_refData)
|
||||
|
||||
class WXDLLEXPORT wxGDIObject: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
||||
public:
|
||||
inline wxGDIObject(void) { m_visible = FALSE; };
|
||||
inline ~wxGDIObject(void) {};
|
||||
inline wxGDIObject() { m_visible = FALSE; };
|
||||
inline ~wxGDIObject() {};
|
||||
|
||||
virtual bool GetVisible(void) { return m_visible; }
|
||||
inline bool IsNull() const { return (m_refData == 0); }
|
||||
|
||||
virtual bool GetVisible() { return m_visible; }
|
||||
virtual void SetVisible(bool v) { m_visible = v; }
|
||||
|
||||
protected:
|
||||
@@ -34,4 +45,4 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GDIOBJH__
|
||||
// _WX_GDIOBJ_H_
|
||||
|
@@ -1,51 +1,107 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: icon.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxIcon class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKICONH__
|
||||
#define __GTKICONH__
|
||||
#ifndef _WX_ICON_H_
|
||||
#define _WX_ICON_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "icon.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxIconRefData: public wxBitmapRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxIcon;
|
||||
public:
|
||||
wxIconRefData();
|
||||
~wxIconRefData();
|
||||
|
||||
class wxIcon;
|
||||
public:
|
||||
/* TODO: whatever your actual icon handle is
|
||||
WXHICON m_hIcon;
|
||||
*/
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxIcon
|
||||
//-----------------------------------------------------------------------------
|
||||
#define M_ICONDATA ((wxIconRefData *)m_refData)
|
||||
#define M_ICONHANDLERDATA ((wxIconRefData *)bitmap->GetRefData())
|
||||
|
||||
class wxIcon: public wxBitmap
|
||||
// Icon
|
||||
class WXDLLEXPORT wxIcon: public wxBitmap
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxIcon)
|
||||
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
wxIcon(void) {};
|
||||
|
||||
// Copy constructors
|
||||
inline wxIcon(const wxIcon& icon) { Ref(icon); }
|
||||
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
|
||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||
|
||||
|
||||
wxIcon(const char bits[], int width, int height);
|
||||
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
~wxIcon();
|
||||
|
||||
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
|
||||
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
||||
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
|
||||
|
||||
/* TODO: implementation
|
||||
void SetHICON(WXHICON ico);
|
||||
inline WXHICON GetHICON() const { return (M_ICONDATA ? M_ICONDATA->m_hIcon : 0); }
|
||||
*/
|
||||
|
||||
/* TODO */
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
};
|
||||
|
||||
/* Example handlers. TODO: write your own handlers for relevant types.
|
||||
|
||||
#endif // __GTKICONH__
|
||||
class WXDLLEXPORT wxICOFileHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxICOFileHandler)
|
||||
public:
|
||||
inline wxICOFileHandler()
|
||||
{
|
||||
m_name = "ICO icon file";
|
||||
m_extension = "ico";
|
||||
m_type = wxBITMAP_TYPE_ICO;
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxICOResourceHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxICOResourceHandler)
|
||||
public:
|
||||
inline wxICOResourceHandler()
|
||||
{
|
||||
m_name = "ICO resource";
|
||||
m_extension = "ico";
|
||||
m_type = wxBITMAP_TYPE_ICO_RESOURCE;
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
#endif
|
||||
// _WX_ICON_H_
|
||||
|
@@ -1,25 +1,24 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: Guilhem Lavaux
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright:
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __JOYSTICKH__
|
||||
#define __JOYSTICKH__
|
||||
#ifndef _WX_JOYSTICK_H_
|
||||
#define _WX_JOYSTICK_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "joystick.h"
|
||||
#endif
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/thread.h"
|
||||
|
||||
class WXDLLEXPORT wxJoystick: public wxObject, public wxThread
|
||||
class WXDLLEXPORT wxJoystick: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxJoystick)
|
||||
public:
|
||||
@@ -27,56 +26,56 @@ class WXDLLEXPORT wxJoystick: public wxObject, public wxThread
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxJoystick(int joystick = wxJOYSTICK1);
|
||||
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPoint GetPosition(void) const;
|
||||
int GetZPosition(void) const;
|
||||
int GetButtonState(void) const;
|
||||
int GetPOVPosition(void) const;
|
||||
int GetPOVCTSPosition(void) const;
|
||||
int GetRudderPosition(void) const;
|
||||
int GetUPosition(void) const;
|
||||
int GetVPosition(void) const;
|
||||
int GetMovementThreshold(void) const;
|
||||
wxPoint GetPosition() const;
|
||||
int GetZPosition() const;
|
||||
int GetButtonState() const;
|
||||
int GetPOVPosition() const;
|
||||
int GetPOVCTSPosition() const;
|
||||
int GetRudderPosition() const;
|
||||
int GetUPosition() const;
|
||||
int GetVPosition() const;
|
||||
int GetMovementThreshold() const;
|
||||
void SetMovementThreshold(int threshold) ;
|
||||
|
||||
// Capabilities
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool IsOk(void) const; // Checks that the joystick is functioning
|
||||
int GetNumberJoysticks(void) const ;
|
||||
int GetManufacturerId(void) const ;
|
||||
int GetProductId(void) const ;
|
||||
wxString GetProductName(void) const ;
|
||||
int GetXMin(void) const;
|
||||
int GetYMin(void) const;
|
||||
int GetZMin(void) const;
|
||||
int GetXMax(void) const;
|
||||
int GetYMax(void) const;
|
||||
int GetZMax(void) const;
|
||||
int GetNumberButtons(void) const;
|
||||
int GetNumberAxes(void) const;
|
||||
int GetMaxButtons(void) const;
|
||||
int GetMaxAxes(void) const;
|
||||
int GetPollingMin(void) const;
|
||||
int GetPollingMax(void) const;
|
||||
int GetRudderMin(void) const;
|
||||
int GetRudderMax(void) const;
|
||||
int GetUMin(void) const;
|
||||
int GetUMax(void) const;
|
||||
int GetVMin(void) const;
|
||||
int GetVMax(void) const;
|
||||
bool IsOk() const; // Checks that the joystick is functioning
|
||||
int GetNumberJoysticks() const ;
|
||||
int GetManufacturerId() const ;
|
||||
int GetProductId() const ;
|
||||
wxString GetProductName() const ;
|
||||
int GetXMin() const;
|
||||
int GetYMin() const;
|
||||
int GetZMin() const;
|
||||
int GetXMax() const;
|
||||
int GetYMax() const;
|
||||
int GetZMax() const;
|
||||
int GetNumberButtons() const;
|
||||
int GetNumberAxes() const;
|
||||
int GetMaxButtons() const;
|
||||
int GetMaxAxes() const;
|
||||
int GetPollingMin() const;
|
||||
int GetPollingMax() const;
|
||||
int GetRudderMin() const;
|
||||
int GetRudderMax() const;
|
||||
int GetUMin() const;
|
||||
int GetUMax() const;
|
||||
int GetVMin() const;
|
||||
int GetVMax() const;
|
||||
|
||||
bool HasRudder(void) const;
|
||||
bool HasZ(void) const;
|
||||
bool HasU(void) const;
|
||||
bool HasV(void) const;
|
||||
bool HasPOV(void) const;
|
||||
bool HasPOV4Dir(void) const;
|
||||
bool HasPOVCTS(void) const;
|
||||
bool HasRudder() const;
|
||||
bool HasZ() const;
|
||||
bool HasU() const;
|
||||
bool HasV() const;
|
||||
bool HasPOV() const;
|
||||
bool HasPOV4Dir() const;
|
||||
bool HasPOVCTS() const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -84,19 +83,11 @@ class WXDLLEXPORT wxJoystick: public wxObject, public wxThread
|
||||
// pollingFreq = 0 means that movement events are sent when above the threshold.
|
||||
// If pollingFreq > 0, events are received every this many milliseconds.
|
||||
bool SetCapture(wxWindow* win, int pollingFreq = 0);
|
||||
bool ReleaseCapture(void);
|
||||
bool ReleaseCapture();
|
||||
|
||||
protected:
|
||||
int m_joystick;
|
||||
wxPoint m_lastposition;
|
||||
int m_axe[15];
|
||||
int m_buttons;
|
||||
wxWindow *m_catchwin;
|
||||
int m_polling;
|
||||
|
||||
void *Entry(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __JOYSTICKH__
|
||||
|
||||
// _WX_JOYSTICK_H_
|
||||
|
@@ -1,78 +1,97 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxListBox class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKLISTBOXH__
|
||||
#define __GTKLISTBOXH__
|
||||
#ifndef _WX_LISTBOX_H_
|
||||
#define _WX_LISTBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "listbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
||||
|
||||
class wxListBox;
|
||||
// forward decl for GetSelections()
|
||||
class WXDLLEXPORT wxArrayInt;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
extern const char *wxListBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxListBox: public wxControl
|
||||
// List box item
|
||||
class WXDLLEXPORT wxListBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
public:
|
||||
|
||||
public:
|
||||
wxListBox();
|
||||
inline 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 = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxListBox(void);
|
||||
wxListBox( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0, const wxString &name = 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 wxString &name = wxListBoxNameStr );
|
||||
void Append( const wxString &item );
|
||||
void Append( const wxString &item, char *clientData );
|
||||
void Clear(void);
|
||||
void Delete( int n );
|
||||
void Deselect( int n );
|
||||
int FindString( const wxString &item ) const;
|
||||
char *GetClientData( int n ) const;
|
||||
int GetSelection(void) const;
|
||||
int GetSelections( class wxArrayInt &) const;
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetStringSelection(void) const;
|
||||
int Number(void);
|
||||
bool Selected( int n );
|
||||
void Set( int n, const wxString *choices );
|
||||
void SetClientData( int n, char *clientData );
|
||||
void SetFirstItem( int n );
|
||||
void SetFirstItem( const wxString &item );
|
||||
void SetSelection( int n, bool select = TRUE );
|
||||
void SetString( int n, const wxString &string );
|
||||
void SetStringSelection( const wxString &string, bool select = TRUE );
|
||||
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 = wxListBoxNameStr);
|
||||
|
||||
~wxListBox();
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Append(const wxString& item, char *clientData);
|
||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
||||
virtual int FindString(const wxString& s) const ;
|
||||
virtual void Clear();
|
||||
virtual void SetSelection(int n, bool select = TRUE);
|
||||
|
||||
virtual void Deselect(int n);
|
||||
|
||||
// For single choice list item only
|
||||
virtual int GetSelection() const ;
|
||||
virtual void Delete(int n);
|
||||
virtual char *GetClientData(int n) const ;
|
||||
virtual void SetClientData(int n, char *clientData);
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
// For single or multiple choice list item
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
virtual bool Selected(int n) const ;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Set the specified item at the first visible item
|
||||
// or scroll to max range.
|
||||
virtual void SetFirstItem(int n) ;
|
||||
virtual void SetFirstItem(const wxString& s) ;
|
||||
|
||||
virtual void InsertItems(int nItems, const wxString items[], int pos);
|
||||
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||
virtual int Number() const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
protected:
|
||||
int m_noItems;
|
||||
int m_selected;
|
||||
};
|
||||
|
||||
#endif // __GTKLISTBOXH__
|
||||
#endif
|
||||
// _WX_LISTBOX_H_
|
||||
|
@@ -1,181 +1,160 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mdi.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: MDI (Multiple Document Interface) classes.
|
||||
// This doesn't have to be implemented just like Windows,
|
||||
// it could be a tabbed design as in wxGTK.
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __MDIH__
|
||||
#define __MDIH__
|
||||
#ifndef _WX_MDI_H_
|
||||
#define _WX_MDI_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "mdi.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/toolbar.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStatusLineNameStr;
|
||||
|
||||
class wxMDIParentFrame;
|
||||
class wxMDIClientWindow;
|
||||
class wxMDIChildFrame;
|
||||
class WXDLLEXPORT wxMDIClientWindow;
|
||||
class WXDLLEXPORT wxMDIChildFrame;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char* wxFrameNameStr;
|
||||
extern const char* wxStatusLineNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMDIParentFrame: public wxFrame
|
||||
class WXDLLEXPORT wxMDIParentFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
public:
|
||||
friend class WXDLLEXPORT wxMDIChildFrame;
|
||||
public:
|
||||
|
||||
wxMDIParentFrame(void);
|
||||
wxMDIParentFrame( wxWindow *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
~wxMDIParentFrame(void);
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
wxMDIParentFrame();
|
||||
inline wxMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxMDIParentFrame();
|
||||
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
wxMDIChildFrame *GetActiveChild(void) const;
|
||||
|
||||
wxMDIClientWindow *GetClientWindow(void) const;
|
||||
virtual wxMDIClientWindow *OnCreateClient(void);
|
||||
|
||||
virtual void Cascade(void) {};
|
||||
virtual void Tile(void) {};
|
||||
virtual void ArrangeIcons(void) {};
|
||||
virtual void ActivateNext(void);
|
||||
virtual void ActivatePrevious(void);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
void OnActivate( wxActivateEvent& event );
|
||||
void OnSysColourChanged( wxSysColourChangedEvent& event );
|
||||
|
||||
//private:
|
||||
|
||||
wxMDIChildFrame *m_currentChild;
|
||||
|
||||
void SetMDIMenuBar( wxMenuBar *menu_bar );
|
||||
|
||||
private:
|
||||
|
||||
wxMDIClientWindow *m_clientWindow;
|
||||
bool m_parentFrameActive;
|
||||
wxMenuBar *m_mdiMenuBar;
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
|
||||
// Gets the size available for subwindows after menu size, toolbar size
|
||||
// and status bar size have been subtracted. If you want to manage your own
|
||||
// toolbar(s), don't call SetToolBar.
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
|
||||
// Get the active MDI child window (Windows only)
|
||||
wxMDIChildFrame *GetActiveChild() const ;
|
||||
|
||||
// Get the client window
|
||||
inline wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; };
|
||||
|
||||
// Create the client window class (don't Create the window,
|
||||
// just return a new class)
|
||||
virtual wxMDIClientWindow *OnCreateClient() ;
|
||||
|
||||
// MDI operations
|
||||
virtual void Cascade();
|
||||
virtual void Tile();
|
||||
virtual void ArrangeIcons();
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
|
||||
protected:
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIChildFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMDIChildFrame: public wxFrame
|
||||
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
public:
|
||||
|
||||
wxMDIChildFrame(void);
|
||||
wxMDIChildFrame( wxMDIParentFrame *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
||||
~wxMDIChildFrame(void);
|
||||
bool Create( wxMDIParentFrame *parent,
|
||||
wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
||||
|
||||
virtual void SetMenuBar( wxMenuBar *menu_bar );
|
||||
virtual wxMenuBar *GetMenuBar();
|
||||
wxMDIChildFrame();
|
||||
inline wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual void GetClientSize( int *width, int *height ) const;
|
||||
virtual void AddChild( wxWindow *child );
|
||||
~wxMDIChildFrame();
|
||||
|
||||
virtual void Activate(void);
|
||||
|
||||
// no status bars
|
||||
virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number), long WXUNUSED(style),
|
||||
wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) {return (wxStatusBar*)NULL; }
|
||||
virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; }
|
||||
virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {}
|
||||
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// no size hints
|
||||
virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
|
||||
int WXUNUSED(maxH), int WXUNUSED(incW) ) {}
|
||||
|
||||
// no toolbar bars
|
||||
virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id),
|
||||
const wxString& WXUNUSED(name) ) { return (wxToolBar*)NULL; }
|
||||
virtual wxToolBar *GetToolBar() { return (wxToolBar*)NULL; }
|
||||
|
||||
// no icon
|
||||
void SetIcon( const wxIcon &icon ) { m_icon = icon; }
|
||||
|
||||
// no title
|
||||
void SetTitle( const wxString &title ) { m_title = title; }
|
||||
wxString GetTitle() const { return m_title; }
|
||||
|
||||
// no maximize etc
|
||||
virtual void Maximize(void) {}
|
||||
virtual void Restore(void) {}
|
||||
|
||||
void OnActivate( wxActivateEvent &event );
|
||||
|
||||
public:
|
||||
|
||||
wxMenuBar *m_menuBar;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
void SetClientSize(int width, int height);
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
|
||||
// MDI operations
|
||||
virtual void Maximize();
|
||||
virtual void Restore();
|
||||
virtual void Activate();
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIClientWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
/* The client window is a child of the parent MDI frame, and itself
|
||||
* contains the child MDI frames.
|
||||
* However, you create the MDI children as children of the MDI parent:
|
||||
* only in the implementation does the client window become the parent
|
||||
* of the children. Phew! So the children are sort of 'adopted'...
|
||||
*/
|
||||
|
||||
class wxMDIClientWindow: public wxWindow
|
||||
class WXDLLEXPORT wxMDIClientWindow: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
|
||||
public:
|
||||
|
||||
wxMDIClientWindow(void);
|
||||
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
||||
~wxMDIClientWindow(void);
|
||||
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||
void AddChild( wxWindow *child );
|
||||
public:
|
||||
|
||||
wxMDIClientWindow() ;
|
||||
inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
||||
{
|
||||
CreateClient(parent, style);
|
||||
}
|
||||
|
||||
~wxMDIClientWindow();
|
||||
|
||||
// Note: this is virtual, to allow overridden behaviour.
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
// Explicitly call default scroll behaviour
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
|
||||
protected:
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __MDIH__
|
||||
|
||||
#endif
|
||||
// _WX_MDI_H_
|
||||
|
@@ -1,155 +1,157 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: menu.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxMenu, wxMenuBar classes
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKMENUH__
|
||||
#define __GTKMENUH__
|
||||
#ifndef _WX_MENU_H_
|
||||
#define _WX_MENU_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "menu.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxMenuItem;
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxMenu;
|
||||
|
||||
class wxMenuBar;
|
||||
class wxMenuItem;
|
||||
class wxMenu;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// const
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define ID_SEPARATOR (-1)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuBar
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMenuBar: public wxWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxMenu: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
|
||||
public:
|
||||
wxMenuBar();
|
||||
void Append( wxMenu *menu, const wxString &title );
|
||||
// ctor & dtor
|
||||
wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL);
|
||||
~wxMenu();
|
||||
|
||||
int FindMenuItem( const wxString &menuString, const wxString &itemString ) const;
|
||||
wxMenuItem* FindMenuItemById( int id ) const;
|
||||
|
||||
void Check( int id, bool check );
|
||||
bool Checked( int id ) const;
|
||||
void Enable( int id, bool enable );
|
||||
bool Enabled( int id ) const;
|
||||
inline bool IsEnabled(int Id) const { return Enabled(Id); };
|
||||
inline bool IsChecked(int Id) const { return Checked(Id); };
|
||||
|
||||
int GetMenuCount() const { return m_menus.Number(); }
|
||||
wxMenu *GetMenu(int n) const { return (wxMenu *)m_menus.Nth(n)->Data(); }
|
||||
|
||||
wxList m_menus;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenu
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMenuItem: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuItem)
|
||||
|
||||
public:
|
||||
wxMenuItem();
|
||||
|
||||
// accessors
|
||||
// id
|
||||
void SetId(int id) { m_id = id; }
|
||||
int GetId() const { return m_id; }
|
||||
bool IsSeparator() const { return m_id == ID_SEPARATOR; }
|
||||
|
||||
// the item's text
|
||||
void SetText(const wxString& str);
|
||||
const wxString& GetText() const { return m_text; }
|
||||
|
||||
// what kind of menu item we are
|
||||
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }
|
||||
bool IsCheckable() const { return m_isCheckMenu; }
|
||||
void SetSubMenu(wxMenu *menu) { m_subMenu = menu; }
|
||||
wxMenu *GetSubMenu() const { return m_subMenu; }
|
||||
bool IsSubMenu() const { return m_subMenu != NULL; }
|
||||
|
||||
// state
|
||||
void Enable(bool enable = TRUE) { m_isEnabled = enable; }
|
||||
bool IsEnabled() const { return m_isEnabled; }
|
||||
void Check(bool check = TRUE);
|
||||
bool IsChecked() const;
|
||||
|
||||
// help string (displayed in the status bar by default)
|
||||
void SetHelpString(const wxString& str) { m_helpStr = str; }
|
||||
|
||||
|
||||
private:
|
||||
int m_id;
|
||||
wxString m_text;
|
||||
bool m_isCheckMenu;
|
||||
bool m_isChecked;
|
||||
bool m_isEnabled;
|
||||
wxMenu *m_subMenu;
|
||||
wxString m_helpStr;
|
||||
};
|
||||
|
||||
class wxMenu: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
|
||||
public:
|
||||
// construction
|
||||
wxMenu( const wxString &title = "" );
|
||||
|
||||
// operations
|
||||
// menu creation
|
||||
// construct menu
|
||||
// append items to the menu
|
||||
// separator line
|
||||
void AppendSeparator();
|
||||
void Append(int id, const wxString &item,
|
||||
const wxString &helpStr = "", bool checkable = FALSE);
|
||||
void Append(int id, const wxString &item,
|
||||
wxMenu *subMenu, const wxString &helpStr = "" );
|
||||
void Break() {};
|
||||
// normal item
|
||||
void Append(int id, const wxString& Label, const wxString& helpString = wxEmptyString,
|
||||
bool checkable = FALSE);
|
||||
// a submenu
|
||||
void Append(int id, const wxString& Label, wxMenu *SubMenu,
|
||||
const wxString& helpString = wxEmptyString);
|
||||
// the most generic form (create wxMenuItem first and use it's functions)
|
||||
void Append(wxMenuItem *pItem);
|
||||
// insert a break in the menu
|
||||
void Break();
|
||||
// delete an item
|
||||
void Delete(int id);
|
||||
|
||||
// find item by name/id
|
||||
int FindItem( const wxString itemString ) const;
|
||||
wxMenuItem *FindItem(int id) const;
|
||||
// menu item control
|
||||
void Enable(int id, bool Flag);
|
||||
bool Enabled(int id) const;
|
||||
inline bool IsEnabled(int id) const { return Enabled(id); };
|
||||
void Check(int id, bool Flag);
|
||||
bool Checked(int id) const;
|
||||
inline bool IsChecked(int id) const { return IsChecked(id); };
|
||||
|
||||
// get/set item's state
|
||||
void Enable( int id, bool enable );
|
||||
bool IsEnabled( int id ) const;
|
||||
void Check( int id, bool check );
|
||||
bool IsChecked( int id ) const;
|
||||
// item properties
|
||||
// title
|
||||
void SetTitle(const wxString& label);
|
||||
const wxString& GetTitle() const;
|
||||
// label
|
||||
void SetLabel(int id, const wxString& label);
|
||||
wxString GetLabel(int id) const;
|
||||
// help string
|
||||
virtual void SetHelpString(int id, const wxString& helpString);
|
||||
virtual wxString GetHelpString(int id) const ;
|
||||
|
||||
void SetLabel( int id, const wxString &label );
|
||||
// find item
|
||||
// Finds the item id matching the given string, -1 if not found.
|
||||
virtual int FindItem(const wxString& itemString) const ;
|
||||
// Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL.
|
||||
wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const;
|
||||
|
||||
// accessors
|
||||
wxList& GetItems() { return m_items; }
|
||||
void ProcessCommand(wxCommandEvent& event);
|
||||
inline void Callback(const wxFunction func) { m_callback = func; }
|
||||
|
||||
virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; }
|
||||
inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
||||
inline wxEvtHandler *GetEventHandler() { return m_eventHandler; }
|
||||
|
||||
inline wxList& GetItems() const { return (wxList&) m_menuItems; }
|
||||
|
||||
public:
|
||||
void SetInvokingWindow( wxWindow *win );
|
||||
wxWindow *GetInvokingWindow();
|
||||
wxFunction m_callback;
|
||||
|
||||
wxString m_title;
|
||||
wxList m_items;
|
||||
wxWindow *m_invokingWindow;
|
||||
int m_noItems;
|
||||
wxString m_title;
|
||||
wxMenuBar * m_menuBar;
|
||||
wxList m_menuItems;
|
||||
wxEvtHandler * m_parent;
|
||||
wxEvtHandler * m_eventHandler;
|
||||
};
|
||||
|
||||
#endif // __GTKMENUH__
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu Bar (a la Windows)
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxFrame;
|
||||
class WXDLLEXPORT wxMenuBar: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
|
||||
wxMenuBar();
|
||||
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
|
||||
~wxMenuBar();
|
||||
|
||||
void Append(wxMenu *menu, const wxString& title);
|
||||
// Must only be used AFTER menu has been attached to frame,
|
||||
// otherwise use individual menus to enable/disable items
|
||||
void Enable(int Id, bool Flag);
|
||||
bool Enabled(int Id) const ;
|
||||
inline bool IsEnabled(int Id) const { return Enabled(Id); };
|
||||
void EnableTop(int pos, bool Flag);
|
||||
void Check(int id, bool Flag);
|
||||
bool Checked(int id) const ;
|
||||
inline bool IsChecked(int Id) const { return Checked(Id); };
|
||||
void SetLabel(int id, const wxString& label) ;
|
||||
wxString GetLabel(int id) const ;
|
||||
void SetLabelTop(int pos, const wxString& label) ;
|
||||
wxString GetLabelTop(int pos) const ;
|
||||
virtual void Delete(wxMenu *menu, int index = 0); /* Menu not destroyed */
|
||||
virtual bool OnAppend(wxMenu *menu, const char *title);
|
||||
virtual bool OnDelete(wxMenu *menu, int index);
|
||||
|
||||
virtual void SetHelpString(int Id, const wxString& helpString);
|
||||
virtual wxString GetHelpString(int Id) const ;
|
||||
|
||||
virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ;
|
||||
|
||||
// Find wxMenuItem for item ID, and return item's
|
||||
// menu too if itemMenu is non-NULL.
|
||||
wxMenuItem *FindItemForId(int itemId, wxMenu **menuForItem = NULL) const ;
|
||||
|
||||
inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
||||
inline wxEvtHandler *GetEventHandler() { return m_eventHandler; }
|
||||
|
||||
inline int GetMenuCount() const { return m_menuCount; }
|
||||
inline wxMenu* GetMenu(int i) const { return m_menus[i]; }
|
||||
|
||||
public:
|
||||
wxEvtHandler * m_eventHandler;
|
||||
int m_menuCount;
|
||||
wxMenu ** m_menus;
|
||||
wxString * m_titles;
|
||||
wxFrame * m_menuBarFrame;
|
||||
/* TODO: data that represents the actual menubar when created.
|
||||
*/
|
||||
};
|
||||
|
||||
#endif // _WX_MENU_H_
|
||||
|
@@ -1,41 +1,44 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: notebook.h
|
||||
// Purpose: wxNotebook class
|
||||
// Author: Robert Roebling
|
||||
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __NOTEBOOKH__
|
||||
#define __NOTEBOOKH__
|
||||
#ifndef _WX_NOTEBOOK_H_
|
||||
#define _WX_NOTEBOOK_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "notebook.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/control.h"
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
#include <wx/dynarray.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxImageList;
|
||||
class wxNotebook;
|
||||
class wxNotebookPage;
|
||||
// fwd declarations
|
||||
class WXDLLEXPORT wxImageList;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
|
||||
// array of notebook pages
|
||||
typedef wxWindow wxNotebookPage; // so far, any window can be a page
|
||||
WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// notebook events
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxNotebookEvent : public wxCommandEvent
|
||||
class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; }
|
||||
|
||||
@@ -50,10 +53,13 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebookEvent)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotebook
|
||||
//-----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// @@@ this class should really derive from wxTabCtrl, but the interface is not
|
||||
// exactly the same, so I can't do it right now and instead we reimplement
|
||||
// part of wxTabCtrl here
|
||||
class wxNotebook : public wxControl
|
||||
{
|
||||
public:
|
||||
@@ -63,14 +69,14 @@ public:
|
||||
wxNotebook();
|
||||
// the same arguments as for wxControl (@@@ any special styles?)
|
||||
wxNotebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = "notebook");
|
||||
// Create() function
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
@@ -90,7 +96,7 @@ public:
|
||||
// cycle thru the tabs
|
||||
void AdvanceSelection(bool bForward = TRUE);
|
||||
// get the currently selected page
|
||||
int GetSelection() const;
|
||||
int GetSelection() const { return m_nSelection; }
|
||||
|
||||
// set/get the title of a page
|
||||
bool SetPageText(int nPage, const wxString& strText);
|
||||
@@ -104,7 +110,7 @@ public:
|
||||
// associate image list with a control
|
||||
void SetImageList(wxImageList* imageList);
|
||||
// get pointer (may be NULL) to the associated image list
|
||||
wxImageList* GetImageList() const { return m_imageList; }
|
||||
wxImageList* GetImageList() const { return m_pImageList; }
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
int GetPageImage(int nPage) const;
|
||||
@@ -128,30 +134,46 @@ public:
|
||||
bool DeleteAllPages();
|
||||
// adds a new page to the notebook (it will be deleted ny the notebook,
|
||||
// don't delete it yourself). If bSelect, this page becomes active.
|
||||
bool AddPage(wxWindow *pPage,
|
||||
bool AddPage(wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
// @@@@ VZ: I don't know how to implement InsertPage()
|
||||
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage(int nPage,
|
||||
wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
// get the panel which represents the given page
|
||||
wxWindow *GetPage(int nPage) const;
|
||||
wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
// base class virtuals
|
||||
virtual void AddChild(wxWindow *child);
|
||||
virtual void SetConstraintSizes(bool recurse);
|
||||
virtual bool DoPhase(int phase);
|
||||
// callbacks
|
||||
// ---------
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnSelChange(wxNotebookEvent& event);
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
// base class virtuals
|
||||
// -------------------
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||
virtual bool DoPhase(int nPhase);
|
||||
|
||||
private:
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxImageList* m_imageList;
|
||||
wxList m_pages;
|
||||
// helper functions
|
||||
void ChangePage(int nOldSel, int nSel); // change pages
|
||||
|
||||
wxImageList *m_pImageList; // we can have an associated image list
|
||||
wxArrayPages m_aPages; // array of pages
|
||||
|
||||
int m_nSelection; // the current selection (-1 if none)
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -177,5 +199,4 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
NULL \
|
||||
},
|
||||
|
||||
#endif
|
||||
// __NOTEBOOKH__
|
||||
#endif // _WX_NOTEBOOK_H_
|
||||
|
@@ -1,60 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: palette.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxPalette class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKPALETTEH__
|
||||
#define __GTKPALETTEH__
|
||||
#ifndef _WX_PALETTE_H_
|
||||
#define _WX_PALETTE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "palette.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxPalette;
|
||||
|
||||
class wxPalette;
|
||||
class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxPalette;
|
||||
public:
|
||||
wxPaletteRefData();
|
||||
~wxPaletteRefData();
|
||||
/* TODO: implementation
|
||||
protected:
|
||||
WXHPALETTE m_hPalette;
|
||||
*/
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPalette
|
||||
//-----------------------------------------------------------------------------
|
||||
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
|
||||
|
||||
class wxPalette: public wxGDIObject
|
||||
class WXDLLEXPORT wxPalette: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPalette)
|
||||
|
||||
public:
|
||||
|
||||
wxPalette(void);
|
||||
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
||||
wxPalette( const wxPalette& palette );
|
||||
wxPalette( const wxPalette* palette );
|
||||
~wxPalette(void);
|
||||
wxPalette& operator = ( const wxPalette& palette );
|
||||
bool operator == ( const wxPalette& palette );
|
||||
bool operator != ( const wxPalette& palette );
|
||||
bool Ok(void) const;
|
||||
|
||||
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
|
||||
bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
|
||||
public:
|
||||
wxPalette();
|
||||
inline wxPalette(const wxPalette& palette) { Ref(palette); }
|
||||
inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); }
|
||||
|
||||
// no data
|
||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
~wxPalette();
|
||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
|
||||
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
|
||||
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
|
||||
|
||||
virtual bool FreeResource(bool force = FALSE);
|
||||
/* TODO: implementation
|
||||
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }
|
||||
void SetHPALETTE(WXHPALETTE pal);
|
||||
*/
|
||||
};
|
||||
|
||||
#define wxColorMap wxPalette
|
||||
#define wxColourMap wxPalette
|
||||
|
||||
#endif // __GTKPALETTEH__
|
||||
#endif
|
||||
// _WX_PALETTE_H_
|
||||
|
@@ -1,68 +1,102 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxPen class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKPENH__
|
||||
#define __GTKPENH__
|
||||
#ifndef _WX_PEN_H_
|
||||
#define _WX_PEN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "pen.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef WXDWORD wxDash ;
|
||||
|
||||
class wxPen;
|
||||
class WXDLLEXPORT wxPen;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPen
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxPen: public wxGDIObject
|
||||
class WXDLLEXPORT wxPenRefData: public wxGDIRefData
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
friend class WXDLLEXPORT wxPen;
|
||||
public:
|
||||
wxPenRefData();
|
||||
wxPenRefData(const wxPenRefData& data);
|
||||
~wxPenRefData();
|
||||
|
||||
public:
|
||||
|
||||
wxPen(void);
|
||||
wxPen( const wxColour &colour, int width, int style );
|
||||
wxPen( const wxString &colourName, int width, int style );
|
||||
wxPen( const wxPen& pen );
|
||||
wxPen( const wxPen* pen );
|
||||
~wxPen(void);
|
||||
wxPen& operator = ( const wxPen& pen );
|
||||
bool operator == ( const wxPen& pen );
|
||||
bool operator != ( const wxPen& pen );
|
||||
|
||||
void SetColour( const wxColour &colour );
|
||||
void SetColour( const wxString &colourName );
|
||||
void SetColour( int red, int green, int blue );
|
||||
void SetCap( int capStyle );
|
||||
void SetJoin( int joinStyle );
|
||||
void SetStyle( int style );
|
||||
void SetWidth( int width );
|
||||
wxColour &GetColour(void) const;
|
||||
int GetCap(void) const;
|
||||
int GetJoin(void) const;
|
||||
int GetStyle(void) const;
|
||||
int GetWidth(void) const;
|
||||
bool Ok(void) const;
|
||||
|
||||
// no data :-)
|
||||
protected:
|
||||
int m_width;
|
||||
int m_style;
|
||||
int m_join ;
|
||||
int m_cap ;
|
||||
wxBitmap m_stipple ;
|
||||
int m_nbDash ;
|
||||
wxDash * m_dash ;
|
||||
wxColour m_colour;
|
||||
/* TODO: implementation
|
||||
WXHPEN m_hPen;
|
||||
*/
|
||||
};
|
||||
|
||||
#endif // __GTKPENH__
|
||||
#define M_PENDATA ((wxPenRefData *)m_refData)
|
||||
|
||||
// Pen
|
||||
class WXDLLEXPORT wxPen: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
public:
|
||||
wxPen();
|
||||
wxPen(const wxColour& col, int width, int style);
|
||||
wxPen(const wxString& col, int width, int style);
|
||||
wxPen(const wxBitmap& stipple, int width);
|
||||
inline wxPen(const wxPen& pen) { Ref(pen); }
|
||||
inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
|
||||
~wxPen();
|
||||
|
||||
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
|
||||
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
|
||||
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(const wxString& col) ;
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
|
||||
void SetWidth(int width) ;
|
||||
void SetStyle(int style) ;
|
||||
void SetStipple(const wxBitmap& stipple) ;
|
||||
void SetDashes(int nb_dashes, const wxDash *dash) ;
|
||||
void SetJoin(int join) ;
|
||||
void SetCap(int cap) ;
|
||||
|
||||
inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
|
||||
inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
|
||||
inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
|
||||
inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
|
||||
inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
|
||||
inline int GetDashes(wxDash **ptr) const {
|
||||
*ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
|
||||
}
|
||||
|
||||
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); };
|
||||
|
||||
// Implementation
|
||||
|
||||
// Useful helper: create the brush resource
|
||||
void RealizeResource();
|
||||
|
||||
// When setting properties, we must make sure we're not changing
|
||||
// another object
|
||||
void Unshare();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PEN_H_
|
||||
|
@@ -1,80 +1,88 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxRadioBox class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKRADIOBOXH__
|
||||
#define __GTKRADIOBOXH__
|
||||
#ifndef _WX_RADIOBOX_H_
|
||||
#define _WX_RADIOBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "radiobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
||||
|
||||
class wxRadioBox;
|
||||
// List box item
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxRadioBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxRadioBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxRadioBox: public wxControl
|
||||
class WXDLLEXPORT wxRadioBox: public wxControl
|
||||
{
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
public:
|
||||
wxRadioBox();
|
||||
|
||||
inline 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_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
}
|
||||
|
||||
~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_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
int FindString(const wxString& s) const;
|
||||
void SetSelection(int N);
|
||||
int GetSelection() const;
|
||||
wxString GetString(int N) const;
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void GetSize(int *x, int *y) const;
|
||||
void GetPosition(int *x, int *y) const;
|
||||
wxString GetLabel() const;
|
||||
void SetLabel(const wxString& label);
|
||||
void SetLabel(int item, const wxString& label) ;
|
||||
wxString GetLabel(int item) const;
|
||||
bool Show(bool show);
|
||||
void SetFocus();
|
||||
void Enable(bool enable);
|
||||
void Enable(int item, bool enable);
|
||||
void Show(int item, bool show) ;
|
||||
inline void SetLabelFont(const wxFont& WXUNUSED(font)) {};
|
||||
inline void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
inline virtual int Number() const { return m_noItems; } ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
public:
|
||||
|
||||
wxRadioBox(void);
|
||||
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_HORIZONTAL,
|
||||
const wxString &name = wxRadioBoxNameStr );
|
||||
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_HORIZONTAL,
|
||||
const wxString &name = wxRadioBoxNameStr );
|
||||
int FindString( const wxString& s) const;
|
||||
void SetSelection( int n );
|
||||
int GetSelection(void) const;
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetLabel(void) const;
|
||||
void SetLabel( const wxString& label );
|
||||
void SetLabel( int item, const wxString& label );
|
||||
void SetLabel( int item, wxBitmap *bitmap );
|
||||
wxString GetLabel( int item ) const;
|
||||
bool Show( bool show );
|
||||
void Enable( bool enable );
|
||||
void Enable( int item, bool enable );
|
||||
void Show( int item, bool show );
|
||||
virtual wxString GetStringSelection(void) const;
|
||||
virtual bool SetStringSelection( const wxString& s );
|
||||
virtual int Number(void) const;
|
||||
int GetNumberOfRowsOrCols(void) const;
|
||||
void SetNumberOfRowsOrCols( int n );
|
||||
|
||||
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||
|
||||
protected:
|
||||
/* TODO: implementation
|
||||
WXHWND * m_radioButtons;
|
||||
*/
|
||||
int m_majorDim ;
|
||||
int m_noItems;
|
||||
int m_noRowsOrCols;
|
||||
int m_selectedButton;
|
||||
|
||||
};
|
||||
|
||||
#endif // __GTKRADIOBOXH__
|
||||
#endif
|
||||
// _WX_RADIOBOX_H_
|
||||
|
@@ -1,31 +1,92 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobut.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Purpose: wxRadioButton class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKRADIOBUTTONH__
|
||||
#define __GTKRADIOBUTTONH__
|
||||
#ifndef _WX_RADIOBUT_H_
|
||||
#define _WX_RADIOBUT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "radiobut.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr;
|
||||
|
||||
class wxRadioButton;
|
||||
class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioButton)
|
||||
protected:
|
||||
public:
|
||||
inline wxRadioButton() {}
|
||||
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 = 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 = wxRadioButtonNameStr);
|
||||
|
||||
#endif // __GTKRADIOBUTTONH__
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void SetValue(bool val);
|
||||
virtual bool GetValue() const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
// Not implemented
|
||||
#if 0
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
|
||||
|
||||
class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
|
||||
protected:
|
||||
wxBitmap *theButtonBitmap;
|
||||
public:
|
||||
inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
|
||||
inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr);
|
||||
|
||||
virtual void SetLabel(const wxBitmap *label);
|
||||
virtual void SetValue(bool val) ;
|
||||
virtual bool GetValue() const ;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_RADIOBUT_H_
|
||||
|
@@ -1,37 +1,29 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: region.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxRegion class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __REGIONH__
|
||||
#define __REGIONH__
|
||||
#ifndef _WX_REGION_H_
|
||||
#define _WX_REGION_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "region.h"
|
||||
#endif
|
||||
|
||||
#include "wx/list.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxRect;
|
||||
class WXDLLEXPORT wxPoint;
|
||||
|
||||
class wxRegion;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum wxRegionContain
|
||||
{
|
||||
wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2
|
||||
enum wxRegionContain {
|
||||
wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2
|
||||
};
|
||||
|
||||
// So far, for internal use only
|
||||
@@ -43,54 +35,106 @@ wxRGN_OR, // Creates the union of two combined regions.
|
||||
wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas.
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxRegion
|
||||
//-----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxRegion : public wxGDIObject {
|
||||
DECLARE_DYNAMIC_CLASS(wxRegion);
|
||||
friend class WXDLLEXPORT wxRegionIterator;
|
||||
public:
|
||||
wxRegion(long x, long y, long w, long h);
|
||||
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
|
||||
wxRegion(const wxRect& rect);
|
||||
|
||||
class wxRegion : public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRegion);
|
||||
|
||||
public:
|
||||
|
||||
wxRegion( long x, long y, long w, long h );
|
||||
wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight );
|
||||
wxRegion( const wxRect& rect );
|
||||
wxRegion(void);
|
||||
~wxRegion(void);
|
||||
/* TODO: implementation
|
||||
wxRegion(WXHRGN hRegion); // Hangs on to this region
|
||||
*/
|
||||
|
||||
inline wxRegion( const wxRegion& r )
|
||||
{ Ref(r); }
|
||||
inline wxRegion& operator = ( const wxRegion& r )
|
||||
{ Ref(r); return (*this); }
|
||||
wxRegion();
|
||||
~wxRegion();
|
||||
|
||||
void Clear(void);
|
||||
//# Copying
|
||||
inline wxRegion(const wxRegion& r)
|
||||
{ Ref(r); }
|
||||
inline wxRegion& operator = (const wxRegion& r)
|
||||
{ Ref(r); return (*this); }
|
||||
|
||||
bool Union( long x, long y, long width, long height );
|
||||
bool Union( const wxRect& rect );
|
||||
bool Union( const wxRegion& region );
|
||||
//# Modify region
|
||||
// Clear current region
|
||||
void Clear();
|
||||
|
||||
bool Intersect( long x, long y, long width, long height );
|
||||
bool Intersect( const wxRect& rect );
|
||||
bool Intersect( const wxRegion& region );
|
||||
// Union rectangle or region with this.
|
||||
inline bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); }
|
||||
inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); }
|
||||
inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); }
|
||||
|
||||
bool Subtract( long x, long y, long width, long height );
|
||||
bool Subtract( const wxRect& rect );
|
||||
bool Subtract( const wxRegion& region );
|
||||
// Intersect rectangle or region with this.
|
||||
inline bool Intersect(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_AND); }
|
||||
inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); }
|
||||
inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); }
|
||||
|
||||
bool Xor( long x, long y, long width, long height );
|
||||
bool Xor( const wxRect& rect );
|
||||
bool Xor( const wxRegion& region );
|
||||
// Subtract rectangle or region from this:
|
||||
// Combines the parts of 'this' that are not part of the second region.
|
||||
inline bool Subtract(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_DIFF); }
|
||||
inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); }
|
||||
inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); }
|
||||
|
||||
void GetBox( long& x, long& y, long&w, long &h ) const;
|
||||
wxRect GetBox(void) const ;
|
||||
// XOR: the union of two combined regions except for any overlapping areas.
|
||||
inline bool Xor(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_XOR); }
|
||||
inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); }
|
||||
inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); }
|
||||
|
||||
bool Empty(void) const;
|
||||
//# Information on region
|
||||
// Outer bounds of region
|
||||
void GetBox(long& x, long& y, long&w, long &h) const;
|
||||
wxRect GetBox() const ;
|
||||
|
||||
wxRegionContain Contains( long x, long y ) const;
|
||||
wxRegionContain Contains( long x, long y, long w, long h ) const;
|
||||
|
||||
// Is region empty?
|
||||
bool Empty() const;
|
||||
inline bool IsEmpty() const { return Empty(); }
|
||||
|
||||
//# Tests
|
||||
// Does the region contain the point (x,y)?
|
||||
wxRegionContain Contains(long x, long y) const;
|
||||
// Does the region contain the point pt?
|
||||
wxRegionContain Contains(const wxPoint& pt) const;
|
||||
// Does the region contain the rectangle (x, y, w, h)?
|
||||
wxRegionContain Contains(long x, long y, long w, long h) const;
|
||||
// Does the region contain the rectangle rect?
|
||||
wxRegionContain Contains(const wxRect& rect) const;
|
||||
|
||||
// Internal
|
||||
bool Combine(long x, long y, long width, long height, wxRegionOp op);
|
||||
bool Combine(const wxRegion& region, wxRegionOp op);
|
||||
bool Combine(const wxRect& rect, wxRegionOp op);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxRegionIterator : public wxObject {
|
||||
DECLARE_DYNAMIC_CLASS(wxRegionIterator);
|
||||
public:
|
||||
wxRegionIterator();
|
||||
wxRegionIterator(const wxRegion& region);
|
||||
~wxRegionIterator();
|
||||
|
||||
void Reset() { m_current = 0; }
|
||||
void Reset(const wxRegion& region);
|
||||
|
||||
operator bool () const { return m_current < m_numRects; }
|
||||
bool HaveRects() const { return m_current < m_numRects; }
|
||||
|
||||
void operator ++ ();
|
||||
void operator ++ (int);
|
||||
|
||||
long GetX() const;
|
||||
long GetY() const;
|
||||
long GetW() const;
|
||||
long GetWidth() const { return GetW(); }
|
||||
long GetH() const;
|
||||
long GetHeight() const { return GetH(); }
|
||||
|
||||
private:
|
||||
long m_current;
|
||||
long m_numRects;
|
||||
wxRegion m_region;
|
||||
wxRect* m_rects;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __REGIONH__
|
||||
// _WX_REGION_H_
|
||||
|
@@ -1,78 +1,68 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: scrolbar.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Name: scrollbar.h
|
||||
// Purpose: wxScrollBar class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSCROLLBARH__
|
||||
#define __GTKSCROLLBARH__
|
||||
#ifndef _WX_SCROLBAR_H_
|
||||
#define _WX_SCROLBAR_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "scrolbar.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr;
|
||||
|
||||
class wxScrollBar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxScrollBarNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxScrollBar
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxScrollBar: public wxControl
|
||||
// Scrollbar item
|
||||
class WXDLLEXPORT wxScrollBar: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
||||
|
||||
public:
|
||||
|
||||
wxScrollBar(void) { };
|
||||
wxScrollBar(wxWindow *parent, wxWindowID id,
|
||||
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 wxString& name = wxScrollBarNameStr );
|
||||
~wxScrollBar(void);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = 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 = wxScrollBarNameStr);
|
||||
int GetPosition(void) const;
|
||||
int GetThumbSize() const;
|
||||
int GetPageSize() const;
|
||||
int GetRange() const;
|
||||
virtual void SetPosition( int viewStart );
|
||||
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
||||
bool refresh = TRUE );
|
||||
|
||||
// Backward compatibility
|
||||
int GetValue(void) const;
|
||||
void SetValue( int viewStart );
|
||||
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
|
||||
int GetViewLength() const;
|
||||
int GetObjectLength() const;
|
||||
void SetPageSize( int pageLength );
|
||||
void SetObjectLength( int objectLength );
|
||||
void SetViewLength( int viewLength );
|
||||
int GetPosition() const ;
|
||||
inline int GetThumbSize() const { return m_pageSize; }
|
||||
inline int GetPageSize() const { return m_viewSize; }
|
||||
inline int GetRange() const { return m_objectSize; }
|
||||
|
||||
virtual void SetPosition(int viewStart);
|
||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||
bool refresh = TRUE);
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
protected:
|
||||
int m_pageSize;
|
||||
int m_viewSize;
|
||||
int m_objectSize;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GTKSCROLLBARH__
|
||||
// _WX_SCROLBAR_H_
|
||||
|
@@ -1,30 +1,119 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: settings.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxSystemSettings class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSETTINGSH__
|
||||
#define __GTKSETTINGSH__
|
||||
#ifndef _WX_SETTINGS_H_
|
||||
#define _WX_SETTINGS_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "settings.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/pen.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/setup.h"
|
||||
|
||||
#define wxSYS_WHITE_BRUSH 0
|
||||
#define wxSYS_LTGRAY_BRUSH 1
|
||||
#define wxSYS_GRAY_BRUSH 2
|
||||
#define wxSYS_DKGRAY_BRUSH 3
|
||||
#define wxSYS_BLACK_BRUSH 4
|
||||
#define wxSYS_NULL_BRUSH 5
|
||||
#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH
|
||||
#define wxSYS_WHITE_PEN 6
|
||||
#define wxSYS_BLACK_PEN 7
|
||||
#define wxSYS_NULL_PEN 8
|
||||
#define wxSYS_OEM_FIXED_FONT 10
|
||||
#define wxSYS_ANSI_FIXED_FONT 11
|
||||
#define wxSYS_ANSI_VAR_FONT 12
|
||||
#define wxSYS_SYSTEM_FONT 13
|
||||
#define wxSYS_DEVICE_DEFAULT_FONT 14
|
||||
#define wxSYS_DEFAULT_PALETTE 15
|
||||
#define wxSYS_SYSTEM_FIXED_FONT 16 // Obsolete
|
||||
#define wxSYS_DEFAULT_GUI_FONT 17
|
||||
|
||||
#define wxSYS_COLOUR_SCROLLBAR 0
|
||||
#define wxSYS_COLOUR_BACKGROUND 1
|
||||
#define wxSYS_COLOUR_ACTIVECAPTION 2
|
||||
#define wxSYS_COLOUR_INACTIVECAPTION 3
|
||||
#define wxSYS_COLOUR_MENU 4
|
||||
#define wxSYS_COLOUR_WINDOW 5
|
||||
#define wxSYS_COLOUR_WINDOWFRAME 6
|
||||
#define wxSYS_COLOUR_MENUTEXT 7
|
||||
#define wxSYS_COLOUR_WINDOWTEXT 8
|
||||
#define wxSYS_COLOUR_CAPTIONTEXT 9
|
||||
#define wxSYS_COLOUR_ACTIVEBORDER 10
|
||||
#define wxSYS_COLOUR_INACTIVEBORDER 11
|
||||
#define wxSYS_COLOUR_APPWORKSPACE 12
|
||||
#define wxSYS_COLOUR_HIGHLIGHT 13
|
||||
#define wxSYS_COLOUR_HIGHLIGHTTEXT 14
|
||||
#define wxSYS_COLOUR_BTNFACE 15
|
||||
#define wxSYS_COLOUR_BTNSHADOW 16
|
||||
#define wxSYS_COLOUR_GRAYTEXT 17
|
||||
#define wxSYS_COLOUR_BTNTEXT 18
|
||||
#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19
|
||||
#define wxSYS_COLOUR_BTNHIGHLIGHT 20
|
||||
|
||||
#define wxSYS_COLOUR_3DDKSHADOW 21
|
||||
#define wxSYS_COLOUR_3DLIGHT 22
|
||||
#define wxSYS_COLOUR_INFOTEXT 23
|
||||
#define wxSYS_COLOUR_INFOBK 24
|
||||
|
||||
#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND
|
||||
#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE
|
||||
#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW
|
||||
#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
|
||||
// Metrics
|
||||
#define wxSYS_MOUSE_BUTTONS 1
|
||||
#define wxSYS_BORDER_X 2
|
||||
#define wxSYS_BORDER_Y 3
|
||||
#define wxSYS_CURSOR_X 4
|
||||
#define wxSYS_CURSOR_Y 5
|
||||
#define wxSYS_DCLICK_X 6
|
||||
#define wxSYS_DCLICK_Y 7
|
||||
#define wxSYS_DRAG_X 8
|
||||
#define wxSYS_DRAG_Y 9
|
||||
#define wxSYS_EDGE_X 10
|
||||
#define wxSYS_EDGE_Y 11
|
||||
#define wxSYS_HSCROLL_ARROW_X 12
|
||||
#define wxSYS_HSCROLL_ARROW_Y 13
|
||||
#define wxSYS_HTHUMB_X 14
|
||||
#define wxSYS_ICON_X 15
|
||||
#define wxSYS_ICON_Y 16
|
||||
#define wxSYS_ICONSPACING_X 17
|
||||
#define wxSYS_ICONSPACING_Y 18
|
||||
#define wxSYS_WINDOWMIN_X 19
|
||||
#define wxSYS_WINDOWMIN_Y 20
|
||||
#define wxSYS_SCREEN_X 21
|
||||
#define wxSYS_SCREEN_Y 22
|
||||
#define wxSYS_FRAMESIZE_X 23
|
||||
#define wxSYS_FRAMESIZE_Y 24
|
||||
#define wxSYS_SMALLICON_X 25
|
||||
#define wxSYS_SMALLICON_Y 26
|
||||
#define wxSYS_HSCROLL_Y 27
|
||||
#define wxSYS_VSCROLL_X 28
|
||||
#define wxSYS_VSCROLL_ARROW_X 29
|
||||
#define wxSYS_VSCROLL_ARROW_Y 30
|
||||
#define wxSYS_VTHUMB_Y 31
|
||||
#define wxSYS_CAPTION_Y 32
|
||||
#define wxSYS_MENU_Y 33
|
||||
#define wxSYS_NETWORK_PRESENT 34
|
||||
#define wxSYS_PENWINDOWS_PRESENT 35
|
||||
#define wxSYS_SHOW_SOUNDS 36
|
||||
#define wxSYS_SWAP_BUTTONS 37
|
||||
|
||||
class WXDLLEXPORT wxSystemSettings: public wxObject
|
||||
{
|
||||
public:
|
||||
inline wxSystemSettings(void) {}
|
||||
inline wxSystemSettings() {}
|
||||
|
||||
// Get a system colour
|
||||
static wxColour GetSystemColour(int index);
|
||||
@@ -37,4 +126,4 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GTKSETTINGSH__
|
||||
// _WX_SETTINGS_H_
|
||||
|
@@ -1,86 +1,91 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: slider.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxSlider class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSLIDERH__
|
||||
#define __GTKSLIDERH__
|
||||
#ifndef _WX_SLIDER_H_
|
||||
#define _WX_SLIDER_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "slider.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||
|
||||
class wxSlider;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxSliderNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxSlider
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxSlider: public wxControl
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSlider: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
|
||||
public:
|
||||
wxSlider(void);
|
||||
wxSlider( wxWindow *parent, wxWindowID id,
|
||||
public:
|
||||
wxSlider();
|
||||
|
||||
inline 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 = wxSliderNameStr);
|
||||
~wxSlider(void);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
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,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
/* const wxValidator& validator = wxDefaultValidator, */
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
virtual int GetValue(void) const;
|
||||
virtual void SetValue( int );
|
||||
void GetSize( int *x, int *y ) const;
|
||||
void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
||||
void GetPosition( int *x, int *y ) const;
|
||||
void SetRange( int minValue, int maxValue );
|
||||
int GetMin(void) const;
|
||||
int GetMax(void) const;
|
||||
void SetTickFreq( int n, int pos );
|
||||
int GetTickFreq(void) const;
|
||||
void SetPageSize( int pageSize );
|
||||
int GetPageSize(void) const;
|
||||
void ClearSel(void);
|
||||
void ClearTicks(void);
|
||||
void SetLineSize( int lineSize );
|
||||
int GetLineSize(void) const;
|
||||
int GetSelEnd(void) const;
|
||||
int GetSelStart(void) const;
|
||||
void SetSelection( int minPos, int maxPos );
|
||||
void SetThumbLength( int len );
|
||||
int GetThumbLength(void) const;
|
||||
void SetTick( int tickPos );
|
||||
|
||||
|
||||
virtual int GetValue() const ;
|
||||
virtual void SetValue(int);
|
||||
void GetSize(int *x, int *y) const ;
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
bool Show(bool show);
|
||||
|
||||
void SetRange(int minValue, int maxValue);
|
||||
|
||||
inline int GetMin() const { return m_rangeMin; }
|
||||
inline int GetMax() const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetTickFreq(int n, int pos);
|
||||
inline int GetTickFreq() const { return m_tickFreq; }
|
||||
void SetPageSize(int pageSize);
|
||||
int GetPageSize() const ;
|
||||
void ClearSel() ;
|
||||
void ClearTicks() ;
|
||||
void SetLineSize(int lineSize);
|
||||
int GetLineSize() const ;
|
||||
int GetSelEnd() const ;
|
||||
int GetSelStart() const ;
|
||||
void SetSelection(int minPos, int maxPos);
|
||||
void SetThumbLength(int len) ;
|
||||
int GetThumbLength() const ;
|
||||
void SetTick(int tickPos) ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
protected:
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKSLIDERH__
|
||||
#endif
|
||||
// _WX_SLIDER_H_
|
||||
|
@@ -1,60 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: statbmp.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxStaticBitmap class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSTATICBITMAPH__
|
||||
#define __GTKSTATICBITMAPH__
|
||||
#ifndef _WX_STATBMP_H_
|
||||
#define _WX_STATBMP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "statbmp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
||||
|
||||
class wxStaticBitmap;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char* wxStaticBitmapNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticBitmap
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxStaticBitmap: public wxControl
|
||||
class WXDLLEXPORT wxStaticBitmap: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
|
||||
public:
|
||||
|
||||
wxStaticBitmap(void);
|
||||
wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = wxStaticBitmapNameStr );
|
||||
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 );
|
||||
wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
|
||||
public:
|
||||
inline wxStaticBitmap() { }
|
||||
|
||||
inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr)
|
||||
{
|
||||
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 void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
||||
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
|
||||
protected:
|
||||
wxBitmap m_messageBitmap;
|
||||
|
||||
private:
|
||||
|
||||
wxBitmap m_bitmap;
|
||||
};
|
||||
|
||||
#endif // __GTKSTATICBITMAPH__
|
||||
#endif
|
||||
// _WX_STATBMP_H_
|
||||
|
@@ -1,55 +1,57 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stabox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Name: statbox.h
|
||||
// Purpose: wxStaticBox class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSTATICBOXH__
|
||||
#define __GTKSTATICBOXH__
|
||||
#ifndef _WX_STATBOX_H_
|
||||
#define _WX_STATBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "statbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
|
||||
|
||||
class wxStaticBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxStaticBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxStaticBox: public wxControl
|
||||
// Group box
|
||||
class WXDLLEXPORT wxStaticBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
|
||||
public:
|
||||
public:
|
||||
inline wxStaticBox() {}
|
||||
inline wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
wxStaticBox(void);
|
||||
wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxStaticBoxNameStr );
|
||||
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 void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetLabel(const wxString& label);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKSTATICBOXH__
|
||||
#endif
|
||||
// _WX_STATBOX_H_
|
||||
|
@@ -1,57 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stattext.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxStaticText class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKSTATICTEXTH__
|
||||
#define __GTKSTATICTEXTH__
|
||||
#ifndef _WX_STATTEXT_H_
|
||||
#define _WX_STATTEXT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "stattext.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr;
|
||||
|
||||
class wxStaticText;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxStaticTextNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticText
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxStaticText: public wxControl
|
||||
class WXDLLEXPORT wxStaticText: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
public:
|
||||
inline wxStaticText() { }
|
||||
|
||||
public:
|
||||
inline wxStaticText(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticTextNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
wxStaticText(void);
|
||||
wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxStaticTextNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxStaticTextNameStr );
|
||||
wxString GetLabel(void) const;
|
||||
void SetLabel( const wxString &label );
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticTextNameStr);
|
||||
|
||||
// accessors
|
||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
void SetLabel(const wxString&);
|
||||
|
||||
// operations
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
};
|
||||
|
||||
#endif // __GTKSTATICTEXTH__
|
||||
#endif
|
||||
// _WX_STATTEXT_H_
|
||||
|
@@ -1,24 +1,21 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: textctrl.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxTextCtrl class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKTEXTCTRLH__
|
||||
#define __GTKTEXTCTRLH__
|
||||
#ifndef _WX_TEXTCTRL_H_
|
||||
#define _WX_TEXTCTRL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "textctrl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
#if USE_IOSTREAMH
|
||||
@@ -27,82 +24,116 @@
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
class wxTextCtrl;
|
||||
// Single-line text item
|
||||
class WXDLLEXPORT wxTextCtrl: public wxControl
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
// TODO Some platforms/compilers don't like inheritance from streambuf.
|
||||
|
||||
extern const char *wxTextCtrlNameStr;
|
||||
#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__)
|
||||
#define NO_TEXT_WINDOW_STREAM
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTextCtrl
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
, public streambuf
|
||||
#endif
|
||||
|
||||
class wxTextCtrl: public wxControl, public streambuf
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||
|
||||
public:
|
||||
wxTextCtrl();
|
||||
wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "",
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
int style = 0, const wxString &name = wxTextCtrlNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "",
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
int style = 0, const wxString &name = wxTextCtrlNameStr );
|
||||
wxString GetValue() const;
|
||||
void SetValue( const wxString &value );
|
||||
void WriteText( const wxString &text );
|
||||
// creation
|
||||
// --------
|
||||
wxTextCtrl();
|
||||
inline wxTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTextCtrlNameStr)
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
:streambuf()
|
||||
#endif
|
||||
{
|
||||
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 = wxTextCtrlNameStr);
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
virtual wxString GetValue() const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
bool LoadFile( const wxString &file );
|
||||
bool SaveFile( const wxString &file );
|
||||
bool IsModified() const { return m_modified; }
|
||||
void SetModified() { m_modified = TRUE; }
|
||||
void DiscardEdits() { m_modified = FALSE; }
|
||||
/*
|
||||
wxString GetLineText( long lineNo ) const;
|
||||
void OnDropFiles( wxDropFilesEvent &event );
|
||||
long PositionToXY( long pos, long *x, long *y ) const;
|
||||
long XYToPosition( long x, long y );
|
||||
int GetNumberOfLines();
|
||||
*/
|
||||
virtual void SetInsertionPoint( long pos );
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual void SetEditable( bool editable );
|
||||
virtual void SetSelection( long from, long to );
|
||||
void ShowPosition( long pos );
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual long GetLastPosition() const;
|
||||
virtual void Remove( long from, long to );
|
||||
virtual void Replace( long from, long to, const wxString &value );
|
||||
void Cut();
|
||||
void Copy();
|
||||
void Paste();
|
||||
void Delete();
|
||||
virtual int GetLineLength(long lineNo) const;
|
||||
virtual wxString GetLineText(long lineNo) const;
|
||||
virtual int GetNumberOfLines() const;
|
||||
|
||||
void OnChar( wxKeyEvent &event );
|
||||
// operations
|
||||
// ----------
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const ;
|
||||
virtual long GetLastPosition() const ;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
// streambuf implementation
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
int overflow(int i);
|
||||
int sync();
|
||||
int underflow();
|
||||
#endif
|
||||
|
||||
wxTextCtrl& operator<<(const wxString& s);
|
||||
wxTextCtrl& operator<<(int i);
|
||||
wxTextCtrl& operator<<(long i);
|
||||
wxTextCtrl& operator<<(float f);
|
||||
wxTextCtrl& operator<<(double d);
|
||||
wxTextCtrl& operator<<(const char c);
|
||||
|
||||
virtual bool LoadFile(const wxString& file);
|
||||
virtual bool SaveFile(const wxString& file);
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void DiscardEdits();
|
||||
virtual bool IsModified() const;
|
||||
|
||||
virtual long XYToPosition(long x, long y) const ;
|
||||
virtual void PositionToXY(long pos, long *x, long *y) const ;
|
||||
virtual void ShowPosition(long pos);
|
||||
virtual void Clear();
|
||||
|
||||
// callbacks
|
||||
// ---------
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
void OnChar(wxKeyEvent& event); // Process 'enter' if required
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
// Implementation
|
||||
// --------------
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
int overflow(int i);
|
||||
int sync();
|
||||
int underflow();
|
||||
|
||||
wxTextCtrl& operator<<(const wxString& s);
|
||||
wxTextCtrl& operator<<(int i);
|
||||
wxTextCtrl& operator<<(long i);
|
||||
wxTextCtrl& operator<<(float f);
|
||||
wxTextCtrl& operator<<(double d);
|
||||
wxTextCtrl& operator<<(const char c);
|
||||
|
||||
private:
|
||||
bool m_modified;
|
||||
protected:
|
||||
wxString m_fileName;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKTEXTCTRLH__
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_TEXTCTRL_H_
|
||||
|
@@ -1,52 +1,57 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: timer.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Purpose: wxTimer class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKTIMERH__
|
||||
#define __GTKTIMERH__
|
||||
#ifndef _WX_TIMER_H_
|
||||
#define _WX_TIMER_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "timer.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// derived classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxTimer;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTimer
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxTimer: public wxObject
|
||||
class WXDLLEXPORT wxTimer: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTimer)
|
||||
|
||||
public:
|
||||
public:
|
||||
wxTimer();
|
||||
~wxTimer();
|
||||
virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
|
||||
virtual void Stop(); // Stop timer
|
||||
virtual void Notify() = 0; // Override this member
|
||||
inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop)
|
||||
|
||||
protected:
|
||||
bool m_oneShot ;
|
||||
int m_milli ;
|
||||
int m_lastMilli ;
|
||||
long m_id;
|
||||
|
||||
wxTimer(void);
|
||||
~wxTimer(void);
|
||||
int Interval(void);
|
||||
bool OneShot(void);
|
||||
virtual void Notify(void);
|
||||
void Start( int millisecs = -1, bool oneShot = FALSE );
|
||||
void Stop(void);
|
||||
|
||||
private:
|
||||
|
||||
int m_time;
|
||||
bool m_oneShot;
|
||||
};
|
||||
|
||||
#endif // __GTKTIMERH__
|
||||
/* Note: these are implemented in common/timercmn.cpp, so need to implement them separately.
|
||||
* But you may need to modify timercmn.cpp.
|
||||
*/
|
||||
|
||||
// Timer functions (milliseconds)
|
||||
void WXDLLEXPORT wxStartTimer();
|
||||
// Gets time since last wxStartTimer or wxGetElapsedTime
|
||||
long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
|
||||
|
||||
// EXPERIMENTAL: comment this out if it doesn't compile.
|
||||
bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
|
||||
|
||||
// Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
|
||||
long WXDLLEXPORT wxGetCurrentTime();
|
||||
|
||||
#endif
|
||||
// _WX_TIMER_H_
|
||||
|
@@ -1,252 +1,547 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: window.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Purpose: wxWindow class
|
||||
// Author: AUTHOR
|
||||
// Modified by:
|
||||
// Created: ??/??/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) AUTHOR
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKWINDOWH__
|
||||
#define __GTKWINDOWH__
|
||||
#ifndef _WX_WINDOW_H_
|
||||
#define _WX_WINDOW_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "window.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/validate.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/cursor.h"
|
||||
#include "wx/pen.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/validate.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/region.h"
|
||||
#include "wx/dnd.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
#define wxKEY_SHIFT 1
|
||||
#define wxKEY_CTRL 2
|
||||
|
||||
extern const char *wxFrameNameStr;
|
||||
extern wxList wxTopLevelWindows;
|
||||
/*
|
||||
* Base class for frame, panel, canvas, panel items, dialog box.
|
||||
*
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* Event handler: windows have themselves as their event handlers
|
||||
* by default, but their event handlers could be set to another
|
||||
* object entirely. This separation can reduce the amount of
|
||||
* derivation required, and allow alteration of a window's functionality
|
||||
* (e.g. by a resource editor that temporarily switches event handlers).
|
||||
*/
|
||||
|
||||
class wxLayoutConstraints;
|
||||
class wxSizer;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
class WXDLLEXPORT wxEvent;
|
||||
class WXDLLEXPORT wxCommandEvent;
|
||||
class WXDLLEXPORT wxKeyEvent;
|
||||
class WXDLLEXPORT wxControl;
|
||||
class WXDLLEXPORT wxCursor;
|
||||
class WXDLLEXPORT wxColourMap;
|
||||
class WXDLLEXPORT wxFont;
|
||||
class WXDLLEXPORT wxMenu;
|
||||
class WXDLLEXPORT wxRectangle;
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxSizer;
|
||||
class WXDLLEXPORT wxList;
|
||||
class WXDLLEXPORT wxLayoutConstraints;
|
||||
class WXDLLEXPORT wxMouseEvent;
|
||||
class WXDLLEXPORT wxButton;
|
||||
class WXDLLEXPORT wxColour;
|
||||
class WXDLLEXPORT wxBrush;
|
||||
class WXDLLEXPORT wxPen;
|
||||
class WXDLLEXPORT wxIcon;
|
||||
class WXDLLEXPORT wxDC;
|
||||
class WXDLLEXPORT wxValidator;
|
||||
|
||||
class wxWindow;
|
||||
class wxCanvas;
|
||||
#if USE_DRAG_AND_DROP
|
||||
class WXDLLEXPORT wxDropTarget;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
#if USE_WX_RESOURCES
|
||||
class WXDLLEXPORT wxResourceTable;
|
||||
class WXDLLEXPORT wxItemResource;
|
||||
#endif
|
||||
|
||||
extern const char *wxPanelNameStr;
|
||||
extern const wxSize wxDefaultSize;
|
||||
extern const wxPoint wxDefaultPosition;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
|
||||
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
|
||||
|
||||
class wxWindow: public wxEvtHandler
|
||||
class WXDLLEXPORT wxWindow: public wxEvtHandler
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxWindow)
|
||||
|
||||
friend class wxDC;
|
||||
friend class wxPaintDC;
|
||||
|
||||
public:
|
||||
wxWindow();
|
||||
wxWindow( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxPanelNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxPanelNameStr );
|
||||
inline wxWindow(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
m_children = new wxList;
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxWindow();
|
||||
bool Close( bool force = FALSE );
|
||||
virtual bool Destroy();
|
||||
virtual bool DestroyChildren();
|
||||
|
||||
virtual void PrepareDC( wxDC &dc );
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
virtual void SetSize( int x, int y, int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO );
|
||||
virtual void SetSize( int width, int height );
|
||||
virtual void Move( int x, int y );
|
||||
virtual void GetSize( int *width, int *height ) const;
|
||||
virtual void SetClientSize( int const width, int const height );
|
||||
virtual void GetClientSize( int *width, int *height ) const;
|
||||
virtual void GetPosition( int *x, int *y ) const;
|
||||
virtual void Centre( int direction = wxHORIZONTAL );
|
||||
// Fit the window around the items
|
||||
virtual void Fit();
|
||||
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnIdle( wxIdleEvent& event );
|
||||
// Show or hide the window
|
||||
virtual bool Show(bool show);
|
||||
|
||||
virtual bool Show( bool show );
|
||||
virtual void Enable( bool enable );
|
||||
virtual void MakeModal( bool modal );
|
||||
virtual bool IsEnabled() const { return m_isEnabled; };
|
||||
// Is the window shown?
|
||||
virtual bool IsShown() const;
|
||||
|
||||
// Raise the window to the top of the Z order
|
||||
virtual void Raise();
|
||||
|
||||
// Lower the window to the bottom of the Z order
|
||||
virtual void Lower();
|
||||
|
||||
// Is the window enabled?
|
||||
virtual bool IsEnabled() const;
|
||||
|
||||
// For compatibility
|
||||
inline bool Enabled() const { return IsEnabled(); }
|
||||
|
||||
// Dialog support: override these and call
|
||||
// base class members to add functionality
|
||||
// that can't be done using validators.
|
||||
|
||||
// Transfer values to controls. If returns FALSE,
|
||||
// it's an application error (pops up a dialog)
|
||||
virtual bool TransferDataToWindow();
|
||||
|
||||
// Transfer values from controls. If returns FALSE,
|
||||
// transfer failed: don't quit
|
||||
virtual bool TransferDataFromWindow();
|
||||
|
||||
// Validate controls. If returns FALSE,
|
||||
// validation failed: don't quit
|
||||
virtual bool Validate();
|
||||
|
||||
// Return code for dialogs
|
||||
inline void SetReturnCode(int retCode);
|
||||
inline int GetReturnCode();
|
||||
|
||||
// Set the cursor
|
||||
virtual void SetCursor(const wxCursor& cursor);
|
||||
inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; };
|
||||
|
||||
// Get the window with the focus
|
||||
static wxWindow *FindFocus();
|
||||
|
||||
// Get character size
|
||||
virtual int GetCharHeight() const;
|
||||
virtual int GetCharWidth() const;
|
||||
|
||||
// Get overall window size
|
||||
virtual void GetSize(int *width, int *height) const;
|
||||
|
||||
// Get window position, relative to parent (or screen if no parent)
|
||||
virtual void GetPosition(int *x, int *y) const;
|
||||
|
||||
// Get client (application-useable) size
|
||||
virtual void GetClientSize(int *width, int *height) const;
|
||||
|
||||
// Set overall size and position
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||
inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
|
||||
|
||||
// Set client size
|
||||
virtual void SetClientSize(int width, int size);
|
||||
|
||||
// Convert client to screen coordinates
|
||||
virtual void ClientToScreen(int *x, int *y) const;
|
||||
|
||||
// Convert screen to client coordinates
|
||||
virtual void ScreenToClient(int *x, int *y) const;
|
||||
|
||||
// Set the focus to this window
|
||||
virtual void SetFocus();
|
||||
virtual bool OnClose();
|
||||
|
||||
virtual void AddChild( wxWindow *child );
|
||||
wxList *GetChildren();
|
||||
virtual void RemoveChild( wxWindow *child );
|
||||
void SetReturnCode( int retCode );
|
||||
int GetReturnCode();
|
||||
wxWindow *GetParent();
|
||||
|
||||
wxEvtHandler *GetEventHandler();
|
||||
void SetEventhandler( wxEvtHandler *handler );
|
||||
|
||||
virtual wxValidator *GetValidator();
|
||||
virtual void SetValidator( wxValidator *validator );
|
||||
|
||||
bool IsBeingDeleted();
|
||||
|
||||
void SetId( wxWindowID id );
|
||||
wxWindowID GetId();
|
||||
|
||||
void SetCursor( const wxCursor &cursor );
|
||||
|
||||
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL );
|
||||
virtual void Clear();
|
||||
virtual bool IsExposed( long x, long y );
|
||||
virtual bool IsExposed( long x, long y, long width, long height );
|
||||
|
||||
virtual wxColour GetBackgroundColour() const;
|
||||
virtual void SetBackgroundColour( const wxColour &colour );
|
||||
|
||||
virtual void SetDefaultBackgroundColour( const wxColour& col )
|
||||
{ m_defaultBackgroundColour = col; };
|
||||
virtual wxColour GetDefaultBackgroundColour() const
|
||||
{ return m_defaultBackgroundColour; };
|
||||
virtual void SetDefaultForegroundColour( const wxColour& col )
|
||||
{ m_defaultForegroundColour = col; };
|
||||
virtual wxColour GetDefaultForegroundColour() const
|
||||
{ return m_defaultForegroundColour; };
|
||||
|
||||
virtual void SetFont( const wxFont &font );
|
||||
virtual wxFont *GetFont();
|
||||
// For backward compatibility
|
||||
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||
inline virtual wxFont *GetLabelFont() { return GetFont(); };
|
||||
inline virtual wxFont *GetButtonFont() { return GetFont(); };
|
||||
virtual void SetWindowStyleFlag( long flag );
|
||||
virtual long GetWindowStyleFlag() const;
|
||||
// Capture/release mouse
|
||||
virtual void CaptureMouse();
|
||||
virtual void ReleaseMouse();
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const;
|
||||
virtual void SetName( const wxString &name );
|
||||
virtual wxString GetName() const;
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) {};
|
||||
// Enable or disable the window
|
||||
virtual void Enable(bool enable);
|
||||
|
||||
virtual bool IsShown() const;
|
||||
virtual bool IsRetained();
|
||||
virtual wxWindow *FindWindow( long id );
|
||||
virtual wxWindow *FindWindow( const wxString& name );
|
||||
void AllowDoubleClick( bool WXUNUSED(allow) ) {};
|
||||
void SetDoubleClick( bool WXUNUSED(allow) ) {};
|
||||
virtual void ClientToScreen( int *x, int *y );
|
||||
virtual void ScreenToClient( int *x, int *y );
|
||||
#if USE_DRAG_AND_DROP
|
||||
// Associate a drop target with this window (if the window already had a drop
|
||||
// target, it's deleted!) and return the current drop target (may be NULL).
|
||||
void SetDropTarget(wxDropTarget *pDropTarget);
|
||||
wxDropTarget *GetDropTarget() const { return m_pDropTarget; }
|
||||
#endif
|
||||
|
||||
virtual bool Validate();
|
||||
virtual bool TransferDataToWindow();
|
||||
virtual bool TransferDataFromWindow();
|
||||
void OnInitDialog( wxInitDialogEvent &event );
|
||||
virtual void InitDialog();
|
||||
// Accept files for dragging
|
||||
virtual void DragAcceptFiles(bool accept);
|
||||
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
virtual wxDropTarget *GetDropTarget() const;
|
||||
// Update region access
|
||||
virtual wxRegion GetUpdateRegion() const;
|
||||
virtual bool IsExposed(int x, int y, int w, int h) const;
|
||||
virtual bool IsExposed(const wxPoint& pt) const;
|
||||
virtual bool IsExposed(const wxRect& rect) const;
|
||||
|
||||
// Set/get the window title
|
||||
virtual inline void SetTitle(const wxString& WXUNUSED(title)) {};
|
||||
inline virtual wxString GetTitle() const { return wxString(""); };
|
||||
// Most windows have the concept of a label; for frames, this is the
|
||||
// title; for items, this is the label or button text.
|
||||
inline virtual wxString GetLabel() const { return GetTitle(); }
|
||||
|
||||
// Set/get the window name (used for resource setting in X)
|
||||
inline virtual wxString GetName() const;
|
||||
inline virtual void SetName(const wxString& name);
|
||||
|
||||
// Centre the window
|
||||
virtual void Centre(int direction) ;
|
||||
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
|
||||
|
||||
// Popup a menu
|
||||
virtual bool PopupMenu(wxMenu *menu, int x, int y);
|
||||
|
||||
// Send the window a refresh event
|
||||
virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL);
|
||||
|
||||
// New functions that will replace the above.
|
||||
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 GetScrollRange(int orient) const;
|
||||
virtual int GetScrollThumb(int orient) const;
|
||||
|
||||
virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL);
|
||||
|
||||
// Caret manipulation
|
||||
virtual void CreateCaret(int w, int h);
|
||||
virtual void CreateCaret(const wxBitmap *bitmap);
|
||||
virtual void DestroyCaret();
|
||||
virtual void ShowCaret(bool show);
|
||||
virtual void SetCaretPos(int x, int y);
|
||||
virtual void GetCaretPos(int *x, int *y) const;
|
||||
|
||||
// Tell window how much it can be sized
|
||||
virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1);
|
||||
|
||||
// Set/get the window's identifier
|
||||
inline int GetId() const;
|
||||
inline void SetId(int id);
|
||||
|
||||
// Make the window modal (all other windows unresponsive)
|
||||
virtual void MakeModal(bool modal);
|
||||
|
||||
// Get the private handle (platform-dependent)
|
||||
inline void *GetHandle() const;
|
||||
|
||||
// Set/get the window's relatives
|
||||
inline wxWindow *GetParent() const;
|
||||
inline void SetParent(wxWindow *p) ;
|
||||
inline wxWindow *GetGrandParent() const;
|
||||
inline wxList *GetChildren() const;
|
||||
|
||||
// Set/get the window's font
|
||||
virtual void SetFont(const wxFont& f);
|
||||
inline virtual wxFont *GetFont() const;
|
||||
|
||||
// Set/get the window's validator
|
||||
void SetValidator(const wxValidator& validator);
|
||||
inline wxValidator *GetValidator() const;
|
||||
|
||||
// Set/get the window's style
|
||||
inline void SetWindowStyleFlag(long flag);
|
||||
inline long GetWindowStyleFlag() const;
|
||||
|
||||
// Set/get event handler
|
||||
inline void SetEventHandler(wxEvtHandler *handler);
|
||||
inline wxEvtHandler *GetEventHandler() const;
|
||||
|
||||
// Push/pop event handler (i.e. allow a chain of event handlers
|
||||
// be searched)
|
||||
void PushEventHandler(wxEvtHandler *handler) ;
|
||||
wxEvtHandler *PopEventHandler(bool deleteHandler = FALSE) ;
|
||||
|
||||
public:
|
||||
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 );
|
||||
// Close the window by calling OnClose, posting a deletion
|
||||
virtual bool Close(bool force = FALSE);
|
||||
|
||||
// return FALSE from here if the window doesn't want the focus
|
||||
virtual bool AcceptsFocus() const;
|
||||
// Destroy the window (delayed, if a managed window)
|
||||
virtual bool Destroy() ;
|
||||
|
||||
// update the UI state (called from OnIdle)
|
||||
// Mode for telling default OnSize members to
|
||||
// call Layout(), if not using Sizers, just top-down constraints
|
||||
inline void SetAutoLayout(bool a);
|
||||
inline bool GetAutoLayout() const;
|
||||
|
||||
// Set/get constraints
|
||||
inline wxLayoutConstraints *GetConstraints() const;
|
||||
void SetConstraints(wxLayoutConstraints *c);
|
||||
|
||||
// Set/get window background colour
|
||||
inline virtual void SetBackgroundColour(const wxColour& col);
|
||||
inline virtual wxColour GetBackgroundColour() const;
|
||||
|
||||
// Set/get window foreground colour
|
||||
inline virtual void SetForegroundColour(const wxColour& col);
|
||||
inline virtual wxColour GetForegroundColour() const;
|
||||
|
||||
// Set/get window default background colour (for children to inherit).
|
||||
// NOTE: these may be removed in later revisions.
|
||||
inline virtual void SetDefaultBackgroundColour(const wxColour& col);
|
||||
inline virtual wxColour GetDefaultBackgroundColour(void) const;
|
||||
|
||||
// Set/get window default foreground colour (for children to inherit)
|
||||
inline virtual void SetDefaultForegroundColour(const wxColour& col);
|
||||
inline virtual wxColour GetDefaultForegroundColour(void) const;
|
||||
|
||||
// Get the default button, if there is one
|
||||
inline virtual wxButton *GetDefaultItem() const;
|
||||
inline virtual void SetDefaultItem(wxButton *but);
|
||||
|
||||
// Override to define new behaviour for default action (e.g. double clicking
|
||||
// on a listbox)
|
||||
virtual void OnDefaultAction(wxControl *initiatingItem);
|
||||
|
||||
// Resource loading
|
||||
#if USE_WX_RESOURCES
|
||||
virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL);
|
||||
virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL);
|
||||
#endif
|
||||
|
||||
// Native resource loading
|
||||
virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id);
|
||||
virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name);
|
||||
virtual wxWindow* GetWindowChild1(wxWindowID& id);
|
||||
virtual wxWindow* GetWindowChild(wxWindowID& id);
|
||||
|
||||
virtual void GetTextExtent(const wxString& string, int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL, bool use16 = FALSE) const;
|
||||
|
||||
// Is the window retained?
|
||||
inline bool IsRetained() const;
|
||||
|
||||
// Warp the pointer the given position
|
||||
virtual void WarpPointer(int x_pos, int y_pos) ;
|
||||
|
||||
// Clear the window
|
||||
virtual void Clear();
|
||||
|
||||
// Find a window by id or name
|
||||
virtual wxWindow *FindWindow(long id);
|
||||
virtual wxWindow *FindWindow(const wxString& name);
|
||||
|
||||
// Constraint operations
|
||||
bool Layout();
|
||||
void SetSizer(wxSizer *sizer); // Adds sizer child to this window
|
||||
inline wxSizer *GetSizer() const ;
|
||||
inline wxWindow *GetSizerParent() const ;
|
||||
inline void SetSizerParent(wxWindow *win);
|
||||
|
||||
// Do Update UI processing for controls
|
||||
void UpdateWindowUI();
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
void OnChar(wxKeyEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Does this window want to accept keyboard focus?
|
||||
virtual bool AcceptsFocus() const;
|
||||
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// IMPLEMENTATION
|
||||
|
||||
public: // cannot get private going yet
|
||||
// For implementation purposes - sometimes decorations make the client area
|
||||
// smaller
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
// Makes an adjustment to the window position (for example, a frame that has
|
||||
// a toolbar that it manages itself).
|
||||
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
||||
|
||||
wxWindow *m_parent;
|
||||
wxList m_children;
|
||||
int m_x,m_y;
|
||||
int m_width,m_height;
|
||||
int m_retCode;
|
||||
wxEvtHandler *m_eventHandler;
|
||||
wxValidator *m_windowValidator;
|
||||
wxDropTarget *m_pDropTarget;
|
||||
wxWindowID m_windowId;
|
||||
wxCursor *m_cursor;
|
||||
wxFont m_font;
|
||||
wxColour m_backgroundColour;
|
||||
wxColour m_defaultBackgroundColour;
|
||||
wxColour m_foregroundColour ;
|
||||
wxColour m_defaultForegroundColour;
|
||||
wxRegion m_updateRegion;
|
||||
long m_windowStyle;
|
||||
bool m_isShown;
|
||||
bool m_isEnabled;
|
||||
wxString m_windowName;
|
||||
// Executes the default message
|
||||
virtual long Default();
|
||||
|
||||
/* TODO: you may need something like this
|
||||
// Determine whether 3D effects are wanted
|
||||
virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
|
||||
*/
|
||||
|
||||
public: // Layout section
|
||||
virtual void AddChild(wxWindow *child); // Adds reference to the child object
|
||||
virtual void RemoveChild(wxWindow *child); // Removes reference to child
|
||||
// (but doesn't delete the child object)
|
||||
virtual void DestroyChildren(); // Removes and destroys all children
|
||||
|
||||
wxLayoutConstraints * m_constraints;
|
||||
wxList * m_constraintsInvolvedIn;
|
||||
wxSizer * m_windowSizer;
|
||||
wxWindow * m_sizerParent;
|
||||
bool m_autoLayout;
|
||||
|
||||
wxLayoutConstraints *GetConstraints() const;
|
||||
void SetConstraints( wxLayoutConstraints *constraints );
|
||||
void SetAutoLayout( bool autoLayout );
|
||||
bool GetAutoLayout() const;
|
||||
bool Layout();
|
||||
void SetSizer( wxSizer *sizer );
|
||||
wxSizer *GetSizer() const;
|
||||
void SetSizerParent( wxWindow *win );
|
||||
wxWindow *GetSizerParent() const;
|
||||
// Constraint implementation
|
||||
void UnsetConstraints(wxLayoutConstraints *c);
|
||||
inline wxList *GetConstraintsInvolvedIn() const ;
|
||||
// Back-pointer to other windows we're involved with, so if we delete
|
||||
// this window, we must delete any constraints we're involved with.
|
||||
void AddConstraintReference(wxWindow *otherWin);
|
||||
void RemoveConstraintReference(wxWindow *otherWin);
|
||||
void DeleteRelatedConstraints();
|
||||
|
||||
virtual void ResetConstraints();
|
||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||
virtual bool LayoutPhase1(int *noChanges);
|
||||
virtual bool LayoutPhase2(int *noChanges);
|
||||
virtual bool DoPhase(int);
|
||||
// Transforms from sizer coordinate space to actual
|
||||
// parent coordinate space
|
||||
virtual void TransformSizerToActual(int *x, int *y) const ;
|
||||
|
||||
// Set size with transformation to actual coordinates if nec.
|
||||
virtual void SizerSetSize(int x, int y, int w, int h);
|
||||
virtual void SizerMove(int x, int y);
|
||||
|
||||
// Only set/get the size/position of the constraint (if any)
|
||||
virtual void SetSizeConstraint(int x, int y, int w, int h);
|
||||
virtual void MoveConstraint(int x, int y);
|
||||
virtual void GetSizeConstraint(int *w, int *h) const ;
|
||||
virtual void GetClientSizeConstraint(int *w, int *h) const ;
|
||||
virtual void GetPositionConstraint(int *x, int *y) const ;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxObject *GetChild(int number) const ;
|
||||
|
||||
inline void SetShowing(bool show);
|
||||
inline bool IsUserEnabled() const;
|
||||
inline bool GetTransparentBackground() const ;
|
||||
|
||||
// Responds to colour changes: passes event on to children.
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Transfers data to any child controls
|
||||
void OnInitDialog(wxInitDialogEvent& event);
|
||||
|
||||
// Sends an OnInitDialog event, which in turns transfers data to
|
||||
// to the window via validators.
|
||||
virtual void InitDialog();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// PROTECTED DATA
|
||||
protected:
|
||||
int m_windowId;
|
||||
long m_windowStyle; // Store the window's style
|
||||
wxEvtHandler * m_windowEventHandler; // Usually is 'this'
|
||||
wxLayoutConstraints * m_constraints; // Constraints for this window
|
||||
wxList * m_constraintsInvolvedIn; // List of constraints we're involved in
|
||||
wxSizer * m_windowSizer; // Window's top-level sizer (if any)
|
||||
wxWindow * m_sizerParent; // Window's parent sizer (if any)
|
||||
bool m_autoLayout; // Whether to call Layout() in OnSize
|
||||
wxWindow * m_windowParent; // Each window always knows its parent
|
||||
wxValidator * m_windowValidator;
|
||||
int m_minSizeX;
|
||||
int m_minSizeY;
|
||||
int m_maxSizeX;
|
||||
int m_maxSizeY;
|
||||
|
||||
// Caret data
|
||||
int m_caretWidth;
|
||||
int m_caretHeight;
|
||||
bool m_caretEnabled;
|
||||
bool m_caretShown;
|
||||
wxFont m_windowFont; // Window's font
|
||||
wxCursor m_windowCursor; // Window's cursor
|
||||
wxString m_windowName; // Window name
|
||||
|
||||
wxButton * m_defaultItem;
|
||||
|
||||
wxColour m_backgroundColour ;
|
||||
wxColour m_foregroundColour ;
|
||||
wxColour m_defaultBackgroundColour;
|
||||
wxColour m_defaultForegroundColour;
|
||||
|
||||
#if USE_DRAG_AND_DROP
|
||||
wxDropTarget *m_pDropTarget; // the current drop target or NULL
|
||||
#endif //USE_DRAG_AND_DROP
|
||||
|
||||
public:
|
||||
wxRegion m_updateRegion;
|
||||
wxList * m_children; // Window's children
|
||||
int m_returnCode;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKWINDOWH__
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// INLINES
|
||||
|
||||
inline void *wxWindow::GetHandle() const { return (void *)NULL; }
|
||||
inline int wxWindow::GetId() const { return m_windowId; }
|
||||
inline void wxWindow::SetId(int id) { m_windowId = id; }
|
||||
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
|
||||
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
|
||||
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); }
|
||||
inline wxList *wxWindow::GetChildren() const { return m_children; }
|
||||
inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
|
||||
inline wxString wxWindow::GetName() const { return m_windowName; }
|
||||
inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
|
||||
inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
|
||||
inline void wxWindow::SetWindowStyleFlag(long flag) { m_windowStyle = flag; }
|
||||
inline void wxWindow::SetDoubleClick(bool flag) { m_doubleClickAllowed = flag; }
|
||||
inline bool wxWindow::GetDoubleClick() const { return m_doubleClickAllowed; }
|
||||
inline void wxWindow::SetEventHandler(wxEvtHandler *handler) { m_windowEventHandler = handler; }
|
||||
inline wxEvtHandler *wxWindow::GetEventHandler() const { return m_windowEventHandler; }
|
||||
inline void wxWindow::SetAutoLayout(bool a) { m_autoLayout = a; }
|
||||
inline bool wxWindow::GetAutoLayout() const { return m_autoLayout; }
|
||||
inline wxLayoutConstraints *wxWindow::GetConstraints() const { return m_constraints; }
|
||||
inline void wxWindow::SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; };
|
||||
inline wxColour wxWindow::GetBackgroundColour() const { return m_backgroundColour; };
|
||||
inline void wxWindow::SetForegroundColour(const wxColour& col) { m_foregroundColour = col; };
|
||||
inline wxColour wxWindow::GetForegroundColour() const { return m_foregroundColour; };
|
||||
inline void wxWindow::SetDefaultForegroundColour(const wxColour& col) { m_defaultForegroundColour = col; };
|
||||
inline wxColour wxWindow::GetDefaultForegroundColour(void) const { return m_defaultForegroundColour; };
|
||||
inline void wxWindow::SetDefaultBackgroundColour(const wxColour& col) { m_defaultBackgroundColour = col; };
|
||||
inline wxColour wxWindow::GetDefaultBackgroundColour(void) const { return m_defaultBackgroundColour; };
|
||||
|
||||
inline wxButton *wxWindow::GetDefaultItem() const { return m_defaultItem; }
|
||||
inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; }
|
||||
inline bool wxWindow::IsRetained() const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); }
|
||||
|
||||
inline void wxWindow::SetShowing(bool show) { m_isShown = show; }
|
||||
inline wxList *wxWindow::GetConstraintsInvolvedIn() const { return m_constraintsInvolvedIn; }
|
||||
inline wxSizer *wxWindow::GetSizer() const { return m_windowSizer; }
|
||||
inline wxWindow *wxWindow::GetSizerParent() const { return m_sizerParent; }
|
||||
inline void wxWindow::SetSizerParent(wxWindow *win) { m_sizerParent = win; }
|
||||
inline wxValidator *wxWindow::GetValidator() const { return m_windowValidator; }
|
||||
inline bool wxWindow::IsUserEnabled() const { return m_winEnabled; }
|
||||
inline bool wxWindow::GetTransparentBackground() const { return m_backgroundTransparent; }
|
||||
inline void wxWindow::SetReturnCode(int retCode) { m_returnCode = retCode; }
|
||||
inline int wxWindow::GetReturnCode() { return m_returnCode; }
|
||||
|
||||
// Get the active window.
|
||||
wxWindow* WXDLLEXPORT wxGetActiveWindow();
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows;
|
||||
|
||||
#endif
|
||||
// _WX_WINDOW_H_
|
||||
|
Reference in New Issue
Block a user