lumiera_/src/gui/widgets/panel-bar.hpp

98 lines
2.2 KiB
C++
Raw Normal View History

2009-03-08 17:50:23 +01:00
/*
panel-bar.hpp - Declaration of the panel bar widget
Copyright (C) Lumiera.org
2009, Joel Holdsworth <joel@airwebreathe.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file panel-bar.hpp
** This file contains the definition of timeline widget
*/
#ifndef PANEL_BAR_HPP
#define PANEL_BAR_HPP
#include <gtkmm.h>
#include "menu-button.hpp"
namespace gui {
2009-03-18 18:58:57 +01:00
namespace panels {
class Panel;
}
2009-03-08 17:50:23 +01:00
namespace widgets {
2009-03-16 18:41:51 +01:00
/**
* A container widget for widgets to be displayed on GDL panels grips.
**/
2009-03-08 17:50:23 +01:00
class PanelBar : public Gtk::HBox
{
public:
2009-03-16 18:41:51 +01:00
/**
* Constructor - creates a PanelBar with a given stock_id.
2009-03-18 18:58:57 +01:00
* @param owner_panel The panel that is the parent of this panel bar.
2009-03-16 18:41:51 +01:00
* @param stock_id The stock id with a name and an icon for this
* panel.
**/
2009-03-18 18:58:57 +01:00
PanelBar(panels::Panel &owner_panel, const gchar *stock_id);
private:
void setup_panel_button();
private:
/**
* An override to intercept realize events.
**/
void on_realize();
/**
* An override to intercept size allocate events.
**/
void on_size_allocate(Gtk::Allocation& allocation);
2009-03-16 18:41:51 +01:00
private:
2009-03-18 18:58:57 +01:00
void on_hide();
private:
panels::Panel &panel;
2009-03-16 18:41:51 +01:00
/**
* The panel menu drop-down button widget, that will be displayed in
* the corner of the bar.
**/
MenuButton panelButton;
/**
* The bar window.
* @remarks This window is used only to set the cursor as an arrow for
* any child widgets.
**/
Glib::RefPtr<Gdk::Window> window;
2009-03-08 17:50:23 +01:00
};
} // gui
} // widgets
#endif // PANEL_BAR_HPP