cd ..
cd html
-md \wxgtk_dist\wxGTK\src\html
-copy *.cpp \wxgtk_dist\wxGTK\src\html
-copy *.h \wxgtk_dist\wxGTK\src\html
-cd bitmaps
-md \wxgtk_dist\wxGTK\src\html\bitmaps
-copy *.xpm \wxgtk_dist\wxGTK\src\html\bitmaps
-cd ..\..
+md \wxmsw_dist\wxMSW\src\html
+copy *.cpp \wxmsw_dist\wxMSW\src\html
+copy *.h \wxmsw_dist\wxMSW\src\html
+cd ..
cd generic
md \wxmsw_dist\wxMSW\src\generic
DECLARE_DYNAMIC_CLASS(wxMenu)
public:
-#ifdef WXWIN_COMPATIBILITY
wxMenu( const wxString& title, const wxFunction func)
{
Init(title, 0, func);
}
-#endif
wxMenu( long style )
{
Init( wxEmptyString, style );
wxMenuItem *FindItemForId( int id ) const { return FindItem( id ); }
-#ifdef WXWIN_COMPATIBILITY
wxFunction GetCallback() const { return m_callback; }
void Callback(const wxFunction func) { m_callback = func; }
+ wxFunction m_callback;
+
+#ifdef WXWIN_COMPATIBILITY
// compatibility: these functions are deprecated
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
- wxFunction m_callback;
#endif // WXWIN_COMPATIBILITY
// implementation
private:
// common code for both constructors:
void Init( const wxString& title,
- long style
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func = (wxFunction) NULL
-#endif
- );
+ long style,
+ const wxFunction func = (wxFunction) NULL );
wxString m_title;
wxList m_items;
DECLARE_DYNAMIC_CLASS(wxMenu)
public:
-#ifdef WXWIN_COMPATIBILITY
wxMenu( const wxString& title, const wxFunction func)
{
Init(title, 0, func);
}
-#endif
wxMenu( long style )
{
Init( wxEmptyString, style );
wxMenuItem *FindItemForId( int id ) const { return FindItem( id ); }
-#ifdef WXWIN_COMPATIBILITY
wxFunction GetCallback() const { return m_callback; }
void Callback(const wxFunction func) { m_callback = func; }
+ wxFunction m_callback;
+
+#ifdef WXWIN_COMPATIBILITY
// compatibility: these functions are deprecated
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
- wxFunction m_callback;
#endif // WXWIN_COMPATIBILITY
// implementation
private:
// common code for both constructors:
void Init( const wxString& title,
- long style
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func = (wxFunction) NULL
-#endif
- );
+ long style,
+ const wxFunction func = (wxFunction) NULL );
wxString m_title;
wxList m_items;
public:
// ctors & dtor
-#ifdef WXWIN_COMPATIBILITY
wxMenu(const wxString& title,
const wxFunction func)
{
Init(title, func);
}
-#endif
+
+ wxMenu( long WXUNUSED(style) )
+ {
+ Init( wxEmptyString );
+ }
wxMenu(const wxString& title = wxEmptyString, long WXUNUSED(style) = 0)
{
size_t CopyAccels(wxAcceleratorEntry *accels) const;
#endif // wxUSE_ACCEL
-#ifdef WXWIN_COMPATIBILITY
+ wxFunction GetCallback() const { return m_callback; }
void Callback(const wxFunction func) { m_callback = func; }
+ wxFunction m_callback;
+#ifdef WXWIN_COMPATIBILITY
// compatibility: these functions are deprecated
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
-private:
- wxFunction m_callback;
#endif // WXWIN_COMPATIBILITY
private:
// common part of all ctors
- void Init(const wxString& title
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func = NULL
-#endif
- );
+ void Init(const wxString& title, const wxFunction func = NULL );
bool m_doBreak;
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
panel = new wxPanel(m_notebook);
- (void)new wxStaticBox( panel, -1, "wxGauge and wxSlider", wxPoint(10,10), wxSize(180,130) );
+ (void)new wxStaticBox( panel, -1, "wxGauge and wxSlider", wxPoint(10,10), wxSize(200,130) );
m_gauge = new wxGauge( panel, -1, 200, wxPoint(18,50), wxSize(155, 30) );
m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1), wxSL_LABELS );
- (void)new wxStaticBox( panel, -1, "Explanation", wxPoint(200,10), wxSize(290,130) );
+ (void)new wxStaticBox( panel, -1, "Explanation", wxPoint(220,10), wxSize(270,130) );
#ifdef __WXMOTIF__
// No wrapping text in wxStaticText yet :-(
(void)new wxStaticText( panel, -1,
"Drag the slider!",
- wxPoint(208,30),
- wxSize(210, -1)
+ wxPoint(228,30),
+ wxSize(230, -1)
);
#else
(void)new wxStaticText( panel, -1,
"\n"
"This is also supposed to demonstrate how\n"
"to use static controls.\n",
- wxPoint(208,25),
- wxSize(250, 110)
+ wxPoint(228,25),
+ wxSize(230, 110)
);
#endif
m_spintext = new wxTextCtrl( panel, -1, "0", wxPoint(20,160), wxSize(80,-1) );
// VA cannot resolve this so:
dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL, FALSE);
#else
- dc.GetTextExtent(message, &widthText, NULL);
+ dc.GetTextExtent(message, &widthText, (long*)NULL);
#endif
m_msg = new wxStaticText(this, -1, message);
m_gauge = (wxGauge *)NULL;
// create the estimated/remaining/total time zones if requested
- m_elapsed = m_estimated = m_remaining = NULL;
+ m_elapsed = m_estimated = m_remaining = (wxStaticText*)NULL;
int nTimeLabels = 0;
if ( style & wxPD_ELAPSED_TIME )
Show(TRUE);
Enable(TRUE); // enable this window
+
+ // Update the display (especially on X, GTK)
+ wxYield();
}
wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
void
wxMenu::Init( const wxString& title,
- long style
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func
-#endif
- )
+ long style,
+ const wxFunction func
+ )
{
m_title = title;
m_items.DeleteContents( TRUE );
m_menu = gtk_menu_new(); // Do not show!
#endif
-#ifdef WXWIN_COMPATIBILITY
m_callback = func;
-#endif
m_eventHandler = this;
m_clientData = (void*) NULL;
void
wxMenu::Init( const wxString& title,
- long style
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func
-#endif
- )
+ long style,
+ const wxFunction func
+ )
{
m_title = title;
m_items.DeleteContents( TRUE );
m_menu = gtk_menu_new(); // Do not show!
#endif
-#ifdef WXWIN_COMPATIBILITY
m_callback = func;
-#endif
m_eventHandler = this;
m_clientData = (void*) NULL;
// ---------------------------------------------------------------------------
// Construct a menu with optional title (then use append)
-void wxMenu::Init(const wxString& title
-#ifdef WXWIN_COMPATIBILITY
- , const wxFunction func
-#endif
- )
+void wxMenu::Init(const wxString& title, const wxFunction func )
{
m_title = title;
m_parent = NULL;
AppendSeparator() ;
}
-#if WXWIN_COMPATIBILITY
Callback(func);
-#endif
}
// The wxWindow destructor will take care of deleting the submenus.
{
bool processed = FALSE;
-#if WXWIN_COMPATIBILITY
// Try a callback
if (m_callback)
{
(void)(*(m_callback))(*this, event);
processed = TRUE;
}
-#endif // WXWIN_COMPATIBILITY
// Try the menu's event handler
if ( !processed && GetEventHandler())
SetAnyImageList(m_imageListState = imageList, TVSIL_STATE);
}
-size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item,
- bool recursively) const
+// internal class for counting tree items
+
+class TraverseCounter : public wxTreeTraversal
{
- class TraverseCounter : public wxTreeTraversal
- {
- public:
+public:
TraverseCounter(const wxTreeCtrl *tree,
const wxTreeItemId& root,
- bool recursively)
+ bool recursively)
: wxTreeTraversal(tree)
{
m_count = 0;
size_t GetCount() const { return m_count; }
- private:
+private:
size_t m_count;
- } counter(this, item, recursively);
+};
+
+
+size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item,
+ bool recursively) const
+{
+ TraverseCounter counter(this, item, recursively);
return counter.GetCount();
}
DoSetItem(&tvItem);
}
-size_t wxTreeCtrl::GetSelections(wxArrayTreeItemIds& selections) const
+// internal class for getting the selected
+
+class TraverseSelections : public wxTreeTraversal
{
- class TraverseSelections : public wxTreeTraversal
- {
- public:
+public:
TraverseSelections(const wxTreeCtrl *tree,
wxArrayTreeItemIds& selections)
: wxTreeTraversal(tree), m_selections(selections)
return TRUE;
}
- private:
+private:
wxArrayTreeItemIds& m_selections;
- } selector(this, selections);
+};
+
+size_t wxTreeCtrl::GetSelections(wxArrayTreeItemIds& selections) const
+{
+ TraverseSelections selector(this, selections);
return selections.GetCount();
}
*
*/
-#if defined(__WXGTK__) || defined(__WXMOTIF__) // I don't dare to delete it...
-
BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
+// EVT_PAINT(EditorToolBar::OnPaint)
END_EVENT_TABLE()
-#else
-
-BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
- EVT_PAINT(EditorToolBar::OnPaint)
-END_EVENT_TABLE()
-
-#endif
-
EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size,
long style):
wxToolBar(frame, -1, pos, size, style)