control = [wxRadioBox, 'Radiobox', 'wxHSCROLL | wxVERTICAL | wxVERTICAL_LABEL', 'radiobox2', 24, 23, 111, 63, ['One', 'Two', 'Three', 'Four'], 2,\
[11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
[11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
- control = [wxMultiText, 'Multitext', 'wxVERTICAL_LABEL', 'multitext3', 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\
+ control = [wxMultiText, 'Multitext', 'wxTE_MULTILINE', 'multitext3', 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\
[11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
[11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [wxListBox, 'Listbox', 'wxVERTICAL_LABEL', 'listbox4', 156, 26, 200, 80, ['Apples', 'Pears', 'Bananas'], 'wxSINGLE',\
frame->SetMenuBar(menu_bar);
// Make a panel
- frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame");
+ frame->panel = new MyPanel(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame");
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
+BEGIN_EVENT_TABLE(MyPanel, wxPanel)
+ EVT_LEFT_DOWN( MyPanel::OnClick)
+END_EVENT_TABLE()
+
+MyPanel::MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
+ int style, const wxString &name ) :
+ wxPanel( parent, id, pos, size, style, name )
+{
+}
+
+void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event) )
+{
+ MyFrame *frame = (MyFrame*)(wxTheApp->GetTopWindow());
+ wxCommandEvent event;
+ frame->OnTest1( event );
+}
+
+
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
panel = NULL;
}
-void MyFrame::OnQuit(wxCommandEvent& event)
+void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
-void MyFrame::OnTest1(wxCommandEvent& event)
+void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event) )
{
MyDialog *dialog = new MyDialog;
if (dialog->LoadFromResource(this, "dialog1"))
END_EVENT_TABLE()
-void MyDialog::OnOk(wxCommandEvent& event)
+void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event) )
{
EndModal(RESOURCE_OK);
}
-void MyDialog::OnCancel(wxCommandEvent& event)
+void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event) )
{
EndModal(RESOURCE_CANCEL);
}
bool OnInit(void);
};
+class MyPanel: public wxPanel
+{
+ public:
+ MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
+ int style, const wxString &name );
+ void OnClick(wxMouseEvent &event);
+
+ DECLARE_EVENT_TABLE()
+};
+
class MyFrame: public wxFrame
{
public:
}
}
#endif
- else if (controlType == "wxText" || controlType == "wxTextCtrl")
+ else if (controlType == "wxText" || controlType == "wxTextCtrl" || controlType == "wxMultiText")
{
// Check for default value
if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
+#include "wx/resource.h"
#include "unistd.h"
wxInitializeStockLists();
wxInitializeStockObjects();
+ wxInitializeResourceSystem();
+
// For PostScript printing
#if USE_POSTSCRIPT
wxInitializePrintSetupData();
g_globalCursor = new wxCursor;
*/
-
-// wxInitializeStockObjects();
};
void wxApp::CommonCleanUp(void)
wxDeleteStockLists();
+ wxCleanUpResourceSystem();
+
wxSystemSettings::Done();
};
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
+#include "wx/resource.h"
#include "unistd.h"
wxInitializeStockLists();
wxInitializeStockObjects();
+ wxInitializeResourceSystem();
+
// For PostScript printing
#if USE_POSTSCRIPT
wxInitializePrintSetupData();
g_globalCursor = new wxCursor;
*/
-
-// wxInitializeStockObjects();
};
void wxApp::CommonCleanUp(void)
wxDeleteStockLists();
+ wxCleanUpResourceSystem();
+
wxSystemSettings::Done();
};