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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXMenuCascade.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                        M e n u C a s c a d 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 FXMENUCASCADE_H
00022 #define FXMENUCASCADE_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 FXMenuCascade : public FXMenuCaption {
00039   FXDECLARE(FXMenuCascade)
00040 protected:
00041   FXPopup *pane;
00042 protected:
00043   FXMenuCascade();
00044   void drawTriangle(FXDCWindow& dc,FXint l,FXint t,FXint r,FXint b);
00045 private:
00046   FXMenuCascade(const FXMenuCascade&);
00047   FXMenuCascade &operator=(const FXMenuCascade&);
00048 public:
00049   long onPaint(FXObject*,FXSelector,void*);
00050   long onEnter(FXObject*,FXSelector,void*);
00051   long onLeave(FXObject*,FXSelector,void*);
00052   long onButtonPress(FXObject*,FXSelector,void*);
00053   long onButtonRelease(FXObject*,FXSelector,void*);
00054   long onKeyPress(FXObject*,FXSelector,void*);
00055   long onKeyRelease(FXObject*,FXSelector,void*);
00056   long onHotKeyPress(FXObject*,FXSelector,void*);
00057   long onHotKeyRelease(FXObject*,FXSelector,void*);
00058   long onCmdPost(FXObject*,FXSelector,void*);
00059   long onCmdUnpost(FXObject*,FXSelector,void*);
00060 public:
00061   enum {
00062     ID_MENUTIMER=FXMenuCaption::ID_LAST,
00063     ID_LAST
00064     };
00065 public:
00066 
00068   FXMenuCascade(FXComposite* p,const FXString& text,FXIcon* ic=NULL,FXPopup* pup=NULL,FXuint opts=0);
00069 
00071   virtual void create();
00072 
00074   virtual void detach();
00075 
00077   virtual void destroy();
00078 
00080   virtual FXbool canFocus() const;
00081 
00083   virtual void setFocus();
00084 
00086   virtual void killFocus();
00087 
00089   void setMenu(FXPopup *pup){ pane = pup; }
00090 
00092   FXPopup* getMenu() const { return pane; }
00093 
00095   virtual FXbool contains(FXint parentx,FXint parenty) const;
00096 
00098   virtual void save(FXStream& store) const;
00099 
00101   virtual void load(FXStream& store);
00102 
00104   virtual ~FXMenuCascade();
00105   };
00106 
00107 }
00108 
00109 #endif

Copyright © 1997-2011 Jeroen van der Zijp