Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/vlg/develop/gwavmerger/src/TopMenuBar.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 //                              TopMenuBar.h
00004 //------------------------------------------------------------------------------
00005 // $Id: TopMenuBar.h,v 1.6 2003/02/07 05:15:10 vlg Exp $
00006 //------------------------------------------------------------------------------
00007 //  Copyright (c) 2001-2003 by Vladislav Grinchenko
00008 //
00009 //  This program is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU General Public License
00011 //  as published by the Free Software Foundation; either version
00012 //  2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 // 03/01/2002 VLG  Created
00015 //------------------------------------------------------------------------------
00016 #ifndef TOP_MENU_BAR_H
00017 #define TOP_MENU_BAR_H
00018 
00019 #include <vector>
00020 using std::vector;
00021 
00022 #include <gtkmm/menubar.h>
00023 #include <libgnomeuimm.h>
00024 
00025 #include "gWavMerger-main.h"
00026 
00027 class MainWindow;
00028 class Config;
00029 class ActionsMenu;
00030 
00031 using namespace Gtk;
00032 using namespace Menu_Helpers;
00033 
00034 class TopMenuBar : public SigC::Object
00035 {
00036 public:
00037     TopMenuBar (MainWindow& mw_, Config& cfg_);
00038     ~TopMenuBar ();
00039     
00040     void create ();
00041     MenuBar* get_menu_bar ();
00042     void add_history ();
00043     void refill_history_list ();
00044     
00045     void set_sensitivity (WMState state);
00046     void set_loaded ();
00047 
00048     void jump_next_row_cb ();
00049     void toggle_jump_next_row (bool active_) { m_jump->set_active (active_); }
00050 
00051     void fill_toolbar_with_doc_controls ();
00052     void fill_toolbar_with_play_controls (
00053         vector<Gnome::UI::Items::Info>& toolbar_);
00054 
00055 private:            // no cloning
00056     TopMenuBar (const TopMenuBar&);        
00057     TopMenuBar& operator= (const TopMenuBar&);
00058 
00059 private:            // all data members are managed by containers
00060     MainWindow&  m_mw;
00061     Config&      m_config;
00062     ActionsMenu* m_actions; // [Actions] menu item
00063     bool         m_loaded;  // MainWin to let us know when list is loaded
00064 
00065     MenuBar*     m_menu_bar;
00066     Menu*        m_file_menu;
00067     Menu*        m_open_recent_menu;
00068 
00069     MenuItem*    m_new;
00070     MenuItem*    m_open;
00071     MenuItem*    m_open_recent;
00072     MenuItem*    m_save;
00073     MenuItem*    m_save_as;
00074     MenuItem*    m_close;
00075     MenuItem*    m_exit;
00076 
00077     Gtk::Widget* m_b_open;
00078     Gtk::Widget* m_b_save;
00079     Gtk::Widget* m_b_save_as;
00080     Gtk::Widget* m_b_exit;
00081     Gtk::Widget* m_b_reload;
00082     Gtk::Widget* m_b_exec;
00083 
00084     Gtk::CheckMenuItem* m_jump; // jump next row
00085 };
00086 
00087 inline void
00088 
00089 TopMenuBar::set_loaded ()
00090 {
00091     m_b_exec->set_sensitive (m_loaded = true);
00092 }
00093 
00094 #endif /* TOP_MENU_BAR_H */

Generated on Tue Feb 11 23:05:20 2003 for gwavmerger by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002