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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXChoiceBox.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                            C h o i c e   B o x                                *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2004,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 FXCHOICEBOX_H
00022 #define FXCHOICEBOX_H
00023 
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXList;
00032 
00033 
00040 class FXAPI FXChoiceBox : public FXDialogBox {
00041   FXDECLARE(FXChoiceBox)
00042 protected:
00043   FXList *list;
00044 protected:
00045   FXChoiceBox(){}
00046 private:
00047   FXChoiceBox(const FXChoiceBox&);
00048   FXChoiceBox &operator=(const FXChoiceBox&);
00049   void initialize(const FXString& text,FXIcon* icon);
00050 public:
00051   long onCmdClicked(FXObject*,FXSelector,void*);
00052   long onCmdCancel(FXObject*,FXSelector,void*);
00053 public:
00054   enum{
00055     ID_CLICKED=FXDialogBox::ID_LAST,
00056     ID_LAST
00057     };
00058 public:
00059 
00061   FXChoiceBox(FXWindow* owner,const FXString& caption,const FXString& text,FXIcon* icon,const FXchar** choices,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00062 
00064   FXChoiceBox(FXWindow* owner,const FXString& caption,const FXString& text,FXIcon* icon,const FXString& choices,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00065 
00067   FXChoiceBox(FXApp* app,const FXString& caption,const FXString& text,FXIcon* icon,const FXchar** choices,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00068 
00070   FXChoiceBox(FXApp* app,const FXString& caption,const FXString& text,FXIcon* icon,const FXString& choices,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00071 
00078   static FXint ask(FXWindow* owner,FXuint opts,const FXString& caption,const FXString& text,FXIcon* icon,const FXchar** choices);
00079 
00086   static FXint ask(FXWindow* owner,FXuint opts,const FXString& caption,const FXString& text,FXIcon* icon,const FXString& choices);
00087 
00094   static FXint ask(FXApp* app,FXuint opts,const FXString& caption,const FXString& text,FXIcon* icon,const FXchar** choices);
00095 
00102   static FXint ask(FXApp* app,FXuint opts,const FXString& caption,const FXString& text,FXIcon* icon,const FXString& choices);
00103 
00104 
00106   virtual void save(FXStream& store) const;
00107 
00109   virtual void load(FXStream& store);
00110 
00112   virtual ~FXChoiceBox();
00113   };
00114 
00115 }
00116 
00117 #endif

Copyright © 1997-2011 Jeroen van der Zijp