ufinderImpl.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  ufinderImpl.hpp (part of UFinder)
00004  *  Ubit Project
00005  *  Author: Eric Lecolinet
00006  *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00007  *  (C) 1999-2006 Eric Lecolinet / ENST Paris / http://www.enst.fr/~elc/ubit
00008  *
00009  * ***********************************************************************
00010  * COPYRIGHT NOTICE : 
00011  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00012  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00013  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00014  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00015  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00016  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00017  * ***********************************************************************
00018  * ==================================================== [(c)Elc] ======= *
00019  * ==================================================== ======== ======= */
00020 
00021 #ifndef _ufinderImpl_hpp_
00022 #define _ufinderImpl_hpp_
00023 //pragma ident  "@(#)ufinderImpl.hpp    ubit:05.05.00"
00024 #include <ubit/uwin.hpp>
00025 #include <ubit/uicon.hpp>
00026 namespace ubit {
00027 
00028 /* ==================================================== ===== ======= */
00031 class UFinderDir : public UItem {
00032   friend class UFinder;
00033   UFont font;
00034   UStr  fpath, fname;
00035   uptr<UIconbox> iconbox;
00036   UPopmenu popmenu;
00037   bool keep_open;
00038   int path_type;
00039   
00040 public:
00041   UFinderDir(class UFinder*, const UStr& path, int path_type);
00042   ~UFinderDir();
00043 
00044   const UStr& getDir() const;
00045   class UIconbox* getIconbox() const;
00046 
00047   void setDir(const UStr& dirname);
00048   void setIconbox(class UIconbox*);
00049 
00050   void emph(bool state);
00051   void setKeepOpen(bool st) {keep_open = st;}
00052   bool isKeepOpen() {return keep_open;}
00053 };
00054 
00055 /* ==================================================== ===== ======= */
00058 struct UFinderHost : public UVbox {
00059   typedef void (UFinderHost::*HostMethod)();
00060 
00061   UFinderHost(class UFinder*, const UStr& hostname);
00062   void resolve(HostMethod);
00063   void createClone();
00064   void deleteClone();
00065   void addXhost();
00066   void removeXhost();
00067   void calibrate();
00068   void putFile();
00069 
00070 protected:
00071   friend class UFinder;
00072   class UFinder& fd;
00073   UStr hostname, address;
00074   UBox *name_box, *prop_box;
00075   UBox *clone_btn, *xhost_btn, *put_btn, *get_btn;
00076   UWin *clone_win;
00077 
00078   void resolveCB(UMessageEvent&, HostMethod);
00079   void createCloneImpl();
00080   void addXhostImpl();
00081   void calibrateImpl();
00082   void putFileImpl();
00083 };
00084 
00085 /* ==================================================== ===== ======= */
00088 class UFinderControls : public UHbox {
00089 public:
00090   UFinderControls(class UFinder*);
00091   ~UFinderControls();
00092   void showDir();
00093   void showDoc();
00094   void showSelectedIcon();
00095   void changeLayout(int);
00096 
00097 private:
00098   friend class UFinder;
00099   UFinder& fd;
00100   UVbox folder_list, host_list, file_list, small_navig_box;
00101   uptr<UVbox> big_custom_controls, small_custom_controls;
00102   UItem show_controls_btn;
00103   //UIcon preview;
00104   UValign small_navig_box_valign;
00105 };
00106 
00107 /* ==================================================== ===== ======= */
00108 /*
00109 class UFinderFullwin : public UFrame {
00110   friend class UFinder;
00111   UFinder&  fd;
00112   enum WinSize {SmallWinSize, MediumWinSize, LargeWinSize, FullWinSize}
00113   winsize;
00114   bool    resizing;
00115   UWidth  width;
00116   UHeight height;
00117   //UIcon   content;
00118 
00119 public:    
00120   UFinderFullwin(UFinder*);
00121   ~UFinderFullwin();
00122   void setSizeMode(WinSize);
00123   void rescale();
00124   void resized(UEvent&);
00125   void keyPressed(UEvent&);
00126 };
00127 */
00128 
00129 }
00130 #endif
00131 /* ==================================================== [TheEnd] ======= */
00132 /* ==================================================== (c)[Elc] ======= */

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