libyui-mga  1.1.0
YMGAMenuBar.h
1 /*
2  Copyright 2020 by Angelo Naselli <anaselli at linux dot it>
3 
4  This library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU Lesser General Public License as
6  published by the Free Software Foundation; either version 2.1 of the
7  License, or (at your option) version 3.0 of the License. This library
8  is distributed in the hope that it will be useful, but WITHOUT ANY
9  WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11  License for more details. You should have received a copy of the GNU
12  Lesser General Public License along with this library; if not, write
13  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
14  Floor, Boston, MA 02110-1301 USA
15 */
16 
17 
18 /*-/
19 
20  File: YMGAMenuBar.h
21 
22  Author: Angelo Naselli <anaselli@linux.it>
23 
24 /-*/
25 #ifndef YMGAMenuBar_h
26 #define YMGAMenuBar_h
27 
28 #include <yui/YTypes.h>
29 #include <yui/YSelectionWidget.h>
30 #include <yui/YMenuItem.h>
31 #include <yui/YEvent.h>
32 
33 
34 class YMGAMenuBar : public YSelectionWidget
35 {
36  protected:
37  /**
38  * Constructor.
39  *
40  **/
41  YMGAMenuBar( YWidget * parent );
42 
43  public:
44 
45  /**
46  * Destructor.
47  **/
48  virtual ~YMGAMenuBar();
49 
50  /**
51  * Return a descriptive name of this widget class for logging,
52  * debugging etc.
53  **/
54  virtual const char * widgetClass() const { return "YMGAMenuBar"; }
55 
56  /**
57  * Enable YMGAMenuItem (menu name or menu entry) to enable/disable it into menubar or menu
58  *
59  **/
60  virtual void enableItem(YItem * menu_item, bool enable=true);
61 
62  /**
63  * Hide YMGAMenuItem (menu name or menu entry) to hide/show it into menubar or menu
64  *
65  **/
66  virtual void hideItem(YItem * menu_item, bool invisible=true);
67 
68 };
69 
70 #endif //YMGAMenuBar_h
71 
YMGAMenuBar
Definition: YMGAMenuBar.h:35
YMGAMenuBar::widgetClass
virtual const char * widgetClass() const
Return a descriptive name of this widget class for logging, debugging etc.
Definition: YMGAMenuBar.h:54
YMGAMenuBar::YMGAMenuBar
YMGAMenuBar(YWidget *parent)
Constructor.
Definition: YMGAMenuBar.cc:34
YMGAMenuBar::~YMGAMenuBar
virtual ~YMGAMenuBar()
Destructor.
Definition: YMGAMenuBar.cc:44
YMGAMenuBar::hideItem
virtual void hideItem(YItem *menu_item, bool invisible=true)
Hide YMGAMenuItem (menu name or menu entry) to hide/show it into menubar or menu.
Definition: YMGAMenuBar.cc:56
YMGAMenuBar::enableItem
virtual void enableItem(YItem *menu_item, bool enable=true)
Enable YMGAMenuItem (menu name or menu entry) to enable/disable it into menubar or menu.
Definition: YMGAMenuBar.cc:48