*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -178,6 +178,8 @@ private:
|
|||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
#include "wx/msw/caret.h"
|
#include "wx/msw/caret.h"
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
#include "wx/os2/caret.h"
|
||||||
#else
|
#else
|
||||||
#include "wx/generic/caret.h"
|
#include "wx/generic/caret.h"
|
||||||
#endif // platform
|
#endif // platform
|
||||||
|
@@ -104,6 +104,11 @@ private:
|
|||||||
|
|
||||||
// the type of the client data for the items
|
// the type of the client data for the items
|
||||||
wxClientDataType m_clientDataItemsType;
|
wxClientDataType m_clientDataItemsType;
|
||||||
|
// the above pure virtuals hide these virtuals in wxWindowBase
|
||||||
|
virtual void DoSetClientData(void* clientData ) { wxWindowBase::DoSetClientData(clientData); };
|
||||||
|
virtual void* DoGetClientData() const { return(wxWindowBase::DoGetClientData()); };
|
||||||
|
virtual void DoSetClientObject( wxClientData* clientData ) { wxWindowBase::DoSetClientObject(clientData); };
|
||||||
|
virtual wxClientData* DoGetClientObject() const { return(wxWindowBase::DoGetClientObject()); };
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
#include "wx/mac/dnd.h"
|
#include "wx/mac/dnd.h"
|
||||||
#elif defined(__WXPM__)
|
#elif defined(__WXPM__)
|
||||||
#include "wx/os2/dnd.h"
|
#include "wx/os2/dataobj.h"
|
||||||
#elif defined(__WXSTUBS__)
|
#elif defined(__WXSTUBS__)
|
||||||
#include "wx/stubs/dnd.h"
|
#include "wx/stubs/dnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1420,6 +1420,27 @@ typedef void * WXDRAWITEMSTRUCT;
|
|||||||
typedef void * WXMEASUREITEMSTRUCT;
|
typedef void * WXMEASUREITEMSTRUCT;
|
||||||
typedef void * WXLPCREATESTRUCT;
|
typedef void * WXLPCREATESTRUCT;
|
||||||
|
|
||||||
|
#if defined(__WXPM__)
|
||||||
|
typedef unsigned long WXMPARAM;
|
||||||
|
typedef unsigned long WXMSGID;
|
||||||
|
typedef void* WXRESULT;
|
||||||
|
typedef int (*WXFARPROC)();
|
||||||
|
// some windows handles not defined by PM
|
||||||
|
typedef unsigned long HANDLE;
|
||||||
|
typedef unsigned long HICON;
|
||||||
|
typedef unsigned long HFONT;
|
||||||
|
typedef unsigned long HMENU;
|
||||||
|
typedef unsigned long HPEN;
|
||||||
|
typedef unsigned long HBRUSH;
|
||||||
|
typedef unsigned long HPALETTE;
|
||||||
|
typedef unsigned long HCURSOR;
|
||||||
|
typedef unsigned long HINSTANCE;
|
||||||
|
typedef unsigned long HIMAGELIST;
|
||||||
|
typedef unsigned long HGLOBAL;
|
||||||
|
typedef unsigned long DWORD;
|
||||||
|
typedef unsigned short WORD;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUWIN32__) || defined(__WXWINE__)
|
#if defined(__GNUWIN32__) || defined(__WXWINE__)
|
||||||
typedef int (*WXFARPROC)();
|
typedef int (*WXFARPROC)();
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
|
@@ -96,6 +96,11 @@ public:
|
|||||||
virtual wxInputStream& LoadObject(wxInputStream& stream);
|
virtual wxInputStream& LoadObject(wxInputStream& stream);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_SERIAL
|
||||||
|
// need this to keep from hiding the virtual from wxObject
|
||||||
|
virtual void LoadObject(wxObjectInputStream& stream) { wxObject::LoadObject(stream); };
|
||||||
|
#endif
|
||||||
|
|
||||||
// Called by wxWindows
|
// Called by wxWindows
|
||||||
virtual bool OnSaveDocument(const wxString& filename);
|
virtual bool OnSaveDocument(const wxString& filename);
|
||||||
virtual bool OnOpenDocument(const wxString& filename);
|
virtual bool OnOpenDocument(const wxString& filename);
|
||||||
|
@@ -174,7 +174,10 @@ class WXDLLEXPORT name : public wxBaseArray \
|
|||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
name() \
|
name() \
|
||||||
{ wxASSERT( sizeof(T) <= sizeof(long) ); } \
|
{ size_t type = sizeof(T); \
|
||||||
|
size_t sizelong = sizeof(long); \
|
||||||
|
wxASSERT( type <= sizelong ); \
|
||||||
|
} \
|
||||||
\
|
\
|
||||||
name& operator=(const name& src) \
|
name& operator=(const name& src) \
|
||||||
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
||||||
@@ -232,7 +235,11 @@ class WXDLLEXPORT name : public wxBaseArray \
|
|||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
name(SCMPFUNC##T fn) \
|
name(SCMPFUNC##T fn) \
|
||||||
{ wxASSERT( sizeof(T) <= sizeof(long) ); m_fnCompare = fn; } \
|
{ size_t type = sizeof(T); \
|
||||||
|
size_t sizelong = sizeof(long); \
|
||||||
|
wxASSERT( type <= sizelong ); \
|
||||||
|
m_fnCompare = fn; \
|
||||||
|
} \
|
||||||
\
|
\
|
||||||
name& operator=(const name& src) \
|
name& operator=(const name& src) \
|
||||||
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
||||||
|
@@ -96,7 +96,7 @@ void process_command(char *);
|
|||||||
void syntax_error(char *);
|
void syntax_error(char *);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#if __BORLANDC__
|
#if defined(__BORLANDC__) || defined(__VISAGECPP__)
|
||||||
char *proio_cons(char *, char *);
|
char *proio_cons(char *, char *);
|
||||||
char * wxmake_integer(char *);
|
char * wxmake_integer(char *);
|
||||||
char * wxmake_word(char *);
|
char * wxmake_word(char *);
|
||||||
@@ -107,6 +107,7 @@ char * wxmake_exp2(char *, char *, char*);
|
|||||||
void add_expr(char *);
|
void add_expr(char *);
|
||||||
void process_command(char *);
|
void process_command(char *);
|
||||||
void syntax_error(char *);
|
void syntax_error(char *);
|
||||||
|
int lex_input(void);
|
||||||
#else
|
#else
|
||||||
char *proio_cons();
|
char *proio_cons();
|
||||||
char * wxmake_integer();
|
char * wxmake_integer();
|
||||||
|
@@ -117,6 +117,8 @@ class WXDLLEXPORT wxXLPHelpController: public wxHelpControllerBase
|
|||||||
bool helpRunning;
|
bool helpRunning;
|
||||||
wxXLPHelpConnection* helpConnection;
|
wxXLPHelpConnection* helpConnection;
|
||||||
wxXLPHelpClient helpClient;
|
wxXLPHelpClient helpClient;
|
||||||
|
private:
|
||||||
|
virtual bool Initialize(const wxString& file) { return(wxHelpControllerBase::Initialize(file)); };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_HELP
|
#endif // wxUSE_HELP
|
||||||
|
@@ -1,7 +1,11 @@
|
|||||||
#ifndef _WX_HELPWIN_H_BASE_
|
#ifndef _WX_HELPWIN_H_BASE_
|
||||||
#define _WX_HELPWIN_H_BASE_
|
#define _WX_HELPWIN_H_BASE_
|
||||||
|
|
||||||
|
#if defined(__WXMSW__)
|
||||||
#include "wx/msw/helpwin.h"
|
#include "wx/msw/helpwin.h"
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
#include "wx/os2/helpwin.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_HELPWIN_H_BASE_
|
// _WX_HELPWIN_H_BASE_
|
||||||
|
@@ -29,6 +29,12 @@
|
|||||||
#pragma interface "list.h"
|
#pragma interface "list.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXPM__
|
||||||
|
#define LINKAGEMODE _Optlink
|
||||||
|
#else
|
||||||
|
#define LINKAGEMODE
|
||||||
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// headers
|
// headers
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -65,10 +71,10 @@ enum wxKeyType
|
|||||||
// type of compare function for list sort operation (as in 'qsort'): it should
|
// type of compare function for list sort operation (as in 'qsort'): it should
|
||||||
// return a negative value, 0 or positive value if the first element is less
|
// return a negative value, 0 or positive value if the first element is less
|
||||||
// than, equal or greater than the second
|
// than, equal or greater than the second
|
||||||
typedef int (*wxSortCompareFunction)(const void *elem1, const void *elem2);
|
typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2);
|
||||||
|
|
||||||
//
|
//
|
||||||
typedef int (*wxListIterateFunction)(void *current);
|
typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// key stuff: a list may be optionally keyed on integer or string key
|
// key stuff: a list may be optionally keyed on integer or string key
|
||||||
|
@@ -78,9 +78,8 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
|
|||||||
int m_marginX;
|
int m_marginX;
|
||||||
int m_marginY;
|
int m_marginY;
|
||||||
private:
|
private:
|
||||||
// Supress VisualAge's hidden functin warning
|
virtual void SetLabel(const wxString& string)
|
||||||
void SetLabel(const wxString& label)
|
{ wxButton::SetLabel(string); };
|
||||||
{ wxButton::SetLabel(label); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -44,12 +44,9 @@ class WXDLLEXPORT wxButton: public wxControl
|
|||||||
|
|
||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
virtual void SetDefault();
|
virtual void SetDefault();
|
||||||
static wxSize GetDefaultSize();
|
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual wxString GetLabel() const ;
|
virtual wxString GetLabel() const ;
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -47,8 +47,6 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
|||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||||
@@ -79,8 +77,8 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
|||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
virtual void SetLabel(const wxBitmap& bitmap);
|
virtual void SetLabel(const wxBitmap& bitmap);
|
||||||
private:
|
private:
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
virtual void SetLabel(const wxString& string)
|
||||||
void SetLabel(const wxString& label) {wxCheckBox::SetLabel(label);}
|
{ wxCheckBox::SetLabel(string); };
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// _WX_CHECKBOX_H_
|
// _WX_CHECKBOX_H_
|
||||||
|
@@ -66,9 +66,6 @@ class WXDLLEXPORT wxChoice: public wxControl
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_noStrings;
|
int m_noStrings;
|
||||||
|
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,170 +1,373 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dc.h
|
// Name: dc.h
|
||||||
// Purpose: wxDC class
|
// Purpose: wxDC class
|
||||||
// Author: Julian Smart
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_DC_H_
|
#ifndef _WX_DC_H_
|
||||||
#define _WX_DC_H_
|
#define _WX_DC_H_
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface "dc.h"
|
#pragma interface "dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class WXDLLEXPORT wxDC : public wxDCBase
|
#include "wx/pen.h"
|
||||||
|
#include "wx/brush.h"
|
||||||
|
#include "wx/icon.h"
|
||||||
|
#include "wx/font.h"
|
||||||
|
#include "wx/gdicmn.h"
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// constants
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef MM_TEXT
|
||||||
|
#define MM_TEXT 0
|
||||||
|
#define MM_ISOTROPIC 1
|
||||||
|
#define MM_ANISOTROPIC 2
|
||||||
|
#define MM_LOMETRIC 3
|
||||||
|
#define MM_HIMETRIC 4
|
||||||
|
#define MM_TWIPS 5
|
||||||
|
#define MM_POINTS 6
|
||||||
|
#define MM_METRIC 7
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// global variables
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
extern int wxPageNumber;
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// wxDC
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxDC: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDC)
|
DECLARE_ABSTRACT_CLASS(wxDC)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDC();
|
|
||||||
~wxDC();
|
|
||||||
|
|
||||||
// implement base class pure virtuals
|
wxDC(void);
|
||||||
// ----------------------------------
|
~wxDC(void);
|
||||||
|
|
||||||
|
void BeginDrawing(void) {};
|
||||||
|
void EndDrawing(void) {};
|
||||||
|
|
||||||
|
virtual bool Ok(void) const { return m_ok; };
|
||||||
|
|
||||||
virtual void Clear();
|
virtual void FloodFill( long x1, long y1, const wxColour& col, int style=wxFLOOD_SURFACE ) = 0;
|
||||||
|
inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE)
|
||||||
virtual bool StartDoc(const wxString& message);
|
|
||||||
virtual void EndDoc();
|
|
||||||
|
|
||||||
virtual void StartPage();
|
|
||||||
virtual void EndPage();
|
|
||||||
|
|
||||||
virtual void SetFont(const wxFont& font);
|
|
||||||
virtual void SetPen(const wxPen& pen);
|
|
||||||
virtual void SetBrush(const wxBrush& brush);
|
|
||||||
virtual void SetBackground(const wxBrush& brush);
|
|
||||||
virtual void SetBackgroundMode(int mode);
|
|
||||||
virtual void SetPalette(const wxPalette& palette);
|
|
||||||
|
|
||||||
virtual void DestroyClippingRegion();
|
|
||||||
|
|
||||||
virtual long GetCharHeight() const;
|
|
||||||
virtual long GetCharWidth() const;
|
|
||||||
virtual void GetTextExtent(const wxString& string,
|
|
||||||
long *x, long *y,
|
|
||||||
long *descent = NULL,
|
|
||||||
long *externalLeading = NULL,
|
|
||||||
wxFont *theFont = NULL) const;
|
|
||||||
|
|
||||||
virtual bool CanDrawBitmap() const;
|
|
||||||
virtual bool CanGetTextExtent() const;
|
|
||||||
virtual int GetDepth() const;
|
|
||||||
virtual wxSize GetPPI() const;
|
|
||||||
|
|
||||||
virtual void SetMapMode(int mode);
|
|
||||||
virtual void SetUserScale(double x, double y);
|
|
||||||
virtual void SetSystemScale(double x, double y);
|
|
||||||
virtual void SetLogicalScale(double x, double y);
|
|
||||||
virtual void SetLogicalOrigin(long x, long y);
|
|
||||||
virtual void SetDeviceOrigin(long x, long y);
|
|
||||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
|
||||||
virtual void SetLogicalFunction(int function);
|
|
||||||
|
|
||||||
// implementation from now on
|
|
||||||
// --------------------------
|
|
||||||
|
|
||||||
virtual void SetRop(WXHDC cdc);
|
|
||||||
virtual void DoClipping(WXHDC cdc);
|
|
||||||
virtual void SelectOldObjects(WXHDC dc);
|
|
||||||
|
|
||||||
wxWindow *GetWindow() const { return m_canvas; }
|
|
||||||
void SetWindow(wxWindow *win) { m_canvas = win; }
|
|
||||||
|
|
||||||
WXHDC GetHDC() const { return m_hDC; }
|
|
||||||
void SetHDC(WXHDC dc, bool bOwnsDC = FALSE)
|
|
||||||
{
|
{
|
||||||
m_hDC = dc;
|
FloodFill(pt.x, pt.y, col, style);
|
||||||
m_bOwnsDC = bOwnsDC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0;
|
||||||
virtual void DoFloodFill(long x, long y, const wxColour& col,
|
inline bool GetPixel(const wxPoint& pt, wxColour *col) const
|
||||||
int style = wxFLOOD_SURFACE);
|
|
||||||
|
|
||||||
virtual bool DoGetPixel(long x, long y, wxColour *col) const;
|
|
||||||
|
|
||||||
virtual void DoDrawPoint(long x, long y);
|
|
||||||
virtual void DoDrawLine(long x1, long y1, long x2, long y2);
|
|
||||||
|
|
||||||
virtual void DoDrawArc(long x1, long y1,
|
|
||||||
long x2, long y2,
|
|
||||||
long xc, long yc);
|
|
||||||
virtual void DoDrawEllipticArc(long x, long y, long w, long h,
|
|
||||||
double sa, double ea);
|
|
||||||
|
|
||||||
virtual void DoDrawRectangle(long x, long y, long width, long height);
|
|
||||||
virtual void DoDrawRoundedRectangle(long x, long y,
|
|
||||||
long width, long height,
|
|
||||||
double radius);
|
|
||||||
virtual void DoDrawEllipse(long x, long y, long width, long height);
|
|
||||||
|
|
||||||
virtual void DoCrossHair(long x, long y);
|
|
||||||
|
|
||||||
virtual void DoDrawIcon(const wxIcon& icon, long x, long y);
|
|
||||||
virtual void DoDrawBitmap(const wxBitmap &bmp, long x, long y,
|
|
||||||
bool useMask = FALSE);
|
|
||||||
|
|
||||||
virtual void DoDrawText(const wxString& text, long x, long y);
|
|
||||||
|
|
||||||
virtual bool DoBlit(long xdest, long ydest, long width, long height,
|
|
||||||
wxDC *source, long xsrc, long ysrc,
|
|
||||||
int rop = wxCOPY, bool useMask = FALSE);
|
|
||||||
|
|
||||||
// this is gnarly - we can't even call this function DoSetClippingRegion()
|
|
||||||
// because of virtual function hiding
|
|
||||||
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
|
|
||||||
virtual void DoSetClippingRegion(long x, long y,
|
|
||||||
long width, long height);
|
|
||||||
virtual void DoGetClippingRegion(long *x, long *y,
|
|
||||||
long *width, long *height)
|
|
||||||
{
|
{
|
||||||
GetClippingBox(x, y, width, height);
|
return GetPixel(pt.x, pt.y, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DoGetSize(int *width, int *height) const;
|
virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0;
|
||||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
|
||||||
|
{
|
||||||
|
DrawLine(pt1.x, pt1.y, pt2.x, pt2.y);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DoDrawLines(int n, wxPoint points[],
|
virtual void CrossHair( long x, long y ) = 0;
|
||||||
long xoffset, long yoffset);
|
inline void CrossHair(const wxPoint& pt)
|
||||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
{
|
||||||
long xoffset, long yoffset,
|
CrossHair(pt.x, pt.y);
|
||||||
int fillStyle = wxODDEVEN_RULE);
|
}
|
||||||
|
|
||||||
#if wxUSE_SPLINES
|
virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc ) = 0;
|
||||||
virtual void DoDrawSpline(wxList *points);
|
inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
|
||||||
#endif // wxUSE_SPLINES
|
{
|
||||||
|
DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y);
|
||||||
|
}
|
||||||
|
|
||||||
// MSW-specific member variables
|
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0;
|
||||||
int m_windowExtX;
|
virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea)
|
||||||
int m_windowExtY;
|
{
|
||||||
|
DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea);
|
||||||
|
}
|
||||||
|
|
||||||
// the window associated with this DC (may be NULL)
|
virtual void DrawPoint( long x, long y ) = 0;
|
||||||
wxWindow *m_canvas;
|
virtual void DrawPoint( wxPoint& point );
|
||||||
|
|
||||||
|
virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0;
|
||||||
|
virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
|
||||||
|
virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0,
|
||||||
|
int fillStyle=wxODDEVEN_RULE ) = 0;
|
||||||
|
virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0,
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
wxBitmap m_selectedBitmap;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
// TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it
|
virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 );
|
||||||
bool m_bOwnsDC:1;
|
virtual void DrawSpline( wxList *points ) = 0;
|
||||||
|
virtual void DrawSpline( int n, wxPoint points[] );
|
||||||
|
|
||||||
|
virtual bool CanDrawBitmap(void) const = 0;
|
||||||
|
|
||||||
// our HDC and its usage count: we only free it when the usage count drops
|
virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE );
|
||||||
// to 0
|
inline void DrawIcon(const wxIcon& icon, const wxPoint& pt)
|
||||||
WXHDC m_hDC;
|
{
|
||||||
int m_hDCCount;
|
DrawIcon(icon, pt.x, pt.y);
|
||||||
|
}
|
||||||
|
|
||||||
// Store all old GDI objects when do a SelectObject, so we can select them
|
// TODO DrawBitmap is not always the same as DrawIcon, especially if bitmaps and
|
||||||
// back in (this unselecting user's objects) so we can safely delete the
|
// icons are implemented differently.
|
||||||
// DC.
|
void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE )
|
||||||
WXHBITMAP m_oldBitmap;
|
{ DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); }
|
||||||
WXHPEN m_oldPen;
|
|
||||||
WXHBRUSH m_oldBrush;
|
virtual bool Blit( long xdest, long ydest, long width, long height,
|
||||||
WXHFONT m_oldFont;
|
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0;
|
||||||
WXHPALETTE m_oldPalette;
|
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,
|
||||||
|
wxFont *theFont = NULL, bool use16 = FALSE ) = 0;
|
||||||
|
virtual long GetCharWidth(void) = 0;
|
||||||
|
virtual long GetCharHeight(void) = 0;
|
||||||
|
|
||||||
|
virtual void Clear(void) = 0;
|
||||||
|
|
||||||
|
virtual void SetFont( const wxFont &font ) = 0;
|
||||||
|
virtual wxFont& GetFont(void) const { return (wxFont&) m_font; };
|
||||||
|
|
||||||
|
virtual void SetPen( const wxPen &pen ) = 0;
|
||||||
|
virtual wxPen& GetPen(void) const { return (wxPen&) m_pen; };
|
||||||
|
|
||||||
|
virtual void SetBrush( const wxBrush &brush ) = 0;
|
||||||
|
virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush; };
|
||||||
|
|
||||||
|
virtual void SetBackground( const wxBrush &brush ) = 0;
|
||||||
|
virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush; };
|
||||||
|
|
||||||
|
virtual void SetLogicalFunction( int function ) = 0;
|
||||||
|
virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
|
||||||
|
|
||||||
|
virtual void SetTextForeground( const wxColour &col );
|
||||||
|
virtual void SetTextBackground( const wxColour &col );
|
||||||
|
virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; };
|
||||||
|
virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; };
|
||||||
|
|
||||||
|
virtual void SetBackgroundMode( int mode ) = 0;
|
||||||
|
virtual int GetBackgroundMode(void) const { return m_backgroundMode; };
|
||||||
|
|
||||||
|
virtual void SetPalette( const wxPalette& palette ) = 0;
|
||||||
|
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 );
|
||||||
|
virtual void DestroyClippingRegion(void);
|
||||||
|
virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const;
|
||||||
|
|
||||||
|
virtual inline long MinX(void) const { return m_minX; }
|
||||||
|
virtual inline long MaxX(void) const { return m_maxX; }
|
||||||
|
virtual inline long MinY(void) const { return m_minY; }
|
||||||
|
virtual inline long MaxY(void) const { return m_maxY; }
|
||||||
|
|
||||||
|
virtual void GetSize( int* width, int* height ) const;
|
||||||
|
inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); }
|
||||||
|
virtual void GetSizeMM( long* width, long* height ) const;
|
||||||
|
|
||||||
|
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; };
|
||||||
|
virtual void EndDoc(void) {};
|
||||||
|
virtual void StartPage(void) {};
|
||||||
|
virtual void EndPage(void) {};
|
||||||
|
|
||||||
|
virtual void SetMapMode( int mode );
|
||||||
|
virtual int GetMapMode(void) const { return m_mappingMode; };
|
||||||
|
|
||||||
|
virtual void SetUserScale( double x, double y );
|
||||||
|
virtual void GetUserScale( double *x, double *y );
|
||||||
|
virtual void SetLogicalScale( double x, double y );
|
||||||
|
virtual void GetLogicalScale( double *x, double *y );
|
||||||
|
|
||||||
|
virtual void SetLogicalOrigin( long x, long y );
|
||||||
|
virtual void GetLogicalOrigin( long *x, long *y );
|
||||||
|
virtual void SetDeviceOrigin( long x, long y );
|
||||||
|
virtual void GetDeviceOrigin( long *x, long *y );
|
||||||
|
virtual void SetInternalDeviceOrigin( long x, long y );
|
||||||
|
virtual void GetInternalDeviceOrigin( long *x, long *y );
|
||||||
|
|
||||||
|
virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||||
|
|
||||||
|
virtual void SetOptimization( bool WXUNUSED(optimize) ) {};
|
||||||
|
virtual bool GetOptimization(void) { return m_optimize; };
|
||||||
|
|
||||||
|
virtual long DeviceToLogicalX(long x) const;
|
||||||
|
virtual long DeviceToLogicalY(long y) const;
|
||||||
|
virtual long DeviceToLogicalXRel(long x) const;
|
||||||
|
virtual long DeviceToLogicalYRel(long y) const;
|
||||||
|
virtual long LogicalToDeviceX(long x) const;
|
||||||
|
virtual long LogicalToDeviceY(long y) const;
|
||||||
|
virtual long LogicalToDeviceXRel(long x) const;
|
||||||
|
virtual long LogicalToDeviceYRel(long y) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void CalcBoundingBox( long x, long y );
|
||||||
|
void ComputeScaleAndOrigin(void);
|
||||||
|
|
||||||
|
long XDEV2LOG(long x) const
|
||||||
|
{
|
||||||
|
long new_x = x - m_deviceOriginX;
|
||||||
|
if (new_x > 0)
|
||||||
|
return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
|
||||||
|
else
|
||||||
|
return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
|
||||||
|
}
|
||||||
|
long XDEV2LOGREL(long x) const
|
||||||
|
{
|
||||||
|
if (x > 0)
|
||||||
|
return (long)((double)(x) / m_scaleX + 0.5);
|
||||||
|
else
|
||||||
|
return (long)((double)(x) / m_scaleX - 0.5);
|
||||||
|
}
|
||||||
|
long YDEV2LOG(long y) const
|
||||||
|
{
|
||||||
|
long new_y = y - m_deviceOriginY;
|
||||||
|
if (new_y > 0)
|
||||||
|
return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
|
||||||
|
else
|
||||||
|
return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
|
||||||
|
}
|
||||||
|
long YDEV2LOGREL(long y) const
|
||||||
|
{
|
||||||
|
if (y > 0)
|
||||||
|
return (long)((double)(y) / m_scaleY + 0.5);
|
||||||
|
else
|
||||||
|
return (long)((double)(y) / m_scaleY - 0.5);
|
||||||
|
}
|
||||||
|
long XLOG2DEV(long x) const
|
||||||
|
{
|
||||||
|
long new_x = x - m_logicalOriginX;
|
||||||
|
if (new_x > 0)
|
||||||
|
return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
|
||||||
|
else
|
||||||
|
return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
|
||||||
|
}
|
||||||
|
long XLOG2DEVREL(long x) const
|
||||||
|
{
|
||||||
|
if (x > 0)
|
||||||
|
return (long)((double)(x) * m_scaleX + 0.5);
|
||||||
|
else
|
||||||
|
return (long)((double)(x) * m_scaleX - 0.5);
|
||||||
|
}
|
||||||
|
long YLOG2DEV(long y) const
|
||||||
|
{
|
||||||
|
long new_y = y - m_logicalOriginY;
|
||||||
|
if (new_y > 0)
|
||||||
|
return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
|
||||||
|
else
|
||||||
|
return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
|
||||||
|
}
|
||||||
|
long YLOG2DEVREL(long y) const
|
||||||
|
{
|
||||||
|
if (y > 0)
|
||||||
|
return (long)((double)(y) * m_scaleY + 0.5);
|
||||||
|
else
|
||||||
|
return (long)((double)(y) * m_scaleY - 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
bool m_ok;
|
||||||
|
bool m_colour;
|
||||||
|
|
||||||
|
// not sure, what these mean
|
||||||
|
bool m_clipping; // Is clipping on right now ?
|
||||||
|
bool m_isInteractive; // Is GetPixel possible ?
|
||||||
|
bool m_autoSetting; // wxMSW only ?
|
||||||
|
bool m_dontDelete; // wxMSW only ?
|
||||||
|
bool m_optimize; // wxMSW only ?
|
||||||
|
wxString m_filename; // Not sure where this belongs.
|
||||||
|
|
||||||
|
wxPen m_pen;
|
||||||
|
wxBrush m_brush;
|
||||||
|
wxBrush m_backgroundBrush;
|
||||||
|
wxColour m_textForegroundColour;
|
||||||
|
wxColour m_textBackgroundColour;
|
||||||
|
wxFont m_font;
|
||||||
|
|
||||||
|
int m_logicalFunction;
|
||||||
|
int m_backgroundMode;
|
||||||
|
int m_textAlignment; // gone in wxWin 2.0 ?
|
||||||
|
|
||||||
|
int m_mappingMode;
|
||||||
|
|
||||||
|
// not sure what for, but what is a mm on a screen you don't know the size of?
|
||||||
|
double m_mm_to_pix_x,m_mm_to_pix_y;
|
||||||
|
|
||||||
|
long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or
|
||||||
|
// d.o. changes with scrolling.
|
||||||
|
// Set using SetInternalDeviceOrigin().
|
||||||
|
|
||||||
|
long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes
|
||||||
|
// such as wxScrolledWindow
|
||||||
|
// using SetDeviceOrigin()
|
||||||
|
|
||||||
|
long m_deviceOriginX,m_deviceOriginY; // Sum of the two above.
|
||||||
|
|
||||||
|
long m_logicalOriginX,m_logicalOriginY; // User defined.
|
||||||
|
|
||||||
|
double m_scaleX,m_scaleY;
|
||||||
|
double m_logicalScaleX,m_logicalScaleY;
|
||||||
|
double m_userScaleX,m_userScaleY;
|
||||||
|
long m_signX,m_signY;
|
||||||
|
|
||||||
|
bool m_needComputeScaleX,m_needComputeScaleY; // not yet used
|
||||||
|
|
||||||
|
float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
|
||||||
|
|
||||||
|
long m_clipX1,m_clipY1,m_clipX2,m_clipY2;
|
||||||
|
long m_minX,m_maxX,m_minY,m_maxY;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -90,22 +90,15 @@ class WXDLLEXPORT wxWindowDC: public wxDC
|
|||||||
|
|
||||||
virtual void DrawSpline( wxList *points );
|
virtual void DrawSpline( wxList *points );
|
||||||
private:
|
private:
|
||||||
// VisualAge function hiding warning supression
|
void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
|
||||||
void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea)
|
double sa, double ea)
|
||||||
{ wxDC::DrawEllipticArc(pt, sz, sa, ea); }
|
{ wxDC::DrawEllipticArc(pt, sz, sa, ea); };
|
||||||
void DrawPoint( wxPoint& point )
|
void DrawPoint(wxPoint& pt)
|
||||||
{ wxDC::DrawPoint(point); }
|
{ wxDC:DrawPoint(pt); };
|
||||||
void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 )
|
void DrawSpline(int n, wxPoint points[])
|
||||||
{ DrawSpline(x1, y1, x2, y2, x3, y3); }
|
{ wxDC::DrawSpline(n, points); };
|
||||||
void DrawSpline( int n, wxPoint points[] )
|
void DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3)
|
||||||
{ DrawSpline(n, points); }
|
{ wxDC::DrawSpline(x1, y1, x2, y2, x3, y3); };
|
||||||
void GetTextExtent( const wxString &string, long *width, long *height,
|
|
||||||
long *descent = NULL, long *externalLeading = NULL,
|
|
||||||
wxFont *theFont = NULL ) const
|
|
||||||
{ GetTextExtent( string, width, height, descent, externalLeading, theFont); };
|
|
||||||
// these next two are ridiculous! the only difference is the const
|
|
||||||
long GetCharWidth(void) const {return(GetCharWidth());};
|
|
||||||
long GetCharHeight(void) const {return(GetCharHeight());};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -1,136 +1,110 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dialog.h
|
// Name: dialog.h
|
||||||
// Purpose: wxDialog class
|
// Purpose: wxDialog class
|
||||||
// Author: Julian Smart
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart and Markus Holzem
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_DIALOG_H_
|
#ifndef _WX_DIALOG_H_
|
||||||
#define _WX_DIALOG_H_
|
#define _WX_DIALOG_H_
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface "dialog.h"
|
#pragma interface "dialog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
||||||
|
|
||||||
// Dialog boxes
|
// Dialog boxes
|
||||||
class WXDLLEXPORT wxDialog : public wxDialogBase
|
class WXDLLEXPORT wxDialog: public wxDialogBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDialog();
|
|
||||||
|
|
||||||
// Constructor with a modal flag, but no window id - the old convention
|
wxDialog();
|
||||||
wxDialog(wxWindow *parent,
|
|
||||||
const wxString& title, bool modal,
|
// Constructor with a modal flag, but no window id - the old convention
|
||||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
inline wxDialog( wxWindow* parent
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
,const wxString& title
|
||||||
const wxString& name = wxDialogNameStr)
|
,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 ;
|
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height),
|
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
||||||
style | modalStyle, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor with no modal flag - the new convention.
|
// Constructor with no modal flag - the new convention.
|
||||||
wxDialog(wxWindow *parent, wxWindowID id,
|
inline wxDialog( wxWindow* parent
|
||||||
const wxString& title,
|
,wxWindowID id
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
,const wxString& title
|
||||||
const wxSize& size = wxDefaultSize,
|
,const wxPoint& pos = wxDefaultPosition
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
,const wxSize& size = wxDefaultSize
|
||||||
const wxString& name = wxDialogNameStr)
|
,long style = wxDEFAULT_DIALOG_STYLE
|
||||||
|
,const wxString& name = wxDialogNameStr
|
||||||
|
)
|
||||||
{
|
{
|
||||||
Create(parent, id, title, pos, size, style, name);
|
Create(parent, id, title, pos, size, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create( wxWindow* parent
|
||||||
const wxString& title,
|
,wxWindowID id
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
,const wxString& title
|
||||||
const wxSize& size = wxDefaultSize,
|
, // bool modal = FALSE, // TODO make this a window style?
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
const wxPoint& pos = wxDefaultPosition
|
||||||
const wxString& name = wxDialogNameStr);
|
,const wxSize& size = wxDefaultSize
|
||||||
|
,long style = wxDEFAULT_DIALOG_STYLE
|
||||||
|
,const wxString& name = wxDialogNameStr
|
||||||
|
);
|
||||||
|
|
||||||
~wxDialog();
|
~wxDialog();
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Virtuals
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
|
||||||
virtual void DoSetClientSize(int width, int height);
|
|
||||||
|
|
||||||
virtual void GetPosition(int *x, int *y) const;
|
|
||||||
|
|
||||||
bool Show(bool show);
|
|
||||||
bool IsShown() const;
|
|
||||||
void Iconize(bool iconize);
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Iconized() const { return IsIconized(); };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual bool IsIconized() const;
|
virtual bool IsIconized() const;
|
||||||
void Fit();
|
|
||||||
|
|
||||||
void SetTitle(const wxString& title);
|
|
||||||
wxString GetTitle() const ;
|
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
|
||||||
bool OnClose();
|
|
||||||
void OnCharHook(wxKeyEvent& event);
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
|
||||||
|
|
||||||
void SetModal(bool flag);
|
|
||||||
|
|
||||||
virtual void Centre(int direction = wxBOTH);
|
virtual void Centre(int direction = wxBOTH);
|
||||||
virtual bool IsModal() const
|
virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||||
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
|
||||||
|
|
||||||
// For now, same as Show(TRUE) but returns return code
|
virtual int ShowModal();
|
||||||
virtual int ShowModal();
|
|
||||||
virtual void EndModal(int retCode);
|
virtual void EndModal(int retCode);
|
||||||
|
|
||||||
|
void SetClientSize(int width, int height);
|
||||||
|
void GetPosition(int *x, int *y) const;
|
||||||
|
bool Show(bool show);
|
||||||
|
void Iconize(bool iconize);
|
||||||
|
|
||||||
|
void Fit();
|
||||||
|
|
||||||
|
void SetTitle(const wxString& title);
|
||||||
|
wxString GetTitle() const ;
|
||||||
|
|
||||||
|
void OnCharHook(wxKeyEvent& event);
|
||||||
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
|
||||||
|
void SetModal(bool flag);
|
||||||
|
|
||||||
// Standard buttons
|
// Standard buttons
|
||||||
void OnOK(wxCommandEvent& event);
|
void OnOK(wxCommandEvent& event);
|
||||||
void OnApply(wxCommandEvent& event);
|
void OnApply(wxCommandEvent& event);
|
||||||
void OnCancel(wxCommandEvent& event);
|
void OnCancel(wxCommandEvent& event);
|
||||||
|
|
||||||
// Responds to colour changes
|
// Responds to colour changes
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
|
|
||||||
// implementation
|
DECLARE_EVENT_TABLE()
|
||||||
// --------------
|
|
||||||
|
|
||||||
long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool IsModalShowing() const { return m_modalShowing; }
|
|
||||||
|
|
||||||
// tooltip management
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
|
|
||||||
void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
|
|
||||||
#endif // tooltips
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool m_modalShowing;
|
|
||||||
WXHWND m_hwndOldFocus; // the window which had focus before we were shown
|
|
||||||
|
|
||||||
private:
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
WXHWND m_hwndToolTip;
|
|
||||||
#endif // tooltips
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -70,8 +70,55 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
wxDataFormatId m_type;
|
wxDataFormatId m_type;
|
||||||
wxString m_id;
|
wxString m_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
// wxDataBroker (internal)
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxDataBroker : public wxObject
|
||||||
|
{
|
||||||
|
DECLARE_CLASS( wxDataBroker )
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/* constructor */
|
||||||
|
wxDataBroker();
|
||||||
|
|
||||||
|
/* add data object */
|
||||||
|
void Add( wxDataObject *dataObject, bool preferred = FALSE );
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/* OLE implementation, the methods don't need to be overridden */
|
||||||
|
|
||||||
|
/* get number of supported formats */
|
||||||
|
virtual size_t GetFormatCount() const;
|
||||||
|
|
||||||
|
/* return nth supported format */
|
||||||
|
virtual wxDataFormat &GetNthFormat( size_t nth ) const;
|
||||||
|
|
||||||
|
/* return preferrd/best supported format */
|
||||||
|
virtual wxDataFormatId GetPreferredFormat() const;
|
||||||
|
|
||||||
|
/* search through m_dataObjects, return TRUE if found */
|
||||||
|
virtual bool IsSupportedFormat( wxDataFormat &format ) const;
|
||||||
|
|
||||||
|
/* search through m_dataObjects and call child's GetSize() */
|
||||||
|
virtual size_t GetSize( wxDataFormat& format ) const;
|
||||||
|
|
||||||
|
/* search through m_dataObjects and call child's WriteData(dest) */
|
||||||
|
virtual void WriteData( wxDataFormat& format, void *dest ) const;
|
||||||
|
|
||||||
|
/* implementation */
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
wxList m_dataObjects;
|
||||||
|
size_t m_preferred;
|
||||||
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// wxDataObject
|
// wxDataObject
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
@@ -1,220 +1,156 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: frame.h
|
// Name: frame.h
|
||||||
// Purpose: wxFrame class
|
// Purpose: wxFrame class
|
||||||
// Author: Julian Smart
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart and Markus Holzem
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_FRAME_H_
|
#ifndef _WX_FRAME_H_
|
||||||
#define _WX_FRAME_H_
|
#define _WX_FRAME_H_
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface "frame.h"
|
#pragma interface "frame.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
#include "wx/msw/accel.h"
|
#include "wx/accel.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr;
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr;
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxMenuBar;
|
class WXDLLEXPORT wxMenuBar;
|
||||||
class WXDLLEXPORT wxStatusBar;
|
class WXDLLEXPORT wxStatusBar;
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame : public wxWindow
|
class WXDLLEXPORT wxFrame: public wxWindow {
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFrame();
|
wxFrame();
|
||||||
wxFrame(wxWindow *parent,
|
inline wxFrame(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, title, pos, size, style, name);
|
Create(parent, id, title, pos, size, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxFrame();
|
~wxFrame();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr);
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
void SetClientSize(int width, int height);
|
||||||
|
void GetClientSize(int *width, int *height) const;
|
||||||
|
|
||||||
virtual void ClientToScreen(int *x, int *y) const;
|
void GetSize(int *width, int *height) const ;
|
||||||
virtual void ScreenToClient(int *x, int *y) const;
|
void GetPosition(int *x, int *y) const ;
|
||||||
|
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
|
void ClientToScreen(int *x, int *y) const;
|
||||||
|
void ScreenToClient(int *x, int *y) const;
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
void OnMenuHighlight(wxMenuEvent& event);
|
void OnMenuHighlight(wxMenuEvent& event);
|
||||||
void OnActivate(wxActivateEvent& event);
|
void OnActivate(wxActivateEvent& event);
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
|
||||||
bool Show(bool show);
|
bool Show(bool show);
|
||||||
|
|
||||||
// Set menu bar
|
// Set menu bar
|
||||||
void SetMenuBar(wxMenuBar *menu_bar);
|
void SetMenuBar(wxMenuBar *menu_bar);
|
||||||
virtual wxMenuBar *GetMenuBar() const;
|
virtual wxMenuBar *GetMenuBar() const ;
|
||||||
|
|
||||||
// Call this to simulate a menu command
|
// Set title
|
||||||
bool Command(int id) { return ProcessCommand(id); }
|
void SetTitle(const wxString& title);
|
||||||
|
wxString GetTitle() const ;
|
||||||
|
|
||||||
// process menu command: returns TRUE if processed
|
void Centre(int direction = wxBOTH);
|
||||||
bool ProcessCommand(int id);
|
|
||||||
|
|
||||||
// make the window modal (all other windows unresponsive)
|
// Call this to simulate a menu command
|
||||||
virtual void MakeModal(bool modal = TRUE);
|
virtual void Command(int id);
|
||||||
|
virtual void ProcessCommand(int id);
|
||||||
|
|
||||||
// Set icon
|
// Set icon
|
||||||
virtual void SetIcon(const wxIcon& icon);
|
virtual void SetIcon(const wxIcon& icon);
|
||||||
|
|
||||||
// Toolbar
|
// Create status line
|
||||||
#if wxUSE_TOOLBAR
|
virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
|
||||||
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
const wxString& name = "statusBar");
|
||||||
wxWindowID id = -1,
|
inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||||
const wxString& name = wxToolBarNameStr);
|
virtual void PositionStatusBar();
|
||||||
|
virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||||
|
const wxString& name);
|
||||||
|
|
||||||
virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
|
// 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 SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
// Set status line text
|
||||||
virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
|
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||||
|
|
||||||
virtual void PositionToolBar();
|
// Set status line widths
|
||||||
#endif // wxUSE_TOOLBAR
|
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
// Hint to tell framework which status bar to use
|
||||||
// Status bar
|
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||||
long style = wxST_SIZEGRIP,
|
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
||||||
wxWindowID id = 0,
|
|
||||||
const wxString& name = wxStatusLineNameStr);
|
|
||||||
|
|
||||||
wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
// Fit frame around subwindows
|
||||||
void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
|
virtual void Fit();
|
||||||
|
|
||||||
virtual void PositionStatusBar();
|
// Iconize
|
||||||
virtual wxStatusBar *OnCreateStatusBar(int number,
|
virtual void Iconize(bool iconize);
|
||||||
long style,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& name);
|
|
||||||
|
|
||||||
// Set status line text
|
virtual bool IsIconized() const ;
|
||||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
|
||||||
|
|
||||||
// Set status line widths
|
// Compatibility
|
||||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
inline bool Iconized() const { return IsIconized(); }
|
||||||
|
|
||||||
// Hint to tell framework which status bar to use
|
// Is the frame maximized?
|
||||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
virtual bool IsMaximized(void) const ;
|
||||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
|
||||||
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
// Iconize
|
virtual void Maximize(bool maximize);
|
||||||
virtual void Iconize(bool iconize);
|
|
||||||
|
|
||||||
virtual bool IsIconized() const;
|
// Responds to colour changes
|
||||||
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
|
|
||||||
// Is it maximized?
|
// Query app for menu item updates (called from OnIdle)
|
||||||
virtual bool IsMaximized() const;
|
void DoMenuUpdates();
|
||||||
|
void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
|
||||||
|
|
||||||
// Compatibility
|
// Checks if there is a toolbar, and returns the first free client position
|
||||||
bool Iconized() const { return IsIconized(); }
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
|
|
||||||
virtual void Maximize(bool maximize);
|
|
||||||
// virtual bool LoadAccelerators(const wxString& table);
|
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
// Query app for menu item updates (called from OnIdle)
|
|
||||||
void DoMenuUpdates();
|
|
||||||
void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
|
|
||||||
|
|
||||||
WXHMENU GetWinMenu() const { return m_hMenu; }
|
|
||||||
|
|
||||||
// Returns the origin of client area (may be different from (0,0) if the
|
|
||||||
// frame has a toolbar)
|
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
|
||||||
|
|
||||||
// Implementation only from here
|
|
||||||
// event handlers
|
|
||||||
bool HandlePaint();
|
|
||||||
bool HandleSize(int x, int y, WXUINT flag);
|
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
|
||||||
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
|
|
||||||
|
|
||||||
bool MSWCreate(int id, wxWindow *parent, const wxChar *wclass,
|
|
||||||
wxWindow *wx_win, const wxChar *title,
|
|
||||||
int x, int y, int width, int height, long style);
|
|
||||||
|
|
||||||
// tooltip management
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
|
|
||||||
void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
|
|
||||||
#endif // tooltips
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// override base class virtuals
|
wxMenuBar * m_frameMenuBar;
|
||||||
virtual void DoGetClientSize(int *width, int *height) const;
|
wxStatusBar * m_frameStatusBar;
|
||||||
virtual void DoGetSize(int *width, int *height) const;
|
wxIcon m_icon;
|
||||||
virtual void DoGetPosition(int *x, int *y) const;
|
bool m_iconized;
|
||||||
|
static bool m_useNativeStatusBar;
|
||||||
|
wxToolBar * m_frameToolBar ;
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y,
|
DECLARE_EVENT_TABLE()
|
||||||
int width, int height,
|
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
|
||||||
virtual void DoSetClientSize(int width, int height);
|
|
||||||
|
|
||||||
// a plug in for MDI frame classes which need to do something special when
|
|
||||||
// the menubar is set
|
|
||||||
virtual void InternalSetMenuBar();
|
|
||||||
|
|
||||||
// propagate our state change to all child frames
|
|
||||||
void IconizeChildFrames(bool bIconize);
|
|
||||||
|
|
||||||
// we add menu bar accel processing
|
|
||||||
bool MSWTranslateMessage(WXMSG* pMsg);
|
|
||||||
|
|
||||||
// window proc for the frames
|
|
||||||
long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
wxMenuBar * m_frameMenuBar;
|
|
||||||
wxIcon m_icon;
|
|
||||||
bool m_iconized;
|
|
||||||
WXHICON m_defaultIcon;
|
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
wxStatusBar * m_frameStatusBar;
|
|
||||||
|
|
||||||
static bool m_useNativeStatusBar;
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR
|
|
||||||
wxToolBar * m_frameToolBar;
|
|
||||||
#endif // wxUSE_TOOLBAR
|
|
||||||
|
|
||||||
private:
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
WXHWND m_hwndToolTip;
|
|
||||||
#endif // tooltips
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -63,8 +63,6 @@ class WXDLLEXPORT wxGauge: public wxControl
|
|||||||
protected:
|
protected:
|
||||||
int m_rangeMax;
|
int m_rangeMax;
|
||||||
int m_gaugePos;
|
int m_gaugePos;
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -49,8 +49,6 @@ public:
|
|||||||
wxIcon(const char bits[], int width, int height);
|
wxIcon(const char bits[], int width, int height);
|
||||||
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||||
int desiredWidth = -1, int desiredHeight = -1);
|
int desiredWidth = -1, int desiredHeight = -1);
|
||||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
|
||||||
|
|
||||||
~wxIcon();
|
~wxIcon();
|
||||||
|
|
||||||
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||||
@@ -68,9 +66,11 @@ public:
|
|||||||
/* TODO */
|
/* TODO */
|
||||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||||
private:
|
private:
|
||||||
// supress VisAge hiding warning
|
// supress virtual function hiding warning
|
||||||
bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE)
|
virtual bool LoadFile( const wxString& name
|
||||||
{ return(wxBitmap::LoadFile(name, type)); }
|
,long type = wxBITMAP_TYPE_BMP_RESOURCE
|
||||||
|
)
|
||||||
|
{ return(wxBitmap::LoadFile(name, type)); };
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Example handlers. TODO: write your own handlers for relevant types.
|
/* Example handlers. TODO: write your own handlers for relevant types.
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: listbox.h
|
// Name: listbox.h
|
||||||
// Purpose: wxListBox class
|
// Purpose: wxListBox class
|
||||||
// Author: Julian Smart
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -18,131 +18,79 @@
|
|||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxListBoxNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
|
||||||
class WXDLLEXPORT wxOwnerDrawn;
|
|
||||||
|
|
||||||
// define the array of list box items
|
|
||||||
#include <wx/dynarray.h>
|
|
||||||
|
|
||||||
WX_DEFINE_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// forward decl for GetSelections()
|
// forward decl for GetSelections()
|
||||||
class wxArrayInt;
|
class WXDLLEXPORT wxArrayInt;
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxListBox : public wxControl
|
class WXDLLEXPORT wxListBox: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||||
|
public:
|
||||||
|
|
||||||
public:
|
wxListBox();
|
||||||
wxListBox();
|
inline wxListBox(wxWindow *parent, wxWindowID id,
|
||||||
wxListBox(wxWindow *parent, wxWindowID id,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxSize& size = wxDefaultSize,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
long style = 0,
|
||||||
long style = 0,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxString& name = wxListBoxNameStr)
|
||||||
const wxString& name = wxListBoxNameStr)
|
{
|
||||||
{
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxListBoxNameStr);
|
const wxString& name = wxListBoxNameStr);
|
||||||
|
|
||||||
~wxListBox();
|
~wxListBox();
|
||||||
|
|
||||||
bool MSWCommand(WXUINT param, WXWORD id);
|
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);
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
virtual void Deselect(int n);
|
||||||
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
|
||||||
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
|
||||||
|
|
||||||
// plug-in for derived classes
|
// For single choice list item only
|
||||||
virtual wxOwnerDrawn *CreateItem(size_t n);
|
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);
|
||||||
|
|
||||||
// allows to get the item and use SetXXX functions to set it's appearance
|
// For single or multiple choice list item
|
||||||
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
|
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);
|
||||||
|
|
||||||
// get the index of the given item
|
// Set the specified item at the first visible item
|
||||||
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
|
// or scroll to max range.
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
virtual void SetFirstItem(int n) ;
|
||||||
|
virtual void SetFirstItem(const wxString& s) ;
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void InsertItems(int nItems, const wxString items[], int pos);
|
||||||
virtual void Append(const wxString& item, void *clientData);
|
|
||||||
virtual void Set(int n, const wxString* choices, void **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);
|
virtual wxString GetStringSelection() const ;
|
||||||
|
virtual bool SetStringSelection(const wxString& s, bool flag = TRUE);
|
||||||
|
virtual int Number() const ;
|
||||||
|
|
||||||
// For single choice list item only
|
void Command(wxCommandEvent& event);
|
||||||
virtual int GetSelection() const ;
|
|
||||||
virtual void Delete(int n);
|
|
||||||
virtual void *GetClientData(int n) const ;
|
|
||||||
virtual void SetClientData(int n, void *clientData);
|
|
||||||
virtual void SetString(int n, const wxString& s);
|
|
||||||
|
|
||||||
// For single or multiple choice list item
|
protected:
|
||||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
int m_noItems;
|
||||||
virtual bool Selected(int n) const ;
|
int m_selected;
|
||||||
virtual wxString GetString(int n) const ;
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
// Windows-specific code to set the horizontal extent of
|
|
||||||
// the listbox, if necessary. If s is non-NULL, it's
|
|
||||||
// used to calculate the horizontal extent.
|
|
||||||
// Otherwise, all strings are used.
|
|
||||||
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
|
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
virtual void SetupColours();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
int m_noItems;
|
|
||||||
int m_selected;
|
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
|
||||||
// control items
|
|
||||||
wxListBoxItemsArray m_aItems;
|
|
||||||
#endif
|
|
||||||
private:
|
|
||||||
// Virtual function hiding warning
|
|
||||||
virtual wxControl *CreateItem(const wxItemResource* childResource,
|
|
||||||
const wxItemResource* parentResource,
|
|
||||||
const wxResourceTable *table = (const wxResourceTable *) NULL)
|
|
||||||
{ return(wxWindowBase::CreateItem(childResource, parentResource, table)); }
|
|
||||||
virtual void *GetClientData() const
|
|
||||||
{return (wxWindowBase::GetClientData()); }
|
|
||||||
virtual void SetClientData( void *data )
|
|
||||||
{ wxWindowBase::SetClientData(data); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -128,8 +128,8 @@ public:
|
|||||||
virtual void Restore();
|
virtual void Restore();
|
||||||
virtual void Activate();
|
virtual void Activate();
|
||||||
private:
|
private:
|
||||||
// Supress VA's hidden function warning
|
// supress virtual function hiding warning
|
||||||
void Maximize(bool maximize) {wxFrame::Maximize(maximize);}
|
virtual void Maximize(bool maximize) { wxFrame::Maximize(maximize); };
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The client window is a child of the parent MDI frame, and itself
|
/* The client window is a child of the parent MDI frame, and itself
|
||||||
|
@@ -1,14 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: printdlg.h
|
// Name: printdlg.h
|
||||||
// Purpose: wxPrintDialog, wxPageSetupDialog classes.
|
// Purpose: wxPrintDialog, wxPageSetupDialog classes
|
||||||
// Use generic, PostScript version if no
|
// Author: Julian Smart
|
||||||
// platform-specific implementation.
|
|
||||||
// Author: AUTHOR
|
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: ??/??/98
|
// Created: 01/02/97
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) AUTHOR
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_PRINTDLG_H_
|
#ifndef _WX_PRINTDLG_H_
|
||||||
@@ -18,57 +16,61 @@
|
|||||||
#pragma interface "printdlg.h"
|
#pragma interface "printdlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/cmndata.h"
|
#include "wx/cmndata.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* wxPrinterDialog
|
|
||||||
* The common dialog for printing.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxDC;
|
class WXDLLEXPORT wxDC;
|
||||||
class WXDLLEXPORT wxPrintDialog: public wxDialog
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// wxPrinterDialog: the common dialog for printing.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxPrintDialog : public wxDialog
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
|
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPrintDialog();
|
wxPrintDialog();
|
||||||
wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
|
wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
|
||||||
wxPrintDialog(wxWindow *parent, wxPrintData* data);
|
wxPrintDialog(wxWindow *parent, wxPrintData* data);
|
||||||
~wxPrintDialog();
|
virtual ~wxPrintDialog();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxPrintData* data = NULL);
|
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
|
|
||||||
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
||||||
inline wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
|
wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
|
||||||
virtual wxDC *GetPrintDC();
|
virtual wxDC *GetPrintDC();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxPrintDialogData m_printDialogData;
|
wxPrintDialogData m_printDialogData;
|
||||||
wxDC* m_printerDC;
|
wxDC* m_printerDC;
|
||||||
bool m_destroyDC;
|
bool m_destroyDC;
|
||||||
wxWindow* m_dialogParent;
|
wxWindow* m_dialogParent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
|
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
|
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPageSetupDialog();
|
wxPageSetupDialog();
|
||||||
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||||
~wxPageSetupDialog();
|
virtual ~wxPageSetupDialog();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
|
|
||||||
inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
|
wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxPageSetupData m_pageSetupData;
|
wxPageSetupData m_pageSetupData;
|
||||||
wxWindow* m_dialogParent;
|
wxWindow* m_dialogParent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_PRINTDLG_H_
|
// _WX_PRINTDLG_H_
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobox.h
|
// Name: radiobox.h
|
||||||
// Purpose: wxRadioBox class
|
// Purpose: wxRadioBox class
|
||||||
// Author: Julian Smart
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -18,105 +18,69 @@
|
|||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxRadioBoxNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxBitmap;
|
class WXDLLEXPORT wxBitmap ;
|
||||||
|
|
||||||
class WXDLLEXPORT wxRadioBox : public wxControl
|
class WXDLLEXPORT wxRadioBox: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxRadioBox();
|
wxRadioBox();
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
int x = -1, int y = -1, int width = -1, int height = -1,
|
int n = 0, const wxString choices[] = NULL,
|
||||||
int n = 0, char **choices = NULL,
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||||
#endif // WXWIN_COMPATIBILITY
|
{
|
||||||
|
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||||
|
}
|
||||||
|
|
||||||
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
~wxRadioBox();
|
||||||
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);
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
int FindString(const wxString& s) const;
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
void SetSelection(int N);
|
||||||
int n = 0, const wxString choices[] = NULL,
|
int GetSelection() const;
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
wxString GetString(int N) const;
|
||||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
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();
|
||||||
|
bool 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 bool MSWCommand(WXUINT param, WXWORD id);
|
virtual wxString GetStringSelection() const;
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual bool SetStringSelection(const wxString& s);
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
inline virtual int Number() const { return m_noItems; } ;
|
||||||
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
int FindString(const wxString& s) const;
|
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
||||||
void SetSelection(int N);
|
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||||
int GetSelection() const;
|
|
||||||
wxString GetString(int N) const;
|
|
||||||
|
|
||||||
void GetSize(int *x, int *y) const;
|
|
||||||
void GetPosition(int *x, int *y) const;
|
|
||||||
|
|
||||||
void SetLabel(int item, const wxString& label);
|
|
||||||
void SetLabel(int item, wxBitmap *bitmap);
|
|
||||||
wxString GetLabel(int item) const;
|
|
||||||
bool Show(bool show);
|
|
||||||
void SetFocus();
|
|
||||||
bool Enable(bool enable);
|
|
||||||
void Enable(int item, bool enable);
|
|
||||||
void Show(int item, bool show);
|
|
||||||
void SetLabelFont(const wxFont& WXUNUSED(font)) {};
|
|
||||||
void SetButtonFont(const wxFont& font) { SetFont(font); }
|
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const;
|
|
||||||
virtual bool SetStringSelection(const wxString& s);
|
|
||||||
virtual int Number() const { return m_noItems; };
|
|
||||||
void Command(wxCommandEvent& event);
|
|
||||||
|
|
||||||
int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
|
||||||
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
WXHWND *GetRadioButtons() const { return m_radioButtons; }
|
|
||||||
bool ContainsHWND(WXHWND hWnd) const;
|
|
||||||
void SendNotificationEvent();
|
|
||||||
|
|
||||||
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
// get the number of buttons per column/row
|
|
||||||
inline int GetNumVer() const;
|
|
||||||
inline int GetNumHor() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SubclassRadioButton(WXHWND hWndBtn);
|
/* TODO: implementation
|
||||||
|
WXHWND * m_radioButtons;
|
||||||
WXHWND * m_radioButtons;
|
*/
|
||||||
int m_majorDim;
|
int m_majorDim ;
|
||||||
int * m_radioWidth; // for bitmaps
|
int m_noItems;
|
||||||
int * m_radioHeight;
|
int m_noRowsOrCols;
|
||||||
|
int m_selectedButton;
|
||||||
int m_noItems;
|
|
||||||
int m_noRowsOrCols;
|
|
||||||
int m_selectedButton;
|
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y,
|
|
||||||
int width, int height,
|
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
|
||||||
private:
|
|
||||||
// Virtual function hiding warning
|
|
||||||
virtual wxString GetLabel() const
|
|
||||||
{ return(wxControl::GetLabel()); }
|
|
||||||
virtual void SetLabel(const wxString& label)
|
|
||||||
{ wxControl::SetLabel(label); }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -85,8 +85,6 @@ public:
|
|||||||
int m_lineSize;
|
int m_lineSize;
|
||||||
int m_tickFreq;
|
int m_tickFreq;
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -69,16 +69,6 @@ protected:
|
|||||||
int m_max;
|
int m_max;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxSpinEvent: public wxScrollEvent
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
|
|
||||||
|
|
||||||
// Spin events
|
// Spin events
|
||||||
|
|
||||||
#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
||||||
|
@@ -57,8 +57,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBitmap m_messageBitmap;
|
wxBitmap m_messageBitmap;
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -51,8 +51,6 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
|||||||
void SetLabel(const wxString& label);
|
void SetLabel(const wxString& label);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -50,8 +50,6 @@ class WXDLLEXPORT wxStaticText: public wxControl
|
|||||||
// operations
|
// operations
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -42,7 +42,7 @@ class WXDLLEXPORT wxTextCtrl: public wxControl
|
|||||||
|
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// creation
|
// creation
|
||||||
// --------
|
// --------
|
||||||
@@ -59,14 +59,14 @@ public:
|
|||||||
{
|
{
|
||||||
Create(parent, id, value, pos, size, style, validator, name);
|
Create(parent, id, value, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& value = wxEmptyString,
|
const wxString& value = wxEmptyString,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxTextCtrlNameStr);
|
const wxString& name = wxTextCtrlNameStr);
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
// ---------
|
// ---------
|
||||||
virtual wxString GetValue() const ;
|
virtual wxString GetValue() const ;
|
||||||
@@ -79,12 +79,12 @@ public:
|
|||||||
// operations
|
// operations
|
||||||
// ----------
|
// ----------
|
||||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
// Clipboard operations
|
// Clipboard operations
|
||||||
virtual void Copy();
|
virtual void Copy();
|
||||||
virtual void Cut();
|
virtual void Cut();
|
||||||
virtual void Paste();
|
virtual void Paste();
|
||||||
|
|
||||||
virtual bool CanCopy() const;
|
virtual bool CanCopy() const;
|
||||||
virtual bool CanCut() const;
|
virtual bool CanCut() const;
|
||||||
virtual bool CanPaste() const;
|
virtual bool CanPaste() const;
|
||||||
@@ -116,26 +116,26 @@ public:
|
|||||||
int sync();
|
int sync();
|
||||||
int underflow();
|
int underflow();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxTextCtrl& operator<<(const wxString& s);
|
wxTextCtrl& operator<<(const wxString& s);
|
||||||
wxTextCtrl& operator<<(int i);
|
wxTextCtrl& operator<<(int i);
|
||||||
wxTextCtrl& operator<<(long i);
|
wxTextCtrl& operator<<(long i);
|
||||||
wxTextCtrl& operator<<(float f);
|
wxTextCtrl& operator<<(float f);
|
||||||
wxTextCtrl& operator<<(double d);
|
wxTextCtrl& operator<<(double d);
|
||||||
wxTextCtrl& operator<<(const char c);
|
wxTextCtrl& operator<<(const char c);
|
||||||
|
|
||||||
virtual bool LoadFile(const wxString& file);
|
virtual bool LoadFile(const wxString& file);
|
||||||
virtual bool SaveFile(const wxString& file);
|
virtual bool SaveFile(const wxString& file);
|
||||||
virtual void WriteText(const wxString& text);
|
virtual void WriteText(const wxString& text);
|
||||||
virtual void AppendText(const wxString& text);
|
virtual void AppendText(const wxString& text);
|
||||||
virtual void DiscardEdits();
|
virtual void DiscardEdits();
|
||||||
virtual bool IsModified() const;
|
virtual bool IsModified() const;
|
||||||
|
|
||||||
virtual long XYToPosition(long x, long y) const ;
|
virtual long XYToPosition(long x, long y) const ;
|
||||||
virtual void PositionToXY(long pos, long *x, long *y) const ;
|
virtual void PositionToXY(long pos, long *x, long *y) const ;
|
||||||
virtual void ShowPosition(long pos);
|
virtual void ShowPosition(long pos);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
// ---------
|
// ---------
|
||||||
void OnDropFiles(wxDropFilesEvent& event);
|
void OnDropFiles(wxDropFilesEvent& event);
|
||||||
@@ -159,10 +159,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxString m_fileName;
|
wxString m_fileName;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
|
||||||
void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -62,7 +62,7 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
|
|||||||
|
|
||||||
// Add all the buttons
|
// Add all the buttons
|
||||||
virtual bool CreateTools();
|
virtual bool CreateTools();
|
||||||
virtual bool Layout() {return TRUE;}
|
virtual bool Layout() { return TRUE; }
|
||||||
|
|
||||||
// The post-tool-addition call. TODO: do here whatever's
|
// The post-tool-addition call. TODO: do here whatever's
|
||||||
// necessary for completing the toolbar construction.
|
// necessary for completing the toolbar construction.
|
||||||
|
@@ -1,67 +1,65 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: window.h
|
// Name: window.h
|
||||||
// Purpose: wxWindow class
|
// Purpose: wxWindow class
|
||||||
// Author: Julian Smart
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 01/02/97
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart and Markus Holzem
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_WINDOW_H_
|
#ifndef _WX_WINDOW_H_
|
||||||
#define _WX_WINDOW_H_
|
#define _WX_WINDOW_H_
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface "window.h"
|
#pragma interface "window.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #include "wx/msw/winundef.h"
|
#define INCL_DOS
|
||||||
|
#define INCL_PM
|
||||||
|
#include <os2.h>
|
||||||
|
|
||||||
// VZ: apparently some version of Windows send extra mouse move messages after
|
#define wxKEY_SHIFT 1
|
||||||
// a mouse click. My tests under NT 4.0 and 95 didn't show it so I'm
|
#define wxKEY_CTRL 2
|
||||||
// tempted to think that it was just an effect of a poor mouse and so the
|
|
||||||
// code to work around this is currently disabled - just define this as 1
|
|
||||||
// to reenable it
|
|
||||||
#define wxUSE_MOUSEEVENT_HACK 0
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// forward declarations
|
// forward declarations
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxWindow;
|
||||||
class WXDLLEXPORT wxButton;
|
class WXDLLEXPORT wxButton;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
#if wxUSE_DRAG_AND_DROP
|
||||||
// constants
|
class WXDLLEXPORT wxDropTarget;
|
||||||
// ---------------------------------------------------------------------------
|
#endif
|
||||||
|
|
||||||
// FIXME does anybody use those? they're unused by wxWindows...
|
#if wxUSE_WX_RESOURCES
|
||||||
enum
|
class WXDLLEXPORT wxResourceTable;
|
||||||
{
|
class WXDLLEXPORT wxItemResource;
|
||||||
wxKEY_SHIFT = 1,
|
#endif
|
||||||
wxKEY_CTRL = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
|
||||||
// wxWindow declaration for MSW
|
|
||||||
// ---------------------------------------------------------------------------
|
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
|
||||||
class WXDLLEXPORT wxWindow : public wxWindowBase
|
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxWindow: public wxWindowBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxWindow);
|
DECLARE_ABSTRACT_CLASS(wxWindow)
|
||||||
|
|
||||||
|
friend class wxDC;
|
||||||
|
friend class wxPaintDC;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxWindow() { Init(); }
|
wxWindow() { Init(); };
|
||||||
|
inline wxWindow( wxWindow* parent
|
||||||
wxWindow(wxWindow *parent,
|
,wxWindowID id
|
||||||
wxWindowID id,
|
,const wxPoint& pos = wxDefaultPosition
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
,const wxSize& size = wxDefaultSize
|
||||||
const wxSize& size = wxDefaultSize,
|
,long style = 0
|
||||||
long style = 0,
|
,const wxString& name = wxPanelNameStr
|
||||||
const wxString& name = wxPanelNameStr)
|
)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
@@ -69,121 +67,160 @@ public:
|
|||||||
|
|
||||||
virtual ~wxWindow();
|
virtual ~wxWindow();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create( wxWindow* parent
|
||||||
wxWindowID id,
|
,wxWindowID id
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
,const wxPoint& pos = wxDefaultPosition
|
||||||
const wxSize& size = wxDefaultSize,
|
,const wxSize& size = wxDefaultSize
|
||||||
long style = 0,
|
,long style = 0
|
||||||
const wxString& name = wxPanelNameStr);
|
,const wxString& name = wxPanelNameStr
|
||||||
|
);
|
||||||
|
|
||||||
// implement base class pure virtuals
|
// ---------------------------------------------------------------------------
|
||||||
virtual void SetTitle( const wxString& title);
|
// wxWindowBase pure virtual implementations
|
||||||
virtual wxString GetTitle() const;
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Z order
|
||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
// Set the focus to this window
|
||||||
virtual bool Show( bool show = TRUE );
|
|
||||||
virtual bool Enable( bool enable = TRUE );
|
|
||||||
|
|
||||||
virtual void SetFocus();
|
virtual void SetFocus();
|
||||||
|
// Warp the pointer the given position
|
||||||
virtual bool Reparent( wxWindow *newParent );
|
virtual void WarpPointer(int x_pos, int y_pos) ;
|
||||||
|
// Capture/release mouse
|
||||||
virtual void WarpPointer(int x, int y);
|
|
||||||
virtual void CaptureMouse();
|
virtual void CaptureMouse();
|
||||||
virtual void ReleaseMouse();
|
virtual void ReleaseMouse();
|
||||||
|
// Send the window a refresh event
|
||||||
virtual void Refresh( bool eraseBackground = TRUE,
|
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
|
||||||
const wxRect *rect = (const wxRect *) NULL );
|
// Clear the window
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
// Set window's font
|
||||||
|
virtual bool SetFont(const wxFont& f);
|
||||||
|
// Get character size
|
||||||
|
virtual int GetCharHeight() const;
|
||||||
|
virtual int GetCharWidth() const;
|
||||||
|
virtual void GetTextExtent( const wxString& string
|
||||||
|
,int* x
|
||||||
|
,int* y
|
||||||
|
,int* descent = NULL
|
||||||
|
,int* externalLeading = NULL
|
||||||
|
,const wxFont* theFont = NULL
|
||||||
|
) const;
|
||||||
|
|
||||||
virtual bool SetCursor( const wxCursor &cursor );
|
// Configure the window's scrollbar
|
||||||
virtual bool SetFont( const wxFont &font );
|
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 wxRect* rect = NULL
|
||||||
|
);
|
||||||
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
void SetDropTarget(wxDropTarget *pDropTarget);
|
||||||
|
#endif
|
||||||
|
// coordinates translation
|
||||||
|
virtual void DoClientToScreen( int *x, int *y ) const;
|
||||||
|
virtual void DoScreenToClient( int *x, int *y ) const;
|
||||||
|
|
||||||
virtual int GetCharHeight() const;
|
// retrieve the position/size of the window
|
||||||
virtual int GetCharWidth() const;
|
virtual void DoGetPosition( int *x, int *y ) const;
|
||||||
virtual void GetTextExtent(const wxString& string,
|
virtual void DoGetSize( int *width, int *height ) const;
|
||||||
int *x, int *y,
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||||
int *descent = (int *) NULL,
|
|
||||||
int *externalLeading = (int *) NULL,
|
|
||||||
const wxFont *theFont = (const wxFont *) NULL)
|
|
||||||
const;
|
|
||||||
|
|
||||||
virtual bool PopupMenu( wxMenu *menu, int x, int y );
|
// this is the virtual function to be overriden in any derived class which
|
||||||
|
// wants to change how SetSize() or Move() works - it is called by all
|
||||||
|
// versions of these functions in the base class
|
||||||
|
virtual void DoSetSize(int x, int y,
|
||||||
|
int width, int height,
|
||||||
|
int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
|
// same as DoSetSize() for the client size
|
||||||
|
virtual void DoSetClientSize(int width, int height);
|
||||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
// ---------------------------------------------------------------------------
|
||||||
int range, bool refresh = TRUE );
|
// wxWindowBase virtual implementations that need to be overriden
|
||||||
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 = (wxRect *) NULL );
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
// Fit the window around the items
|
||||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
virtual void Fit();
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
// Show or hide the window
|
||||||
|
virtual bool Show(bool show); // check if base implementation is OK
|
||||||
|
// Enable or disable the window
|
||||||
|
virtual bool Enable(bool enable); // check if base implementation is OK
|
||||||
|
// Set the cursor
|
||||||
|
virtual bool SetCursor(const wxCursor& cursor); // check if base implementation is OK
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// additional functions
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Dialog support: override these and call
|
||||||
|
// base class members to add functionality
|
||||||
|
// that can't be done using validators.
|
||||||
|
|
||||||
|
// 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();
|
||||||
|
|
||||||
|
|
||||||
|
// Get the window with the focus
|
||||||
|
static wxWindow *FindFocus();
|
||||||
|
|
||||||
// Accept files for dragging
|
// Accept files for dragging
|
||||||
virtual void DragAcceptFiles(bool accept);
|
virtual void DragAcceptFiles(bool accept);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
// Most windows have the concept of a label; for frames, this is the
|
||||||
// Set/get scroll attributes
|
// title; for items, this is the label or button text.
|
||||||
virtual void SetScrollRange(int orient, int range, bool refresh = TRUE);
|
inline virtual wxString GetLabel() const { return GetTitle(); }
|
||||||
virtual void SetScrollPage(int orient, int page, bool refresh = TRUE);
|
|
||||||
virtual int OldGetScrollRange(int orient) const;
|
|
||||||
virtual int GetScrollPage(int orient) const;
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
// Handle a control command
|
// 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;
|
||||||
|
|
||||||
|
|
||||||
|
// Handle a control command
|
||||||
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
|
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
// Get the default button, if there is one
|
||||||
// clicking on a listbox)
|
inline virtual wxButton *GetDefaultItem() const;
|
||||||
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
|
inline virtual void SetDefaultItem(wxButton *but);
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
// Override to define new behaviour for default action (e.g. double clicking
|
||||||
// caret manipulation (old MSW only functions, see wxCaret class for the
|
// on a listbox)
|
||||||
// new API)
|
virtual void OnDefaultAction(wxControl *initiatingItem);
|
||||||
void CreateCaret(int w, int h);
|
|
||||||
void CreateCaret(const wxBitmap *bitmap);
|
|
||||||
void DestroyCaret();
|
|
||||||
void ShowCaret(bool show);
|
|
||||||
void SetCaretPos(int x, int y);
|
|
||||||
void GetCaretPos(int *x, int *y) const;
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
|
||||||
// FIXME: should they really be all virtual?
|
|
||||||
virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id);
|
|
||||||
virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name);
|
|
||||||
wxWindow* GetWindowChild1(wxWindowID id);
|
|
||||||
wxWindow* GetWindowChild(wxWindowID id);
|
|
||||||
|
|
||||||
// implementation from now on
|
|
||||||
// --------------------------
|
|
||||||
|
|
||||||
// simple accessors
|
|
||||||
// ----------------
|
|
||||||
|
|
||||||
WXHWND GetHWND() const { return m_hWnd; }
|
|
||||||
void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
|
|
||||||
virtual WXWidget GetHandle() const { return GetHWND(); }
|
|
||||||
|
|
||||||
bool GetUseCtl3D() const { return m_useCtl3D; }
|
|
||||||
bool GetTransparentBackground() const { return m_backgroundTransparent; }
|
|
||||||
void SetTransparent(bool t = TRUE) { m_backgroundTransparent = t; }
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
// --------------
|
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
void OnEraseBackground(wxEraseEvent& event);
|
||||||
|
void OnChar(wxKeyEvent& event);
|
||||||
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
|
void OnKeyUp(wxKeyEvent& event);
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// IMPLEMENTATION
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
// For implementation purposes - sometimes decorations make the client area
|
// For implementation purposes - sometimes decorations make the client area
|
||||||
// smaller
|
// smaller
|
||||||
virtual wxPoint GetClientAreaOrigin() const;
|
virtual wxPoint GetClientAreaOrigin() const;
|
||||||
@@ -192,245 +229,52 @@ public:
|
|||||||
// a toolbar that it manages itself).
|
// a toolbar that it manages itself).
|
||||||
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
||||||
|
|
||||||
// Windows subclassing
|
// Executes the default message
|
||||||
void SubclassWin(WXHWND hWnd);
|
virtual long Default();
|
||||||
void UnsubclassWin();
|
|
||||||
|
|
||||||
WXFARPROC MSWGetOldWndProc() const { return m_oldWndProc; }
|
/* TODO: you may need something like this
|
||||||
void MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
|
// Determine whether 3D effects are wanted
|
||||||
|
virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
|
||||||
|
*/
|
||||||
|
|
||||||
wxWindow *FindItem(int id) const;
|
// Constraint implementation
|
||||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
|
void UnsetConstraints(wxLayoutConstraints *c);
|
||||||
|
// Back-pointer to other windows we're involved with, so if we delete
|
||||||
|
// this window, we must delete any constraints we're involved with.
|
||||||
|
|
||||||
// Make a Windows extended style from the given wxWindows window style
|
wxObject *GetChild(int number) const ;
|
||||||
virtual WXDWORD MakeExtendedStyle(long style, bool eliminateBorders = TRUE);
|
|
||||||
// Determine whether 3D effects are wanted
|
|
||||||
virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
|
|
||||||
|
|
||||||
// MSW only: TRUE if this control is part of the main control
|
// Transfers data to any child controls
|
||||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
|
void OnInitDialog(wxInitDialogEvent& event);
|
||||||
|
|
||||||
// returns TRUE if the window has been created
|
|
||||||
bool MSWCreate(int id,
|
|
||||||
wxWindow *parent,
|
|
||||||
const wxChar *wclass,
|
|
||||||
wxWindow *wx_win,
|
|
||||||
const wxChar *title,
|
|
||||||
int x, int y, int width, int height,
|
|
||||||
WXDWORD style,
|
|
||||||
const wxChar *dialog_template = NULL,
|
|
||||||
WXDWORD exendedStyle = 0);
|
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject *GetChild(int number) const;
|
|
||||||
virtual void MSWDeviceToLogical(float *x, float *y) const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Create an appropriate wxWindow from a HWND
|
|
||||||
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
|
|
||||||
|
|
||||||
// Make sure the window style reflects the HWND style (roughly)
|
|
||||||
virtual void AdoptAttributesFromHWND();
|
|
||||||
|
|
||||||
// Setup background and foreground colours correctly
|
|
||||||
virtual void SetupColours();
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// helpers for message handlers: these perform the same function as the
|
|
||||||
// message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into
|
|
||||||
// the correct parameters
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void UnpackCommand(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *id, WXHWND *hwnd, WXWORD *cmd);
|
|
||||||
void UnpackActivate(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *state, WXWORD *minimized, WXHWND *hwnd);
|
|
||||||
void UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *code, WXWORD *pos, WXHWND *hwnd);
|
|
||||||
void UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd);
|
|
||||||
void UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
|
|
||||||
WXWORD *item, WXWORD *flags, WXHMENU *hmenu);
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// internal handlers for MSW messages: all handlers return a boolen value:
|
|
||||||
// TRUE means that the handler processed the event and FALSE that it didn't
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// there are several cases where we have virtual functions for Windows
|
|
||||||
// message processing: this is because these messages often require to be
|
|
||||||
// processed in a different manner in the derived classes. For all other
|
|
||||||
// messages, however, we do *not* have corresponding MSWOnXXX() function
|
|
||||||
// and if the derived class wants to process them, it should override
|
|
||||||
// MSWWindowProc() directly.
|
|
||||||
|
|
||||||
// scroll event (both horizontal and vertical)
|
|
||||||
virtual bool MSWOnScroll(int orientation, WXWORD nSBCode,
|
|
||||||
WXWORD pos, WXHWND control);
|
|
||||||
|
|
||||||
// child control notifications
|
|
||||||
#ifdef __WIN95__
|
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
|
||||||
#endif // __WIN95__
|
|
||||||
|
|
||||||
// owner-drawn controls need to process these messages
|
|
||||||
virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item);
|
|
||||||
virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item);
|
|
||||||
|
|
||||||
// the rest are not virtual
|
|
||||||
bool HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate);
|
|
||||||
bool HandleInitDialog(WXHWND hWndFocus);
|
|
||||||
bool HandleDestroy();
|
|
||||||
|
|
||||||
bool HandlePaint();
|
|
||||||
bool HandleEraseBkgnd(WXHDC pDC);
|
|
||||||
|
|
||||||
bool HandleMinimize();
|
|
||||||
bool HandleMaximize();
|
|
||||||
bool HandleSize(int x, int y, WXUINT flag);
|
|
||||||
bool HandleGetMinMaxInfo(void *mmInfo);
|
|
||||||
|
|
||||||
bool HandleShow(bool show, int status);
|
|
||||||
bool HandleActivate(int flag, bool minimized, WXHWND activate);
|
|
||||||
|
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
|
||||||
bool HandleSysCommand(WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool HandleCtlColor(WXHBRUSH *hBrush,
|
|
||||||
WXHDC hdc,
|
|
||||||
WXHWND hWnd,
|
|
||||||
WXUINT nCtlColor,
|
|
||||||
WXUINT message,
|
|
||||||
WXWPARAM wParam,
|
|
||||||
WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool HandlePaletteChanged(WXHWND hWndPalChange);
|
|
||||||
bool HandleQueryNewPalette();
|
|
||||||
bool HandleSysColorChange();
|
|
||||||
|
|
||||||
bool HandleQueryEndSession(long logOff, bool *mayEnd);
|
|
||||||
bool HandleEndSession(bool endSession, long logOff);
|
|
||||||
|
|
||||||
bool HandleSetFocus(WXHWND wnd);
|
|
||||||
bool HandleKillFocus(WXHWND wnd);
|
|
||||||
|
|
||||||
bool HandleDropFiles(WXWPARAM wParam);
|
|
||||||
|
|
||||||
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
|
|
||||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
|
||||||
|
|
||||||
bool HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
|
||||||
bool HandleKeyDown(WXWORD wParam, WXLPARAM lParam);
|
|
||||||
bool HandleKeyUp(WXWORD wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
bool HandleQueryDragIcon(WXHICON *hIcon);
|
|
||||||
|
|
||||||
bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg);
|
|
||||||
|
|
||||||
// Window procedure
|
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
|
|
||||||
// Calls an appropriate default window procedure
|
|
||||||
virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
||||||
virtual bool MSWProcessMessage(WXMSG* pMsg);
|
|
||||||
virtual bool MSWTranslateMessage(WXMSG* pMsg);
|
|
||||||
virtual void MSWDestroyWindow();
|
|
||||||
|
|
||||||
// Detach "Window" menu from menu bar so it doesn't get deleted
|
|
||||||
void MSWDetachWindowMenu();
|
|
||||||
|
|
||||||
// this function should return the brush to paint the window background
|
|
||||||
// with or 0 for the default brush
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC hDC,
|
|
||||||
WXHWND hWnd,
|
|
||||||
WXUINT nCtlColor,
|
|
||||||
WXUINT message,
|
|
||||||
WXWPARAM wParam,
|
|
||||||
WXLPARAM lParam);
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetShowing(bool show) { (void)Show(show); }
|
|
||||||
bool IsUserEnabled() const { return IsEnabled(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Responds to colour changes: passes event on to children.
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
// initialize various fields of wxMouseEvent (common part of MSWOnMouseXXX)
|
|
||||||
void InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the window handle
|
|
||||||
WXHWND m_hWnd;
|
|
||||||
|
|
||||||
// the old window proc (we subclass all windows)
|
// Caret data
|
||||||
WXFARPROC m_oldWndProc;
|
int m_caretWidth;
|
||||||
|
int m_caretHeight;
|
||||||
|
bool m_caretEnabled;
|
||||||
|
bool m_caretShown;
|
||||||
|
|
||||||
// additional (MSW specific) flags
|
wxButton * m_defaultItem;
|
||||||
bool m_useCtl3D:1; // Using CTL3D for this control
|
|
||||||
bool m_backgroundTransparent:1;
|
|
||||||
bool m_mouseInWindow:1;
|
|
||||||
bool m_doubleClickAllowed:1;
|
|
||||||
bool m_winCaptured:1;
|
|
||||||
|
|
||||||
// the size of one page for scrolling
|
public:
|
||||||
int m_xThumbSize;
|
int m_returnCode;
|
||||||
int m_yThumbSize;
|
|
||||||
|
|
||||||
#if wxUSE_MOUSEEVENT_HACK
|
|
||||||
// the coordinates of the last mouse event and the type of it
|
|
||||||
long m_lastMouseX,
|
|
||||||
m_lastMouseY;
|
|
||||||
int m_lastMouseEvent;
|
|
||||||
#endif // wxUSE_MOUSEEVENT_HACK
|
|
||||||
|
|
||||||
WXHMENU m_hMenu; // Menu, if any
|
|
||||||
|
|
||||||
// the return value of WM_GETDLGCODE handler
|
|
||||||
long m_lDlgCode;
|
|
||||||
|
|
||||||
// implement the base class pure virtuals
|
|
||||||
virtual void DoClientToScreen( int *x, int *y ) const;
|
|
||||||
virtual void DoScreenToClient( int *x, int *y ) const;
|
|
||||||
virtual void DoGetPosition( int *x, int *y ) const;
|
|
||||||
virtual void DoGetSize( int *width, int *height ) const;
|
|
||||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
|
||||||
virtual void DoSetSize(int x, int y,
|
|
||||||
int width, int height,
|
|
||||||
int sizeFlags = wxSIZE_AUTO);
|
|
||||||
virtual void DoSetClientSize(int width, int height);
|
|
||||||
|
|
||||||
// get the size which best suits the window: e.g., for a static text it
|
|
||||||
// will be the width and height of the text
|
|
||||||
virtual wxSize DoGetBestSize();
|
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
virtual void DoSetToolTip( wxToolTip *tip );
|
|
||||||
#endif // wxUSE_TOOLTIPS
|
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
private:
|
||||||
// common part of all ctors
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
// the (non-virtual) handlers for the events
|
|
||||||
bool HandleMove(int x, int y);
|
|
||||||
bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags);
|
|
||||||
|
|
||||||
DECLARE_NO_COPY_CLASS(wxWindow);
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
// Supress virtual function hiding warning
|
|
||||||
virtual bool Reparent( wxWindowBase *newParent )
|
|
||||||
{return(wxWindowBase::Reparent(newParent));}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
////////////////////////////////////////////////////////////////////////
|
||||||
// global functions
|
//// INLINES
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// kbd code translation
|
inline wxButton *wxWindow::GetDefaultItem() const { return m_defaultItem; }
|
||||||
WXDLLEXPORT int wxCharCodeMSWToWX(int keySym);
|
inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; }
|
||||||
WXDLLEXPORT int wxCharCodeWXToMSW(int id, bool *IsVirtual);
|
inline void wxWindow::SetReturnCode(int retCode) { m_returnCode = retCode; }
|
||||||
|
inline int wxWindow::GetReturnCode() { return m_returnCode; }
|
||||||
|
|
||||||
|
// Get the active window.
|
||||||
|
wxWindow* WXDLLEXPORT wxGetActiveWindow();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_WINDOW_H_
|
// _WX_WINDOW_H_
|
||||||
|
@@ -159,7 +159,7 @@ class WXDLLEXPORT wxPropertyListView: public wxPropertyView
|
|||||||
inline virtual wxButton *GetWindowCloseButton() const { return m_windowCloseButton; }
|
inline virtual wxButton *GetWindowCloseButton() const { return m_windowCloseButton; }
|
||||||
inline virtual wxButton *GetWindowCancelButton() const { return m_windowCancelButton; }
|
inline virtual wxButton *GetWindowCancelButton() const { return m_windowCancelButton; }
|
||||||
inline virtual wxButton *GetHelpButton() const { return m_windowHelpButton; }
|
inline virtual wxButton *GetHelpButton() const { return m_windowHelpButton; }
|
||||||
|
|
||||||
bool OnClose(void);
|
bool OnClose(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -177,15 +177,18 @@ public:
|
|||||||
|
|
||||||
static wxBitmap* sm_tickBitmap;
|
static wxBitmap* sm_tickBitmap;
|
||||||
static wxBitmap* sm_crossBitmap;
|
static wxBitmap* sm_crossBitmap;
|
||||||
|
|
||||||
wxPanel* m_propertyWindow; // Panel that the controls will appear on
|
wxPanel* m_propertyWindow; // Panel that the controls will appear on
|
||||||
wxWindow* m_managedWindow; // Frame or dialog
|
wxWindow* m_managedWindow; // Frame or dialog
|
||||||
|
|
||||||
wxButton* m_windowCloseButton; // Or OK
|
wxButton* m_windowCloseButton; // Or OK
|
||||||
wxButton* m_windowCancelButton;
|
wxButton* m_windowCancelButton;
|
||||||
wxButton* m_windowHelpButton;
|
wxButton* m_windowHelpButton;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
private:
|
||||||
|
virtual void ShowView(wxPropertySheet *propertySheet, wxWindow *window)
|
||||||
|
{ wxPropertyView::ShowView(propertySheet, window); };
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
|
class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
|
||||||
@@ -206,7 +209,7 @@ class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
|
|||||||
/*
|
/*
|
||||||
* The type of validator used for property lists (Visual Basic style)
|
* The type of validator used for property lists (Visual Basic style)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyListValidator)
|
DECLARE_DYNAMIC_CLASS(wxPropertyListValidator)
|
||||||
@@ -221,7 +224,7 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
|||||||
|
|
||||||
// Called when the property is double clicked. Extra functionality can be provided, such as
|
// Called when the property is double clicked. Extra functionality can be provided, such as
|
||||||
// cycling through possible values.
|
// cycling through possible values.
|
||||||
inline virtual bool OnDoubleClick(
|
inline virtual bool OnDoubleClick(
|
||||||
wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) )
|
wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) )
|
||||||
{ return TRUE; }
|
{ return TRUE; }
|
||||||
|
|
||||||
@@ -268,7 +271,7 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
|||||||
/*
|
/*
|
||||||
* A default dialog box class to use.
|
* A default dialog box class to use.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyListDialog: public wxDialog
|
class WXDLLEXPORT wxPropertyListDialog: public wxDialog
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPropertyListDialog)
|
DECLARE_CLASS(wxPropertyListDialog)
|
||||||
@@ -292,7 +295,7 @@ DECLARE_EVENT_TABLE()
|
|||||||
/*
|
/*
|
||||||
* A default panel class to use.
|
* A default panel class to use.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyListPanel: public wxPanel
|
class WXDLLEXPORT wxPropertyListPanel: public wxPanel
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPropertyListPanel)
|
DECLARE_CLASS(wxPropertyListPanel)
|
||||||
@@ -325,7 +328,7 @@ DECLARE_EVENT_TABLE()
|
|||||||
/*
|
/*
|
||||||
* A default frame class to use.
|
* A default frame class to use.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyListFrame: public wxFrame
|
class WXDLLEXPORT wxPropertyListFrame: public wxFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPropertyListFrame)
|
DECLARE_CLASS(wxPropertyListFrame)
|
||||||
@@ -355,7 +358,7 @@ DECLARE_EVENT_TABLE()
|
|||||||
/*
|
/*
|
||||||
* Some default validators
|
* Some default validators
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WXDLLEXPORT wxRealListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxRealListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRealListValidator)
|
DECLARE_DYNAMIC_CLASS(wxRealListValidator)
|
||||||
@@ -472,7 +475,7 @@ class WXDLLEXPORT wxStringListValidator: public wxPropertyListValidator
|
|||||||
protected:
|
protected:
|
||||||
wxStringList* m_strings;
|
wxStringList* m_strings;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFilenameListValidator)
|
DECLARE_DYNAMIC_CLASS(wxFilenameListValidator)
|
||||||
@@ -501,7 +504,7 @@ class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
|
|||||||
protected:
|
protected:
|
||||||
wxString m_filenameWildCard;
|
wxString m_filenameWildCard;
|
||||||
wxString m_filenameMessage;
|
wxString m_filenameMessage;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxColourListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxColourListValidator: public wxPropertyListValidator
|
||||||
|
@@ -52,7 +52,7 @@ class wxTCPClient;
|
|||||||
class wxTCPConnection: public wxConnectionBase
|
class wxTCPConnection: public wxConnectionBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxTCPConnection)
|
DECLARE_DYNAMIC_CLASS(wxTCPConnection)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxSocketBase *m_sock;
|
wxSocketBase *m_sock;
|
||||||
wxSocketStream *m_sockstrm;
|
wxSocketStream *m_sockstrm;
|
||||||
@@ -94,6 +94,9 @@ public:
|
|||||||
|
|
||||||
// To enable the compressor
|
// To enable the compressor
|
||||||
void Compress(bool on);
|
void Compress(bool on);
|
||||||
|
private:
|
||||||
|
// to prevent virtual function hiding warnings
|
||||||
|
virtual bool Execute(const wxString& str) { return(wxConnectionBase::Execute(str)); };
|
||||||
};
|
};
|
||||||
|
|
||||||
class wxTCPServer: public wxServerBase
|
class wxTCPServer: public wxServerBase
|
||||||
@@ -105,9 +108,9 @@ public:
|
|||||||
|
|
||||||
wxTCPServer();
|
wxTCPServer();
|
||||||
virtual ~wxTCPServer();
|
virtual ~wxTCPServer();
|
||||||
|
|
||||||
// Returns FALSE if can't create server (e.g. port number is already in use)
|
// Returns FALSE if can't create server (e.g. port number is already in use)
|
||||||
virtual bool Create(const wxString& server_name);
|
virtual bool Create(const wxString& server_name);
|
||||||
virtual wxConnectionBase *OnAcceptConnection(const wxString& topic);
|
virtual wxConnectionBase *OnAcceptConnection(const wxString& topic);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -115,7 +118,7 @@ class wxTCPClient: public wxClientBase
|
|||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxTCPClient)
|
DECLARE_DYNAMIC_CLASS(wxTCPClient)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTCPClient();
|
wxTCPClient();
|
||||||
virtual ~wxTCPClient();
|
virtual ~wxTCPClient();
|
||||||
|
|
||||||
@@ -125,7 +128,7 @@ public:
|
|||||||
virtual wxConnectionBase *MakeConnection(const wxString& host,
|
virtual wxConnectionBase *MakeConnection(const wxString& host,
|
||||||
const wxString& server,
|
const wxString& server,
|
||||||
const wxString& topic);
|
const wxString& topic);
|
||||||
|
|
||||||
// Tailor this to return own connection.
|
// Tailor this to return own connection.
|
||||||
virtual wxConnectionBase *OnMakeConnection();
|
virtual wxConnectionBase *OnMakeConnection();
|
||||||
};
|
};
|
||||||
|
@@ -27,9 +27,9 @@ class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream
|
|||||||
wxSocketOutputStream(wxSocketBase& s);
|
wxSocketOutputStream(wxSocketBase& s);
|
||||||
~wxSocketOutputStream();
|
~wxSocketOutputStream();
|
||||||
|
|
||||||
off_t SeekO( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
|
off_t SeekO( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
off_t TellO()
|
off_t TellO() const
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -44,9 +44,9 @@ class WXDLLEXPORT wxSocketInputStream : public wxInputStream
|
|||||||
wxSocketInputStream(wxSocketBase& s);
|
wxSocketInputStream(wxSocketBase& s);
|
||||||
~wxSocketInputStream();
|
~wxSocketInputStream();
|
||||||
|
|
||||||
off_t SeekI( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
|
off_t SeekI( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
off_t TellI()
|
off_t TellI() const
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -646,7 +646,7 @@ public:
|
|||||||
// get the haqndle of the window for the underlying window system: this
|
// get the haqndle of the window for the underlying window system: this
|
||||||
// is only used for wxWin itself or for user code which wants to call
|
// is only used for wxWin itself or for user code which wants to call
|
||||||
// platform-specific APIs
|
// platform-specific APIs
|
||||||
virtual WXWidget GetHandle() const = 0;
|
virtual WXWidget GetHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the window id - a number which uniquely identifies a window among
|
// the window id - a number which uniquely identifies a window among
|
||||||
|
Reference in New Issue
Block a user