1 /* lister.h 2 * This file belongs to Worker, a file manager for UN*X/X11. 3 * Copyright (C) 2001-2019 Ralf Hoffmann. 4 * You can contact me at: ralf@boomerangsworld.de 5 * or http://www.boomerangsworld.de/worker 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 22 #ifndef LISTER_H 23 #define LISTER_H 24 25 #include "wdefines.h" 26 #include "aguix/message.h" 27 #include <set> 28 #include <string> 29 30 class Worker; 31 class AGUIX; 32 class ListerMode; 33 class AContainer; 34 class AWindow; 35 class Button; 36 class Datei; 37 class DNDMsg; 38 39 typedef enum { 40 CYCLICFUNC_MODE_NORMAL, 41 CYCLICFUNC_MODE_RESTART 42 } cyclicfunc_mode_t; 43 44 class Lister 45 { 46 public: 47 Lister( Worker*, int side ); 48 ~Lister(); 49 Lister( const Lister &other ); 50 Lister &operator=( const Lister &other ); 51 52 void messageHandler(AGMessage *msg); 53 AGUIX *getAGUIX(); 54 AWindow *getAWindow(); 55 void setActiveMode(ListerMode*); 56 void getGeometry(int*,int*,int*,int*); 57 ListerMode *getActiveMode(); 58 void setFocus(bool); 59 bool getFocus(); 60 void switch2Mode(int); 61 void setName(const char*); 62 void setStatebarText(const char*); 63 void makeActive(); 64 int getSide(); 65 bool isActive(); 66 void configure(); 67 Worker *getWorker(); 68 void cyclicfunc(cyclicfunc_mode_t mode); 69 int saveState(Datei *fh); 70 int loadState(); 71 const char *getNameOfMode(int); 72 73 void relayout(); 74 75 bool startdnd(DNDMsg *dm); 76 77 void setContainer( AContainer *mode_cont ); 78 bool pathsChanged( const std::set< std::string > changed_paths ); 79 80 void finalizeBGOps(); 81 82 void setLastPath( const std::string &path ); 83 std::string getLastPath() const; 84 private: 85 Worker *parent; 86 AGUIX *aguix; 87 AWindow *win; 88 Button *lvb; 89 Button *m_configure_b; 90 ListerMode *activemode; 91 int activemodeid; 92 ListerMode **modes; 93 bool hasFocus; 94 95 struct timeval lastlvbclick; 96 97 AContainer *m_cont; 98 AContainer *m_mode_cont; 99 AContainer *m_button_cont; 100 101 std::string m_last_path; 102 }; 103 104 #endif 105 106 /* Local Variables: */ 107 /* mode:c++ */ 108 /* End: */ 109