text in the demo for more details of what this means, but in a nutshell methods such as wxWindow.GetParent or FindWindowById will now return a shadow object of the proper type if it can. By "proper type" I mean that if the wxWindow pointer returned from FindWindowById really points to a wxButton then the Python object constructed will be of a wxButtonPtr class instead of wxWindowPtr as before. This should reduce or eliminiate the need for wxPyTypeCast. (Woo Hoo!) The objects returned are still not the original Python object, but that is the next step. (Although it will probably only work on Python 2.1 and beyond because it will use weak references.) A few other minor tweaks and fixes and additions for things found while doing the OOR stuff. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
111 lines
3.2 KiB
OpenEdge ABL
111 lines
3.2 KiB
OpenEdge ABL
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: frames.i
|
|
// Purpose: SWIG definitions of various window classes
|
|
//
|
|
// Author: Robin Dunn
|
|
//
|
|
// Created: 8/27/98
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) 1998 by Total Control Software
|
|
// Licence: wxWindows license
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
%module frames
|
|
|
|
%{
|
|
#include "helpers.h"
|
|
#include <wx/minifram.h>
|
|
%}
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
%include typemaps.i
|
|
%include my_typemaps.i
|
|
|
|
// Import some definitions of other classes, etc.
|
|
%import _defs.i
|
|
%import misc.i
|
|
%import gdi.i
|
|
%import windows.i
|
|
%import stattool.i
|
|
|
|
%pragma(python) code = "import wx"
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
enum {
|
|
wxFULLSCREEN_NOMENUBAR,
|
|
wxFULLSCREEN_NOTOOLBAR,
|
|
wxFULLSCREEN_NOSTATUSBAR,
|
|
wxFULLSCREEN_NOBORDER,
|
|
wxFULLSCREEN_NOCAPTION,
|
|
wxFULLSCREEN_ALL
|
|
};
|
|
|
|
|
|
class wxFrame : public wxWindow {
|
|
public:
|
|
wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
char* name = "frame");
|
|
|
|
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
|
|
|
|
void Centre(int direction = wxBOTH);
|
|
wxStatusBar* CreateStatusBar(int number = 1,
|
|
long style = wxST_SIZEGRIP,
|
|
wxWindowID id = -1,
|
|
char* name = "statusBar");
|
|
wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT,
|
|
wxWindowID id = -1,
|
|
char* name = "toolBar");
|
|
|
|
const wxIcon& GetIcon();
|
|
wxMenuBar* GetMenuBar();
|
|
wxStatusBar* GetStatusBar();
|
|
wxString GetTitle();
|
|
wxToolBar* GetToolBar();
|
|
void Iconize(bool iconize);
|
|
bool IsIconized();
|
|
void Maximize(bool maximize);
|
|
bool IsMaximized();
|
|
void Restore();
|
|
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
|
void SetIcon(const wxIcon& icon);
|
|
void SetMenuBar(wxMenuBar* menuBar);
|
|
void SetStatusBar(wxStatusBar *statusBar);
|
|
void SetStatusText(const wxString& text, int number = 0);
|
|
void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
|
|
void SetTitle(const wxString& title);
|
|
void SetToolBar(wxToolBar* toolbar);
|
|
void MakeModal(bool modal = TRUE);
|
|
wxPoint GetClientAreaOrigin() const;
|
|
bool Command(int id);
|
|
bool ProcessCommand(int id);
|
|
bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
|
};
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
class wxMiniFrame : public wxFrame {
|
|
public:
|
|
wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
char* name = "frame");
|
|
|
|
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
|
|
};
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|