utextbox.hpp

00001 /* ==================================================== ======== ======= *
00002 *
00003 *  utext.hpp
00004 *  Ubit Project
00005 *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00006 *  (C) 1999-2006 / Eric Lecolinet / ENST Paris / http://www.enst.fr/~elc/ubit
00007 *
00008 * ***********************************************************************
00009 * COPYRIGHT NOTICE : 
00010 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00011 * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00012 * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00013 * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00014 * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00015 * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00016 * ***********************************************************************
00017 * ==================================================== [(c)Elc] ======= *
00018 * ==================================================== ======== ======= */
00019 
00020 #ifndef _utext_hpp_
00021 #define _utext_hpp_
00022 //pragma ident  "@(#)utext.hpp  ubit:05.05.00"
00023 #include <ubit/ustr.hpp>
00024 #include <ubit/uedit.hpp>
00025 namespace ubit {
00026   
00027 /* ==================================================== ===== ======= */
00052 class UTextbox: public UBox {
00053 public:
00054   UBIT_ELEMENT_CLASS(UTextbox, UBox)
00055 
00056   UTextbox(const UArgs& = UArgs::none);
00058   
00059   friend UTextbox& utextbox(const UArgs& a = UArgs::none) {return *new UTextbox(a);}
00060   
00061   static  UStyle* createStyle();
00062 };
00063   
00064 /* ==================================================== [Elc] ======= */
00065 /* ==================================================== ===== ======= */
00141 class UTextfield: public UTextbox {
00142 public:
00143   UBIT_ELEMENT_CLASS(UTextfield, UTextbox)
00144 
00145   UTextfield(const UArgs& = UArgs::none);
00146   friend UTextfield& utextfield(const UArgs& a = UArgs::none) {return *new UTextfield(a);}
00148   
00149   virtual bool isEditable() const;
00150   virtual UTextfield& setEditable(bool state = true);
00151   
00152   UEdit& edit() {return *pedit;}
00153   const UEdit& edit() const {return *pedit;}
00154   
00155   static  UStyle* createStyle();
00156 
00157 protected:
00158     uptr<UEdit> pedit;
00159 };
00160   
00161 /* ==================================================== [Elc] ======= */
00162 /* ==================================================== ===== ======= */
00168 class UTextarea: public UTextfield {
00169 public:
00170   UBIT_ELEMENT_CLASS(UTextarea, UTextfield)
00171   
00172   UTextarea(const UArgs& = UArgs::none);
00174 
00175   friend UTextarea& utextarea(const UArgs& a = UArgs::none) {return *new UTextarea(a);}
00177   
00178   static UStyle* createStyle();
00179 };
00180   
00181 }
00182 #endif
00183 /* ==================================================== [TheEnd] ======= */
00184 /* ==================================================== [(c)Elc] ======= */

Generated on Mon Jan 29 00:20:40 2007 for Ubit by  doxygen 1.4.7