more wxGTK compatibility things.
It builds now but there are serious runtime problems... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
eaf3cf57ed
commit
fb5e0af035
@ -6,6 +6,7 @@
|
||||
CCC=c++
|
||||
WXWIN=../../..
|
||||
|
||||
|
||||
## Pick one of these, or set your own
|
||||
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||
TARGETDIR=..
|
||||
@ -13,6 +14,8 @@ TARGETDIR=..
|
||||
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||
-I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
|
||||
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk
|
||||
# -D__WXDEBUG__ -ldmalloc \
|
||||
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk \
|
||||
-L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11
|
||||
|
||||
|
||||
|
@ -113,7 +113,9 @@ enum {
|
||||
wxMINOR_VERSION,
|
||||
wxRELEASE_NUMBER,
|
||||
|
||||
#ifdef __WXMSW__
|
||||
UNKNOWN,
|
||||
#endif
|
||||
NOT_FOUND,
|
||||
|
||||
wxVSCROLL,
|
||||
@ -695,6 +697,11 @@ enum wxEventType {
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 1998/08/18 19:48:11 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.3 1998/08/14 23:36:33 RD
|
||||
// Beginings of wxGTK compatibility
|
||||
//
|
||||
|
@ -370,7 +370,8 @@ class wxFrame(wxFramePtr):
|
||||
_StdFrameCallbacks(self)
|
||||
|
||||
|
||||
class wxMiniFrame(wxMiniFramePtr):
|
||||
if wxPlatform == '__WXMSW__':
|
||||
class wxMiniFrame(wxMiniFramePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
@ -603,7 +604,8 @@ class wxScrollBar(wxScrollBarPtr):
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxSpinButton(wxSpinButtonPtr):
|
||||
if wxPlatform == '__WXMSW__':
|
||||
class wxSpinButton(wxSpinButtonPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
@ -716,7 +718,7 @@ wxPyDefaultSize.Set(-1,-1)
|
||||
## self.isShown = false
|
||||
|
||||
|
||||
_defRedirect = (wxPlatform == '__WIN32__')
|
||||
_defRedirect = (wxPlatform == '__WXMSW__')
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# The main application class. Derive from this and implement an OnInit
|
||||
@ -760,6 +762,11 @@ class wxApp(wxPyApp):
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.2 1998/08/18 19:48:12 RD
|
||||
# more wxGTK compatibility things.
|
||||
#
|
||||
# It builds now but there are serious runtime problems...
|
||||
#
|
||||
# Revision 1.1 1998/08/09 08:25:49 RD
|
||||
# Initial version
|
||||
#
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
|
||||
bool GetChooseFull();
|
||||
wxColour& GetColour();
|
||||
wxColour& GetCustomColour(int i);
|
||||
wxColour GetCustomColour(int i);
|
||||
void SetChooseFull(int flag);
|
||||
void SetColour(const wxColour& colour);
|
||||
void SetCustomColour(int i, const wxColour& colour);
|
||||
@ -52,13 +52,18 @@ class wxColourDialog : public wxDialog {
|
||||
public:
|
||||
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxColourData& GetColourData();
|
||||
#else
|
||||
wxColourData GetColourData();
|
||||
#endif
|
||||
int ShowModal();
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxDirDialog : public wxDialog {
|
||||
public:
|
||||
wxDirDialog(wxWindow* parent,
|
||||
@ -74,6 +79,7 @@ public:
|
||||
void SetPath(const wxString& path);
|
||||
int ShowModal();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@ -185,6 +191,7 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxPageSetupData {
|
||||
public:
|
||||
wxPageSetupData();
|
||||
@ -226,9 +233,11 @@ public:
|
||||
wxPageSetupData& GetPageSetupData();
|
||||
int ShowModal();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxPrintData {
|
||||
public:
|
||||
wxPrintData();
|
||||
@ -266,6 +275,7 @@ public:
|
||||
wxDC* GetPrintDC();
|
||||
int ShowModal();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@ -286,6 +296,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:13 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:25 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -15,7 +15,10 @@
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include <wx/slider.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <wx/spinbutt.h>
|
||||
#endif
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -41,7 +44,7 @@ wxValidator wxPyDefaultValidator; // Non-const default because of SWIG
|
||||
class wxControl : public wxWindow {
|
||||
public:
|
||||
void Command(wxCommandEvent& event);
|
||||
wxString& GetLabel();
|
||||
wxString GetLabel();
|
||||
void SetLabel(const wxString& label);
|
||||
};
|
||||
|
||||
@ -69,14 +72,16 @@ public:
|
||||
const wxValidator& validator = wxPyDefaultValidator,
|
||||
char* name = "button");
|
||||
|
||||
wxBitmap& GetBitmapLabel();
|
||||
#ifdef __WXMSW__
|
||||
wxBitmap& GetBitmapDisabled();
|
||||
wxBitmap& GetBitmapFocus();
|
||||
wxBitmap& GetBitmapLabel();
|
||||
wxBitmap& GetBitmapSelected();
|
||||
void SetBitmapDisabled(const wxBitmap& bitmap);
|
||||
void SetBitmapFocus(const wxBitmap& bitmap);
|
||||
void SetBitmapLabel(const wxBitmap& bitmap);
|
||||
void SetBitmapSelected(const wxBitmap& bitmap);
|
||||
#endif
|
||||
void SetBitmapLabel(const wxBitmap& bitmap);
|
||||
|
||||
};
|
||||
|
||||
@ -258,14 +263,18 @@ public:
|
||||
void DiscardEdits();
|
||||
long GetInsertionPoint();
|
||||
long GetLastPosition();
|
||||
#ifdef __WXMSW__
|
||||
int GetLineLength(long lineNo);
|
||||
wxString GetLineText(long lineNo);
|
||||
int GetNumberOfLines();
|
||||
#endif
|
||||
wxString GetValue();
|
||||
bool IsModified();
|
||||
bool LoadFile(const wxString& filename);
|
||||
void Paste();
|
||||
#ifdef __WXMSW__
|
||||
void PositionToXY(long pos, long *OUTPUT, long *OUTPUT);
|
||||
#endif
|
||||
void Remove(long from, long to);
|
||||
void Replace(long from, long to, const wxString& value);
|
||||
bool SaveFile(const wxString& filename);
|
||||
@ -276,7 +285,9 @@ public:
|
||||
void SetValue(const wxString& value);
|
||||
void ShowPosition(long pos);
|
||||
void WriteText(const wxString& text);
|
||||
#ifdef __WXMSW__
|
||||
long XYToPosition(long x, long y);
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -302,6 +313,7 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxSpinButton : public wxControl {
|
||||
public:
|
||||
wxSpinButton(wxWindow* parent, wxWindowID id = -1,
|
||||
@ -316,6 +328,7 @@ public:
|
||||
void SetRange(int min, int max);
|
||||
void SetValue(int value);
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@ -419,6 +432,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:14 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:28 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -76,21 +76,31 @@ public:
|
||||
|
||||
class wxListCtrl : public wxControl {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxListCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxPyDefaultValidator,
|
||||
char* name = "listCtrl");
|
||||
#else
|
||||
wxListCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
char* name = "listctrl");
|
||||
#endif
|
||||
|
||||
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
|
||||
bool DeleteItem(long item);
|
||||
bool DeleteAllItems();
|
||||
bool DeleteColumn(int col);
|
||||
#ifdef __WXMSW__
|
||||
bool DeleteAllColumns(void);
|
||||
void ClearAll(void);
|
||||
wxTextCtrl* EditLabel(long item);
|
||||
bool EndEditLabel(bool cancel);
|
||||
#endif
|
||||
bool EnsureVisible(long item);
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE);
|
||||
%name(FindItemData)long FindItem(long start, long data);
|
||||
@ -99,7 +109,9 @@ public:
|
||||
bool GetColumn(int col, wxListItem& item);
|
||||
int GetColumnWidth(int col);
|
||||
int GetCountPerPage();
|
||||
#ifdef __WXMSW
|
||||
wxTextCtrl* GetEditControl();
|
||||
#endif
|
||||
wxImageList* GetImageList(int which);
|
||||
long GetItemData(long item);
|
||||
|
||||
@ -129,7 +141,9 @@ public:
|
||||
int geometry = wxLIST_NEXT_ALL,
|
||||
int state = wxLIST_STATE_DONTCARE);
|
||||
int GetSelectedItemCount();
|
||||
#ifdef __WXMSW__
|
||||
wxColour GetTextColour();
|
||||
#endif
|
||||
long GetTopItem();
|
||||
long HitTest(const wxPoint& point, int& OUTPUT);
|
||||
%name(InsertColumnWithInfo)long InsertColumn(long col, wxListItem& info);
|
||||
@ -157,7 +171,9 @@ public:
|
||||
bool SetItemState(long item, long state, long stateMask);
|
||||
void SetItemText(long item, const wxString& text);
|
||||
void SetSingleStyle(long style, bool add = TRUE);
|
||||
#ifdef __WXMSW__
|
||||
void SetTextColour(const wxColour& col);
|
||||
#endif
|
||||
void SetWindowStyleFlag(long style);
|
||||
// TODO: bool SortItems(wxListCtrlCompare fn, long data);
|
||||
};
|
||||
@ -262,22 +278,38 @@ public:
|
||||
|
||||
class wxTreeCtrl : public wxControl {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS,
|
||||
const wxValidator& validator = wxPyDefaultValidator,
|
||||
char* name = "wxTreeCtrl");
|
||||
#else
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS,
|
||||
char* name = "wxTreeCtrl");
|
||||
#endif
|
||||
|
||||
bool DeleteAllItems();
|
||||
#ifdef __WXMSW__
|
||||
bool DeleteItem(long item);
|
||||
#else
|
||||
void DeleteItem(long item);
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
wxTextCtrl* EditLabel(long item);
|
||||
bool EnsureVisible(long item);
|
||||
bool ExpandItem(long item, int action);
|
||||
long GetChild(long item);
|
||||
#endif
|
||||
int GetCount();
|
||||
#ifdef __WXMSW__
|
||||
wxTextCtrl* GetEditControl();
|
||||
long GetFirstVisibleItem();
|
||||
#endif
|
||||
wxImageList* GetImageList(int which = wxIMAGE_LIST_NORMAL);
|
||||
int GetIndent();
|
||||
long GetItemData(long item);
|
||||
@ -288,17 +320,23 @@ public:
|
||||
self->GetItem(*info);
|
||||
return info;
|
||||
}
|
||||
#ifdef __WXMSW__
|
||||
%new wxRect* GetItemRect(long item, int textOnly = FALSE) {
|
||||
wxRect* rect = new wxRect;
|
||||
self->GetItemRect(item, *rect, textOnly);
|
||||
return rect;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
int GetItemState(long item, long stateMask);
|
||||
#endif
|
||||
wxString GetItemText(long item);
|
||||
#ifdef __WXMSW__
|
||||
long GetNextItem(long item, int code);
|
||||
long GetNextVisibleItem(long item);
|
||||
#endif
|
||||
long GetParent(long item);
|
||||
long GetRootItem();
|
||||
long GetSelection();
|
||||
@ -310,20 +348,31 @@ public:
|
||||
int image = -1, int selImage = -1,
|
||||
long insertAfter = wxTREE_INSERT_LAST);
|
||||
bool ItemHasChildren(long item);
|
||||
#ifdef __WXMSW__
|
||||
bool ScrollTo(long item);
|
||||
#endif
|
||||
bool SelectItem(long item);
|
||||
void SetIndent(int indent);
|
||||
void SetImageList(wxImageList* imageList, int which = wxIMAGE_LIST_NORMAL);
|
||||
bool SetItem(wxTreeItem& info);
|
||||
#ifdef __WXMSW__
|
||||
bool SetItemImage(long item, int image, int selImage);
|
||||
#else
|
||||
void SetItemImage(long item, int image, int selImage);
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
bool SetItemState(long item, long state, long stateMask);
|
||||
#endif
|
||||
void SetItemText(long item, const wxString& text);
|
||||
bool SetItemData(long item, long data);
|
||||
#ifdef __WXMSW__
|
||||
bool SortChildren(long item);
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxTabEvent : public wxCommandEvent {
|
||||
public:
|
||||
};
|
||||
@ -369,12 +418,19 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:15 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:30 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
|
||||
#include <wx/metafile.h>
|
||||
%}
|
||||
|
||||
@ -35,7 +34,9 @@ public:
|
||||
wxBitmap(const wxString& name, long type);
|
||||
~wxBitmap();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void Create(int width, int height, int depth = -1);
|
||||
#endif
|
||||
int GetDepth();
|
||||
int GetHeight();
|
||||
wxPalette* GetPalette();
|
||||
@ -47,8 +48,9 @@ public:
|
||||
void SetDepth(int depth);
|
||||
void SetHeight(int height);
|
||||
void SetMask(wxMask* mask);
|
||||
void SetOk(int isOk);
|
||||
#ifdef __WXMSW__
|
||||
void SetPalette(wxPalette* palette);
|
||||
#endif
|
||||
void SetWidth(int width);
|
||||
};
|
||||
|
||||
@ -88,7 +90,10 @@ public:
|
||||
|
||||
class wxIcon : public wxBitmap {
|
||||
public:
|
||||
wxIcon(char *name, long flags);
|
||||
#ifdef __WXMSW__
|
||||
wxIcon(const wxString& name, long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
#endif
|
||||
~wxIcon();
|
||||
|
||||
int GetDepth();
|
||||
@ -98,7 +103,6 @@ public:
|
||||
bool Ok();
|
||||
void SetDepth(int depth);
|
||||
void SetHeight(int height);
|
||||
void SetOk(int isOk);
|
||||
void SetWidth(int width);
|
||||
};
|
||||
|
||||
@ -106,7 +110,9 @@ public:
|
||||
|
||||
class wxCursor : public wxBitmap {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
|
||||
#endif
|
||||
~wxCursor();
|
||||
bool Ok();
|
||||
};
|
||||
@ -142,12 +148,14 @@ public:
|
||||
int GetStyle();
|
||||
bool GetUnderlined();
|
||||
int GetWeight();
|
||||
#ifdef __WXMSW__
|
||||
void SetFaceName(const wxString& faceName);
|
||||
void SetFamily(int family);
|
||||
void SetPointSize(int pointSize);
|
||||
void SetStyle(int style);
|
||||
void SetUnderlined(bool underlined);
|
||||
void SetWeight(int weight);
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -198,18 +206,22 @@ public:
|
||||
int GetCap();
|
||||
wxColour& GetColour();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// **** This one needs to return a list of ints (wxDash)
|
||||
int GetDashes(wxDash **dashes);
|
||||
int GetJoin();
|
||||
wxBitmap* GetStipple();
|
||||
#endif
|
||||
int GetJoin();
|
||||
int GetStyle();
|
||||
int GetWidth();
|
||||
bool Ok();
|
||||
void SetCap(int cap_style);
|
||||
void SetColour(wxColour& colour);
|
||||
#ifdef __WXMSW__
|
||||
void SetDashes(int LCOUNT, wxDash* LIST);
|
||||
void SetJoin(int join_style);
|
||||
void SetStipple(wxBitmap * stipple);
|
||||
#endif
|
||||
void SetJoin(int join_style);
|
||||
void SetStyle(int style);
|
||||
void SetWidth(int width);
|
||||
};
|
||||
@ -231,9 +243,11 @@ public:
|
||||
wxBitmap * GetStipple();
|
||||
int GetStyle();
|
||||
bool Ok();
|
||||
#ifdef __WXMSW__
|
||||
void SetColour(wxColour &colour);
|
||||
void SetStipple(wxBitmap *bitmap);
|
||||
void SetStyle(int style);
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -242,7 +256,7 @@ public:
|
||||
|
||||
class wxDC {
|
||||
public:
|
||||
wxDC();
|
||||
// wxDC(); **** abstract base class, can't instantiate.
|
||||
~wxDC();
|
||||
|
||||
void BeginDrawing();
|
||||
@ -271,7 +285,12 @@ public:
|
||||
void EndDoc();
|
||||
void EndDrawing();
|
||||
void EndPage();
|
||||
#ifdef __WXWIN__
|
||||
void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
|
||||
#endif
|
||||
#ifdef __WXGTK__
|
||||
void FloodFill(long x, long y, wxColour* colour, int style=wxFLOOD_SURFACE);
|
||||
#endif
|
||||
wxBrush * GetBackground();
|
||||
wxBrush * GetBrush();
|
||||
long GetCharHeight();
|
||||
@ -283,7 +302,13 @@ public:
|
||||
int GetMapMode();
|
||||
bool GetOptimization();
|
||||
wxPen * GetPen();
|
||||
//bool GetPixel(int x, int y, wxColour *T_OUTPUT); **** See below.
|
||||
%addmethods {
|
||||
%new wxColour* GetPixel(long x, long y) {
|
||||
wxColour* wc = new wxColour();
|
||||
self->GetPixel(x, y, wc);
|
||||
return wc;
|
||||
}
|
||||
}
|
||||
void GetSize(int* OUTPUT, int* OUTPUT); //void GetSize(long* OUTPUT, long* OUTPUT);
|
||||
wxColour& GetTextBackground();
|
||||
void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT,
|
||||
@ -317,12 +342,6 @@ public:
|
||||
|
||||
|
||||
%addmethods {
|
||||
%new wxColour* GetPixel(long x, long y) {
|
||||
wxColor* wc = new wxColor();
|
||||
self->GetPixel(x, y, wc);
|
||||
return wc;
|
||||
}
|
||||
|
||||
// This one is my own creation...
|
||||
void DrawBitmap(wxBitmap* bitmap, long x, long y, bool swapPalette=TRUE) {
|
||||
wxMemoryDC* memDC = new wxMemoryDC;
|
||||
@ -389,19 +408,23 @@ public:
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxPrinterDC : public wxDC {
|
||||
public:
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output,
|
||||
bool interactive = TRUE, int orientation = wxPORTRAIT);
|
||||
};
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxMetaFileDC : public wxDC {
|
||||
public:
|
||||
wxMetaFileDC(const wxString& filename = wxPyEmptyStr);
|
||||
wxMetaFile* Close();
|
||||
};
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
@ -461,6 +484,11 @@ extern wxColour wxNullColour;
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:16 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:35 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -76,7 +76,7 @@ void wxPyApp::AfterMainLoop(void) {
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------
|
||||
// a few native methods to add to the module
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@ -100,8 +100,18 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
||||
wxPythonApp->OnInitGui();
|
||||
#endif
|
||||
#ifdef __WXGTK__
|
||||
wxTheApp->argc = 0;
|
||||
wxTheApp->argv = NULL;
|
||||
wxClassInfo::InitializeClasses();
|
||||
PyObject* sysargv = PySys_GetObject("argv");
|
||||
int argc = PyList_Size(sysargv);
|
||||
char** argv = new char*[argc+1];
|
||||
int x;
|
||||
for(x=0; x<argc; x++)
|
||||
argv[x] = PyString_AsString(PyList_GetItem(sysargv, x));
|
||||
argv[argc] = NULL;
|
||||
|
||||
|
||||
wxTheApp->argc = argc;
|
||||
wxTheApp->argv = argv;
|
||||
|
||||
gtk_init( &wxTheApp->argc, &wxTheApp->argv );
|
||||
|
||||
@ -148,6 +158,8 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
@ -274,7 +286,7 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args)
|
||||
#define wxPlatform "__GTK__"
|
||||
#endif
|
||||
#if defined(__WIN32__) || defined(__WXMSW__)
|
||||
#define wxPlatform "__WIN32__"
|
||||
#define wxPlatform "__WXMSW__"
|
||||
#endif
|
||||
#ifdef __WXMAC__
|
||||
#define wxPlatform "__MAC__"
|
||||
@ -1059,6 +1071,11 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.5 1998/08/18 19:48:17 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.4 1998/08/16 04:31:06 RD
|
||||
// More wxGTK work.
|
||||
//
|
||||
|
@ -51,7 +51,9 @@ public:
|
||||
// TODO: This isn't handled by the standard event-table system...
|
||||
//wxMDIClientWindow* OnCreateClient();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void SetToolBar(wxToolBar* toolbar);
|
||||
#endif
|
||||
void Tile();
|
||||
};
|
||||
|
||||
@ -70,6 +72,11 @@ public:
|
||||
void Activate();
|
||||
void Maximize();
|
||||
void Restore();
|
||||
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
void SetClientSize(int width, int height);
|
||||
void GetPosition(int* OUTPUT, int* OUTPUT) const ;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -84,6 +91,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:18 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:39 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -182,18 +182,19 @@ wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL);
|
||||
#ifdef __WXMSW__
|
||||
wxWindow * wxGetActiveWindow();
|
||||
long wxGetElapsedTime(bool resetTimer = TRUE);
|
||||
#endif
|
||||
long wxGetFreeMemory();
|
||||
#endif
|
||||
void wxGetMousePosition(int* OUTPUT, int* OUTPUT);
|
||||
bool wxIsBusy();
|
||||
wxString wxNow();
|
||||
bool wxShell(const wxString& command = wxPyEmptyStr);
|
||||
#ifdef __WXMSW__
|
||||
bool wxShell(const wxString& command = wxPyEmptyStr);
|
||||
void wxStartTimer();
|
||||
int wxGetOsVersion(int *OUTPUT, int *OUTPUT);
|
||||
#endif
|
||||
|
||||
bool wxYield();
|
||||
|
||||
int wxGetOsVersion(int *OUTPUT, int *OUTPUT);
|
||||
%inline %{
|
||||
char* wxGetResource(char *section, char *entry, char *file = NULL) {
|
||||
char * retval;
|
||||
@ -306,6 +307,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 1998/08/18 19:48:19 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.3 1998/08/16 04:31:10 RD
|
||||
// More wxGTK work.
|
||||
//
|
||||
|
@ -209,11 +209,13 @@ public:
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
#ifdef __WXMSW__
|
||||
bool InsertPage(int nPage,
|
||||
/*wxNotebookPage*/ wxWindow *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
#endif
|
||||
wxNotebookPage *GetPage(int nPage);
|
||||
|
||||
};
|
||||
@ -222,6 +224,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.3 1998/08/18 19:48:20 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:50 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
@ -149,9 +149,6 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
|
||||
#ifdef __WXMSW__
|
||||
wxApp::Initialize((WXHINSTANCE)wxhInstance);
|
||||
#endif
|
||||
#ifdef __WXGTK__
|
||||
wxApp::CommonInit();
|
||||
#endif
|
||||
|
||||
|
||||
// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
|
||||
@ -180,6 +177,11 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 1998/08/18 19:48:20 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.3 1998/08/15 07:36:53 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
|
Loading…
Reference in New Issue
Block a user