1 \section{wx\-Active\-X Class Reference
}
2 \label{classwxActiveX
}\index{wxActiveX@
{wxActiveX
}}
3 {\tt \#include $<$wxactivex.h$>$
}
7 \subsection{Detailed Description
}
8 Main class for embedding a Active\-X control.
10 Use by itself or derive from it
\begin{Desc
}
11 \item[Note:
]The utility program (wxie) can generate a list of events, methods \& properties for a control. First display the control (File$|$Display), then get the type info (Active\-X$|$Get Type Info) - these are copied to the clipboard. Eventually this will be expanded to autogenerate wx\-Windows source files for a control with all methods etc encapsulated.
\end{Desc
}
13 \item[Usage:
]construct using a Prog\-Id or class id
15 \footnotesize\begin{verbatim
} new wxActiveX(parent, CLSID_WebBrowser, id, pos, size, style, name)
16 \end{verbatim
}\normalsize
19 \footnotesize\begin{verbatim
} new wxActiveX(parent, "ShockwaveFlash.ShockwaveFlash", id, pos, size, style, name)
20 \end{verbatim
}\normalsize
23 \item[Properties
]Properties can be set using
{\tt {\bf Set\-Prop()
}} and set/retrieved using
{\tt {\bf Prop()
}}
25 \footnotesize\begin{verbatim
} SetProp(name, wxVariant(x))
26 \end{verbatim
}\normalsize
29 \footnotesize\begin{verbatim
} wxString Prop("<name>") = x
30 \end{verbatim
}\normalsize
33 \footnotesize\begin{verbatim
} wxString result = Prop("<name>")
34 \end{verbatim
}\normalsize
37 \footnotesize\begin{verbatim
} flash_ctl.Prop("movie") = "file:///movies/test.swf";
38 \end{verbatim
}\normalsize
41 \footnotesize\begin{verbatim
} flash_ctl.Prop("Playing") = false;
42 \end{verbatim
}\normalsize
45 \footnotesize\begin{verbatim
} wxString current_movie = flash_ctl.Prop("movie");
46 \end{verbatim
}\normalsize
49 \item[Methods
]Methods are invoked with
{\tt {\bf Call\-Method()
}}
51 \footnotesize\begin{verbatim
} wxVariant result = CallMethod("<name>", args, nargs = -
1)
52 \end{verbatim
}\normalsize
55 \footnotesize\begin{verbatim
} wxVariant args
[] =
{0L, "file:///e:/dev/wxie/bug-zap.swf"
};
56 wxVariant result = X->CallMethod("LoadMovie", args);
57 \end{verbatim
}\normalsize
60 \item[events
]respond to events with the
{\tt {\bf EVT
\_\-ACTIVEX(control\-Id, event\-Name, handler)
}} \&
{\tt {\bf EVT
\_\-ACTIVEX
\_\-DISPID(control\-Id, event\-Disp\-Id, handler)
}} macros
62 \footnotesize\begin{verbatim
}
63 BEGIN_EVENT_TABLE(wxIEFrame, wxFrame)
64 EVT_ACTIVEX_DISPID(ID_MSHTML, DISPID_STATUSTEXTCHANGE, OnMSHTMLStatusTextChangeX)
65 EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2", OnMSHTMLBeforeNavigate2X)
66 EVT_ACTIVEX(ID_MSHTML, "TitleChange", OnMSHTMLTitleChangeX)
67 EVT_ACTIVEX(ID_MSHTML, "NewWindow2", OnMSHTMLNewWindow2X)
68 EVT_ACTIVEX(ID_MSHTML, "ProgressChange", OnMSHTMLProgressChangeX)
70 \end{verbatim
}\normalsize
76 Definition at line
329 of file wxactivex.h.
\subsection*
{Public Member Functions
}
77 \begin{CompactItemize
}
79 \index{wxActiveX@
{wxActiveX
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!wxActiveX@
{wxActiveX
}}
80 {\bf wx\-Active\-X
} (wx\-Window $
\ast$parent, REFCLSID clsid, wx\-Window\-ID id=-
1, const wx\-Point \&pos=wx\-Default\-Position, const wx\-Size \&size=wx\-Default\-Size, long style=
0, const wx\-String \&name=wx\-Panel\-Name\-Str)
\label{classwxActiveX_a0
}
82 \begin{CompactList
}\small\item\em Create using clsid.
\item\end{CompactList
}\item
83 \index{wxActiveX@
{wxActiveX
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!wxActiveX@
{wxActiveX
}}
84 {\bf wx\-Active\-X
} (wx\-Window $
\ast$parent, wx\-String prog\-Id, wx\-Window\-ID id=-
1, const wx\-Point \&pos=wx\-Default\-Position, const wx\-Size \&size=wx\-Default\-Size, long style=
0, const wx\-String \&name=wx\-Panel\-Name\-Str)
\label{classwxActiveX_a1
}
86 \begin{CompactList
}\small\item\em create using progid.
\item\end{CompactList
}\item
87 \index{GetEventCount@
{GetEventCount
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!GetEventCount@
{GetEventCount
}}
88 int
{\bf Get\-Event\-Count
} () const
\label{classwxActiveX_a3
}
90 \begin{CompactList
}\small\item\em Number of events defined for this control.
\item\end{CompactList
}\item
91 const
{\bf Func\-X
} \&
{\bf Get\-Event\-Desc
} (int idx) const
92 \begin{CompactList
}\small\item\em returns event description by index.
\item\end{CompactList
}\item
93 \index{GetPropCount@
{GetPropCount
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!GetPropCount@
{GetPropCount
}}
94 int
{\bf Get\-Prop\-Count
} () const
\label{classwxActiveX_a5
}
96 \begin{CompactList
}\small\item\em Number of properties defined for this control.
\item\end{CompactList
}\item
97 const
{\bf Prop\-X
} \&
{\bf Get\-Prop\-Desc
} (int idx) const
98 \begin{CompactList
}\small\item\em returns property description by index.
\item\end{CompactList
}\item
99 const
{\bf Prop\-X
} \&
{\bf Get\-Prop\-Desc
} (wx\-String name) const
100 \begin{CompactList
}\small\item\em returns property description by name.
\item\end{CompactList
}\item
101 \index{GetMethodCount@
{GetMethodCount
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!GetMethodCount@
{GetMethodCount
}}
102 int
{\bf Get\-Method\-Count
} () const
\label{classwxActiveX_a8
}
104 \begin{CompactList
}\small\item\em Number of methods defined for this control.
\item\end{CompactList
}\item
105 const
{\bf Func\-X
} \&
{\bf Get\-Method\-Desc
} (int idx) const
106 \begin{CompactList
}\small\item\em returns method description by name.
\item\end{CompactList
}\item
107 const
{\bf Func\-X
} \&
{\bf Get\-Method\-Desc
} (wx\-String name) const
108 \begin{CompactList
}\small\item\em returns method description by name.
\item\end{CompactList
}\item
109 \index{SetProp@
{SetProp
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!SetProp@
{SetProp
}}
110 void
{\bf Set\-Prop
} (MEMBERID name, VARIANTARG \&value)
\label{classwxActiveX_a11
}
112 \begin{CompactList
}\small\item\em Set property VARIANTARG value by MEMBERID.
\item\end{CompactList
}\item
113 \index{SetProp@
{SetProp
}!wxActiveX@
{wxActiveX
}}\index{wxActiveX@
{wxActiveX
}!SetProp@
{SetProp
}}
114 void
{\bf Set\-Prop
} (const wx\-String \&name, const wx\-Variant \&value)
\label{classwxActiveX_a12
}
116 \begin{CompactList
}\small\item\em Set property using wx\-Variant by name.
\item\end{CompactList
}\item
117 wx\-Property\-Setter
{\bf Prop
} (wx\-String name)
118 \begin{CompactList
}\small\item\em Generic Get/Set Property by name. Automatically handles most types.
\item\end{CompactList
}\item
119 wx\-Variant
{\bf Call\-Method
} (wx\-String name, wx\-Variant args
[$\,$
], int nargs=-
1)
120 \begin{CompactList
}\small\item\em Call a method of the Active\-X control. Automatically handles most types.
\item\end{CompactList
}\end{CompactItemize
}
121 \subsection*
{Related Functions
}
122 (Note that these are not member functions.)
\begin{CompactItemize
}
124 bool
{\bf MSWVariant\-To\-Variant
} (VARIANTARG \&va, wx\-Variant \&vx)
125 \begin{CompactList
}\small\item\em Convert MSW VARIANTARG to wx\-Variant. Handles basic types, need to add:
\begin{itemize
}
126 \item VT
\_\-ARRAY $|$ VT
\_\-$
\ast$
\item better support for VT
\_\-UNKNOWN (currently treated as void $
\ast$)
\item better support for VT
\_\-DISPATCH (currently treated as void $
\ast$).
\end{itemize
}
127 \item\end{CompactList
}\item
128 bool
{\bf Variant\-To\-MSWVariant
} (const wx\-Variant \&vx, VARIANTARG \&va)
129 \begin{CompactList
}\small\item\em Convert wx\-Variant to MSW VARIANTARG. Handles basic types, need to add:
\begin{itemize
}
130 \item VT
\_\-ARRAY $|$ VT
\_\-$
\ast$
\item better support for VT
\_\-UNKNOWN (currently treated as void $
\ast$)
\item better support for VT
\_\-DISPATCH (currently treated as void $
\ast$).
\end{itemize
}
131 \item\end{CompactList
}\end{CompactItemize
}
134 \subsection{Member Function Documentation
}
135 \index{wxActiveX@
{wx\-Active\-X
}!GetEventDesc@
{GetEventDesc
}}
136 \index{GetEventDesc@
{GetEventDesc
}!wxActiveX@
{wx\-Active\-X
}}
137 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}const
{\bf Func\-X
}\& wx\-Active\-X::Get\-Event\-Desc (int
{\em idx
}) const
}\label{classwxActiveX_a4
}
140 returns event description by index.
142 throws exception for invalid index
\index{wxActiveX@
{wx\-Active\-X
}!GetPropDesc@
{GetPropDesc
}}
143 \index{GetPropDesc@
{GetPropDesc
}!wxActiveX@
{wx\-Active\-X
}}
144 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}const
{\bf Prop\-X
}\& wx\-Active\-X::Get\-Prop\-Desc (int
{\em idx
}) const
}\label{classwxActiveX_a6
}
147 returns property description by index.
149 throws exception for invalid index
\index{wxActiveX@
{wx\-Active\-X
}!GetPropDesc@
{GetPropDesc
}}
150 \index{GetPropDesc@
{GetPropDesc
}!wxActiveX@
{wx\-Active\-X
}}
151 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}const
{\bf Prop\-X
}\& wx\-Active\-X::Get\-Prop\-Desc (wx\-String
{\em name
}) const
}\label{classwxActiveX_a7
}
154 returns property description by name.
156 throws exception for invalid name
\index{wxActiveX@
{wx\-Active\-X
}!GetMethodDesc@
{GetMethodDesc
}}
157 \index{GetMethodDesc@
{GetMethodDesc
}!wxActiveX@
{wx\-Active\-X
}}
158 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}const
{\bf Func\-X
}\& wx\-Active\-X::Get\-Method\-Desc (int
{\em idx
}) const
}\label{classwxActiveX_a9
}
161 returns method description by name.
163 throws exception for invalid index
\index{wxActiveX@
{wx\-Active\-X
}!GetMethodDesc@
{GetMethodDesc
}}
164 \index{GetMethodDesc@
{GetMethodDesc
}!wxActiveX@
{wx\-Active\-X
}}
165 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}const
{\bf Func\-X
}\& wx\-Active\-X::Get\-Method\-Desc (wx\-String
{\em name
}) const
}\label{classwxActiveX_a10
}
168 returns method description by name.
170 throws exception for invalid name
\index{wxActiveX@
{wx\-Active\-X
}!Prop@
{Prop
}}
171 \index{Prop@
{Prop
}!wxActiveX@
{wx\-Active\-X
}}
172 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}wx\-Property\-Setter wx\-Active\-X::Prop (wx\-String
{\em name
})
\hspace{0.3cm
}{\tt [inline
]}}\label{classwxActiveX_a13
}
175 Generic Get/Set Property by name. Automatically handles most types.
180 \item[{\em name
}]Property name to read/set
\end{description
}
183 \item[Returns:
]wx\-Property\-Setter, which has overloads for setting/getting the property
\end{Desc
}
187 \item[Usage:
]\begin{itemize
}
188 \item Prop(
\char`\"
{}$<$name$>$
\char`\"
{}) = $<$value$>$
\item var = Prop(
\char`\"
{}$<$name$>$
\char`\"
{})
\item e.g:
\begin{itemize
}
191 \footnotesize\begin{verbatim
} flash_ctl.Prop("movie") = "file:///movies/test.swf";
192 \end{verbatim
}\normalsize
195 \footnotesize\begin{verbatim
} flash_ctl.Prop("Playing") = false;
196 \end{verbatim
}\normalsize
199 \footnotesize\begin{verbatim
} wxString current_movie = flash_ctl.Prop("movie");
200 \end{verbatim
}\normalsize
207 \item[{\em raises
}]exception if $<$name$>$ is invalid
\end{description
}
210 \item[Note:
]Have to add a few more type conversions yet ...
\end{Desc
}
213 Definition at line
458 of file wxactivex.h.
\index{wxActiveX@
{wx\-Active\-X
}!CallMethod@
{CallMethod
}}
214 \index{CallMethod@
{CallMethod
}!wxActiveX@
{wx\-Active\-X
}}
215 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}wx\-Variant wx\-Active\-X::Call\-Method (wx\-String
{\em name
}, wx\-Variant
{\em args
}[$\,$
], int
{\em nargs
} = -
1)
}\label{classwxActiveX_a26
}
218 Call a method of the Active\-X control. Automatically handles most types.
223 \item[{\em name
}]name of method to call
\item[{\em args
}]array of wx\-Variant's, defaults to NULL (no args)
\item[{\em nargs
}]number of arguments passed via args. Defaults to actual number of args for the method
\end{description
}
226 \item[Returns:
]wx\-Variant
\end{Desc
}
230 \item[Usage:
]\begin{itemize
}
231 \item result = Call\-Method(
\char`\"
{}$<$name$>$
\char`\"
{}, args, nargs)
\item e.g.
\item
233 \footnotesize\begin{verbatim
}
234 wxVariant args
[] =
{0L, "file:///e:/dev/wxie/bug-zap.swf"
};
235 wxVariant result = X->CallMethod("LoadMovie", args);
236 \end{verbatim
}\normalsize
242 \item[{\em raises
}]exception if $<$name$>$ is invalid
\end{description
}
245 \item[Note:
]Since wx\-Variant has built in type conversion, most the std types can be passed easily
\end{Desc
}
248 \subsection{Friends And Related Function Documentation
}
249 \index{wxActiveX@
{wx\-Active\-X
}!MSWVariantToVariant@
{MSWVariantToVariant
}}
250 \index{MSWVariantToVariant@
{MSWVariantToVariant
}!wxActiveX@
{wx\-Active\-X
}}
251 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}bool MSWVariant\-To\-Variant (VARIANTARG \&
{\em va
}, wx\-Variant \&
{\em vx
})
\hspace{0.3cm
}{\tt [related
]}}\label{classwxActiveX_k0
}
254 Convert MSW VARIANTARG to wx\-Variant. Handles basic types, need to add:
\begin{itemize
}
255 \item VT
\_\-ARRAY $|$ VT
\_\-$
\ast$
\item better support for VT
\_\-UNKNOWN (currently treated as void $
\ast$)
\item better support for VT
\_\-DISPATCH (currently treated as void $
\ast$).
\end{itemize
}
261 \item[{\em va
}]VARAIANTARG to convert from
\item[{\em vx
}]Destination wx\-Variant
\end{description
}
264 \item[Returns:
]success/failure (true/false)
\end{Desc
}
265 \index{wxActiveX@
{wx\-Active\-X
}!VariantToMSWVariant@
{VariantToMSWVariant
}}
266 \index{VariantToMSWVariant@
{VariantToMSWVariant
}!wxActiveX@
{wx\-Active\-X
}}
267 \subsubsection{\setlength{\rightskip}{0pt plus
5cm
}bool Variant\-To\-MSWVariant (const wx\-Variant \&
{\em vx
}, VARIANTARG \&
{\em va
})
\hspace{0.3cm
}{\tt [related
]}}\label{classwxActiveX_k1
}
270 Convert wx\-Variant to MSW VARIANTARG. Handles basic types, need to add:
\begin{itemize
}
271 \item VT
\_\-ARRAY $|$ VT
\_\-$
\ast$
\item better support for VT
\_\-UNKNOWN (currently treated as void $
\ast$)
\item better support for VT
\_\-DISPATCH (currently treated as void $
\ast$).
\end{itemize
}
277 \item[{\em vx
}]wx\-Variant to convert from
\item[{\em va
}]Destination VARIANTARG
\end{description
}
280 \item[Returns:
]success/failure (true/false)
\end{Desc
}
283 The documentation for this class was generated from the following file:
\begin{CompactItemize
}
285 {\bf wxactivex.h
}\end{CompactItemize
}