Small changed to wxExtDialog
Made DnD use long instead of int Made DnD sample compile again Re-Updated wxTextDialog Added GetDefaultSize() to wxButton git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,6 +62,14 @@ public:
|
||||
{ m_clientWindow = clientWindow; }
|
||||
wxWindow *GetClientWindow()
|
||||
{ return m_clientWindow; }
|
||||
void SetClientWindowMargin( int margin )
|
||||
{ m_clientWindowMargin = margin; }
|
||||
int GetClientWindowMargin()
|
||||
{ return m_clientWindowMargin; }
|
||||
void SetSpacePerButton( wxSize space )
|
||||
{ m_spacePerButton = space; }
|
||||
wxSize GetSpacePerButton()
|
||||
{ return m_spacePerButton; }
|
||||
|
||||
void AddButton( wxButton *button );
|
||||
|
||||
@@ -77,7 +85,7 @@ public:
|
||||
void OnYes(wxCommandEvent& event);
|
||||
void OnNo(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
|
||||
protected:
|
||||
wxWindow *m_clientWindow;
|
||||
long m_extraStyle;
|
||||
@@ -85,7 +93,9 @@ protected:
|
||||
#if wxUSE_STATLINE
|
||||
wxStaticLine *m_statLine;
|
||||
#endif
|
||||
|
||||
int m_clientWindowMargin;
|
||||
wxSize m_spacePerButton;
|
||||
|
||||
wxSize LayoutButtons();
|
||||
|
||||
private:
|
||||
|
@@ -60,6 +60,8 @@ class wxButton: public wxControl
|
||||
void SetDefault();
|
||||
void SetLabel( const wxString &label );
|
||||
bool Enable( bool enable );
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
// implementation
|
||||
|
||||
|
@@ -57,17 +57,17 @@ public:
|
||||
/* may be overridden to reject certain formats or drops
|
||||
on certain areas. always returns TRUE by default
|
||||
indicating that you'd accept the data from the drag. */
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
|
||||
/* has to be overridden to accept a drop event. call
|
||||
IsSupported() to ask which formats are available
|
||||
and then call RequestData() to indicate the format
|
||||
you request. */
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
|
||||
/* this gets called once the data has actually arrived. get
|
||||
it with GetData(). this has to be overridden. */
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* called from within OnDrop() to request a certain format
|
||||
from the drop event. */
|
||||
@@ -106,12 +106,12 @@ public:
|
||||
|
||||
wxTextDropTarget() {}
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropData to get at the text */
|
||||
virtual bool OnDropText( int x, int y, const wxChar *text ) = 0;
|
||||
virtual bool OnDropText( long x, long y, const wxChar *text ) = 0;
|
||||
|
||||
};
|
||||
|
||||
@@ -129,12 +129,12 @@ public:
|
||||
/* see SetId() below for explanation */
|
||||
wxPrivateDropTarget( const wxString &id );
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropData to get at the data */
|
||||
virtual bool OnDropData( int x, int y, void *data, size_t size ) = 0;
|
||||
virtual bool OnDropData( long x, long y, void *data, size_t size ) = 0;
|
||||
|
||||
/* the string ID identifies the format of clipboard or DnD data. a word
|
||||
processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
|
||||
@@ -158,12 +158,12 @@ public:
|
||||
|
||||
wxFileDropTarget() {}
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropFiles to get at the file names */
|
||||
virtual bool OnDropFiles( int x, int y, size_t nFiles, const wxChar * const aszFiles[] ) = 0;
|
||||
virtual bool OnDropFiles( long x, long y, size_t nFiles, const wxChar * const aszFiles[] ) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/extdlg.h"
|
||||
|
||||
// Handy dialog functions (will be converted into classes at some point)
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||
|
@@ -60,6 +60,8 @@ class wxButton: public wxControl
|
||||
void SetDefault();
|
||||
void SetLabel( const wxString &label );
|
||||
bool Enable( bool enable );
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
// implementation
|
||||
|
||||
|
@@ -57,17 +57,17 @@ public:
|
||||
/* may be overridden to reject certain formats or drops
|
||||
on certain areas. always returns TRUE by default
|
||||
indicating that you'd accept the data from the drag. */
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
|
||||
/* has to be overridden to accept a drop event. call
|
||||
IsSupported() to ask which formats are available
|
||||
and then call RequestData() to indicate the format
|
||||
you request. */
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
|
||||
/* this gets called once the data has actually arrived. get
|
||||
it with GetData(). this has to be overridden. */
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* called from within OnDrop() to request a certain format
|
||||
from the drop event. */
|
||||
@@ -106,12 +106,12 @@ public:
|
||||
|
||||
wxTextDropTarget() {}
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropData to get at the text */
|
||||
virtual bool OnDropText( int x, int y, const wxChar *text ) = 0;
|
||||
virtual bool OnDropText( long x, long y, const wxChar *text ) = 0;
|
||||
|
||||
};
|
||||
|
||||
@@ -129,12 +129,12 @@ public:
|
||||
/* see SetId() below for explanation */
|
||||
wxPrivateDropTarget( const wxString &id );
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropData to get at the data */
|
||||
virtual bool OnDropData( int x, int y, void *data, size_t size ) = 0;
|
||||
virtual bool OnDropData( long x, long y, void *data, size_t size ) = 0;
|
||||
|
||||
/* the string ID identifies the format of clipboard or DnD data. a word
|
||||
processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
|
||||
@@ -158,12 +158,12 @@ public:
|
||||
|
||||
wxFileDropTarget() {}
|
||||
|
||||
virtual bool OnMove( int x, int y );
|
||||
virtual bool OnDrop( int x, int y );
|
||||
virtual bool OnData( int x, int y );
|
||||
virtual bool OnMove( long x, long y );
|
||||
virtual bool OnDrop( long x, long y );
|
||||
virtual bool OnData( long x, long y );
|
||||
|
||||
/* you have to override OnDropFiles to get at the file names */
|
||||
virtual bool OnDropFiles( int x, int y, size_t nFiles, const wxChar * const aszFiles[] ) = 0;
|
||||
virtual bool OnDropFiles( long x, long y, size_t nFiles, const wxChar * const aszFiles[] ) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/extdlg.h"
|
||||
|
||||
// Handy dialog functions (will be converted into classes at some point)
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||
|
Reference in New Issue
Block a user