Removed minor differences between wxMSW and wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,18 +55,13 @@ public:
|
||||
|
||||
%pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxColourData& GetColourData();
|
||||
#else
|
||||
wxColourData GetColourData();
|
||||
#endif
|
||||
int ShowModal();
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxDirDialog : public wxDialog {
|
||||
public:
|
||||
wxDirDialog(wxWindow* parent,
|
||||
@@ -84,7 +79,6 @@ public:
|
||||
void SetPath(const wxString& path);
|
||||
int ShowModal();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -311,6 +305,9 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.8 1998/12/17 14:07:25 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.7 1998/12/15 20:41:14 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
|
@@ -83,14 +83,12 @@ public:
|
||||
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
|
||||
|
||||
wxBitmap& GetBitmapLabel();
|
||||
#ifdef __WXMSW__
|
||||
wxBitmap& GetBitmapDisabled();
|
||||
wxBitmap& GetBitmapFocus();
|
||||
wxBitmap& GetBitmapSelected();
|
||||
void SetBitmapDisabled(const wxBitmap& bitmap);
|
||||
void SetBitmapFocus(const wxBitmap& bitmap);
|
||||
void SetBitmapSelected(const wxBitmap& bitmap);
|
||||
#endif
|
||||
void SetBitmapLabel(const wxBitmap& bitmap);
|
||||
|
||||
};
|
||||
@@ -270,7 +268,6 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxCheckListBox : public wxListBox {
|
||||
public:
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
@@ -289,7 +286,6 @@ public:
|
||||
|
||||
int GetItemHeight();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -483,6 +479,9 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 1998/12/17 14:07:29 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.8 1998/12/15 20:41:15 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
|
@@ -90,11 +90,12 @@ public:
|
||||
bool DeleteItem(long item);
|
||||
bool DeleteAllItems();
|
||||
bool DeleteColumn(int col);
|
||||
#ifdef __WXMSW__
|
||||
bool DeleteAllColumns(void);
|
||||
void ClearAll(void);
|
||||
#ifdef __WXMSW__
|
||||
wxTextCtrl* EditLabel(long item);
|
||||
bool EndEditLabel(bool cancel);
|
||||
wxTextCtrl* GetEditControl();
|
||||
#endif
|
||||
bool EnsureVisible(long item);
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE);
|
||||
@@ -104,9 +105,6 @@ 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);
|
||||
|
||||
@@ -138,6 +136,7 @@ public:
|
||||
int GetSelectedItemCount();
|
||||
#ifdef __WXMSW__
|
||||
wxColour GetTextColour();
|
||||
void SetTextColour(const wxColour& col);
|
||||
#endif
|
||||
long GetTopItem();
|
||||
long HitTest(const wxPoint& point, int& OUTPUT);
|
||||
@@ -166,9 +165,6 @@ 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);
|
||||
};
|
||||
@@ -222,7 +218,6 @@ public:
|
||||
|
||||
class wxTreeCtrl : public wxControl {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
@@ -230,14 +225,6 @@ public:
|
||||
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 | wxTR_LINES_AT_ROOT,
|
||||
//const wxValidator& validator = wxPyDefaultValidator,
|
||||
char* name = "wxTreeCtrl");
|
||||
#endif
|
||||
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
|
||||
|
||||
size_t GetCount();
|
||||
@@ -318,9 +305,7 @@ public:
|
||||
|
||||
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
|
||||
bool IsBold(const wxTreeItemId& item) const;
|
||||
#ifdef __WXMSW__
|
||||
wxTreeItemId HitTest(const wxPoint& point);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -384,7 +369,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.13 1998/12/17 14:07:34 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.12 1998/12/16 22:10:52 RD
|
||||
//
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.11 1998/12/15 20:41:16 RD
|
||||
|
@@ -247,11 +247,9 @@ public:
|
||||
wxBitmap * GetStipple();
|
||||
int GetStyle();
|
||||
bool Ok();
|
||||
#ifdef __WXMSW__
|
||||
void SetColour(wxColour &colour);
|
||||
void SetStipple(wxBitmap& bitmap);
|
||||
void SetStyle(int style);
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -290,30 +288,17 @@ public:
|
||||
void EndDrawing();
|
||||
void EndPage();
|
||||
void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
|
||||
#ifdef __WXMSW__
|
||||
wxBrush& GetBackground();
|
||||
wxBrush& GetBrush();
|
||||
#else
|
||||
wxBrush GetBackground();
|
||||
wxBrush GetBrush();
|
||||
#endif
|
||||
long GetCharHeight();
|
||||
long GetCharWidth();
|
||||
void GetClippingBox(long *OUTPUT, long *OUTPUT,
|
||||
long *OUTPUT, long *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
wxFont& GetFont();
|
||||
#else
|
||||
wxFont GetFont();
|
||||
#endif
|
||||
int GetLogicalFunction();
|
||||
int GetMapMode();
|
||||
bool GetOptimization();
|
||||
#ifdef __WXMSW__
|
||||
wxPen& GetPen();
|
||||
#else
|
||||
wxPen GetPen();
|
||||
#endif
|
||||
%addmethods {
|
||||
%new wxColour* GetPixel(long x, long y) {
|
||||
wxColour* wc = new wxColour();
|
||||
@@ -413,21 +398,17 @@ public:
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxWindowDC : public wxDC {
|
||||
public:
|
||||
wxWindowDC(wxWindow* win);
|
||||
};
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef __WXMSW__
|
||||
class wxPostScriptDC : public wxDC {
|
||||
public:
|
||||
wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL);
|
||||
};
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -522,7 +503,11 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 1998/12/17 14:07:37 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.8 1998/12/16 22:10:54 RD
|
||||
//
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.7 1998/12/15 20:41:18 RD
|
||||
|
@@ -21,12 +21,6 @@
|
||||
#include <Python.h>
|
||||
#include "helpers.h"
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#ifdef wxUSE_GDK_IMLIB
|
||||
#include "gdk_imlib/gdk_imlib.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//wxHashTable* wxPyWindows = NULL;
|
||||
@@ -140,12 +134,6 @@ void __wxPreStart()
|
||||
gtk_init( &argc, &argv );
|
||||
delete [] argv;
|
||||
|
||||
#ifdef wxUSE_GDK_IMLIB
|
||||
gdk_imlib_init();
|
||||
gtk_widget_push_visual(gdk_imlib_get_visual());
|
||||
gtk_widget_push_colormap(gdk_imlib_get_colormap());
|
||||
#endif
|
||||
|
||||
wxApp::CommonInit();
|
||||
#endif
|
||||
|
||||
@@ -602,6 +590,9 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.16 1998/12/17 14:07:39 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.15 1998/12/15 20:41:19 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
|
@@ -139,17 +139,16 @@ public:
|
||||
wxToolBarTool* FindToolForPosition(const float x, const float y);
|
||||
wxSize GetToolSize();
|
||||
wxSize GetToolBitmapSize();
|
||||
void SetToolBitmapSize(const wxSize& size);
|
||||
// wxSize GetMargins();
|
||||
wxSize GetMaxSize();
|
||||
// wxObject* GetToolClientData(int toolIndex);
|
||||
#endif
|
||||
bool GetToolEnabled(int toolIndex);
|
||||
#ifdef __WXMSW__
|
||||
wxString GetToolLongHelp(int toolIndex);
|
||||
int GetToolPacking();
|
||||
int GetToolSeparation();
|
||||
wxString GetToolShortHelp(int toolIndex);
|
||||
#endif
|
||||
bool GetToolState(int toolIndex);
|
||||
|
||||
// TODO: figure out how to handle these
|
||||
@@ -157,17 +156,10 @@ public:
|
||||
//void OnMouseEnter(int toolIndex);
|
||||
//void OnRightClick(int toolIndex, float x, float y);
|
||||
|
||||
|
||||
#ifdef __WXMSW__
|
||||
bool Realize();
|
||||
#else
|
||||
void Realize();
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
void SetToolBitmapSize(const wxSize& size);
|
||||
|
||||
void SetToolLongHelp(int toolIndex, const wxString& helpString);
|
||||
void SetToolShortHelp(int toolIndex, const wxString& helpString);
|
||||
#endif
|
||||
void SetMargins(const wxSize& size);
|
||||
void SetToolPacking(int packing);
|
||||
void SetToolSeparation(int separation);
|
||||
@@ -209,6 +201,9 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 1998/12/17 14:07:43 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.3 1998/12/15 20:41:23 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
|
@@ -16,13 +16,10 @@
|
||||
%{
|
||||
#include "helpers.h"
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// wxGTK defines wxMenuItem inside menu.h
|
||||
#include <wx/menuitem.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <wx/minifram.h>
|
||||
#include <wx/minifram.h> // needed ?
|
||||
#endif
|
||||
%}
|
||||
|
||||
@@ -87,28 +84,14 @@ public:
|
||||
int GetCharHeight();
|
||||
int GetCharWidth();
|
||||
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
wxSize GetClientSize();
|
||||
#else
|
||||
%addmethods {
|
||||
wxSize GetClientSize() {
|
||||
int w, h;
|
||||
self->GetClientSize(&w, &h);
|
||||
return wxSize(w, h);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
wxLayoutConstraints * GetConstraints();
|
||||
#ifdef __WXMSW__
|
||||
wxButton* GetDefaultItem();
|
||||
#endif
|
||||
//wxEvtHandler* GetEventHandler();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxFont& GetFont();
|
||||
#else
|
||||
wxFont GetFont();
|
||||
#endif
|
||||
wxColour GetForegroundColour();
|
||||
wxWindow * GetGrandParent();
|
||||
int GetId();
|
||||
@@ -116,18 +99,14 @@ public:
|
||||
wxString GetName();
|
||||
wxWindow * GetParent();
|
||||
%name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
wxPoint GetPosition();
|
||||
wxRect GetRect();
|
||||
#endif
|
||||
int GetReturnCode();
|
||||
int GetScrollThumb(int orientation);
|
||||
int GetScrollPos(int orientation);
|
||||
int GetScrollRange(int orientation);
|
||||
%name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
wxSize GetSize();
|
||||
#endif
|
||||
void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE)
|
||||
wxString GetTitle();
|
||||
long GetWindowStyleFlag();
|
||||
@@ -188,9 +167,7 @@ public:
|
||||
bool TransferDataFromWindow();
|
||||
bool TransferDataToWindow();
|
||||
bool Validate();
|
||||
#ifdef __WXMSW__
|
||||
void WarpPointer(int x, int y);
|
||||
#endif
|
||||
|
||||
%name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
|
||||
%name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
|
||||
@@ -303,10 +280,8 @@ public:
|
||||
void Check(int id, bool flag);
|
||||
void Enable(int id, bool enable);
|
||||
int FindItem(const wxString& itemString);
|
||||
#ifdef __WXMSW__
|
||||
wxString GetTitle();
|
||||
void SetTitle(const wxString& title);
|
||||
#endif
|
||||
wxMenuItem* FindItemForId(int id);
|
||||
wxString GetHelpString(int id);
|
||||
wxString GetLabel(int id);
|
||||
@@ -340,11 +315,8 @@ public:
|
||||
void Enable(int id, bool enable);
|
||||
bool Enabled(int id);
|
||||
int FindMenuItem(const wxString& menuString, const wxString& itemString);
|
||||
#ifdef __WXGTK__
|
||||
%name(FindItemForId) wxMenuItem* FindMenuItemById( int id );
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
wxMenuItem * FindItemForId(int id);
|
||||
#ifdef __WXMSW__
|
||||
void EnableTop(int pos, bool enable);
|
||||
wxString GetHelpString(int id);
|
||||
wxString GetLabel(int id);
|
||||
@@ -368,22 +340,27 @@ public:
|
||||
bool IsCheckable();
|
||||
int GetId();
|
||||
wxMenu* GetSubMenu();
|
||||
#ifdef __WXMSW__
|
||||
void SetName(const wxString& strName);
|
||||
void DeleteSubMenu();
|
||||
const wxString& GetName();
|
||||
#endif
|
||||
const wxString& GetHelp();
|
||||
void SetHelp(const wxString& strHelp);
|
||||
void Enable(bool bDoEnable = TRUE);
|
||||
void Check(bool bDoCheck = TRUE);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void DeleteSubMenu();
|
||||
#endif
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 1998/12/17 14:07:46 RR
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.8 1998/12/16 22:10:56 RD
|
||||
//
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.7 1998/12/15 20:41:25 RD
|
||||
|
Reference in New Issue
Block a user