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