Added Prepend() and Remove() methods to wxSizer,
Corrected a stupid bug in it, Freshed up wxPropertyXXX to make use of the icons in the dialogs. Made wxBmpButton inherit from wxButton. Grumble. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@@ -40,7 +41,7 @@ extern const wxChar *wxButtonNameStr;
|
||||
// wxBitmapButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmapButton: public wxControl
|
||||
class wxBitmapButton: public wxButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
virtual void SetDefault();
|
||||
|
||||
void SetLabel( const wxString &label );
|
||||
wxString GetLabel() const;
|
||||
|
@@ -57,7 +57,7 @@ class wxButton: public wxControl
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
virtual void SetDefault();
|
||||
void SetLabel( const wxString &label );
|
||||
bool Enable( bool enable );
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@@ -40,7 +41,7 @@ extern const wxChar *wxButtonNameStr;
|
||||
// wxBitmapButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmapButton: public wxControl
|
||||
class wxBitmapButton: public wxButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
virtual void SetDefault();
|
||||
|
||||
void SetLabel( const wxString &label );
|
||||
wxString GetLabel() const;
|
||||
|
@@ -57,7 +57,7 @@ class wxButton: public wxControl
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
virtual void SetDefault();
|
||||
void SetLabel( const wxString &label );
|
||||
bool Enable( bool enable );
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/layout.h"
|
||||
#include "wx/sizer.h"
|
||||
|
||||
class wxWindow;
|
||||
class wxProperty;
|
||||
|
@@ -172,12 +172,10 @@ public:
|
||||
wxButton* m_confirmButton; // A tick, as in VB
|
||||
wxButton* m_cancelButton; // A cross, as in VB
|
||||
wxButton* m_editButton; // Invokes the custom validator, if any
|
||||
wxSizer* m_middleSizer;
|
||||
|
||||
bool m_detailedEditing; // E.g. using listbox for choices
|
||||
|
||||
static wxBitmap* sm_tickBitmap;
|
||||
static wxBitmap* sm_crossBitmap;
|
||||
|
||||
wxPanel* m_propertyWindow; // Panel that the controls will appear on
|
||||
wxWindow* m_managedWindow; // Frame or dialog
|
||||
|
||||
|
@@ -92,6 +92,14 @@ public:
|
||||
virtual void Add( wxSizer *sizer, int option = 0, int flag = 0, int border = 0 );
|
||||
virtual void Add( int width, int height, int option = 0, int flag = 0, int border = 0 );
|
||||
|
||||
virtual void Prepend( wxWindow *window, int option = 0, int flag = 0, int border = 0 );
|
||||
virtual void Prepend( wxSizer *sizer, int option = 0, int flag = 0, int border = 0 );
|
||||
virtual void Prepend( int width, int height, int option = 0, int flag = 0, int border = 0 );
|
||||
|
||||
virtual bool Remove( wxWindow *window );
|
||||
virtual bool Remove( wxSizer *sizer );
|
||||
virtual bool Remove( int pos );
|
||||
|
||||
void SetDimension( int x, int y, int width, int height );
|
||||
|
||||
wxSize GetSize()
|
||||
|
Reference in New Issue
Block a user