Audacity  2.3.1
HtmlWindow.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  HtmlWindow.cpp
6 
7  Leland Lucius
8 
9 *******************************************************************//*******************************************************************//**********************************************************************/
22 
23 #ifndef __AUDACITY_WIDGETS_HtmlWindow__
24 #define __AUDACITY_WIDGETS_HtmlWindow__
25 
26 #include "../Audacity.h"
27 
28 #include <wx/defs.h>
29 #include <wx/html/htmlwin.h>
30 
31 #if wxUSE_ACCESSIBILITY
32 #include "WindowAccessible.h"
33 #endif
34 
38 
39 class AUDACITY_DLL_API HtmlWindow /* not final */ : public wxHtmlWindow
40 {
41 public:
42  HtmlWindow(wxWindow *parent,
43  wxWindowID id = wxID_ANY,
44  const wxPoint& pos = wxDefaultPosition,
45  const wxSize& size = wxDefaultSize,
46  long style = wxHW_DEFAULT_STYLE,
47  const wxString& name = wxT("htmlWindow"));
48  virtual ~HtmlWindow();
49 };
50 
51 #if wxUSE_ACCESSIBILITY
52 
53 class HtmlWindowAx final : public WindowAccessible
54 {
55 public:
56  HtmlWindowAx(wxWindow * window);
57 
58  virtual ~ HtmlWindowAx();
59 
60  // Retrieves the address of an IDispatch interface for the specified child.
61  // All objects must support this property.
62  wxAccStatus GetChild(int childId, wxAccessible** child) override;
63 
64  // Gets the number of children.
65  wxAccStatus GetChildCount(int* childCount) override;
66 
67  // Gets the default action for this object (0) or > 0 (the action for a child).
68  // Return wxACC_OK even if there is no action. actionName is the action, or the empty
69  // string if there is no action.
70  // The retrieved string describes the action that is performed on an object,
71  // not what the object does as a result. For example, a toolbar button that prints
72  // a document has a default action of "Press" rather than "Prints the current document."
73  wxAccStatus GetDefaultAction(int childId, wxString *actionName) override;
74 
75  // Returns the description for this object or a child.
76  wxAccStatus GetDescription(int childId, wxString *description) override;
77 
78  // Gets the window with the keyboard focus.
79  // If childId is 0 and child is NULL, no object in
80  // this subhierarchy has the focus.
81  // If this object has the focus, child should be 'this'.
82  wxAccStatus GetFocus(int *childId, wxAccessible **child) override;
83 
84  // Returns help text for this object or a child, similar to tooltip text.
85  wxAccStatus GetHelpText(int childId, wxString *helpText) override;
86 
87  // Returns the keyboard shortcut for this object or child.
88  // Return e.g. ALT+K
89  wxAccStatus GetKeyboardShortcut(int childId, wxString *shortcut) override;
90 
91  // Returns the rectangle for this object (id = 0) or a child element (id > 0).
92  // rect is in screen coordinates.
93  wxAccStatus GetLocation(wxRect& rect, int elementId) override;
94 
95  // Gets the name of the specified object.
96  wxAccStatus GetName(int childId, wxString *name) override;
97 
98  // Returns a role constant.
99  wxAccStatus GetRole(int childId, wxAccRole *role) override;
100 
101  // Gets a variant representing the selected children
102  // of this object.
103  // Acceptable values:
104  // - a null variant (IsNull() returns TRUE)
105  // - a list variant (GetType() == wxT("list"))
106  // - an integer representing the selected child element,
107  // or 0 if this object is selected (GetType() == wxT("long"))
108  // - a "void*" pointer to a wxAccessible child object
109  wxAccStatus GetSelections(wxVariant *selections) override;
110 
111  // Returns a state constant.
112  wxAccStatus GetState(int childId, long* state) override;
113 
114  // Returns a localized string representing the value for the object
115  // or child.
116  wxAccStatus GetValue(int childId, wxString* strValue) override;
117 
118 };
119 
120 #endif // wxUSE_ACCESSIBILITY
121 
122 #endif
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
HtmlWindow Class.
Definition: HtmlWindow.h:39
const wxChar * name
Definition: Distortion.cpp:94