]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/misc2.i
Added event class constructors
[wxWidgets.git] / utils / wxPython / src / misc2.i
CommitLineData
bb0054cd
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: misc2.i
3// Purpose: Definitions of miscelaneous functions and classes that need
4// to know about wxWindow. (So they can't be in misc.i or an
5// import loop will happen.)
6//
7// Author: Robin Dunn
8//
9// Created: 18-June-1999
10// RCS-ID: $Id$
11// Copyright: (c) 1998 by Total Control Software
12// Licence: wxWindows license
13/////////////////////////////////////////////////////////////////////////////
14
15%module misc2
16
17%{
18#include "helpers.h"
19#include <wx/resource.h>
20#include <wx/tooltip.h>
f0261a72 21#include <wx/caret.h>
134d79dc 22#ifdef NOT_READY_YET
f0261a72 23#include <wx/fontenum.h>
134d79dc 24#endif
bb0054cd
RD
25%}
26
27//----------------------------------------------------------------------
28
29%include typemaps.i
30%include my_typemaps.i
31
32// Import some definitions of other classes, etc.
33%import _defs.i
34%import windows.i
f0261a72 35%import misc.i
bb0054cd
RD
36
37//----------------------------------------------------------------------
38
39wxWindow * wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL);
40wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL);
41
42
43
44//---------------------------------------------------------------------------
45// wxToolTip
46
47class wxToolTip {
48public:
49 wxToolTip(const wxString &tip);
50
51 void SetTip(const wxString& tip);
52 wxString GetTip();
53 // *** Not in the "public" interface void SetWindow(wxWindow *win);
54 wxWindow *GetWindow();
55};
56
57
58%inline %{
59 void wxToolTip_Enable(bool flag) {
60 wxToolTip::Enable(flag);
61 }
62
63 void wxToolTip_SetDelay(long milliseconds) {
64 wxToolTip::SetDelay(milliseconds);
65 }
66%}
67
68//----------------------------------------------------------------------
f0261a72
RD
69
70class wxCaret {
71public:
72 wxCaret(wxWindow* window, const wxSize& size);
73 ~wxCaret();
74
75 bool IsOk();
76 bool IsVisible();
77 %name(GetPositionTuple)void GetPosition(int *OUTPUT, int *OUTPUT);
78 wxPoint GetPosition();
79 %name(GetSizeTuple)void GetSize(int *OUTPUT, int *OUTPUT);
80 wxSize GetSize();
81 wxWindow *GetWindow();
82 %name(MoveXY)void Move(int x, int y);
83 void Move(const wxPoint& pt);
84 void Show(int show = TRUE);
85 void Hide();
86 void OnSetFocus();
87 void OnKillFocus();
88};
89
90%inline %{
91 int wxCaret_GetBlinkTime() {
92 return wxCaret::GetBlinkTime();
93 }
94
95 void wxCaret_SetBlinkTime(int milliseconds) {
96 wxCaret::SetBlinkTime(milliseconds);
97 }
98%}
99
bb0054cd 100//----------------------------------------------------------------------
f0261a72
RD
101#ifdef NOT_READY_YET
102
103%{
104class wxPyFontEnumerator : public wxFontEnumerator {
105public:
106 wxPyFontEnumerator() {}
107 ~wxPyFontEnumerator() {}
108
109 bool EnumerateFamilies(int fixedWidthOnly = FALSE);
110 bool EnumerateEncodings(const char* family = "");
111
112 DEC_PYCALLBACK_BOOL_STRING(OnFontFamily);
113 DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding);
114
115 PYPRIVATE;
116};
117
118IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFontFamily);
119IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding);
120
121%}
122
123%name(wxFontEnumerator) class wxPyFontEnumerator {
124public:
125 wxPyFontEnumerator() {}
126 ~wxPyFontEnumerator() {}
127 %pragma(python) addtomethod = "__init__:self._setSelf(self)"
128
129 bool EnumerateFamilies(int fixedWidthOnly = FALSE);
130 bool EnumerateEncodings(const char* family = "");
131
132 bool base_OnFontFamily(const wxString& family);
133 bool base_OnFontEncoding(const wxString& family,
134 const wxString& encoding);
135};
136#endif
137//----------------------------------------------------------------------
138//----------------------------------------------------------------------
139