Beginings of wxGTK compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,8 +14,15 @@
|
||||
|
||||
|
||||
#include "helpers.h"
|
||||
#include <wx/minifram.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// wxGTK defines wxMenuItem inside menu.h
|
||||
#include <wx/menuitem.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <wx/minifram.h>
|
||||
#endif
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -37,7 +44,7 @@ public:
|
||||
void Connect( int id, int lastId, int eventType, PyObject* func) {
|
||||
if (PyCallable_Check(func)) {
|
||||
self->Connect(id, lastId, eventType,
|
||||
(wxObjectEventFunction) wxPyCallback::EventThunker,
|
||||
(wxObjectEventFunction) &wxPyCallback::EventThunker,
|
||||
new wxPyCallback(func));
|
||||
}
|
||||
}
|
||||
@@ -59,45 +66,66 @@ public:
|
||||
|
||||
|
||||
void CaptureMouse();
|
||||
void Center(int direction = wxHORIZONTAL);
|
||||
//void Center(int direction = wxHORIZONTAL);
|
||||
void Centre(int direction = wxHORIZONTAL);
|
||||
void ClientToScreen(int *BOTH, int *BOTH);
|
||||
bool Close(int force = FALSE);
|
||||
bool Destroy();
|
||||
void DestroyChildren();
|
||||
#ifdef __WXMSW__
|
||||
void DragAcceptFiles(bool accept);
|
||||
#endif
|
||||
void Enable(bool enable);
|
||||
//bool FakePopupMenu(wxMenu* menu, int x, int y);
|
||||
void Fit();
|
||||
wxColour GetBackgroundColour();
|
||||
#ifdef __WXMSW__
|
||||
int GetCharHeight();
|
||||
int GetCharWidth();
|
||||
#endif
|
||||
void GetClientSize(int *OUTPUT, int *OUTPUT);
|
||||
wxLayoutConstraints * GetConstraints();
|
||||
#ifdef __WXMSW__
|
||||
wxButton* GetDefaultItem();
|
||||
#endif
|
||||
//wxEvtHandler* GetEventHandler();
|
||||
wxFont* GetFont();
|
||||
#ifdef __WXMSW__
|
||||
wxColour GetForegroundColour();
|
||||
wxWindow * GetGrandParent();
|
||||
#endif
|
||||
int GetId();
|
||||
void GetPosition(int *OUTPUT, int *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
wxString& GetLabel();
|
||||
wxString& GetName();
|
||||
#else
|
||||
wxString GetLabel();
|
||||
wxString GetName();
|
||||
#endif
|
||||
wxWindow * GetParent();
|
||||
int GetReturnCode();
|
||||
int GetScrollThumb(int orientation);
|
||||
int GetScrollPos(int orientation);
|
||||
int GetScrollRange(int orientation);
|
||||
void GetSize(int *OUTPUT, int *OUTPUT);
|
||||
#ifdef __WXMSW__
|
||||
void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE)
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
wxString& GetTitle();
|
||||
#else
|
||||
wxString GetTitle();
|
||||
#endif
|
||||
long GetWindowStyleFlag();
|
||||
void InitDialog();
|
||||
bool IsEnabled();
|
||||
bool IsRetained();
|
||||
bool IsShown();
|
||||
void Layout();
|
||||
#ifdef __WXMSW__
|
||||
bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
|
||||
#endif
|
||||
void Lower();
|
||||
void MakeModal(bool flag);
|
||||
void Move(int x, int y);
|
||||
@@ -117,7 +145,9 @@ public:
|
||||
void SetDoubleClick(bool allowDoubleClick);
|
||||
void SetFocus();
|
||||
void SetFont(const wxFont& font);
|
||||
#ifdef __WXMSW__
|
||||
void SetForegroundColour(const wxColour& colour);
|
||||
#endif
|
||||
void SetId(int id);
|
||||
void SetName(const wxString& name);
|
||||
void SetReturnCode(int retCode);
|
||||
@@ -138,7 +168,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1);
|
||||
#endif
|
||||
void SetClientSize(int width, int height);
|
||||
//void SetPalette(wxPalette* palette);
|
||||
//void SetColourMap(wxColourMap *colourMap);
|
||||
@@ -149,18 +181,21 @@ public:
|
||||
bool TransferDataFromWindow();
|
||||
bool TransferDataToWindow();
|
||||
bool Validate();
|
||||
#ifdef __WXMSW__
|
||||
void WarpPointer(int x, int y);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Static method(s)
|
||||
#ifdef __WXMSW__
|
||||
%inline %{
|
||||
wxWindow* wxWindow_FindFocus() {
|
||||
return wxWindow::FindFocus();
|
||||
}
|
||||
%}
|
||||
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -173,17 +208,23 @@ public:
|
||||
char* name = "frame");
|
||||
|
||||
void Centre(int direction = wxBOTH);
|
||||
#ifdef __WXMSW__
|
||||
void Command(int id);
|
||||
#endif
|
||||
bool CreateStatusBar(int number = 1);
|
||||
wxMenuBar* GetMenuBar();
|
||||
wxStatusBar* GetStatusBar();
|
||||
#ifdef __WXMSW__
|
||||
wxString& GetTitle();
|
||||
#else
|
||||
wxString GetTitle();
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
void Iconize(bool iconize);
|
||||
bool IsIconized();
|
||||
// *** removed *** void LoadAccelerators(const wxString& table);
|
||||
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
||||
|
||||
void Maximize(bool maximize);
|
||||
#endif
|
||||
void SetIcon(const wxIcon& icon);
|
||||
void SetMenuBar(wxMenuBar* menuBar);
|
||||
void SetStatusText(const wxString& text, int number = 0);
|
||||
@@ -194,6 +235,7 @@ public:
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class wxMiniFrame : public wxFrame {
|
||||
public:
|
||||
wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
|
||||
@@ -201,8 +243,8 @@ public:
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
char* name = "frame");
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -233,10 +275,12 @@ public:
|
||||
void Centre(int direction = wxBOTH);
|
||||
void EndModal(int retCode);
|
||||
wxString GetTitle();
|
||||
#ifdef __WXMSW__
|
||||
void Iconize(bool iconize);
|
||||
bool IsIconized();
|
||||
bool IsModal();
|
||||
void SetModal(bool flag);
|
||||
#endif
|
||||
bool IsModal();
|
||||
void SetTitle(const wxString& title);
|
||||
bool Show(bool show);
|
||||
int ShowModal();
|
||||
@@ -280,20 +324,23 @@ public:
|
||||
void AppendSeparator();
|
||||
void Break();
|
||||
void Check(int id, bool flag);
|
||||
bool Checked(int id);
|
||||
void Enable(int id, bool enable);
|
||||
int FindItem(const wxString& itemString);
|
||||
#ifdef __WXMSW__
|
||||
wxMenuItem* FindItemForId(int id);
|
||||
wxString& GetHelpString(int id);
|
||||
wxString GetLabel(int id);
|
||||
wxString GetTitle();
|
||||
void SetHelpString(int id, const wxString& helpString);
|
||||
void SetLabel(int id, const wxString& label);
|
||||
void SetTitle(const wxString& title);
|
||||
#endif
|
||||
bool IsChecked(int id);
|
||||
bool IsEnabled(int id);
|
||||
void SetLabel(int id, const wxString& label);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef __WXMSW__
|
||||
//
|
||||
// This one knows how to set a callback and handle INC- and DECREFing it. To
|
||||
// be used for PopupMenus, but you must retain a referece to it while using
|
||||
@@ -304,6 +351,7 @@ public:
|
||||
wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
|
||||
~wxPyMenu();
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -315,15 +363,17 @@ public:
|
||||
void Check(int id, bool flag);
|
||||
bool Checked(int id);
|
||||
void Enable(int id, bool enable);
|
||||
void EnableTop(int pos, bool enable);
|
||||
int FindMenuItem(const wxString& menuString, const wxString& itemString);
|
||||
#ifdef __WXMSW__
|
||||
void EnableTop(int pos, bool enable);
|
||||
wxMenuItem * FindItemForId(int id);
|
||||
wxString GetHelpString(int id);
|
||||
wxString GetLabel(int id);
|
||||
wxString GetLabelTop(int pos);
|
||||
void SetHelpString(int id, const wxString& helpString);
|
||||
void SetLabel(int id, const wxString& label);
|
||||
wxString GetLabelTop(int pos);
|
||||
void SetLabelTop(int pos, const wxString& label);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -335,14 +385,18 @@ public:
|
||||
bool IsEnabled();
|
||||
bool IsChecked();
|
||||
int GetId();
|
||||
const wxString& GetHelp();
|
||||
wxMenu* GetSubMenu();
|
||||
#ifdef __WXMSW__
|
||||
const wxString& GetHelp();
|
||||
void SetName(const wxString& strName);
|
||||
void SetHelp(const wxString& strHelp);
|
||||
#endif
|
||||
void Enable(bool bDoEnable = TRUE);
|
||||
void Check(bool bDoCheck = TRUE);
|
||||
#ifdef __WXMSW__
|
||||
void DeleteSubMenu();
|
||||
const wxString& GetName();
|
||||
#endif
|
||||
bool IsCheckable();
|
||||
};
|
||||
|
||||
@@ -350,6 +404,9 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 1998/08/14 23:36:46 RD
|
||||
// Beginings of wxGTK compatibility
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:52 RD
|
||||
// Initial version
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user