summaryrefslogtreecommitdiffstats
path: root/plugins/src/accessible/widgets/qaccessiblemenu.h
blob: acc7b1ed4706bae887b50b4f192f528d336a7430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef QACCESSIBLEMENU_H
#define QACCESSIBLEMENU_H

#include "qaccessiblewidget.h"

class QPopupMenu;
class QMenuBar;

class QAccessiblePopup : public QAccessibleWidget
{
public:
    QAccessiblePopup( QObject *o );

    int		childCount() const;
    QRESULT	queryChild( int control, QAccessibleInterface ** ) const;

    QRect	rect( int control ) const;
    int		controlAt( int x, int y ) const;
    int		navigate( NavDirection direction, int control ) const;

    QString	text( Text t, int control ) const;
    Role	role( int control ) const;
    State	state( int control ) const;

    bool	doDefaultAction( int control );
    bool	setFocus( int control );

protected:
    QPopupMenu *popupMenu() const;
};

class QAccessibleMenuBar : public QAccessibleWidget
{
public:
    QAccessibleMenuBar( QObject *o );

    int		childCount() const;
    QRESULT	queryChild( int control, QAccessibleInterface ** ) const;

    QRect	rect( int control ) const;
    int		controlAt( int x, int y ) const;
    int		navigate( NavDirection direction, int control ) const;

    QString	text( Text t, int control ) const;
    Role	role( int control ) const;
    State	state( int control ) const;

    bool	doDefaultAction( int control );
    bool	setFocus( int control );

protected:
    QMenuBar *menuBar() const;
};

#endif // QACCESSIBLEMENU_H