1 /* kartei.h
2  * This file belongs to Worker, a file manager for UN*X/X11.
3  * Copyright (C) 2004-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 KARTEI_H
23 #define KARTEI_H
24 
25 #include "awindow.h"
26 #include <vector>
27 
28 class Kartei : public AWindow {
29 public:
30   Kartei( AGUIX *parent,
31           int x,
32           int y,
33           int width,
34           int height,
35           std::string title );
36   ~Kartei();
37   Kartei( const Kartei &other );
38   Kartei &operator=( const Kartei &other );
39   void setOption( AWindow *win, unsigned int option, const char *optionname );
40   void updateOption( unsigned int option, const char *optionname );
41   void updateOption( unsigned int option, const std::string &optionname );
42   void maximize();
43   static void optionChangeCallback( Kartei *k1, unsigned int option );
44   void optionChange( unsigned int option );
45   void boxRedraw();
46   bool handleMessage(XEvent *,Message *msg);
47   int getCurOption() const;
48 protected:
49   std::vector<AWindow*> options;
50   class AContainer *cont;
51   class KarteiButton *optionkb;
52   unsigned int curOption;
53 
54   void showCurOption();
55   void doCreateStuff();
56   void doDestroyStuff();
57 };
58 
59 #endif
60