Some compile warnings removed; file selector prototypes put in each filedlg.h;
Dialog Editor wxGTK makefile hacked git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -202,9 +202,17 @@ public:
|
|||||||
{ return wxConfigBase::Read(key, val); }
|
{ return wxConfigBase::Read(key, val); }
|
||||||
bool Read(const wxString& key, double* val, double defVal) const
|
bool Read(const wxString& key, double* val, double defVal) const
|
||||||
{ return wxConfigBase::Read(key, val, defVal); }
|
{ return wxConfigBase::Read(key, val, defVal); }
|
||||||
|
bool Read(const wxString& key, bool* val) const
|
||||||
|
{ return wxConfigBase::Read(key, val); }
|
||||||
|
bool Read(const wxString& key, bool* val, bool defVal) const
|
||||||
|
{ return wxConfigBase::Read(key, val, defVal); }
|
||||||
|
|
||||||
virtual bool Write(const wxString& key, const wxString& szValue);
|
virtual bool Write(const wxString& key, const wxString& szValue);
|
||||||
virtual bool Write(const wxString& key, long lValue);
|
virtual bool Write(const wxString& key, long lValue);
|
||||||
|
bool Write(const wxString& key, double value)
|
||||||
|
{ return wxConfigBase::Write(key, value); }
|
||||||
|
bool Write(const wxString& key, bool value)
|
||||||
|
{ return wxConfigBase::Write(key, value); }
|
||||||
|
|
||||||
virtual bool Flush(bool bCurrentOnly = FALSE);
|
virtual bool Flush(bool bCurrentOnly = FALSE);
|
||||||
|
|
||||||
|
@@ -15,41 +15,6 @@
|
|||||||
#include "wx/stubs/filedlg.h"
|
#include "wx/stubs/filedlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// File selector - backward compatibility
|
|
||||||
WXDLLEXPORT wxString
|
|
||||||
wxFileSelector(const char *message = wxFileSelectorPromptStr,
|
|
||||||
const char *default_path = NULL,
|
|
||||||
const char *default_filename = NULL,
|
|
||||||
const char *default_extension = NULL,
|
|
||||||
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
|
||||||
int flags = 0,
|
|
||||||
wxWindow *parent = NULL,
|
|
||||||
int x = -1, int y = -1);
|
|
||||||
|
|
||||||
// An extended version of wxFileSelector
|
|
||||||
WXDLLEXPORT wxString
|
|
||||||
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
|
|
||||||
const char *default_path = NULL,
|
|
||||||
const char *default_filename = NULL,
|
|
||||||
int *indexDefaultExtension = NULL,
|
|
||||||
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
|
||||||
int flags = 0,
|
|
||||||
wxWindow *parent = NULL,
|
|
||||||
int x = -1, int y = -1);
|
|
||||||
|
|
||||||
// Ask for filename to load
|
|
||||||
WXDLLEXPORT wxString
|
|
||||||
wxLoadFileSelector(const char *what,
|
|
||||||
const char *extension,
|
|
||||||
const char *default_name = (const char *)NULL,
|
|
||||||
wxWindow *parent = (wxWindow *) NULL);
|
|
||||||
|
|
||||||
// Ask for filename to save
|
|
||||||
WXDLLEXPORT wxString
|
|
||||||
wxSaveFileSelector(const char *what,
|
|
||||||
const char *extension,
|
|
||||||
const char *default_name = (const char *) NULL,
|
|
||||||
wxWindow *parent = (wxWindow *) NULL);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_FILEDLG_H_BASE_
|
// _WX_FILEDLG_H_BASE_
|
||||||
|
@@ -210,7 +210,11 @@ class WXDLLEXPORT wxPathList : public wxStringList
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void AddEnvList(const wxString& envVariable); // Adds all paths in environment variable
|
void AddEnvList(const wxString& envVariable); // Adds all paths in environment variable
|
||||||
|
|
||||||
void Add(const wxString& path);
|
void Add(const wxString& path);
|
||||||
|
// Avoid compiler warning
|
||||||
|
wxNode *Add(const char *s) { return wxStringList::Add(s); }
|
||||||
|
|
||||||
wxString FindValidPath(const wxString& filename); // Find the first full path
|
wxString FindValidPath(const wxString& filename); // Find the first full path
|
||||||
// for which the file exists
|
// for which the file exists
|
||||||
wxString FindAbsoluteValidPath(const wxString& filename); // Find the first full path
|
wxString FindAbsoluteValidPath(const wxString& filename); // Find the first full path
|
||||||
|
@@ -76,5 +76,41 @@ class wxFileDialog: public wxDialog
|
|||||||
#define wxHIDE_READONLY 8
|
#define wxHIDE_READONLY 8
|
||||||
#define wxFILE_MUST_EXIST 16
|
#define wxFILE_MUST_EXIST 16
|
||||||
|
|
||||||
|
// File selector - backward compatibility
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelector(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
const char *default_extension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// An extended version of wxFileSelector
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
int *indexDefaultExtension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// Ask for filename to load
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxLoadFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *)NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
|
// Ask for filename to save
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxSaveFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *) NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// __GTKFILEDLGH__
|
// __GTKFILEDLGH__
|
||||||
|
@@ -76,5 +76,41 @@ class wxFileDialog: public wxDialog
|
|||||||
#define wxHIDE_READONLY 8
|
#define wxHIDE_READONLY 8
|
||||||
#define wxFILE_MUST_EXIST 16
|
#define wxFILE_MUST_EXIST 16
|
||||||
|
|
||||||
|
// File selector - backward compatibility
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelector(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
const char *default_extension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// An extended version of wxFileSelector
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
int *indexDefaultExtension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// Ask for filename to load
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxLoadFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *)NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
|
// Ask for filename to save
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxSaveFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *) NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// __GTKFILEDLGH__
|
// __GTKFILEDLGH__
|
||||||
|
@@ -50,7 +50,7 @@ public:
|
|||||||
const wxString& GetMimeType() const { return m_mimetype; }
|
const wxString& GetMimeType() const { return m_mimetype; }
|
||||||
|
|
||||||
// override this function in derived class
|
// override this function in derived class
|
||||||
virtual wxString GetParamValue(const wxString& paramName) const
|
virtual wxString GetParamValue(const wxString& WXUNUSED(paramName)) const
|
||||||
{ return ""; }
|
{ return ""; }
|
||||||
|
|
||||||
// virtual dtor as in any base class
|
// virtual dtor as in any base class
|
||||||
|
@@ -47,6 +47,10 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
|
|||||||
{
|
{
|
||||||
SetBitmapLabel(bitmap);
|
SetBitmapLabel(bitmap);
|
||||||
}
|
}
|
||||||
|
virtual void SetLabel(const wxString& label)
|
||||||
|
{
|
||||||
|
wxControl::SetLabel(label);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void SetBitmapLabel(const wxBitmap& bitmap);
|
virtual void SetBitmapLabel(const wxBitmap& bitmap);
|
||||||
|
|
||||||
|
@@ -83,6 +83,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
virtual void SetLabel(const wxBitmap *bitmap);
|
virtual void SetLabel(const wxBitmap *bitmap);
|
||||||
};
|
};
|
||||||
|
@@ -60,6 +60,7 @@ class WXDLLEXPORT wxChoice: public wxControl
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const ;
|
virtual wxString GetStringSelection() const ;
|
||||||
virtual bool SetStringSelection(const wxString& sel);
|
virtual bool SetStringSelection(const wxString& sel);
|
||||||
|
@@ -55,6 +55,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
// List functions
|
// List functions
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
|
@@ -44,13 +44,44 @@ class WXDLLEXPORT wxWindowDC: public wxDC
|
|||||||
~wxWindowDC(void);
|
~wxWindowDC(void);
|
||||||
|
|
||||||
virtual void FloodFill( long x1, long y1, const wxColour& col, int style=wxFLOOD_SURFACE );
|
virtual void FloodFill( long x1, long y1, const wxColour& col, int style=wxFLOOD_SURFACE );
|
||||||
|
inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE)
|
||||||
|
{
|
||||||
|
FloodFill(pt.x, pt.y, col, style);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool GetPixel( long x1, long y1, wxColour *col ) const;
|
virtual bool GetPixel( long x1, long y1, wxColour *col ) const;
|
||||||
|
inline bool GetPixel(const wxPoint& pt, wxColour *col) const
|
||||||
|
{
|
||||||
|
return GetPixel(pt.x, pt.y, col);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DrawLine( long x1, long y1, long x2, long y2 );
|
virtual void DrawLine( long x1, long y1, long x2, long y2 );
|
||||||
|
inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
|
||||||
|
{
|
||||||
|
DrawLine(pt1.x, pt1.y, pt2.x, pt2.y);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void CrossHair( long x, long y );
|
virtual void CrossHair( long x, long y );
|
||||||
|
inline void CrossHair(const wxPoint& pt)
|
||||||
|
{
|
||||||
|
CrossHair(pt.x, pt.y);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc );
|
virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc );
|
||||||
|
inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
|
||||||
|
{
|
||||||
|
DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea );
|
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea );
|
||||||
|
virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea)
|
||||||
|
{
|
||||||
|
DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DrawPoint( long x, long y );
|
virtual void DrawPoint( long x, long y );
|
||||||
|
inline void DrawPoint( wxPoint& point )
|
||||||
|
{ DrawPoint(point.x, point.y); }
|
||||||
|
|
||||||
virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 );
|
virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 );
|
||||||
virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
|
virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
|
||||||
@@ -60,15 +91,57 @@ class WXDLLEXPORT wxWindowDC: public wxDC
|
|||||||
int fillStyle=wxODDEVEN_RULE );
|
int fillStyle=wxODDEVEN_RULE );
|
||||||
|
|
||||||
virtual void DrawRectangle( long x, long y, long width, long height );
|
virtual void DrawRectangle( long x, long y, long width, long height );
|
||||||
|
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 );
|
virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 );
|
||||||
|
inline void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius = 20.0)
|
||||||
|
{
|
||||||
|
DrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius);
|
||||||
|
}
|
||||||
|
inline void DrawRoundedRectangle(const wxRect& rect, double radius = 20.0)
|
||||||
|
{
|
||||||
|
DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, radius);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DrawEllipse( long x, long y, long width, long height );
|
virtual void DrawEllipse( long x, long y, long width, long height );
|
||||||
|
inline void DrawEllipse(const wxPoint& pt, const wxSize& sz)
|
||||||
|
{
|
||||||
|
DrawEllipse(pt.x, pt.y, sz.x, sz.y);
|
||||||
|
}
|
||||||
|
inline void DrawEllipse(const wxRect& rect)
|
||||||
|
{
|
||||||
|
DrawEllipse(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool CanDrawBitmap(void) const;
|
virtual bool CanDrawBitmap(void) const;
|
||||||
|
|
||||||
virtual void DrawIcon( const wxIcon &icon, long x, long y);
|
virtual void DrawIcon( const wxIcon &icon, long x, long y);
|
||||||
|
inline void DrawIcon(const wxIcon& icon, const wxPoint& pt)
|
||||||
|
{
|
||||||
|
DrawIcon(icon, pt.x, pt.y);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool Blit( long xdest, long ydest, long width, long height,
|
virtual bool Blit( long xdest, long ydest, long width, long height,
|
||||||
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE );
|
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE );
|
||||||
|
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 );
|
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE );
|
||||||
|
inline void DrawText(const wxString& text, const wxPoint& pt, bool use16bit = FALSE)
|
||||||
|
{
|
||||||
|
DrawText(text, pt.x, pt.y, use16bit);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool CanGetTextExtent(void) const;
|
virtual bool CanGetTextExtent(void) const;
|
||||||
virtual void GetTextExtent( const wxString &string, long *width, long *height,
|
virtual void GetTextExtent( const wxString &string, long *width, long *height,
|
||||||
long *descent = NULL, long *externalLeading = NULL,
|
long *descent = NULL, long *externalLeading = NULL,
|
||||||
@@ -94,6 +167,10 @@ class WXDLLEXPORT wxWindowDC: public wxDC
|
|||||||
virtual void DestroyClippingRegion(void);
|
virtual void DestroyClippingRegion(void);
|
||||||
|
|
||||||
virtual void DrawSpline( wxList *points );
|
virtual void DrawSpline( wxList *points );
|
||||||
|
virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 )
|
||||||
|
{ wxDC::DrawSpline(x1, y1, x2, y2, x3, y3); }
|
||||||
|
virtual void DrawSpline( int n, wxPoint points[] )
|
||||||
|
{ wxDC::DrawSpline(n, points); }
|
||||||
|
|
||||||
// Motif-specific
|
// Motif-specific
|
||||||
void SetDCClipping (); // Helper function for setting clipping
|
void SetDCClipping (); // Helper function for setting clipping
|
||||||
|
@@ -67,6 +67,7 @@ public:
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
bool Show(bool show);
|
bool Show(bool show);
|
||||||
void Iconize(bool iconize);
|
void Iconize(bool iconize);
|
||||||
|
@@ -74,22 +74,22 @@ public:
|
|||||||
#define wxFILE_MUST_EXIST 0x0010
|
#define wxFILE_MUST_EXIST 0x0010
|
||||||
|
|
||||||
// File selector - backward compatibility
|
// File selector - backward compatibility
|
||||||
char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
WXDLLEXPORT wxString wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||||
const char *default_filename = NULL, const char *default_extension = NULL,
|
const char *default_filename = NULL, const char *default_extension = NULL,
|
||||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
||||||
wxWindow *parent = NULL, int x = -1, int y = -1);
|
wxWindow *parent = NULL, int x = -1, int y = -1);
|
||||||
|
|
||||||
// An extended version of wxFileSelector
|
// An extended version of wxFileSelector
|
||||||
char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
WXDLLEXPORT wxString wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||||
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
|
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
|
||||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
|
||||||
wxWindow *parent = NULL, int x = -1, int y = -1);
|
wxWindow *parent = NULL, int x = -1, int y = -1);
|
||||||
|
|
||||||
// Generic file load dialog
|
// Generic file load dialog
|
||||||
char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
WXDLLEXPORT wxString wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||||
|
|
||||||
// Generic file save dialog
|
// Generic file save dialog
|
||||||
char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
WXDLLEXPORT wxString wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_FILEDLG_H_
|
// _WX_FILEDLG_H_
|
||||||
|
@@ -71,6 +71,7 @@ public:
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void ClientToScreen(int *x, int *y) const;
|
void ClientToScreen(int *x, int *y) const;
|
||||||
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
|
||||||
|
@@ -60,6 +60,7 @@ class WXDLLEXPORT wxGauge: public wxControl
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||||
|
|
||||||
|
@@ -56,6 +56,8 @@ public:
|
|||||||
|
|
||||||
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||||
int desiredWidth = -1, int desiredHeight = -1);
|
int desiredWidth = -1, int desiredHeight = -1);
|
||||||
|
bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM)
|
||||||
|
{ return wxBitmap::LoadFile(name, type); }
|
||||||
|
|
||||||
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
|
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
|
||||||
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
||||||
|
@@ -67,7 +67,9 @@ class WXDLLEXPORT wxListBox: public wxControl
|
|||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual char *GetClientData(int n) const ;
|
virtual char *GetClientData(int n) const ;
|
||||||
|
virtual void *GetClientData() { return wxWindow::GetClientData(); }
|
||||||
virtual void SetClientData(int n, char *clientData);
|
virtual void SetClientData(int n, char *clientData);
|
||||||
|
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
||||||
virtual void SetString(int n, const wxString& s);
|
virtual void SetString(int n, const wxString& s);
|
||||||
|
|
||||||
// For single or multiple choice list item
|
// For single or multiple choice list item
|
||||||
@@ -79,6 +81,7 @@ class WXDLLEXPORT wxListBox: public wxControl
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
// Set the specified item at the first visible item
|
// Set the specified item at the first visible item
|
||||||
// or scroll to max range.
|
// or scroll to max range.
|
||||||
|
@@ -155,6 +155,7 @@ public:
|
|||||||
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void GetSize(int *width, int *height) const;
|
void GetSize(int *width, int *height) const;
|
||||||
wxSize GetSize() const { return wxWindow::GetSize(); }
|
wxSize GetSize() const { return wxWindow::GetSize(); }
|
||||||
@@ -226,6 +227,7 @@ class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
|
|||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void SetClientSize(int width, int height);
|
void SetClientSize(int width, int height);
|
||||||
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
|
||||||
|
@@ -54,6 +54,8 @@ public:
|
|||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
|
||||||
void SetLabel(int item, const wxString& label) ;
|
void SetLabel(int item, const wxString& label) ;
|
||||||
wxString GetLabel(int item) const;
|
wxString GetLabel(int item) const;
|
||||||
|
@@ -58,6 +58,7 @@ public:
|
|||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void SetRange(int minValue, int maxValue);
|
void SetRange(int minValue, int maxValue);
|
||||||
|
|
||||||
|
@@ -53,6 +53,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
||||||
|
|
||||||
|
@@ -52,6 +52,7 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
|||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
||||||
|
virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
|
||||||
|
|
||||||
void SetLabel(const wxString& label);
|
void SetLabel(const wxString& label);
|
||||||
wxString GetLabel() const;
|
wxString GetLabel() const;
|
||||||
|
@@ -69,5 +69,41 @@ protected:
|
|||||||
#define wxHIDE_READONLY 0x0008
|
#define wxHIDE_READONLY 0x0008
|
||||||
#define wxFILE_MUST_EXIST 0x0010
|
#define wxFILE_MUST_EXIST 0x0010
|
||||||
|
|
||||||
|
// File selector - backward compatibility
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelector(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
const char *default_extension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// An extended version of wxFileSelector
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
int *indexDefaultExtension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// Ask for filename to load
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxLoadFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *)NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
|
// Ask for filename to save
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxSaveFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *) NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_FILEDLG_H_
|
// _WX_FILEDLG_H_
|
||||||
|
@@ -221,7 +221,7 @@ public:
|
|||||||
inline virtual wxPrintPreviewBase *GetPrintPreview() const { return m_printPreview; }
|
inline virtual wxPrintPreviewBase *GetPrintPreview() const { return m_printPreview; }
|
||||||
|
|
||||||
void OnPrint(wxCommandEvent& event);
|
void OnPrint(wxCommandEvent& event);
|
||||||
void OnClose(wxCommandEvent& event);
|
void OnWindowClose(wxCommandEvent& event);
|
||||||
void OnNext(wxCommandEvent& event);
|
void OnNext(wxCommandEvent& event);
|
||||||
void OnPrevious(wxCommandEvent& event);
|
void OnPrevious(wxCommandEvent& event);
|
||||||
void OnZoom(wxCommandEvent& event);
|
void OnZoom(wxCommandEvent& event);
|
||||||
|
@@ -67,5 +67,40 @@ public:
|
|||||||
#define wxHIDE_READONLY 0x0008
|
#define wxHIDE_READONLY 0x0008
|
||||||
#define wxFILE_MUST_EXIST 0x0010
|
#define wxFILE_MUST_EXIST 0x0010
|
||||||
|
|
||||||
|
// File selector - backward compatibility
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelector(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
const char *default_extension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// An extended version of wxFileSelector
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
|
||||||
|
const char *default_path = NULL,
|
||||||
|
const char *default_filename = NULL,
|
||||||
|
int *indexDefaultExtension = NULL,
|
||||||
|
const char *wildcard = wxFileSelectorDefaultWildcardStr,
|
||||||
|
int flags = 0,
|
||||||
|
wxWindow *parent = NULL,
|
||||||
|
int x = -1, int y = -1);
|
||||||
|
|
||||||
|
// Ask for filename to load
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxLoadFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *)NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
|
|
||||||
|
// Ask for filename to save
|
||||||
|
WXDLLEXPORT wxString
|
||||||
|
wxSaveFileSelector(const char *what,
|
||||||
|
const char *extension,
|
||||||
|
const char *default_name = (const char *) NULL,
|
||||||
|
wxWindow *parent = (wxWindow *) NULL);
|
||||||
#endif
|
#endif
|
||||||
// _WX_FILEDLG_H_
|
// _WX_FILEDLG_H_
|
||||||
|
@@ -28,7 +28,10 @@
|
|||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
#include "wx/clipbrd.h"
|
#include "wx/clipbrd.h"
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
#include "wx/tooltip.h"
|
#include "wx/tooltip.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||||
#define USE_XPM
|
#define USE_XPM
|
||||||
@@ -337,7 +340,10 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
|||||||
(void)new wxButton( panel, ID_LISTBOX_APPEND, "Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
|
(void)new wxButton( panel, ID_LISTBOX_APPEND, "Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_LISTBOX_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
|
(void)new wxButton( panel, ID_LISTBOX_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
|
||||||
button = new wxButton( panel, ID_LISTBOX_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
|
button = new wxButton( panel, ID_LISTBOX_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
wxToolTip::Add( button, "Press here to set italic font" );
|
wxToolTip::Add( button, "Press here to set italic font" );
|
||||||
|
#endif
|
||||||
// button->SetForegroundColour( "red" );
|
// button->SetForegroundColour( "red" );
|
||||||
m_checkbox = new wxCheckBox( panel, ID_LISTBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
|
m_checkbox = new wxCheckBox( panel, ID_LISTBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
|
||||||
m_checkbox->SetValue(FALSE);
|
m_checkbox->SetValue(FALSE);
|
||||||
|
@@ -222,7 +222,7 @@ void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel)
|
BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel)
|
||||||
EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose)
|
EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnWindowClose)
|
||||||
EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint)
|
EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint)
|
||||||
EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious)
|
EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious)
|
||||||
EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext)
|
EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext)
|
||||||
@@ -259,7 +259,7 @@ void wxPreviewControlBar::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
dc.DrawLine( 0, h-1, w, h-1 );
|
dc.DrawLine( 0, h-1, w, h-1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPreviewControlBar::OnClose(wxCommandEvent& WXUNUSED(event))
|
void wxPreviewControlBar::OnWindowClose(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxPreviewFrame *frame = (wxPreviewFrame *)GetParent();
|
wxPreviewFrame *frame = (wxPreviewFrame *)GetParent();
|
||||||
frame->Close(TRUE);
|
frame->Close(TRUE);
|
||||||
|
@@ -168,7 +168,7 @@ void wxMenuBar::SetLabel( int id, const wxString &label )
|
|||||||
{
|
{
|
||||||
wxMenuItem* item = FindMenuItemById( id );
|
wxMenuItem* item = FindMenuItemById( id );
|
||||||
|
|
||||||
if (item) return item->SetText( label );
|
if (item) item->SetText( label );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMenuBar::EnableTop( int pos, bool flag )
|
void wxMenuBar::EnableTop( int pos, bool flag )
|
||||||
|
@@ -168,7 +168,7 @@ void wxMenuBar::SetLabel( int id, const wxString &label )
|
|||||||
{
|
{
|
||||||
wxMenuItem* item = FindMenuItemById( id );
|
wxMenuItem* item = FindMenuItemById( id );
|
||||||
|
|
||||||
if (item) return item->SetText( label );
|
if (item) item->SetText( label );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMenuBar::EnableTop( int pos, bool flag )
|
void wxMenuBar::EnableTop( int pos, bool flag )
|
||||||
|
@@ -96,7 +96,7 @@ wxString wxFileSelectorEx(const char *title,
|
|||||||
if ( fileDialog.ShowModal() == wxID_OK )
|
if ( fileDialog.ShowModal() == wxID_OK )
|
||||||
{
|
{
|
||||||
*defaultFilterIndex = fileDialog.GetFilterIndex();
|
*defaultFilterIndex = fileDialog.GetFilterIndex();
|
||||||
return fileDialog.GetPath());
|
return fileDialog.GetPath();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
Reference in New Issue
Block a user