removed SetAutoLayout(true) calls when a corresponding SetSizer() was also called (the latter already calls SetAutoLayout(true) in case of a non-NULL window); usual cleanup: removing tabs and end of line whitespace, TRUE->true, FALSE->false, -1->wxID_ANY, Enable(false)->Disable(), ""->wxEmptyString

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2004-06-12 23:44:08 +00:00
parent 3d4875664f
commit dabbc6a5a1
47 changed files with 560 additions and 584 deletions

View File

@@ -35,7 +35,7 @@ wxDllWidget::wxDllWidget(wxWindow *parent,
long style)
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER,
className + wxT("_container")),
m_widget(NULL), m_lib(NULL), m_controlAdded(FALSE)
m_widget(NULL), m_lib(NULL), m_controlAdded(false)
{
SetBackgroundColour(wxColour(255, 0, 255));
if ( !!className )
@@ -53,11 +53,10 @@ void wxDllWidget::AddChild(wxWindowBase *child)
wxPanel::AddChild(child);
m_controlAdded = TRUE;
m_controlAdded = true;
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add((wxWindow*)child, 1, wxEXPAND);
SetSizer(sizer);
SetAutoLayout(TRUE);
Layout();
}
@@ -85,7 +84,7 @@ bool wxDllWidget::LoadWidget(const wxString& dll, const wxString& className,
{
delete m_lib;
m_lib = NULL;
return FALSE;
return false;
}
DLL_WidgetFactory_t factory;
@@ -94,7 +93,7 @@ bool wxDllWidget::LoadWidget(const wxString& dll, const wxString& className,
{
delete m_lib;
m_lib = NULL;
return FALSE;
return false;
}
if ( !factory(className, this, style, &m_widget, &m_cmdFunc) )
@@ -103,10 +102,10 @@ bool wxDllWidget::LoadWidget(const wxString& dll, const wxString& className,
delete m_lib;
m_lib = NULL;
m_widget = NULL;
return FALSE;
return false;
}
return TRUE;
return true;
}
void wxDllWidget::UnloadWidget()

View File

@@ -41,7 +41,7 @@ Example of use:
{
public:
MyWindow(wxWindow *parent, long style)
: wxWindow(parent, -1) {}
: wxWindow(parent, wxID_ANY) {}
int HandleCommand(int cmd, const wxString& param)
{
@@ -75,7 +75,7 @@ class wxDllWidget : public wxPanel
{
public:
wxDllWidget(wxWindow *parent,
wxWindowID id = -1,
wxWindowID id = wxID_ANY,
const wxString& dllName = wxEmptyString,
const wxString& className = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
@@ -132,12 +132,12 @@ private:
{ \
*classInst = new widget(parent, style); \
*cmdFunc = SendCommandTo##widget; \
return TRUE; \
return true; \
}
#define END_WIDGET_LIBRARY() \
return FALSE; \
return false; \
}
#endif // __DLLWIDGET_H__

View File

@@ -9,7 +9,7 @@ class TestWindow : public wxWindow
{
public:
TestWindow(wxWindow *parent, long style)
: wxWindow(parent, -1)
: wxWindow(parent, wxID_ANY)
{
SetBackgroundColour(wxColour("white"));
}