some tweaks for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -177,6 +177,16 @@ INSTALL= $(LIBPL)/install-sh -c
|
|||||||
# Also, making them read-only seems to be a good idea...
|
# Also, making them read-only seems to be a good idea...
|
||||||
INSTALL_SHARED= ${INSTALL} -m 555
|
INSTALL_SHARED= ${INSTALL} -m 555
|
||||||
|
|
||||||
|
#---------------------------------------------------
|
||||||
|
# Possibly change some definintions for C++
|
||||||
|
ifdef MY_LDSHARED
|
||||||
|
LDSHARED=$(MY_LDSHARED)
|
||||||
|
endif
|
||||||
|
ifdef MY_LINKCC
|
||||||
|
LINKCC=$(MY_LINKCC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# === Fixed rules ===
|
# === Fixed rules ===
|
||||||
|
|
||||||
# Default target. This builds shared libraries only
|
# Default target. This builds shared libraries only
|
||||||
@@ -198,7 +208,7 @@ $(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
|
|||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
# This is a defaul version of the install target for wxPython. It just
|
# This is a default version of the install target for wxPython. It just
|
||||||
# redirects to wxInstall below...
|
# redirects to wxInstall below...
|
||||||
|
|
||||||
install: wxInstall
|
install: wxInstall
|
||||||
@@ -314,9 +324,6 @@ distclean: clobber
|
|||||||
# Custom rules and dependencies added for wxPython
|
# Custom rules and dependencies added for wxPython
|
||||||
#
|
#
|
||||||
|
|
||||||
ifdef MY_LDSHARED
|
|
||||||
LDSHARED=$(MY_LDSHARED)
|
|
||||||
endif
|
|
||||||
|
|
||||||
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
|
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
|
||||||
|
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
# This file gives the details of what is needed to build this extension
|
# This file gives the details of what is needed to build this extension
|
||||||
# module so the Makefile can be created.
|
# module so the Makefile can be created.
|
||||||
|
|
||||||
|
###
|
||||||
|
### This file should be created by configure. Currently it is tweaked by hand.
|
||||||
|
###
|
||||||
|
|
||||||
*shared*
|
*shared*
|
||||||
|
|
||||||
CCC=c++
|
CCC=c++
|
||||||
@@ -10,19 +14,29 @@ srcdir=$(GENCODEDIR)
|
|||||||
|
|
||||||
# Depending on how your Python was built, you may have to set this
|
# Depending on how your Python was built, you may have to set this
|
||||||
# value to use the C++ driver to link with instead of the default
|
# value to use the C++ driver to link with instead of the default
|
||||||
# C driver. Fo rexample:
|
# C driver. For example:
|
||||||
MY_LDSHARED=$(CCC) -shared
|
#MY_LDSHARED=$(CCC) -shared
|
||||||
|
MY_LINKCC=$(CCC) --verbose
|
||||||
|
|
||||||
|
|
||||||
## Pick one of these, or set your own
|
## Pick one of these, or set your own. This is where the
|
||||||
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
## wxPython module should be installed. It should be a
|
||||||
|
## subdirectory named wxPython.
|
||||||
TARGETDIR=..
|
TARGETDIR=..
|
||||||
|
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||||
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
|
||||||
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
|
||||||
-I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
|
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||||
# -D__WXDEBUG__ -ldmalloc \
|
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||||
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk \
|
# CFLAGS
|
||||||
-L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11
|
-I. -I$(WXWIN)/include -I/usr/local/lib/glib/include -I$(WXWIN)/src \
|
||||||
|
-I/usr/X/include -DSWIG_GLOBAL -D__WXGTK__ \
|
||||||
|
# LFLAGS
|
||||||
|
-L$(WXWIN)/lib/solaris2.6 -L/usr/X/lib \
|
||||||
|
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 \
|
||||||
|
-lwx_gtk -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -33,8 +33,8 @@
|
|||||||
* and things like that.
|
* and things like that.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.1 1998/08/19 00:10:01 RD
|
* Revision 1.2 1998/08/22 19:50:56 RD
|
||||||
* GTK version of the SWIG-generated files
|
* some tweaks for wxGTK
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
@@ -1372,8 +1372,8 @@ class wxApp(wxPyApp):
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
# Revision 1.1 1998/08/19 00:10:03 RD
|
# Revision 1.2 1998/08/22 19:50:58 RD
|
||||||
# GTK version of the SWIG-generated files
|
# some tweaks for wxGTK
|
||||||
#
|
#
|
||||||
# Revision 1.2 1998/08/18 19:48:12 RD
|
# Revision 1.2 1998/08/18 19:48:12 RD
|
||||||
# more wxGTK compatibility things.
|
# more wxGTK compatibility things.
|
||||||
|
@@ -31,20 +31,21 @@ class MyCanvas(wxWindow):
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class MyMiniFrame(wxMiniFrame):
|
if wxPlatform == '__WXMSW__':
|
||||||
def __init__(self, parent, ID, title, pos, size, style):
|
class MyMiniFrame(wxMiniFrame):
|
||||||
wxMiniFrame.__init__(self, parent, ID, title, pos, size, style)
|
def __init__(self, parent, ID, title, pos, size, style):
|
||||||
panel = wxPanel(self, -1)
|
wxMiniFrame.__init__(self, parent, ID, title, pos, size, style)
|
||||||
ID = NewId()
|
panel = wxPanel(self, -1)
|
||||||
button = wxButton(panel, ID, "Close Me")
|
ID = NewId()
|
||||||
button.SetPosition(wxPoint(15, 15))
|
button = wxButton(panel, ID, "Close Me")
|
||||||
self.Connect(ID, -1, wxEVT_COMMAND_BUTTON_CLICKED, self.OnCloseMe)
|
button.SetPosition(wxPoint(15, 15))
|
||||||
|
self.Connect(ID, -1, wxEVT_COMMAND_BUTTON_CLICKED, self.OnCloseMe)
|
||||||
|
|
||||||
def OnCloseMe(self, event):
|
def OnCloseMe(self, event):
|
||||||
self.Close(true)
|
self.Close(true)
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -62,10 +63,11 @@ class MyFrame(wxFrame):
|
|||||||
menu.Append(200, 'E&xit', 'Get the heck outta here!')
|
menu.Append(200, 'E&xit', 'Get the heck outta here!')
|
||||||
mainmenu.Append(menu, "&It's a menu!")
|
mainmenu.Append(menu, "&It's a menu!")
|
||||||
self.SetMenuBar(mainmenu)
|
self.SetMenuBar(mainmenu)
|
||||||
print menu.GetHelpString(100)
|
if wxPlatform == '__WXMSW__':
|
||||||
print mainmenu.GetHelpString(101)
|
print menu.GetHelpString(100)
|
||||||
print mainmenu.GetHelpString(200)
|
print mainmenu.GetHelpString(101)
|
||||||
self.DragAcceptFiles(true)
|
print mainmenu.GetHelpString(200)
|
||||||
|
self.DragAcceptFiles(true)
|
||||||
|
|
||||||
self.Connect(-1, -1, wxEVT_COMMAND_MENU_SELECTED, self.OnMenuCommand)
|
self.Connect(-1, -1, wxEVT_COMMAND_MENU_SELECTED, self.OnMenuCommand)
|
||||||
self.Connect(-1, -1, wxEVT_DROP_FILES, self.OnDropFiles)
|
self.Connect(-1, -1, wxEVT_DROP_FILES, self.OnDropFiles)
|
||||||
@@ -93,13 +95,16 @@ class MyFrame(wxFrame):
|
|||||||
if event.GetInt() == 200:
|
if event.GetInt() == 200:
|
||||||
self.Close()
|
self.Close()
|
||||||
elif event.GetInt() == 101:
|
elif event.GetInt() == 101:
|
||||||
win = MyMiniFrame(self, -1, "This is a Mini...",
|
if wxPlatform == '__WXMSW__':
|
||||||
|
win = MyMiniFrame(self, -1, "This is a Mini...",
|
||||||
wxPoint(-1, -1), #wxPyDefaultPosition,
|
wxPoint(-1, -1), #wxPyDefaultPosition,
|
||||||
wxSize(150, 150),
|
wxSize(150, 150),
|
||||||
wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU |
|
wxTHICK_FRAME | wxSYSTEM_MENU |
|
||||||
wxTINY_CAPTION_HORIZ)
|
wxTINY_CAPTION_HORIZ)
|
||||||
win.Show(true)
|
win.Show(true)
|
||||||
|
else:
|
||||||
|
print 'Sorry, can\'t do mini\'s...'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -138,6 +143,9 @@ if __name__ == '__main__':
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.2 1998/08/22 19:51:17 RD
|
||||||
|
# some tweaks for wxGTK
|
||||||
|
#
|
||||||
# Revision 1.1 1998/08/09 08:28:05 RD
|
# Revision 1.1 1998/08/09 08:28:05 RD
|
||||||
# Initial version
|
# Initial version
|
||||||
#
|
#
|
||||||
|
@@ -274,8 +274,9 @@ class AppFrame(wxFrame):
|
|||||||
def __init__(self, parent, id, title):
|
def __init__(self, parent, id, title):
|
||||||
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
|
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
|
||||||
wxSize(420, 200))
|
wxSize(420, 200))
|
||||||
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
|
if wxPlatform == '__WXMSW__':
|
||||||
self.SetIcon(self.icon)
|
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
|
||||||
|
self.SetIcon(self.icon)
|
||||||
|
|
||||||
self.mainmenu = wxMenuBar()
|
self.mainmenu = wxMenuBar()
|
||||||
menu = wxMenu()
|
menu = wxMenu()
|
||||||
@@ -384,9 +385,8 @@ class AppFrame(wxFrame):
|
|||||||
|
|
||||||
def OnTestSimpleControls(self, event):
|
def OnTestSimpleControls(self, event):
|
||||||
dlg = TestSimpleControlsDlg(self, self)
|
dlg = TestSimpleControlsDlg(self, self)
|
||||||
dlg.SetModal(true)
|
|
||||||
dlg.Centre()
|
dlg.Centre()
|
||||||
dlg.Show(true)
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
||||||
def OnTestTimer(self, event):
|
def OnTestTimer(self, event):
|
||||||
@@ -520,6 +520,9 @@ if __name__ == '__main__':
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.2 1998/08/22 19:51:18 RD
|
||||||
|
# some tweaks for wxGTK
|
||||||
|
#
|
||||||
# Revision 1.1 1998/08/09 08:28:05 RD
|
# Revision 1.1 1998/08/09 08:28:05 RD
|
||||||
# Initial version
|
# Initial version
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user