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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXMenuTitle.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      M e n u   T i t l e   W i d g e t                        *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXMENUTITLE_H
00022 #define FXMENUTITLE_H
00023 
00024 #ifndef FXMENUCAPTION_H
00025 #include "FXMenuCaption.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXPopup;
00032 
00033 
00038 class FXAPI FXMenuTitle : public FXMenuCaption {
00039   FXDECLARE(FXMenuTitle)
00040 protected:
00041   FXPopup *pane;        // Pane to pop up
00042 protected:
00043   FXMenuTitle(){}
00044 private:
00045   FXMenuTitle(const FXMenuTitle&);
00046   FXMenuTitle &operator=(const FXMenuTitle&);
00047 public:
00048   long onPaint(FXObject*,FXSelector,void*);
00049   long onEnter(FXObject*,FXSelector,void*);
00050   long onLeave(FXObject*,FXSelector,void*);
00051   long onLeftBtnPress(FXObject*,FXSelector,void*);
00052   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00053   long onKeyPress(FXObject*,FXSelector,void*);
00054   long onKeyRelease(FXObject*,FXSelector,void*);
00055   long onHotKeyPress(FXObject*,FXSelector,void*);
00056   long onHotKeyRelease(FXObject*,FXSelector,void*);
00057   long onFocusUp(FXObject*,FXSelector,void*);
00058   long onFocusDown(FXObject*,FXSelector,void*);
00059   long onFocusIn(FXObject*,FXSelector,void*);
00060   long onFocusOut(FXObject*,FXSelector,void*);
00061   long onCmdPost(FXObject*,FXSelector,void*);
00062   long onCmdUnpost(FXObject*,FXSelector,void*);
00063 public:
00064 
00066   FXMenuTitle(FXComposite* p,const FXString& text,FXIcon* ic=NULL,FXPopup* pup=NULL,FXuint opts=0);
00067 
00069   virtual void create();
00070 
00072   virtual void detach();
00073 
00075   virtual FXint getDefaultWidth();
00076 
00078   virtual FXint getDefaultHeight();
00079 
00081   virtual FXbool canFocus() const;
00082 
00084   virtual void setFocus();
00085 
00087   virtual void killFocus();
00088 
00090   void setMenu(FXPopup *menu);
00091 
00093   FXPopup* getMenu() const { return pane; }
00094 
00096   virtual FXbool contains(FXint parentx,FXint parenty) const;
00097 
00099   virtual void save(FXStream& store) const;
00100 
00102   virtual void load(FXStream& store);
00103 
00105   virtual ~FXMenuTitle();
00106   };
00107 
00108 }
00109 
00110 #endif

Copyright © 1997-2011 Jeroen van der Zijp