00001 // @(#)root/gui:$Id: TGMdiMenu.h 23115 2008-04-10 13:35:37Z rdm $ 00002 // Author: Bertrand Bellenot 20/08/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 /************************************************************************** 00013 00014 This file is part of TGMdi, an extension to the xclass toolkit. 00015 Copyright (C) 1998-2002 by Harald Radke, Hector Peraza. 00016 00017 This application is free software; you can redistribute it and/or 00018 modify it under the terms of the GNU Library General Public 00019 License as published by the Free Software Foundation; either 00020 version 2 of the License, or (at your option) any later version. 00021 00022 This application is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00025 Library General Public License for more details. 00026 00027 You should have received a copy of the GNU Library General Public 00028 License along with this library; if not, write to the Free 00029 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00030 00031 **************************************************************************/ 00032 00033 #ifndef ROOT_TGMdiMenu 00034 #define ROOT_TGMdiMenu 00035 00036 ////////////////////////////////////////////////////////////////////////// 00037 // // 00038 // TGMdiMenu. // 00039 // // 00040 // This file contains the TGMdiMenuBar class. // 00041 // // 00042 ////////////////////////////////////////////////////////////////////////// 00043 00044 #ifndef ROOT_TGMenu 00045 #include "TGMenu.h" 00046 #endif 00047 #ifndef ROOT_TGFrame 00048 #include "TGFrame.h" 00049 #endif 00050 00051 00052 class TGMdiMainFrame; 00053 class TGMdiTitleIcon; 00054 class TGMdiButtons; 00055 00056 00057 class TGMdiMenuBar : public TGCompositeFrame { 00058 00059 friend class TGMdiMainFrame; 00060 00061 protected: 00062 TGCompositeFrame *fLeft, *fRight; // left and right parts of MDI menu bar 00063 TGMenuBar *fBar; // standard menu bar 00064 TGLayoutHints *fLHint, *fLeftHint; // left layout hints 00065 TGLayoutHints *fRightHint, *fBarHint; // right layout hints 00066 00067 void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons); 00068 void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons); 00069 void ShowFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons); 00070 void HideFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons); 00071 00072 public: 00073 TGMdiMenuBar(const TGWindow *p, Int_t w = 1, Int_t h = 20); 00074 virtual ~TGMdiMenuBar(); 00075 00076 void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l); 00077 TGMenuBar *GetMenuBar() const { return fBar;} 00078 virtual void SavePrimitive(ostream &out, Option_t *option = ""); 00079 00080 ClassDef(TGMdiMenuBar, 0) // MDI menu bar 00081 }; 00082 00083 #endif