Added sashtest GTK makefiles (crashing bug to be solved); added typetest sample
with simple wxVariant test; changed wxICON macro and used it in minimal.cpp to avoid #ifdefing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile for conftest example (UNIX).
|
||||
# Makefile for minimal example (UNIX).
|
||||
|
||||
WXDIR = ../..
|
||||
|
||||
@@ -15,23 +15,23 @@ WXDIR = ../..
|
||||
# this central makefile.
|
||||
include $(WXDIR)/src/makeg95.env
|
||||
|
||||
OBJECTS = $(OBJDIR)/conftest.$(OBJSUFF) $(OBJDIR)/conftest_resources.$(OBJSUFF)
|
||||
OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF) $(OBJDIR)/minimal_resources.$(OBJSUFF)
|
||||
|
||||
all: $(OBJDIR) conftest$(GUISUFFIX)$(EXESUFF)
|
||||
all: $(OBJDIR) minimal$(GUISUFFIX)$(EXESUFF)
|
||||
|
||||
wx:
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
conftest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o conftest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||
minimal$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o minimal$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||
|
||||
$(OBJDIR)/conftest.$(OBJSUFF): conftest.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ conftest.$(SRCSUFF)
|
||||
$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF)
|
||||
|
||||
$(OBJDIR)/conftest_resources.o: conftest.rc
|
||||
$(RESCOMP) -i conftest.rc -o $(OBJDIR)/conftest_resources.o $(RESFLAGS)
|
||||
$(OBJDIR)/minimal_resources.o: minimal.rc
|
||||
$(RESCOMP) -i minimal.rc -o $(OBJDIR)/minimal_resources.o $(RESFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) conftest$(GUISUFFIX).exe core *.rsc *.res
|
||||
rm -f $(OBJECTS) minimal$(GUISUFFIX).exe core *.rsc *.res
|
||||
|
@@ -20,7 +20,7 @@ WXUSINGDLL=0
|
||||
|
||||
THISDIR = $(WXDIR)\samples\minimal
|
||||
PROGRAM=minimal
|
||||
|
||||
|
||||
OBJECTS = $(PROGRAM).obj
|
||||
|
||||
$(PROGRAM): $(PROGRAM).exe
|
||||
|
@@ -38,7 +38,8 @@ class MyApp: public wxApp
|
||||
// Define a new frame type
|
||||
class MyFrame: public wxFrame
|
||||
{ public:
|
||||
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||
MyFrame(wxFrame *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size);
|
||||
|
||||
public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
@@ -62,19 +63,15 @@ END_EVENT_TABLE()
|
||||
// Create a new application object
|
||||
IMPLEMENT_APP (MyApp)
|
||||
|
||||
// `Main program' equivalent, creating windows and returning main app frame
|
||||
// `Main program' equivalent
|
||||
bool MyApp::OnInit(void)
|
||||
{
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340);
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, "Minimal wxWindows App",
|
||||
wxPoint(50, 50), wxSize(450, 340));
|
||||
|
||||
// Give it an icon
|
||||
#ifdef __WXMSW__
|
||||
frame->SetIcon(wxIcon("mondrian"));
|
||||
#endif
|
||||
#ifdef __WXGTK__
|
||||
frame->SetIcon(wxIcon( mondrian_xpm ));
|
||||
#endif
|
||||
frame->SetIcon(wxICON(mondrian));
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
@@ -99,8 +96,9 @@ bool MyApp::OnInit(void)
|
||||
}
|
||||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
|
||||
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||
MyFrame::MyFrame(wxFrame *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size):
|
||||
wxFrame(parent, -1, title, pos, size)
|
||||
{}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
|
||||
|
Reference in New Issue
Block a user