mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 12:30:07 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1240 lines
25 KiB
Plaintext
1240 lines
25 KiB
Plaintext
//---------------------------------------------------------------------------
|
|
// This file is generated by wxPython's SIP generator. Do not edit by hand.
|
|
//
|
|
// Copyright: (c) 2010 by Total Control Software
|
|
// License: wxWindows License
|
|
//
|
|
// This file will be included by _core.sip
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
struct wxVisualAttributes
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/window.h>
|
|
%End
|
|
|
|
wxFont font;
|
|
|
|
wxColour colFg;
|
|
|
|
wxColour colBg;
|
|
|
|
}; // end of class wxVisualAttributes
|
|
|
|
|
|
class wxWindowBase : wxEvtHandler /Abstract/
|
|
{
|
|
public:
|
|
virtual void AddChild( wxWindowBase* child );
|
|
virtual void RemoveChild( wxWindowBase* child );
|
|
};
|
|
|
|
|
|
class wxWindow : wxWindowBase
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/window.h>
|
|
%End
|
|
|
|
%TypeCode
|
|
|
|
#ifdef __WXMSW__
|
|
#include <wx/msw/private.h>
|
|
#endif
|
|
|
|
#ifdef __WXGTK__
|
|
#include <gdk/gdkx.h>
|
|
#include <wx/gtk/private/win_gtk.h>
|
|
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
|
|
GDK_WINDOW_XWINDOW((wxwin)->m_wxwindow->window) : \
|
|
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
void* wxPyGetWinHandle(wxWindow* win)
|
|
{
|
|
#ifdef __WXMSW__
|
|
return (void*)win->GetHandle();
|
|
#endif
|
|
#if defined(__WXGTK__) || defined(__WXX11__)
|
|
return (void*)GetXWindow(win);
|
|
#endif
|
|
#ifdef __WXMAC__
|
|
return (void*)win->GetHandle();
|
|
#endif
|
|
return 0;
|
|
}
|
|
%End
|
|
|
|
public:
|
|
wxWindow();
|
|
|
|
wxWindow(
|
|
wxWindow * parent /TranserThis/,
|
|
wxWindowID id = wxID_ANY,
|
|
const wxPoint & pos = wxDefaultPosition,
|
|
const wxSize & size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxString & name = wxPanelNameStr
|
|
);
|
|
|
|
~wxWindow();
|
|
|
|
virtual
|
|
bool AcceptsFocus();
|
|
|
|
virtual
|
|
bool AcceptsFocusFromKeyboard();
|
|
|
|
virtual
|
|
bool AcceptsFocusRecursively();
|
|
|
|
bool HasFocus();
|
|
|
|
void SetCanFocus(
|
|
bool canFocus
|
|
);
|
|
|
|
void SetFocus();
|
|
|
|
void SetFocusFromKbd();
|
|
|
|
virtual
|
|
void AddChild(
|
|
wxWindowBase* child
|
|
);
|
|
|
|
bool DestroyChildren();
|
|
|
|
wxWindow * FindWindow(
|
|
long id
|
|
);
|
|
|
|
wxWindow * FindWindow(
|
|
const wxString & name
|
|
);
|
|
|
|
wxWindowList & GetChildren();
|
|
|
|
virtual
|
|
void RemoveChild(
|
|
wxWindowBase* child
|
|
);
|
|
|
|
wxWindow * GetGrandParent();
|
|
|
|
wxWindow * GetNextSibling();
|
|
|
|
wxWindow * GetParent();
|
|
|
|
wxWindow * GetPrevSibling();
|
|
|
|
bool Reparent(
|
|
wxWindow * newParent
|
|
);
|
|
|
|
void AlwaysShowScrollbars(
|
|
bool hflag = true,
|
|
bool vflag = true
|
|
);
|
|
|
|
int GetScrollPos(
|
|
int orientation
|
|
);
|
|
|
|
int GetScrollRange(
|
|
int orientation
|
|
);
|
|
|
|
int GetScrollThumb(
|
|
int orientation
|
|
);
|
|
|
|
bool CanScroll(
|
|
int orient
|
|
);
|
|
|
|
bool HasScrollbar(
|
|
int orient
|
|
);
|
|
|
|
bool IsScrollbarAlwaysShown(
|
|
int orient
|
|
);
|
|
|
|
bool ScrollLines(
|
|
int lines
|
|
);
|
|
|
|
bool ScrollPages(
|
|
int pages
|
|
);
|
|
|
|
void ScrollWindow(
|
|
int dx,
|
|
int dy,
|
|
const wxRect * rect = NULL
|
|
);
|
|
|
|
bool LineUp();
|
|
|
|
bool LineDown();
|
|
|
|
bool PageUp();
|
|
|
|
bool PageDown();
|
|
|
|
void SetScrollPos(
|
|
int orientation,
|
|
int pos,
|
|
bool refresh = true
|
|
);
|
|
|
|
void SetScrollbar(
|
|
int orientation,
|
|
int position,
|
|
int thumbSize,
|
|
int range,
|
|
bool refresh = true
|
|
);
|
|
|
|
void CacheBestSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
wxSize ClientToWindowSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
wxSize WindowToClientSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void Fit();
|
|
|
|
void FitInside();
|
|
|
|
wxSize GetBestSize();
|
|
|
|
wxSize GetClientSize();
|
|
|
|
wxSize GetEffectiveMinSize();
|
|
|
|
wxSize GetMaxClientSize();
|
|
|
|
wxSize GetMaxSize();
|
|
|
|
wxSize GetMinClientSize();
|
|
|
|
wxSize GetMinSize();
|
|
|
|
int GetMinWidth();
|
|
|
|
int GetMinHeight();
|
|
|
|
int GetMaxWidth();
|
|
|
|
int GetMaxHeight();
|
|
|
|
wxSize GetSize();
|
|
|
|
wxSize GetVirtualSize();
|
|
|
|
wxSize GetBestVirtualSize();
|
|
|
|
wxSize GetWindowBorderSize();
|
|
|
|
bool InformFirstDirection(
|
|
int direction,
|
|
int size,
|
|
int availableOtherDir
|
|
);
|
|
|
|
void InvalidateBestSize();
|
|
|
|
void PostSizeEvent();
|
|
|
|
void PostSizeEventToParent();
|
|
|
|
void SendSizeEvent(
|
|
int flags = 0
|
|
);
|
|
|
|
void SendSizeEventToParent(
|
|
int flags = 0
|
|
);
|
|
|
|
void SetClientSize(
|
|
int width,
|
|
int height
|
|
);
|
|
|
|
void SetClientSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetClientSize(
|
|
const wxRect & rect
|
|
) /PyName=SetClientRect/;
|
|
|
|
void SetContainingSizer(
|
|
wxSizer * sizer
|
|
);
|
|
|
|
void SetInitialSize(
|
|
const wxSize & size = wxDefaultSize
|
|
);
|
|
|
|
void SetMaxClientSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetMaxSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetMinClientSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetMinSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetSize(
|
|
int x,
|
|
int y,
|
|
int width,
|
|
int height,
|
|
int sizeFlags = wxSIZE_AUTO
|
|
);
|
|
|
|
void SetSize(
|
|
const wxRect & rect
|
|
) /PyName=SetRect/;
|
|
|
|
void SetSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void SetSize(
|
|
int width,
|
|
int height
|
|
);
|
|
|
|
void SetSizeHints(
|
|
const wxSize & minSize,
|
|
const wxSize & maxSize = wxDefaultSize,
|
|
const wxSize & incSize = wxDefaultSize
|
|
);
|
|
|
|
void SetSizeHints(
|
|
int minW,
|
|
int minH,
|
|
int maxW = -1,
|
|
int maxH = -1,
|
|
int incW = -1,
|
|
int incH = -1
|
|
);
|
|
|
|
void SetVirtualSize(
|
|
int width,
|
|
int height
|
|
);
|
|
|
|
void SetVirtualSize(
|
|
const wxSize & size
|
|
);
|
|
|
|
void Center(
|
|
int dir = wxBOTH
|
|
);
|
|
|
|
void CenterOnParent(
|
|
int dir = wxBOTH
|
|
);
|
|
|
|
void Centre(
|
|
int direction = wxBOTH
|
|
);
|
|
|
|
void CentreOnParent(
|
|
int direction = wxBOTH
|
|
);
|
|
|
|
wxPoint GetPosition();
|
|
|
|
wxRect GetRect();
|
|
|
|
wxPoint GetScreenPosition();
|
|
|
|
wxRect GetScreenRect();
|
|
|
|
virtual
|
|
wxPoint GetClientAreaOrigin();
|
|
|
|
wxRect GetClientRect();
|
|
|
|
void Move(
|
|
int x,
|
|
int y,
|
|
int flags = wxSIZE_USE_EXISTING
|
|
);
|
|
|
|
void Move(
|
|
const wxPoint & pt,
|
|
int flags = wxSIZE_USE_EXISTING
|
|
);
|
|
|
|
void SetPosition(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
wxPoint ClientToScreen(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
wxPoint ConvertDialogToPixels(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
wxSize ConvertDialogToPixels(
|
|
const wxSize & sz
|
|
);
|
|
|
|
wxPoint ConvertPixelsToDialog(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
wxSize ConvertPixelsToDialog(
|
|
const wxSize & sz
|
|
);
|
|
|
|
wxPoint ScreenToClient(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
void ClearBackground();
|
|
|
|
void Freeze();
|
|
|
|
void Thaw();
|
|
|
|
bool IsFrozen();
|
|
|
|
wxColour GetBackgroundColour();
|
|
|
|
wxBackgroundStyle GetBackgroundStyle();
|
|
|
|
int GetCharHeight();
|
|
|
|
int GetCharWidth();
|
|
|
|
wxVisualAttributes GetDefaultAttributes();
|
|
|
|
wxFont GetFont();
|
|
|
|
wxColour GetForegroundColour();
|
|
|
|
void GetTextExtent(
|
|
const wxString & string,
|
|
int * w /Out/,
|
|
int * h /Out/,
|
|
int * descent /Out/ = NULL,
|
|
int * externalLeading /Out/ = NULL,
|
|
const wxFont * font = NULL
|
|
) /PyName=GetFullTextExtent/;
|
|
|
|
wxSize GetTextExtent(
|
|
const wxString & string
|
|
);
|
|
|
|
const wxRegion & GetUpdateRegion();
|
|
|
|
wxRect GetUpdateClientRect();
|
|
|
|
virtual
|
|
bool HasTransparentBackground();
|
|
|
|
void Refresh(
|
|
bool eraseBackground = true,
|
|
const wxRect * rect = NULL
|
|
);
|
|
|
|
void RefreshRect(
|
|
const wxRect & rect,
|
|
bool eraseBackground = true
|
|
);
|
|
|
|
void Update();
|
|
|
|
bool SetBackgroundColour(
|
|
const wxColour & colour
|
|
);
|
|
|
|
bool SetBackgroundStyle(
|
|
wxBackgroundStyle style
|
|
);
|
|
|
|
bool SetFont(
|
|
const wxFont & font
|
|
);
|
|
|
|
bool SetForegroundColour(
|
|
const wxColour & colour
|
|
);
|
|
|
|
void SetOwnBackgroundColour(
|
|
const wxColour & colour
|
|
);
|
|
|
|
void SetOwnFont(
|
|
const wxFont & font
|
|
);
|
|
|
|
void SetOwnForegroundColour(
|
|
const wxColour & colour
|
|
);
|
|
|
|
void SetPalette(
|
|
const wxPalette & pal
|
|
);
|
|
|
|
virtual
|
|
bool ShouldInheritColours();
|
|
|
|
void SetThemeEnabled(
|
|
bool enable
|
|
);
|
|
|
|
bool GetThemeEnabled();
|
|
|
|
bool CanSetTransparent();
|
|
|
|
bool SetTransparent(
|
|
wxByte alpha
|
|
);
|
|
|
|
wxEvtHandler * GetEventHandler();
|
|
|
|
bool HandleAsNavigationKey(
|
|
const wxKeyEvent & event
|
|
);
|
|
|
|
bool HandleWindowEvent(
|
|
wxEvent & event
|
|
);
|
|
|
|
bool ProcessWindowEvent(
|
|
wxEvent & event
|
|
);
|
|
|
|
bool ProcessWindowEventLocally(
|
|
wxEvent & event
|
|
);
|
|
|
|
wxEvtHandler * PopEventHandler(
|
|
bool deleteHandler = false
|
|
);
|
|
|
|
void PushEventHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
bool RemoveEventHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
void SetEventHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
void SetNextHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
void SetPreviousHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
long GetExtraStyle();
|
|
|
|
long GetWindowStyleFlag();
|
|
|
|
long GetWindowStyle();
|
|
|
|
bool HasExtraStyle(
|
|
int exFlag
|
|
);
|
|
|
|
bool HasFlag(
|
|
int flag
|
|
);
|
|
|
|
void SetExtraStyle(
|
|
long exStyle
|
|
);
|
|
|
|
void SetWindowStyleFlag(
|
|
long style
|
|
);
|
|
|
|
void SetWindowStyle(
|
|
long style
|
|
);
|
|
|
|
bool ToggleWindowStyle(
|
|
int flag
|
|
);
|
|
|
|
void MoveAfterInTabOrder(
|
|
wxWindow * win
|
|
);
|
|
|
|
void MoveBeforeInTabOrder(
|
|
wxWindow * win
|
|
);
|
|
|
|
bool Navigate(
|
|
int flags = wxNavigationKeyEvent::IsForward
|
|
);
|
|
|
|
bool NavigateIn(
|
|
int flags = wxNavigationKeyEvent::IsForward
|
|
);
|
|
|
|
void Lower();
|
|
|
|
void Raise();
|
|
|
|
bool Hide();
|
|
|
|
bool HideWithEffect(
|
|
wxShowEffect effect,
|
|
unsigned int timeout = 0
|
|
);
|
|
|
|
bool IsEnabled();
|
|
|
|
bool IsExposed(
|
|
int x,
|
|
int y
|
|
);
|
|
|
|
bool IsExposed(
|
|
wxPoint & pt
|
|
);
|
|
|
|
bool IsExposed(
|
|
int x,
|
|
int y,
|
|
int w,
|
|
int h
|
|
);
|
|
|
|
bool IsExposed(
|
|
wxRect & rect
|
|
);
|
|
|
|
bool IsShown();
|
|
|
|
bool IsShownOnScreen();
|
|
|
|
bool Disable();
|
|
|
|
bool Enable(
|
|
bool enable = true
|
|
);
|
|
|
|
bool Show(
|
|
bool show = true
|
|
);
|
|
|
|
bool ShowWithEffect(
|
|
wxShowEffect effect,
|
|
unsigned int timeout = 0
|
|
);
|
|
|
|
wxString GetHelpText();
|
|
|
|
void SetHelpText(
|
|
const wxString & helpText
|
|
);
|
|
|
|
wxString GetHelpTextAtPoint(
|
|
const wxPoint & point,
|
|
wxHelpEvent::Origin origin
|
|
);
|
|
|
|
wxToolTip * GetToolTip();
|
|
|
|
wxString GetToolTipText();
|
|
|
|
void SetToolTip(
|
|
const wxString & tip /Transfer/
|
|
);
|
|
|
|
void SetToolTip(
|
|
wxToolTip * tip
|
|
);
|
|
|
|
void UnsetToolTip();
|
|
|
|
int GetPopupMenuSelectionFromUser(
|
|
wxMenu & menu,
|
|
const wxPoint & pos = wxDefaultPosition
|
|
);
|
|
|
|
int GetPopupMenuSelectionFromUser(
|
|
wxMenu & menu,
|
|
int x,
|
|
int y
|
|
);
|
|
|
|
bool PopupMenu(
|
|
wxMenu * menu,
|
|
const wxPoint & pos = wxDefaultPosition
|
|
);
|
|
|
|
bool PopupMenu(
|
|
wxMenu * menu,
|
|
int x,
|
|
int y
|
|
);
|
|
|
|
wxValidator * GetValidator();
|
|
|
|
void SetValidator(
|
|
const wxValidator & validator
|
|
);
|
|
|
|
virtual
|
|
bool TransferDataFromWindow();
|
|
|
|
virtual
|
|
bool TransferDataToWindow();
|
|
|
|
virtual
|
|
bool Validate();
|
|
|
|
wxWindowID GetId();
|
|
|
|
wxString GetLabel();
|
|
|
|
wxLayoutDirection GetLayoutDirection();
|
|
|
|
wxString GetName();
|
|
|
|
wxWindowVariant GetWindowVariant();
|
|
|
|
void SetId(
|
|
wxWindowID winid
|
|
);
|
|
|
|
void SetLabel(
|
|
const wxString & label
|
|
);
|
|
|
|
void SetLayoutDirection(
|
|
wxLayoutDirection dir
|
|
);
|
|
|
|
void SetName(
|
|
const wxString & name
|
|
);
|
|
|
|
void SetWindowVariant(
|
|
wxWindowVariant variant
|
|
);
|
|
|
|
wxAcceleratorTable * GetAcceleratorTable();
|
|
|
|
void SetAcceleratorTable(
|
|
const wxAcceleratorTable & accel
|
|
);
|
|
|
|
bool Close(
|
|
bool force = false
|
|
);
|
|
|
|
bool Destroy() /TranserThis/;
|
|
|
|
bool IsBeingDeleted();
|
|
|
|
wxDropTarget * GetDropTarget();
|
|
|
|
void SetDropTarget(
|
|
wxDropTarget * target /Transfer/
|
|
);
|
|
|
|
void DragAcceptFiles(
|
|
bool accept
|
|
);
|
|
|
|
wxSizer * GetContainingSizer();
|
|
|
|
wxSizer * GetSizer();
|
|
|
|
void SetSizer(
|
|
wxSizer * sizer /Transfer/,
|
|
bool deleteOld = true
|
|
);
|
|
|
|
void SetSizerAndFit(
|
|
wxSizer * sizer /Transfer/,
|
|
bool deleteOld = true
|
|
);
|
|
|
|
wxLayoutConstraints * GetConstraints();
|
|
|
|
void SetConstraints(
|
|
wxLayoutConstraints * constraints /Transfer/
|
|
);
|
|
|
|
bool Layout();
|
|
|
|
void SetAutoLayout(
|
|
bool autoLayout
|
|
);
|
|
|
|
bool GetAutoLayout();
|
|
|
|
void CaptureMouse();
|
|
|
|
wxCaret * GetCaret();
|
|
|
|
const wxCursor & GetCursor();
|
|
|
|
bool HasCapture();
|
|
|
|
void ReleaseMouse();
|
|
|
|
void SetCaret(
|
|
wxCaret * caret /Transfer/
|
|
);
|
|
|
|
bool SetCursor(
|
|
const wxCursor & cursor
|
|
);
|
|
|
|
void WarpPointer(
|
|
int x,
|
|
int y
|
|
);
|
|
|
|
wxHitTest HitTest(
|
|
wxCoord x,
|
|
wxCoord y
|
|
);
|
|
|
|
wxHitTest HitTest(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
wxBorder GetBorder(
|
|
long flags
|
|
);
|
|
|
|
wxBorder GetBorder();
|
|
|
|
void DoUpdateWindowUI(
|
|
wxUpdateUIEvent & event
|
|
);
|
|
|
|
void* GetHandle();
|
|
%MethodCode
|
|
sipRes = wxPyGetWinHandle(sipCpp);
|
|
%End
|
|
|
|
bool HasMultiplePages();
|
|
|
|
virtual
|
|
void InheritAttributes();
|
|
|
|
virtual
|
|
void InitDialog();
|
|
|
|
bool IsDoubleBuffered();
|
|
|
|
void SetDoubleBuffered(
|
|
bool on
|
|
);
|
|
%MethodCode
|
|
#if defined(__WXGTK20__) || defined(__WXMSW__)
|
|
sipCpp->SetDoubleBuffered(on);
|
|
#endif
|
|
%End
|
|
|
|
bool IsRetained();
|
|
|
|
bool IsThisEnabled();
|
|
|
|
bool IsTopLevel();
|
|
|
|
void MakeModal(
|
|
bool modal = true
|
|
);
|
|
|
|
virtual
|
|
void OnInternalIdle();
|
|
|
|
bool RegisterHotKey(
|
|
int hotkeyId,
|
|
int modifiers,
|
|
int virtualKeyCode
|
|
);
|
|
%MethodCode
|
|
#ifdef __WXMSW__
|
|
sipRes = sipCpp->RegisterHotKey(hotkeyId, modifiers, virtualKeyCode);
|
|
#else
|
|
sipRes = false;
|
|
#endif
|
|
%End
|
|
|
|
bool UnregisterHotKey(
|
|
int hotkeyId
|
|
);
|
|
%MethodCode
|
|
#ifdef __WXMSW__
|
|
sipRes = sipCpp->UnregisterHotKey(hotkeyId);
|
|
#else
|
|
sipRes = false;
|
|
#endif
|
|
%End
|
|
|
|
void UpdateWindowUI(
|
|
long flags = wxUPDATE_UI_NONE
|
|
);
|
|
|
|
static
|
|
wxVisualAttributes GetClassDefaultAttributes(
|
|
wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
|
|
);
|
|
|
|
static
|
|
wxWindow * FindFocus();
|
|
|
|
static
|
|
wxWindow * FindWindowById(
|
|
long id,
|
|
const wxWindow * parent = 0
|
|
);
|
|
|
|
static
|
|
wxWindow * FindWindowByLabel(
|
|
const wxString & label,
|
|
const wxWindow * parent = 0
|
|
);
|
|
|
|
static
|
|
wxWindow * FindWindowByName(
|
|
const wxString & name,
|
|
const wxWindow * parent = 0
|
|
);
|
|
|
|
static
|
|
wxWindow * GetCapture();
|
|
|
|
static
|
|
wxWindowID NewControlId(
|
|
int count = 1
|
|
);
|
|
|
|
static
|
|
void UnreserveControlId(
|
|
wxWindowID id,
|
|
int count = 1
|
|
);
|
|
|
|
bool Create(
|
|
wxWindow * parent /TranserThis/,
|
|
wxWindowID id = wxID_ANY,
|
|
const wxPoint & pos = wxDefaultPosition,
|
|
const wxSize & size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxString & name = wxPanelNameStr
|
|
);
|
|
|
|
%TypeCode
|
|
void* _wxWindow_GetGtkWidget(wxWindow* self, int& _isErr)
|
|
{
|
|
#ifdef __WXGTK__
|
|
return (void*)self->GetHandle();
|
|
#else
|
|
return NULL;
|
|
#endif
|
|
}
|
|
%End
|
|
void* GetGtkWidget();
|
|
%MethodCode
|
|
sipRes = _wxWindow_GetGtkWidget(sipCpp, sipIsErr);
|
|
%End
|
|
|
|
%TypeCode
|
|
wxWindow* _wxWindow_GetTopLevelParent(wxWindow* self, int& _isErr)
|
|
{
|
|
return wxGetTopLevelParent(self);
|
|
}
|
|
%End
|
|
wxWindow* GetTopLevelParent();
|
|
%MethodCode
|
|
sipRes = _wxWindow_GetTopLevelParent(sipCpp, sipIsErr);
|
|
%End
|
|
|
|
%TypeCode
|
|
bool _wxWindow_MacIsWindowScrollbar(wxWindow* self, int& _isErr, const wxWindow* sb)
|
|
{
|
|
#ifdef __WXMAC__
|
|
return self->MacIsWindowScrollbar(sb);
|
|
#else
|
|
return false;
|
|
#endif
|
|
}
|
|
%End
|
|
bool MacIsWindowScrollbar(const wxWindow* sb);
|
|
%MethodCode
|
|
sipRes = _wxWindow_MacIsWindowScrollbar(sipCpp, sipIsErr, sb);
|
|
%End
|
|
|
|
%Property(name=AcceleratorTable, get=GetAcceleratorTable, set=SetAcceleratorTable)
|
|
%Property(name=AutoLayout, get=GetAutoLayout, set=SetAutoLayout)
|
|
%Property(name=BackgroundColour, get=GetBackgroundColour, set=SetBackgroundColour)
|
|
%Property(name=BackgroundStyle, get=GetBackgroundStyle, set=SetBackgroundStyle)
|
|
%Property(name=EffectiveMinSize, get=GetEffectiveMinSize)
|
|
%Property(name=BestSize, get=GetBestSize)
|
|
%Property(name=BestVirtualSize, get=GetBestVirtualSize)
|
|
%Property(name=Border, get=GetBorder)
|
|
%Property(name=Caret, get=GetCaret, set=SetCaret)
|
|
%Property(name=CharHeight, get=GetCharHeight)
|
|
%Property(name=CharWidth, get=GetCharWidth)
|
|
%Property(name=Children, get=GetChildren)
|
|
%Property(name=ClientAreaOrigin, get=GetClientAreaOrigin)
|
|
%Property(name=ClientRect, get=GetClientRect, set=SetClientRect)
|
|
%Property(name=ClientSize, get=GetClientSize, set=SetClientSize)
|
|
%Property(name=Constraints, get=GetConstraints, set=SetConstraints)
|
|
%Property(name=ContainingSizer, get=GetContainingSizer, set=SetContainingSizer)
|
|
%Property(name=Cursor, get=GetCursor, set=SetCursor)
|
|
%Property(name=DefaultAttributes, get=GetDefaultAttributes)
|
|
%Property(name=DropTarget, get=GetDropTarget, set=SetDropTarget)
|
|
%Property(name=EventHandler, get=GetEventHandler, set=SetEventHandler)
|
|
%Property(name=ExtraStyle, get=GetExtraStyle, set=SetExtraStyle)
|
|
%Property(name=Font, get=GetFont, set=SetFont)
|
|
%Property(name=ForegroundColour, get=GetForegroundColour, set=SetForegroundColour)
|
|
%Property(name=GrandParent, get=GetGrandParent)
|
|
%Property(name=TopLevelParent, get=GetTopLevelParent)
|
|
%Property(name=Handle, get=GetHandle)
|
|
%Property(name=HelpText, get=GetHelpText, set=SetHelpText)
|
|
%Property(name=Id, get=GetId, set=SetId)
|
|
%Property(name=Label, get=GetLabel, set=SetLabel)
|
|
%Property(name=LayoutDirection, get=GetLayoutDirection, set=SetLayoutDirection)
|
|
%Property(name=MaxHeight, get=GetMaxHeight)
|
|
%Property(name=MaxSize, get=GetMaxSize, set=SetMaxSize)
|
|
%Property(name=MaxWidth, get=GetMaxWidth)
|
|
%Property(name=MinHeight, get=GetMinHeight)
|
|
%Property(name=MinSize, get=GetMinSize, set=SetMinSize)
|
|
%Property(name=MinWidth, get=GetMinWidth)
|
|
%Property(name=Name, get=GetName, set=SetName)
|
|
%Property(name=Parent, get=GetParent)
|
|
%Property(name=Position, get=GetPosition, set=SetPosition)
|
|
%Property(name=Rect, get=GetRect, set=SetRect)
|
|
%Property(name=ScreenPosition, get=GetScreenPosition)
|
|
%Property(name=ScreenRect, get=GetScreenRect)
|
|
%Property(name=Size, get=GetSize, set=SetSize)
|
|
%Property(name=Sizer, get=GetSizer, set=SetSizer)
|
|
%Property(name=ThemeEnabled, get=GetThemeEnabled, set=SetThemeEnabled)
|
|
%Property(name=ToolTip, get=GetToolTip, set=SetToolTip)
|
|
%Property(name=UpdateClientRect, get=GetUpdateClientRect)
|
|
%Property(name=UpdateRegion, get=GetUpdateRegion)
|
|
%Property(name=Validator, get=GetValidator, set=SetValidator)
|
|
%Property(name=VirtualSize, get=GetVirtualSize, set=SetVirtualSize)
|
|
%Property(name=WindowStyle, get=GetWindowStyle, set=SetWindowStyle)
|
|
%Property(name=WindowStyleFlag, get=GetWindowStyleFlag, set=SetWindowStyleFlag)
|
|
%Property(name=WindowVariant, get=GetWindowVariant, set=SetWindowVariant)
|
|
%Property(name=Shown, get=IsShown, set=Show)
|
|
%Property(name=Enabled, get=IsEnabled, set=Enable)
|
|
%Property(name=TopLevel, get=IsTopLevel)
|
|
%Property(name=MinClientSize, get=GetMinClientSize, set=SetMinClientSize)
|
|
%Property(name=MaxClientSize, get=GetMaxClientSize, set=SetMaxClientSize)
|
|
public:
|
|
virtual wxWindow *GetMainWindowOfCompositeControl();
|
|
|
|
|
|
protected:
|
|
virtual void DoEnable(bool enable);
|
|
virtual void OnEnabled(bool enabled);
|
|
virtual void DoGetPosition(int *x, int *y) const;
|
|
virtual void DoGetSize(int *width, int *height) const;
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
|
virtual wxSize DoGetBestClientSize() const;
|
|
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
|
|
virtual void DoSetClientSize(int width, int height);
|
|
virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
|
|
virtual wxSize DoGetBorderSize() const;
|
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
|
virtual void DoSetWindowVariant( wxWindowVariant variant);
|
|
virtual wxBorder GetDefaultBorder() const;
|
|
virtual wxBorder GetDefaultBorderForControl() const;
|
|
|
|
|
|
|
|
protected:
|
|
virtual
|
|
wxSize DoGetBestSize();
|
|
|
|
void SendDestroyEvent();
|
|
|
|
virtual
|
|
bool ProcessEvent(
|
|
wxEvent & event
|
|
);
|
|
|
|
}; // end of class wxWindow
|
|
|
|
|
|
%Extract(id=pycode)
|
|
def _Window_PostCreate(self, pre):
|
|
pass
|
|
Window.PostCreate = _Window_PostCreate
|
|
del _Window_PostCreate
|
|
|
|
%End
|
|
|
|
enum wxShowEffect
|
|
{
|
|
wxSHOW_EFFECT_NONE,
|
|
wxSHOW_EFFECT_ROLL_TO_LEFT,
|
|
wxSHOW_EFFECT_ROLL_TO_RIGHT,
|
|
wxSHOW_EFFECT_ROLL_TO_TOP,
|
|
wxSHOW_EFFECT_ROLL_TO_BOTTOM,
|
|
wxSHOW_EFFECT_SLIDE_TO_LEFT,
|
|
wxSHOW_EFFECT_SLIDE_TO_RIGHT,
|
|
wxSHOW_EFFECT_SLIDE_TO_TOP,
|
|
wxSHOW_EFFECT_SLIDE_TO_BOTTOM,
|
|
wxSHOW_EFFECT_BLEND,
|
|
wxSHOW_EFFECT_EXPAND
|
|
};
|
|
|
|
enum wxWindowVariant
|
|
{
|
|
wxWINDOW_VARIANT_NORMAL,
|
|
wxWINDOW_VARIANT_SMALL,
|
|
wxWINDOW_VARIANT_MINI,
|
|
wxWINDOW_VARIANT_LARGE,
|
|
wxWINDOW_VARIANT_MAX
|
|
};
|
|
|
|
wxWindow * wxFindWindowAtPointer(
|
|
wxPoint & pt
|
|
);
|
|
|
|
wxWindow * wxGetActiveWindow();
|
|
|
|
wxWindow * wxGetTopLevelParent(
|
|
wxWindow * window
|
|
);
|
|
|
|
%Extract(id=pycode)
|
|
class FrozenWindow(object):
|
|
"""
|
|
A context manager to be used with Python 'with' statements
|
|
that will freeze the given window for the duration of the
|
|
with block.
|
|
"""
|
|
def __init__(self, window):
|
|
self._win = window
|
|
def __enter__(self):
|
|
self._win.Freeze()
|
|
return self
|
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
self._win.Thaw()
|
|
|
|
%End
|
|
|
|
class wxWindowList_iterator /Abstract/
|
|
{
|
|
// the C++ implementation of this class
|
|
%TypeHeaderCode
|
|
class wxWindowList_iterator {
|
|
public:
|
|
wxWindowList_iterator(wxWindowList::compatibility_iterator start)
|
|
: m_node(start) {}
|
|
|
|
wxWindow* next() {
|
|
wxWindow* obj = NULL;
|
|
if (m_node) {
|
|
obj = m_node->GetData();
|
|
m_node = m_node->GetNext();
|
|
}
|
|
else PyErr_SetString(PyExc_StopIteration, "");
|
|
return (wxWindow*)obj;
|
|
}
|
|
private:
|
|
wxWindowList::compatibility_iterator m_node;
|
|
};
|
|
%End
|
|
public:
|
|
wxWindow* next();
|
|
};
|
|
|
|
class wxWindowList
|
|
{
|
|
public:
|
|
int __len__();
|
|
%MethodCode
|
|
sipRes = sipCpp->size();
|
|
%End
|
|
|
|
wxWindow* __getitem__(size_t index);
|
|
%MethodCode
|
|
if (index < sipCpp->size()) {
|
|
wxWindowList::compatibility_iterator node = sipCpp->Item(index);
|
|
if (node)
|
|
sipRes = (wxWindow*)node->GetData();
|
|
}
|
|
PyErr_SetString(PyExc_IndexError, "sequence index out of range");
|
|
sipError = sipErrorFail;
|
|
%End
|
|
|
|
int __contains__(const wxWindow* obj);
|
|
%MethodCode
|
|
wxWindowList::compatibility_iterator node;
|
|
node = sipCpp->Find((wxWindow*)obj);
|
|
sipRes = node != NULL;
|
|
%End
|
|
|
|
wxWindowList_iterator* __iter__() /Factory/;
|
|
%MethodCode
|
|
sipRes = new wxWindowList_iterator(sipCpp->GetFirst());
|
|
%End
|
|
|
|
// TODO: add support for index(value, [start, [stop]])
|
|
int index(wxWindow* obj);
|
|
%MethodCode
|
|
int idx = sipCpp->IndexOf((wxWindow*)obj);
|
|
if (idx == wxNOT_FOUND) {
|
|
sipError = sipErrorFail;
|
|
PyErr_SetString(PyExc_ValueError,
|
|
"sequence.index(x): x not in sequence");
|
|
}
|
|
sipRes = idx;
|
|
%End
|
|
};
|
|
|
|
%Extract(id=pycode)
|
|
def _wxWindowList___repr__(self):
|
|
return "wxWindowList: " + repr(list(self))
|
|
wxWindowList.__repr__ = _wxWindowList___repr__
|
|
del _wxWindowList___repr__
|
|
%End
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|