]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/misc2.i
added wxDialUpManager::IsAlwaysConnected() and GetISPNames(), also Dial()
[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
RD
21#include <wx/caret.h>
22#include <wx/fontenum.h>
bb0054cd
RD
23%}
24
25//----------------------------------------------------------------------
26
27%include typemaps.i
28%include my_typemaps.i
29
30// Import some definitions of other classes, etc.
31%import _defs.i
32%import windows.i
f0261a72 33%import misc.i
bb0054cd
RD
34
35//----------------------------------------------------------------------
36
37wxWindow * wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL);
38wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL);
39
40
41
42//---------------------------------------------------------------------------
43// wxToolTip
44
45class wxToolTip {
46public:
47 wxToolTip(const wxString &tip);
48
49 void SetTip(const wxString& tip);
50 wxString GetTip();
51 // *** Not in the "public" interface void SetWindow(wxWindow *win);
52 wxWindow *GetWindow();
53};
54
55
56%inline %{
57 void wxToolTip_Enable(bool flag) {
58 wxToolTip::Enable(flag);
59 }
60
61 void wxToolTip_SetDelay(long milliseconds) {
62 wxToolTip::SetDelay(milliseconds);
63 }
64%}
65
66//----------------------------------------------------------------------
f0261a72
RD
67
68class wxCaret {
69public:
70 wxCaret(wxWindow* window, const wxSize& size);
71 ~wxCaret();
72
73 bool IsOk();
74 bool IsVisible();
75 %name(GetPositionTuple)void GetPosition(int *OUTPUT, int *OUTPUT);
76 wxPoint GetPosition();
77 %name(GetSizeTuple)void GetSize(int *OUTPUT, int *OUTPUT);
78 wxSize GetSize();
79 wxWindow *GetWindow();
80 %name(MoveXY)void Move(int x, int y);
81 void Move(const wxPoint& pt);
82 void Show(int show = TRUE);
83 void Hide();
84 void OnSetFocus();
85 void OnKillFocus();
86};
87
88%inline %{
89 int wxCaret_GetBlinkTime() {
90 return wxCaret::GetBlinkTime();
91 }
92
93 void wxCaret_SetBlinkTime(int milliseconds) {
94 wxCaret::SetBlinkTime(milliseconds);
95 }
96%}
97
bb0054cd 98//----------------------------------------------------------------------
f0261a72
RD
99#ifdef NOT_READY_YET
100
101%{
102class wxPyFontEnumerator : public wxFontEnumerator {
103public:
104 wxPyFontEnumerator() {}
105 ~wxPyFontEnumerator() {}
106
107 bool EnumerateFamilies(int fixedWidthOnly = FALSE);
108 bool EnumerateEncodings(const char* family = "");
109
110 DEC_PYCALLBACK_BOOL_STRING(OnFontFamily);
111 DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding);
112
113 PYPRIVATE;
114};
115
116IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFontFamily);
117IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding);
118
119%}
120
121%name(wxFontEnumerator) class wxPyFontEnumerator {
122public:
123 wxPyFontEnumerator() {}
124 ~wxPyFontEnumerator() {}
125 %pragma(python) addtomethod = "__init__:self._setSelf(self)"
126
127 bool EnumerateFamilies(int fixedWidthOnly = FALSE);
128 bool EnumerateEncodings(const char* family = "");
129
130 bool base_OnFontFamily(const wxString& family);
131 bool base_OnFontEncoding(const wxString& family,
132 const wxString& encoding);
133};
134#endif
135//----------------------------------------------------------------------
136//----------------------------------------------------------------------
137