1. wxDataObject compilation fixes (can't test if it works right now, sorry)

2. wxProgressDialog ctor has "style" parameter
3. the controls samples now also demonstrates wxUpdateUI events and
wxProgressDialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-05-27 12:49:40 +00:00
parent 082b27986b
commit 9726da4fd3
9 changed files with 119 additions and 46 deletions

View File

@@ -109,7 +109,7 @@ public:
wxString GetId() const { return m_format.GetId(); }
// implement the base class pure virtuals
virtual wxDataFormat GetPreferredFormat() const
virtual wxDataFormatId GetPreferredFormat() const
{ return m_format; }
virtual bool IsSupportedFormat(wxDataFormat format) const
{ return m_format == format; }

View File

@@ -646,7 +646,12 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
#define wxLI_HORIZONTAL wxHORIZONTAL
#define wxLI_VERTICAL wxVERTICAL
/*
* wxProgressDialog flags
*/
#define wxPD_CAN_ABORT 0x0001
#define wxPD_APP_MODAL 0x0002
#define wxPD_AUTO_HIDE 0x0004
/*
* GDI descriptions

View File

@@ -32,17 +32,14 @@ public:
frames or parent frame to avoid recursion problems.
@param title title for window
@param message message to display in window
@param maximum maximum value for status bar, if <= 0, no bar is shown
@param maximum value for status bar, if <= 0, no bar is shown
@param parent window or NULL
@param disableParentOnly if true, only disable parent window's
event handling
@param abortButton if true, dialog will show an abort button
@param style is the bit mask of wxPD_XXX constants from wx/defs.h
*/
wxProgressDialog(const wxString &title, wxString const &message,
int maximum = 100,
wxWindow *parent = NULL,
bool disableParentOnly = FALSE,
bool abortButton = FALSE);
int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE);
/** Destructor.
Re-enables event handling for other windows.
*/

View File

@@ -44,7 +44,7 @@ public:
wxDataFormat( wxDataFormatId type );
wxDataFormat( const wxString &id );
wxDataFormat( const wxChar *id );
wxDataFormat( wxDataFormat &format );
wxDataFormat( const wxDataFormat &format );
wxDataFormat( const GdkAtom atom );
void SetType( wxDataFormatId type );
@@ -62,6 +62,12 @@ public:
GdkAtom GetAtom();
void SetAtom(GdkAtom atom) { m_hasAtom = TRUE; m_atom = atom; }
// implicit conversion to wxDataFormatId
operator wxDataFormatId() const { return m_type; }
bool operator==(wxDataFormatId type) const { return m_type == type; }
bool operator!=(wxDataFormatId type) const { return m_type != type; }
private:
wxDataFormatId m_type;
wxString m_id;
@@ -96,7 +102,7 @@ private:
virtual wxDataFormat &GetNthFormat( size_t nth ) const;
/* return preferrd/best supported format */
virtual wxDataFormat &GetPreferredFormat() const;
virtual wxDataFormatId GetPreferredFormat() const;
/* search through m_dataObjects, return TRUE if found */
virtual bool IsSupportedFormat( wxDataFormat &format ) const;

View File

@@ -44,7 +44,7 @@ public:
wxDataFormat( wxDataFormatId type );
wxDataFormat( const wxString &id );
wxDataFormat( const wxChar *id );
wxDataFormat( wxDataFormat &format );
wxDataFormat( const wxDataFormat &format );
wxDataFormat( const GdkAtom atom );
void SetType( wxDataFormatId type );
@@ -62,6 +62,12 @@ public:
GdkAtom GetAtom();
void SetAtom(GdkAtom atom) { m_hasAtom = TRUE; m_atom = atom; }
// implicit conversion to wxDataFormatId
operator wxDataFormatId() const { return m_type; }
bool operator==(wxDataFormatId type) const { return m_type == type; }
bool operator!=(wxDataFormatId type) const { return m_type != type; }
private:
wxDataFormatId m_type;
wxString m_id;
@@ -96,7 +102,7 @@ private:
virtual wxDataFormat &GetNthFormat( size_t nth ) const;
/* return preferrd/best supported format */
virtual wxDataFormat &GetPreferredFormat() const;
virtual wxDataFormatId GetPreferredFormat() const;
/* search through m_dataObjects, return TRUE if found */
virtual bool IsSupportedFormat( wxDataFormat &format ) const;