/usr/include/paragui/pgmenubar.h is in libparagui1.1-dev 1.1.8-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /*
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexander Pipelka
pipelka@teleweb.at
Last Update: $Author: braindead $
Update Date: $Date: 2004/03/12 18:46:37 $
Source File: $Source: /cvsroot/paragui/paragui/include/pgmenubar.h,v $
CVS/RCS Revision: $Revision: 1.3.6.2.2.5 $
Status: $State: Exp $
*/
#ifndef PG_MENUBAR_H
#define PG_MENUBAR_H
#include "pgthemewidget.h"
class PG_Button;
class PG_PopupMenu;
/**
@author Alexander Pipelka
@short A menubar.
This class provides a MenuBar where you can snap in different PG_PopupMenu
objects. Every item creates a button in the bar. By clicking the button the corresponding
PopupMenu is opened.
*/
class DECLSPEC PG_MenuBar : public PG_ThemeWidget {
public:
/**
Creates a new MenuBar object.
@param parent pointer to the parent widget
@param rect the position of the menubar
@param style the default themestyle (MenuBar)
The constructor creates a new MenuBar object without any items.
Use the Add member function to insert PG_PopupMenu objects.
*/
PG_MenuBar(PG_Widget* parent, const PG_Rect& rect = PG_Rect::null, const char* style = "MenuBar");
/**
Destroys the MenuBar object.
*/
~PG_MenuBar();
/**
Add a new item to the MenuBar
@param text label of the new item
@param menu pointer to the PG_PopupMenu object to add
@param indent offset of pixels to the last item
@param width width of the MenuBar button (if 0 the button will fit the textsize)
*/
void Add(const char* text, PG_PopupMenu* menu, Uint16 indent = 5, Uint16 width = 0);
protected:
//! Internal item
typedef struct {
PG_Button* button; //!< pointer to the PG_Button object showed in the bar
PG_PopupMenu* popupmenu; //!< pointer to the linked PG_PopupMenu object
} MenuBarItem;
std::vector<MenuBarItem*> ItemList;
Uint16 my_btnOffsetY;
private:
/**
Callback handler for MSG_BUTTONCLICK messages
*/
bool handle_button(PG_Button* button, PG_Pointer last);
void Cleanup();
std::string my_style;
PG_PopupMenu* my_active;
};
#endif // PG_MENUBAR_H
|