-1->wxID_ANY, TRUE->true, FALSE->false and tabs replacements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#define __WX_EDITLBOX_H__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "editlbox.h"
|
||||
#pragma interface "editlbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/panel.h"
|
||||
@@ -31,7 +31,7 @@ class WXDLLEXPORT wxListEvent;
|
||||
|
||||
class WXDLLIMPEXP_GIZMOS wxEditableListBox : public wxPanel
|
||||
{
|
||||
DECLARE_CLASS(wxEditableListBox);
|
||||
DECLARE_CLASS(wxEditableListBox);
|
||||
|
||||
public:
|
||||
wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||
|
@@ -33,18 +33,18 @@ enum wxLEDValueAlign
|
||||
// wxLEDNumberCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_GIZMOS wxLEDNumberCtrl : public wxControl
|
||||
class WXDLLIMPEXP_GIZMOS wxLEDNumberCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
// Constructors.
|
||||
wxLEDNumberCtrl();
|
||||
wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
|
||||
|
||||
// Create functions.
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0);
|
||||
@@ -53,9 +53,9 @@ public:
|
||||
bool GetDrawFaded() const { return m_DrawFaded; }
|
||||
const wxString &GetValue() const { return m_Value; }
|
||||
|
||||
void SetAlignment(wxLEDValueAlign Alignment, bool Redraw = TRUE);
|
||||
void SetDrawFaded(bool DrawFaded, bool Redraw = TRUE);
|
||||
void SetValue(const wxString &Value, bool Redraw = TRUE);
|
||||
void SetAlignment(wxLEDValueAlign Alignment, bool Redraw = true);
|
||||
void SetDrawFaded(bool DrawFaded, bool Redraw = true);
|
||||
void SetValue(const wxString &Value, bool Redraw = true);
|
||||
|
||||
private:
|
||||
// Members.
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#define __WX_MULTICELL_H__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "multicell.h"
|
||||
#pragma interface "multicell.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gizmos/gizmos.h"
|
||||
@@ -33,10 +33,10 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
enum wxResizable
|
||||
{
|
||||
wxNOT_RESIZABLE = 0x00,
|
||||
wxHORIZONTAL_RESIZABLE = 0x01,
|
||||
wxVERTICAL_RESIZABLE = 0x10,
|
||||
wxRESIZABLE = 0x11
|
||||
wxNOT_RESIZABLE = 0x00,
|
||||
wxHORIZONTAL_RESIZABLE = 0x01,
|
||||
wxVERTICAL_RESIZABLE = 0x10,
|
||||
wxRESIZABLE = 0x11
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -49,33 +49,33 @@ enum wxResizable
|
||||
|
||||
class WXDLLIMPEXP_GIZMOS wxMultiCellItemHandle: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellItemHandle);
|
||||
DECLARE_CLASS(wxMultiCellItemHandle);
|
||||
protected:
|
||||
int m_column;
|
||||
int m_row;
|
||||
int m_width;
|
||||
int m_height;
|
||||
wxResizable m_style;
|
||||
wxSize m_fixedSize;
|
||||
int m_alignment;
|
||||
wxSize m_weight;
|
||||
int m_column;
|
||||
int m_row;
|
||||
int m_width;
|
||||
int m_height;
|
||||
wxResizable m_style;
|
||||
wxSize m_fixedSize;
|
||||
int m_alignment;
|
||||
wxSize m_weight;
|
||||
|
||||
public:
|
||||
wxMultiCellItemHandle( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxSize size, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxResizable style, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, int align);
|
||||
int GetColumn();
|
||||
int GetRow();
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
wxResizable GetStyle();
|
||||
wxSize GetLocalSize();
|
||||
int GetAlignment();
|
||||
wxSize GetWeight();
|
||||
wxMultiCellItemHandle( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxSize size, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxResizable style, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, int align);
|
||||
int GetColumn();
|
||||
int GetRow();
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
wxResizable GetStyle();
|
||||
wxSize GetLocalSize();
|
||||
int GetAlignment();
|
||||
wxSize GetWeight();
|
||||
|
||||
private:
|
||||
void Initialize( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
void Initialize( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
|
||||
};
|
||||
|
||||
@@ -85,43 +85,43 @@ private:
|
||||
|
||||
class WXDLLIMPEXP_GIZMOS wxMultiCellSizer : virtual public wxSizer
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellSizer);
|
||||
DECLARE_CLASS(wxMultiCellSizer);
|
||||
|
||||
protected:
|
||||
wxSize m_cell_count;
|
||||
wxSize m_cell_count;
|
||||
|
||||
public:
|
||||
wxMultiCellSizer(wxSize & size);
|
||||
wxMultiCellSizer(int rows, int cols);
|
||||
~wxMultiCellSizer();
|
||||
wxMultiCellSizer(wxSize & size);
|
||||
wxMultiCellSizer(int rows, int cols);
|
||||
~wxMultiCellSizer();
|
||||
|
||||
virtual void RecalcSizes();
|
||||
virtual wxSize CalcMin();
|
||||
bool SetDefaultCellSize(wxSize size);
|
||||
bool SetColumnWidth(int column, int colSize = 5, bool expandable = FALSE);
|
||||
bool SetRowHeight(int row, int rowSize = 5, bool expandable = FALSE);
|
||||
bool EnableGridLines(wxWindow *win);
|
||||
bool SetGridPen(wxPen *pen);
|
||||
void OnPaint(wxDC& dc);
|
||||
virtual void RecalcSizes();
|
||||
virtual wxSize CalcMin();
|
||||
bool SetDefaultCellSize(wxSize size);
|
||||
bool SetColumnWidth(int column, int colSize = 5, bool expandable = false);
|
||||
bool SetRowHeight(int row, int rowSize = 5, bool expandable = false);
|
||||
bool EnableGridLines(wxWindow *win);
|
||||
bool SetGridPen(wxPen *pen);
|
||||
void OnPaint(wxDC& dc);
|
||||
|
||||
private:
|
||||
void GetMinimums();
|
||||
int Sum(int *array, int x);
|
||||
void GetMinimums();
|
||||
int Sum(int *array, int x);
|
||||
|
||||
private:
|
||||
int *m_maxHeight;
|
||||
int *m_maxWidth;
|
||||
int *m_rowStretch;
|
||||
int *m_colStretch;
|
||||
wxSize **m_weights;
|
||||
wxSize **m_minSizes;
|
||||
int m_maxWeights;
|
||||
wxSize m_defaultCellSize;
|
||||
wxWindow *m_win; // usually used for debugging
|
||||
wxPen *m_pen;
|
||||
int *m_maxHeight;
|
||||
int *m_maxWidth;
|
||||
int *m_rowStretch;
|
||||
int *m_colStretch;
|
||||
wxSize **m_weights;
|
||||
wxSize **m_minSizes;
|
||||
int m_maxWeights;
|
||||
wxSize m_defaultCellSize;
|
||||
wxWindow *m_win; // usually used for debugging
|
||||
wxPen *m_pen;
|
||||
|
||||
void DrawGridLines(wxDC& dc);
|
||||
void Initialize(wxSize size);
|
||||
void DrawGridLines(wxDC& dc);
|
||||
void Initialize(wxSize size);
|
||||
};
|
||||
|
||||
|
||||
@@ -136,23 +136,23 @@ class wxCell;
|
||||
class WXDLLIMPEXP_GIZMOS wxMultiCellCanvas : public wxFlexGridSizer
|
||||
{
|
||||
public:
|
||||
wxMultiCellCanvas(wxWindow *parent, int numRows = 2, int numCols = 2);
|
||||
void Add(wxWindow *win, unsigned int row, unsigned int col);
|
||||
wxMultiCellCanvas(wxWindow *parent, int numRows = 2, int numCols = 2);
|
||||
void Add(wxWindow *win, unsigned int row, unsigned int col);
|
||||
|
||||
void Resize(int numRows, int numCols);
|
||||
int MaxRows()
|
||||
{
|
||||
return m_maxRows;
|
||||
};
|
||||
int MaxCols()
|
||||
{
|
||||
return m_maxCols;
|
||||
};
|
||||
void CalculateConstraints();
|
||||
void SetMinCellSize(const wxSize size)
|
||||
{
|
||||
m_minCellSize = size;
|
||||
};
|
||||
void Resize(int numRows, int numCols);
|
||||
int MaxRows()
|
||||
{
|
||||
return m_maxRows;
|
||||
};
|
||||
int MaxCols()
|
||||
{
|
||||
return m_maxCols;
|
||||
};
|
||||
void CalculateConstraints();
|
||||
void SetMinCellSize(const wxSize size)
|
||||
{
|
||||
m_minCellSize = size;
|
||||
};
|
||||
|
||||
/* These are to hide Add() method of parents and to avoid Borland warning about hiding virtual functions */
|
||||
void Add( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL )
|
||||
@@ -165,11 +165,11 @@ public:
|
||||
{ wxFlexGridSizer::Add( item); }
|
||||
|
||||
private:
|
||||
wxWindow *m_parent;
|
||||
unsigned int m_maxRows, m_maxCols;
|
||||
wxWindow *m_parent;
|
||||
unsigned int m_maxRows, m_maxCols;
|
||||
|
||||
wxSize m_minCellSize;
|
||||
wxCell **m_cells;
|
||||
wxSize m_minCellSize;
|
||||
wxCell **m_cells;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0,
|
||||
bool noRefresh = FALSE );
|
||||
bool noRefresh = false );
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
// Get the view start
|
||||
@@ -127,7 +127,7 @@ class WXDLLIMPEXP_GIZMOS wxTreeCompanionWindow: public wxWindow
|
||||
public:
|
||||
DECLARE_CLASS(wxTreeCompanionWindow)
|
||||
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
@@ -166,7 +166,7 @@ class WXDLLIMPEXP_GIZMOS wxThinSplitterWindow: public wxSplitterWindow
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
|
||||
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = wxSP_3D | wxCLIP_CHILDREN);
|
||||
@@ -210,7 +210,7 @@ class WXDLLIMPEXP_GIZMOS wxSplitterScrolledWindow: public wxScrolledWindow
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
|
||||
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
class SashHtmlWindow : public wxHtmlWindow {
|
||||
public:
|
||||
SashHtmlWindow(wxWindow *parent, wxWindowID id = -1,
|
||||
SashHtmlWindow(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_NEVER, const wxString& name = wxT("sashHtmlWindow"));
|
||||
|
||||
@@ -62,23 +62,23 @@ wxT("manages the scrollbars provided by <TT>wxDynamicSashWindow</TT> itself.");
|
||||
bool Demo::OnInit() {
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
wxFrame *frame = new wxFrame(NULL, -1, wxT("Dynamic Sash Demo"));
|
||||
wxFrame *frame = new wxFrame(NULL, wxID_ANY, wxT("Dynamic Sash Demo"));
|
||||
frame->SetSize(480, 480);
|
||||
|
||||
wxDynamicSashWindow *sash = new wxDynamicSashWindow(frame, -1);
|
||||
wxHtmlWindow *html = new SashHtmlWindow(sash, -1);
|
||||
wxDynamicSashWindow *sash = new wxDynamicSashWindow(frame, wxID_ANY);
|
||||
wxHtmlWindow *html = new SashHtmlWindow(sash, wxID_ANY);
|
||||
html->SetPage(HTML_content);
|
||||
|
||||
frame->Show();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
SashHtmlWindow::SashHtmlWindow(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name) :
|
||||
wxHtmlWindow(parent, id, pos, size, style, name) {
|
||||
Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxDynamicSashSplitEventFunction)&SashHtmlWindow::OnSplit);
|
||||
|
||||
@@ -97,6 +97,6 @@ wxSize SashHtmlWindow::DoGetBestSize() const {
|
||||
}
|
||||
|
||||
void SashHtmlWindow::OnSplit(wxDynamicSashSplitEvent& WXUNUSED(event)) {
|
||||
wxHtmlWindow *html = new SashHtmlWindow(m_dyn_sash, -1);
|
||||
wxHtmlWindow *html = new SashHtmlWindow(m_dyn_sash, wxID_ANY);
|
||||
html->SetPage(HTML_content);
|
||||
}
|
||||
|
@@ -65,14 +65,14 @@ IMPLEMENT_APP(SwitchDemo)
|
||||
|
||||
|
||||
SwitchView::SwitchView(wxDynamicSashWindow *win) {
|
||||
Create(win, -1);
|
||||
Create(win, wxID_ANY);
|
||||
|
||||
m_dyn_sash = win;
|
||||
|
||||
m_bar = new wxWindow(this, -1, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER, wxT("bar"));
|
||||
m_choice = new wxChoice(m_bar, -1);
|
||||
m_bar = new wxWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER, wxT("bar"));
|
||||
m_choice = new wxChoice(m_bar, wxID_ANY);
|
||||
m_choice->SetEventHandler(this);
|
||||
m_view = new wxWindow(this, -1, wxDefaultPosition, wxDefaultSize, 0, wxT("view"));
|
||||
m_view = new wxWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxT("view"));
|
||||
m_view->SetBackgroundColour(*wxWHITE);
|
||||
m_view->SetEventHandler(this);
|
||||
|
||||
@@ -119,41 +119,41 @@ SwitchView::SwitchView(wxDynamicSashWindow *win) {
|
||||
(wxEventFunction)
|
||||
(wxPaintEventFunction)&SwitchView::OnPaint);
|
||||
|
||||
Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SET_FOCUS, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxFocusEventFunction)&SwitchView::OnFocus);
|
||||
Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&SwitchView::OnScroll);
|
||||
Connect(-1, wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxEraseEventFunction)&SwitchView::OnErase);
|
||||
|
||||
Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxDynamicSashSplitEventFunction)&SwitchView::OnSplit);
|
||||
Connect(-1, wxEVT_DYNAMIC_SASH_UNIFY, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_DYNAMIC_SASH_UNIFY, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxDynamicSashUnifyEventFunction)&SwitchView::OnUnify);
|
||||
}
|
||||
@@ -252,12 +252,12 @@ bool SwitchDemo::OnInit() {
|
||||
wxFrame *frame;
|
||||
wxDynamicSashWindow *dyn;
|
||||
|
||||
frame = new wxFrame(NULL, -1, wxT("Dynamic Sash Window Switch Demo"));
|
||||
dyn = new wxDynamicSashWindow(frame, -1, wxDefaultPosition, wxDefaultSize, wxCLIP_CHILDREN);
|
||||
frame = new wxFrame(NULL, wxID_ANY, wxT("Dynamic Sash Window Switch Demo"));
|
||||
dyn = new wxDynamicSashWindow(frame, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCLIP_CHILDREN);
|
||||
new SwitchView(dyn);
|
||||
|
||||
frame->SetSize(480, 480);
|
||||
frame->Show();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
@@ -25,17 +25,17 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
wxDialog dlg(NULL, -1, _("Test dialog"), wxDefaultPosition, wxDefaultSize,
|
||||
wxDialog dlg(NULL, wxID_ANY, _("Test dialog"), wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
|
||||
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||
sizer->Add(new wxEditableListBox(&dlg, -1, _("Match these wildcards:"),
|
||||
sizer->Add(new wxEditableListBox(&dlg, wxID_ANY, _("Match these wildcards:"),
|
||||
wxDefaultPosition,wxSize(300,200)),
|
||||
1, wxEXPAND|wxALL, 10);
|
||||
|
||||
sizer->Add(5,5);
|
||||
|
||||
wxEditableListBox *lb = new wxEditableListBox(&dlg, -1, _("Except:"),
|
||||
wxEditableListBox *lb = new wxEditableListBox(&dlg, wxID_ANY, _("Except:"),
|
||||
wxDefaultPosition,wxSize(300,200));
|
||||
wxArrayString ar;
|
||||
ar.Add(_T("*.cpp"));
|
||||
@@ -48,10 +48,10 @@ bool MyApp::OnInit()
|
||||
sizer->Add(5,5);
|
||||
|
||||
sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
dlg.SetAutoLayout(TRUE);
|
||||
dlg.SetAutoLayout(true);
|
||||
dlg.SetSizer(sizer);
|
||||
sizer->Fit(&dlg);
|
||||
dlg.Centre();
|
||||
dlg.Centre();
|
||||
|
||||
dlg.ShowModal();
|
||||
|
||||
@@ -61,5 +61,5 @@ bool MyApp::OnInit()
|
||||
res << ar[i] << _T("\n");
|
||||
wxMessageBox(res);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@@ -165,12 +165,12 @@ bool MyApp::OnInit()
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
// success: wxApp::OnRun() will be called which will enter the main message
|
||||
// loop and the application will run. If we returned FALSE here, the
|
||||
// loop and the application will run. If we returned false here, the
|
||||
// application would exit immediately.
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -179,7 +179,7 @@ bool MyApp::OnInit()
|
||||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||
: wxFrame(NULL, -1, title, pos, size, style)
|
||||
: wxFrame(NULL, wxID_ANY, title, pos, size, style)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
// create a menu bar
|
||||
@@ -202,7 +202,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
editMenu->AppendSeparator();
|
||||
editMenu->AppendCheckItem(LED_Edit_DrawFaded, _T("Draw &Faded\tCtrl-F"));
|
||||
|
||||
editMenu->Check(LED_Edit_DrawFaded, TRUE);
|
||||
editMenu->Check(LED_Edit_DrawFaded, true);
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
@@ -222,8 +222,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
}
|
||||
|
||||
void MyFrame::OnIncrement(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -1,194 +1,194 @@
|
||||
/*
|
||||
* File: mtest.cpp
|
||||
* Purpose: wxMultiCellSizer and wxMultiCellCanvas test
|
||||
* Author: Alex Andruschak
|
||||
* Created: 2000
|
||||
* Updated:
|
||||
* File: mtest.cpp
|
||||
* Purpose: wxMultiCellSizer and wxMultiCellCanvas test
|
||||
* Author: Alex Andruschak
|
||||
* Created: 2000
|
||||
* Updated:
|
||||
* Copyright:
|
||||
*/
|
||||
|
||||
static const char sccsid[] = "%W% %G%";
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gizmos/multicell.h"
|
||||
|
||||
class MyApp: public wxApp
|
||||
{public:
|
||||
bool OnInit(void);
|
||||
bool OnInit(void);
|
||||
};
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
{
|
||||
|
||||
public:
|
||||
MyFrame(int type, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
MyFrame(int type, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
wxMultiCellSizer *sizer;
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
wxMultiCellSizer *sizer;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit(void)
|
||||
{
|
||||
MyFrame *frame = new MyFrame(1, (wxFrame *) NULL, wxT("wxMultiCellSizer Sample"), wxPoint(50, 50), wxDefaultSize); //, wxSize(600, 500));
|
||||
MyFrame *frame = new MyFrame(1, (wxFrame *) NULL, wxT("wxMultiCellSizer Sample"), wxPoint(50, 50), wxDefaultSize); //, wxSize(600, 500));
|
||||
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
SetTopWindow(frame);
|
||||
frame = new MyFrame(2, (wxFrame *) NULL, wxT("wxMultiCellCanvas Sample"), wxPoint(100, 100), wxSize(600, 500));
|
||||
SetTopWindow(frame);
|
||||
frame = new MyFrame(2, (wxFrame *) NULL, wxT("wxMultiCellCanvas Sample"), wxPoint(100, 100), wxSize(600, 500));
|
||||
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
SetTopWindow(frame);
|
||||
return TRUE;
|
||||
SetTopWindow(frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
MyFrame::MyFrame(int type, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size):
|
||||
wxFrame(frame, -1, title, pos, size, wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL)
|
||||
wxFrame(frame, wxID_ANY, title, pos, size, wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL)
|
||||
{
|
||||
CreateStatusBar(1);
|
||||
sizer = NULL;
|
||||
if (type == 1)
|
||||
{
|
||||
// create sizer 4 columns 5 rows
|
||||
wxSize aa(4,9);
|
||||
sizer = new wxMultiCellSizer(aa);
|
||||
sizer->SetDefaultCellSize(wxSize(15,15));
|
||||
sizer->SetRowHeight(7,5,TRUE);
|
||||
sizer->SetRowHeight(8,5,FALSE);
|
||||
// add first row
|
||||
sizer->Add(
|
||||
new wxButton( this, -1,wxT( "B1 - 0,0, horizontal resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,0,1,1, wxDefaultSize, wxHORIZONTAL_RESIZABLE, wxSize(2,2)));
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B2 - 0,1, vertical resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,1,1,1, wxDefaultSize, wxVERTICAL_RESIZABLE, wxSize(2, 2)));
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B3 - 0,2")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,2,1,1, wxDefaultSize, wxNOT_RESIZABLE, wxSize(1,1), wxALIGN_CENTER_HORIZONTAL)); //, wxALIGN_CENTER));
|
||||
sizer->Add(
|
||||
new wxStaticText(this, -1, wxT("jbb 0,3, lower-right")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,3,1,1, wxDefaultSize, wxNOT_RESIZABLE, wxSize(1,1), wxALIGN_BOTTOM | wxALIGN_RIGHT));
|
||||
CreateStatusBar(1);
|
||||
sizer = NULL;
|
||||
if (type == 1)
|
||||
{
|
||||
// create sizer 4 columns 5 rows
|
||||
wxSize aa(4,9);
|
||||
sizer = new wxMultiCellSizer(aa);
|
||||
sizer->SetDefaultCellSize(wxSize(15,15));
|
||||
sizer->SetRowHeight(7,5,true);
|
||||
sizer->SetRowHeight(8,5,false);
|
||||
// add first row
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT( "B1 - 0,0, horizontal resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,0,1,1, wxDefaultSize, wxHORIZONTAL_RESIZABLE, wxSize(2,2)));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B2 - 0,1, vertical resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,1,1,1, wxDefaultSize, wxVERTICAL_RESIZABLE, wxSize(2, 2)));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B3 - 0,2")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,2,1,1, wxDefaultSize, wxNOT_RESIZABLE, wxSize(1,1), wxALIGN_CENTER_HORIZONTAL)); //, wxALIGN_CENTER));
|
||||
sizer->Add(
|
||||
new wxStaticText(this, wxID_ANY, wxT("jbb 0,3, lower-right")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(0,3,1,1, wxDefaultSize, wxNOT_RESIZABLE, wxSize(1,1), wxALIGN_BOTTOM | wxALIGN_RIGHT));
|
||||
|
||||
// add button for secord row
|
||||
sizer->Add(
|
||||
new wxTextCtrl(this, -1, wxT("Text control - 1,0, 4 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(1,0,1,4));
|
||||
// add button for secord row
|
||||
sizer->Add(
|
||||
new wxTextCtrl(this, wxID_ANY, wxT("Text control - 1,0, 4 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(1,0,1,4));
|
||||
|
||||
// add buttons for next row
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B6 - 2,0, 2 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(2,0,1,2));
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B7 - 2,3")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(2,3,1,1));
|
||||
// add buttons for next row
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B6 - 2,0, 2 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(2,0,1,2));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B7 - 2,3")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(2,3,1,1));
|
||||
|
||||
// and last additions
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B8 - 3,0, 4 rows high, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(3,0,4,1,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B9 - 3,2, 2 cols wide, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(3,2,1,2,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B10 - 4,1, 3 cols wide, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(4,1,1,3,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
// and last additions
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B8 - 3,0, 4 rows high, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(3,0,4,1,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B9 - 3,2, 2 cols wide, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(3,2,1,2,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B10 - 4,1, 3 cols wide, vert resizable")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(4,1,1,3,wxDefaultSize, wxVERTICAL_RESIZABLE));
|
||||
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B11 - 5,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(5,1,1,3));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B11 - 5,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(5,1,1,3));
|
||||
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B12 - 6,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(6,1,1,3));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B12 - 6,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(6,1,1,3));
|
||||
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B13 - 7,1, 2 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(7,1,1,2));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B13 - 7,1, 2 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(7,1,1,2));
|
||||
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("B14 - 8,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(8,1,1,3));
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("B14 - 8,1, 3 cols wide")),
|
||||
0, 0, 0, new wxMultiCellItemHandle(8,1,1,3));
|
||||
|
||||
SetAutoLayout( TRUE );
|
||||
// sizer->SetMinSize(sizer->CalcMin());
|
||||
SetSizer( sizer );
|
||||
wxSize s = sizer->CalcMin();
|
||||
wxSize c = GetSize() - GetClientSize();
|
||||
SetSizeHints(s.GetWidth() + c.GetWidth() , s.GetHeight() + c.GetHeight());
|
||||
sizer->EnableGridLines(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// create sizer 4 columns 5 rows
|
||||
wxMultiCellCanvas *sizer = new wxMultiCellCanvas(this, 5,5);
|
||||
SetAutoLayout( true );
|
||||
// sizer->SetMinSize(sizer->CalcMin());
|
||||
SetSizer( sizer );
|
||||
wxSize s = sizer->CalcMin();
|
||||
wxSize c = GetSize() - GetClientSize();
|
||||
SetSizeHints(s.GetWidth() + c.GetWidth() , s.GetHeight() + c.GetHeight());
|
||||
sizer->EnableGridLines(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// create sizer 4 columns 5 rows
|
||||
wxMultiCellCanvas *sizer = new wxMultiCellCanvas(this, 5,5);
|
||||
|
||||
// add first row
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 1")),
|
||||
0, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 2")),
|
||||
0, 1);
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 3")),
|
||||
0, 2);
|
||||
sizer->Add(
|
||||
new wxStaticText(this, -1, wxT("jbb test")),
|
||||
0, 3);
|
||||
// add first row
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 1")),
|
||||
0, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 2")),
|
||||
0, 1);
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 3")),
|
||||
0, 2);
|
||||
sizer->Add(
|
||||
new wxStaticText(this, wxID_ANY, wxT("jbb test")),
|
||||
0, 3);
|
||||
|
||||
sizer->Add(
|
||||
new wxStaticText(this, -1, wxT("jbb test 2")),
|
||||
0, 4);
|
||||
sizer->Add(
|
||||
new wxStaticText(this, wxID_ANY, wxT("jbb test 2")),
|
||||
0, 4);
|
||||
|
||||
// add button for secord row
|
||||
sizer->Add(
|
||||
new wxTextCtrl(this, -1, wxT("Text control")),
|
||||
1, 0);
|
||||
// add button for secord row
|
||||
sizer->Add(
|
||||
new wxTextCtrl(this, wxID_ANY, wxT("Text control")),
|
||||
1, 0);
|
||||
|
||||
// add buttons for next row
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 6")),
|
||||
2, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 7")),
|
||||
2, 3);
|
||||
// add buttons for next row
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 6")),
|
||||
2, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 7")),
|
||||
2, 3);
|
||||
|
||||
// and last additions
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 8")),
|
||||
3, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 9")),
|
||||
3, 1);
|
||||
sizer->Add(
|
||||
new wxButton( this, -1, wxT("Button 10")),
|
||||
4, 1);
|
||||
// and last additions
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 8")),
|
||||
3, 0);
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 9")),
|
||||
3, 1);
|
||||
sizer->Add(
|
||||
new wxButton( this, wxID_ANY, wxT("Button 10")),
|
||||
4, 1);
|
||||
|
||||
sizer->CalculateConstraints();
|
||||
SetSizer( sizer );
|
||||
SetAutoLayout( TRUE );
|
||||
}
|
||||
sizer->CalculateConstraints();
|
||||
SetSizer( sizer );
|
||||
SetAutoLayout( true );
|
||||
}
|
||||
}
|
||||
// Define the repainting behaviour
|
||||
|
||||
@@ -200,16 +200,16 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
|
||||
void MyFrame::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
wxPaintDC dc(this);
|
||||
|
||||
if (sizer)
|
||||
{
|
||||
sizer->OnPaint(dc);
|
||||
}
|
||||
if (sizer)
|
||||
{
|
||||
sizer->OnPaint(dc);
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
Destroy();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@@ -138,12 +138,12 @@ bool MyApp::OnInit()
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
// success: wxApp::OnRun() will be called which will enter the main message
|
||||
// loop and the application will run. If we returned FALSE here, the
|
||||
// loop and the application will run. If we returned false here, the
|
||||
// application would exit immediately.
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -155,7 +155,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, idMAIN_FRAME, title, pos, size)
|
||||
{
|
||||
m_splitter = NULL;
|
||||
m_scrolledWindow = NULL;
|
||||
m_scrolledWindow = NULL;
|
||||
m_tree = NULL;
|
||||
m_valueWindow = NULL;
|
||||
#ifdef __WXMAC__
|
||||
@@ -165,26 +165,26 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
#endif
|
||||
|
||||
m_scrolledWindow = new wxSplitterScrolledWindow(this, idSCROLLED_WINDOW, wxDefaultPosition,
|
||||
wxSize(300, 400), wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL);
|
||||
wxSize(300, 400), wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL);
|
||||
m_splitter = new wxThinSplitterWindow(m_scrolledWindow, idSPLITTER_WINDOW, wxDefaultPosition,
|
||||
wxDefaultSize, wxSP_3DBORDER | wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
|
||||
m_splitter->SetSashSize(2);
|
||||
wxDefaultSize, wxSP_3DBORDER | wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
|
||||
m_splitter->SetSashSize(2);
|
||||
|
||||
/* Note the wxTR_ROW_LINES style: draws horizontal lines between items */
|
||||
/* Note the wxTR_ROW_LINES style: draws horizontal lines between items */
|
||||
m_tree = new TestTree(m_splitter , idTREE_CTRL, wxDefaultPosition,
|
||||
wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER | wxTR_ROW_LINES );
|
||||
wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER | wxTR_ROW_LINES );
|
||||
m_valueWindow = new TestValueWindow(m_splitter, idVALUE_WINDOW, wxDefaultPosition,
|
||||
wxDefaultSize, wxNO_BORDER);
|
||||
wxDefaultSize, wxNO_BORDER);
|
||||
m_splitter->SplitVertically(m_tree, m_valueWindow);
|
||||
//m_splitter->AdjustScrollbars();
|
||||
m_splitter->SetSashPosition(200);
|
||||
m_scrolledWindow->SetTargetWindow(m_tree);
|
||||
//m_splitter->AdjustScrollbars();
|
||||
m_splitter->SetSashPosition(200);
|
||||
m_scrolledWindow->SetTargetWindow(m_tree);
|
||||
|
||||
m_scrolledWindow->EnableScrolling(FALSE, FALSE);
|
||||
m_scrolledWindow->EnableScrolling(false, false);
|
||||
|
||||
// Let the two controls know about each other
|
||||
m_valueWindow->SetTreeCtrl(m_tree);
|
||||
m_tree->SetCompanionWindow(m_valueWindow);
|
||||
// Let the two controls know about each other
|
||||
m_valueWindow->SetTreeCtrl(m_tree);
|
||||
m_tree->SetCompanionWindow(m_valueWindow);
|
||||
|
||||
// set the frame icon
|
||||
SetIcon(wxICON(mondrian));
|
||||
@@ -212,8 +212,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -238,7 +238,7 @@ TestTree::TestTree(wxWindow* parent, wxWindowID id, const wxPoint& pt,
|
||||
const wxSize& sz, long style):
|
||||
wxRemotelyScrolledTreeCtrl(parent, id, pt, sz, style)
|
||||
{
|
||||
m_imageList = new wxImageList(16, 16, TRUE);
|
||||
m_imageList = new wxImageList(16, 16, true);
|
||||
#if !defined(__WXMSW__) // || wxUSE_XPM_IN_MSW
|
||||
m_imageList->Add(wxIcon(icon1_xpm));
|
||||
m_imageList->Add(wxIcon(icon2_xpm));
|
||||
@@ -250,28 +250,28 @@ TestTree::TestTree(wxWindow* parent, wxWindowID id, const wxPoint& pt,
|
||||
#endif
|
||||
SetImageList(m_imageList);
|
||||
|
||||
|
||||
// Add some dummy items
|
||||
wxTreeItemId rootId = AddRoot(_("Root"), -1, -1);
|
||||
int i;
|
||||
for (i = 1; i <= 20; i++)
|
||||
{
|
||||
wxString label;
|
||||
label.Printf(wxT("Item %d"), i);
|
||||
wxTreeItemId id = AppendItem(rootId, label, 0);
|
||||
//SetItemImage( id, 1, wxTreeItemIcon_Expanded );
|
||||
|
||||
int j;
|
||||
for (j = 0; j < 10; j++)
|
||||
AppendItem(id, _("Child"), 1);
|
||||
}
|
||||
Expand(rootId);
|
||||
// Add some dummy items
|
||||
wxTreeItemId rootId = AddRoot(_("Root"), -1, -1);
|
||||
int i;
|
||||
for (i = 1; i <= 20; i++)
|
||||
{
|
||||
wxString label;
|
||||
label.Printf(wxT("Item %d"), i);
|
||||
wxTreeItemId id = AppendItem(rootId, label, 0);
|
||||
//SetItemImage( id, 1, wxTreeItemIcon_Expanded );
|
||||
|
||||
int j;
|
||||
for (j = 0; j < 10; j++)
|
||||
AppendItem(id, _("Child"), 1);
|
||||
}
|
||||
Expand(rootId);
|
||||
}
|
||||
|
||||
TestTree::~TestTree()
|
||||
{
|
||||
SetImageList(NULL);
|
||||
delete m_imageList;
|
||||
SetImageList(NULL);
|
||||
delete m_imageList;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -289,5 +289,5 @@ TestValueWindow::TestValueWindow(wxWindow* parent, wxWindowID id,
|
||||
long style):
|
||||
wxTreeCompanionWindow(parent, id, pos, sz, style)
|
||||
{
|
||||
SetBackgroundColour(* wxWHITE);
|
||||
SetBackgroundColour(* wxWHITE);
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ protected:
|
||||
class TestValueWindow: public wxTreeCompanionWindow
|
||||
{
|
||||
public:
|
||||
TestValueWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
TestValueWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
@@ -230,22 +230,22 @@ bool wxDynamicSashWindow::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, const wxString& name) {
|
||||
if (m_impl)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!wxWindow::Create(parent, id, pos, size, style, name))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_impl = new wxDynamicSashWindowImpl(this);
|
||||
if (!m_impl)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!m_impl->Create()) {
|
||||
delete m_impl;
|
||||
m_impl = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxDynamicSashWindow::AddChild(wxWindowBase *child) {
|
||||
@@ -303,39 +303,39 @@ bool wxDynamicSashWindowImpl::Create() {
|
||||
|
||||
m_leaf = new wxDynamicSashWindowLeaf(this);
|
||||
if (!m_leaf)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!m_leaf->Create()) {
|
||||
delete m_leaf;
|
||||
m_leaf = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_container->SetEventHandler(this);
|
||||
|
||||
Connect(-1, wxEVT_SIZE, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxSizeEventFunction)&wxDynamicSashWindowImpl::OnSize);
|
||||
Connect(-1, wxEVT_PAINT, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_PAINT, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxPaintEventFunction)&wxDynamicSashWindowImpl::OnPaint);
|
||||
Connect(-1, wxEVT_MOTION, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_MOTION, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxMouseEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
|
||||
Connect(-1, wxEVT_ENTER_WINDOW, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_ENTER_WINDOW, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxMouseEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
|
||||
Connect(-1, wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxMouseEventFunction)&wxDynamicSashWindowImpl::OnLeave);
|
||||
Connect(-1, wxEVT_LEFT_DOWN, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_LEFT_DOWN, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxMouseEventFunction)&wxDynamicSashWindowImpl::OnPress);
|
||||
Connect(-1, wxEVT_LEFT_UP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_LEFT_UP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxMouseEventFunction)&wxDynamicSashWindowImpl::OnRelease);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxDynamicSashWindowImpl::AddChild(wxWindow *window) {
|
||||
@@ -573,7 +573,7 @@ void wxDynamicSashWindowImpl::Split(int px, int py) {
|
||||
m_add_child_target = NULL;
|
||||
|
||||
m_child[0] = new wxDynamicSashWindowImpl(m_window);
|
||||
m_child[0]->m_container = new wxWindow(m_container, -1);
|
||||
m_child[0]->m_container = new wxWindow(m_container, wxID_ANY);
|
||||
m_child[0]->m_parent = this;
|
||||
m_child[0]->m_top = m_top;
|
||||
m_child[0]->Create();
|
||||
@@ -583,7 +583,7 @@ void wxDynamicSashWindowImpl::Split(int px, int py) {
|
||||
}
|
||||
|
||||
m_child[1] = new wxDynamicSashWindowImpl(m_window);
|
||||
m_child[1]->m_container = new wxWindow(m_container, -1);
|
||||
m_child[1]->m_container = new wxWindow(m_container, wxID_ANY);
|
||||
m_child[1]->m_parent = this;
|
||||
m_child[1]->m_top = m_top;
|
||||
m_child[1]->Create();
|
||||
@@ -892,16 +892,16 @@ bool wxDynamicSashWindowLeaf::Create() {
|
||||
m_viewport = new wxWindow();
|
||||
|
||||
if (!m_hscroll || !m_vscroll || !m_viewport) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxDynamicSashWindowImpl *add_child_target = m_impl->m_add_child_target;
|
||||
m_impl->m_add_child_target = NULL;
|
||||
success = m_hscroll->Create(m_impl->m_container, -1, wxDefaultPosition, wxDefaultSize,
|
||||
success = m_hscroll->Create(m_impl->m_container, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxSB_HORIZONTAL);
|
||||
success = success && m_vscroll->Create(m_impl->m_container, -1, wxDefaultPosition, wxDefaultSize,
|
||||
success = success && m_vscroll->Create(m_impl->m_container, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxSB_VERTICAL);
|
||||
success = success && m_viewport->Create(m_impl->m_container, -1);
|
||||
success = success && m_viewport->Create(m_impl->m_container, wxID_ANY);
|
||||
m_impl->m_add_child_target = add_child_target;
|
||||
|
||||
wxCursor cursor(wxCURSOR_ARROW);
|
||||
@@ -910,44 +910,44 @@ bool wxDynamicSashWindowLeaf::Create() {
|
||||
m_viewport->SetCursor(cursor);
|
||||
|
||||
m_viewport->SetEventHandler(this);
|
||||
Connect(-1, wxEVT_DYNAMIC_SASH_REPARENT, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnReparent);
|
||||
Connect(wxID_ANY, wxEVT_DYNAMIC_SASH_REPARENT, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnReparent);
|
||||
|
||||
if (m_impl->m_window->GetWindowStyle() & wxDS_MANAGE_SCROLLBARS) {
|
||||
m_hscroll->SetEventHandler(this);
|
||||
m_vscroll->SetEventHandler(this);
|
||||
|
||||
Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SET_FOCUS, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxFocusEventFunction)&wxDynamicSashWindowLeaf::OnFocus);
|
||||
Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
|
||||
Connect(wxID_ANY, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
|
||||
(wxEventFunction)
|
||||
(wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
|
||||
}
|
||||
|
||||
wxLayoutConstraints *layout = new wxLayoutConstraints();
|
||||
if (!layout)
|
||||
return FALSE;
|
||||
return false;
|
||||
wxSize size = m_hscroll->GetBestSize();
|
||||
#ifdef __WXMSW__
|
||||
size = m_hscroll->GetSize();
|
||||
@@ -961,7 +961,7 @@ bool wxDynamicSashWindowLeaf::Create() {
|
||||
|
||||
layout = new wxLayoutConstraints();
|
||||
if (!layout)
|
||||
return FALSE;
|
||||
return false;
|
||||
size = size = m_vscroll->GetBestSize();
|
||||
#ifdef __WXMSW__
|
||||
size = m_vscroll->GetSize();
|
||||
@@ -975,7 +975,7 @@ bool wxDynamicSashWindowLeaf::Create() {
|
||||
|
||||
layout = new wxLayoutConstraints();
|
||||
if (!layout)
|
||||
return FALSE;
|
||||
return false;
|
||||
layout->left.SameAs(m_impl->m_container, wxLeft, 3);
|
||||
layout->right.LeftOf(m_vscroll);
|
||||
layout->top.SameAs(m_impl->m_container, wxTop, 3);
|
||||
|
@@ -36,7 +36,7 @@ class CleverListCtrl : public wxListCtrl
|
||||
{
|
||||
public:
|
||||
CleverListCtrl(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
@@ -119,10 +119,10 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||
|
||||
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxPanel *subp = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize,
|
||||
wxPanel *subp = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxSUNKEN_BORDER | wxTAB_TRAVERSAL);
|
||||
wxSizer *subsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
subsizer->Add(new wxStaticText(subp, -1, label), 1, wxALIGN_CENTRE_VERTICAL | wxLEFT, 4);
|
||||
subsizer->Add(new wxStaticText(subp, wxID_ANY, label), 1, wxALIGN_CENTRE_VERTICAL | wxLEFT, 4);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define BTN_BORDER 4
|
||||
@@ -165,7 +165,7 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||
m_bDown->SetToolTip(_("Move down"));
|
||||
#endif
|
||||
|
||||
subp->SetAutoLayout(TRUE);
|
||||
subp->SetAutoLayout(true);
|
||||
subp->SetSizer(subsizer);
|
||||
subsizer->Fit(subp);
|
||||
|
||||
@@ -181,7 +181,7 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||
|
||||
sizer->Add(m_listCtrl, 1, wxEXPAND);
|
||||
|
||||
SetAutoLayout(TRUE);
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizer);
|
||||
Layout();
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ wxLEDNumberCtrl::wxLEDNumberCtrl()
|
||||
m_DigitMargin(-1),
|
||||
m_LineLength(-1),
|
||||
m_LineWidth(-1),
|
||||
m_DrawFaded(FALSE),
|
||||
m_DrawFaded(false),
|
||||
m_LeftStartPos(-1)
|
||||
{
|
||||
}
|
||||
@@ -80,7 +80,7 @@ wxLEDNumberCtrl::wxLEDNumberCtrl(wxWindow *parent, wxWindowID id,
|
||||
m_DigitMargin(-1),
|
||||
m_LineLength(-1),
|
||||
m_LineWidth(-1),
|
||||
m_DrawFaded(FALSE),
|
||||
m_DrawFaded(false),
|
||||
m_LeftStartPos(-1)
|
||||
{
|
||||
Create(parent, id, pos, size, style);
|
||||
@@ -94,7 +94,7 @@ bool wxLEDNumberCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
bool RetVal = wxControl::Create(parent, id, pos, size, style);
|
||||
|
||||
if ((style & wxLED_DRAW_FADED) != 0)
|
||||
SetDrawFaded(TRUE);
|
||||
SetDrawFaded(true);
|
||||
if ((style & wxLED_ALIGN_MASK) != 0)
|
||||
SetAlignment((wxLEDValueAlign)(style & wxLED_ALIGN_MASK));
|
||||
|
||||
@@ -113,7 +113,7 @@ void wxLEDNumberCtrl::SetAlignment(wxLEDValueAlign Alignment, bool Redraw)
|
||||
RecalcInternals(GetClientSize());
|
||||
|
||||
if (Redraw)
|
||||
Refresh(FALSE);
|
||||
Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void wxLEDNumberCtrl::SetDrawFaded(bool DrawFaded, bool Redraw)
|
||||
m_DrawFaded = DrawFaded;
|
||||
|
||||
if (Redraw)
|
||||
Refresh(FALSE);
|
||||
Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ void wxLEDNumberCtrl::SetValue(wxString const &Value, bool Redraw)
|
||||
RecalcInternals(GetClientSize());
|
||||
|
||||
if (Redraw)
|
||||
Refresh(FALSE);
|
||||
Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ void wxLEDNumberCtrl::DrawDigit(wxDC &Dc, int Digit, int Column)
|
||||
{
|
||||
Dc.DrawLine(XPos + m_LineMargin*2, m_LineMargin,
|
||||
XPos + m_LineLength, m_LineMargin);
|
||||
}
|
||||
}
|
||||
|
||||
if (Digit & LINE2)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -60,8 +60,8 @@ BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxTreeCtrl)
|
||||
#endif
|
||||
EVT_SIZE(wxRemotelyScrolledTreeCtrl::OnSize)
|
||||
EVT_PAINT(wxRemotelyScrolledTreeCtrl::OnPaint)
|
||||
EVT_TREE_ITEM_EXPANDED(-1, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(-1, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_SCROLLWIN(wxRemotelyScrolledTreeCtrl::OnScroll)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@@ -90,7 +90,7 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
|
||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
#endif
|
||||
{
|
||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, FALSE);
|
||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, false);
|
||||
}
|
||||
#if USE_GENERIC_TREECTRL
|
||||
else
|
||||
@@ -122,7 +122,7 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ TRUE);
|
||||
win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ true);
|
||||
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
if (scrolledWindow)
|
||||
@@ -541,7 +541,7 @@ void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event)
|
||||
return;
|
||||
|
||||
// TODO: scroll the window physically instead of just refreshing.
|
||||
Refresh(TRUE);
|
||||
Refresh(true);
|
||||
}
|
||||
|
||||
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event))
|
||||
@@ -674,37 +674,37 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
{
|
||||
// Ensure that events being propagated back up the window hierarchy
|
||||
// don't cause an infinite loop
|
||||
static bool inOnScroll = FALSE;
|
||||
static bool inOnScroll = false;
|
||||
if (inOnScroll)
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
inOnScroll = TRUE;
|
||||
inOnScroll = true;
|
||||
|
||||
int orient = event.GetOrientation();
|
||||
|
||||
int nScrollInc = CalcScrollInc(event);
|
||||
if (nScrollInc == 0)
|
||||
{
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
{
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
event.Skip();
|
||||
return;
|
||||
#if 0
|
||||
int newPos = m_xScrollPosition + nScrollInc;
|
||||
SetScrollPos(wxHORIZONTAL, newPos, TRUE );
|
||||
SetScrollPos(wxHORIZONTAL, newPos, true );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
int newPos = m_yScrollPosition + nScrollInc;
|
||||
SetScrollPos(wxVERTICAL, newPos, TRUE );
|
||||
SetScrollPos(wxVERTICAL, newPos, true );
|
||||
}
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
@@ -735,6 +735,6 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
|
||||
m_targetWindow->Update() ;
|
||||
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
}
|
||||
|
||||
|
@@ -43,9 +43,9 @@ bool wxStaticPicture::Create(wxWindow *parent, wxWindowID id,
|
||||
wxSize size = s ;
|
||||
if ( bitmap.Ok() )
|
||||
{
|
||||
if ( size.x == -1 )
|
||||
if ( size.x == wxDefaultSize.x )
|
||||
size.x = bitmap.GetWidth() ;
|
||||
if ( size.y == -1 )
|
||||
if ( size.y == wxDefaultSize.y )
|
||||
size.y = bitmap.GetHeight() ;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ bool wxStaticPicture::Create(wxWindow *parent, wxWindowID id,
|
||||
OriginalImage = Bitmap.ConvertToImage();
|
||||
#endif
|
||||
|
||||
if ( id == -1 )
|
||||
if ( id == wxID_ANY )
|
||||
m_windowId = (int)NewControlId();
|
||||
else
|
||||
m_windowId = id;
|
||||
|
Reference in New Issue
Block a user