kopalette.h
1/*
2 * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
3 *
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2, as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 */
17
18#ifndef _KO_PALETTE_
19#define _KO_PALETTE_
20
21#include <tqdockwindow.h>
22#include <tqwidget.h>
23#include <tqlabel.h>
24#include <tqtoolbutton.h>
25#include <tqpixmap.h>
26#include <tqstring.h>
27#include <tqfont.h>
28#include <tqlayout.h>
29#include <koffice_export.h>
30
31#include "kopalettemanager.h"
39class KOPALETTE_EXPORT KoPalette : public TQDockWindow {
40
41TQ_OBJECT
42
43
44public:
45
46 KoPalette(TQWidget * parent, const char * name);
47 virtual ~KoPalette();
48
49public:
50
51 virtual void resetFont();
52
53 void setStyle(enumKoPaletteStyle style) { m_style = style; };
54 enumKoPaletteStyle style() { return m_style; };
55
56 virtual void plug(TQWidget * widget, const TQString & name, int position) = 0;
57 virtual void unplug(const TQWidget * widget) = 0;
58 virtual void showPage(TQWidget *w) = 0;
59 virtual void togglePageHidden(TQWidget *w) = 0;
60 virtual void hidePage(TQWidget * w) = 0;
61 virtual void makeVisible(bool v) = 0;
62 virtual bool isHidden(TQWidget * w) = 0;
63 virtual int indexOf(TQWidget *w) = 0;
64
65protected:
66
67 virtual void setMainWidget(TQWidget * widget);
68 TQFont m_font;
69 enumKoPaletteStyle m_style;
70
71private:
72 TQWidget * m_page;
73
74};
75
76#endif //_KO_PALETTE_
A floating palette that allows the adding and removing of widgets to its organzing principle.
Definition kopalette.h:39