Debian Codegraph @

src/af/xap/cocoa/xap_CocoaWidget.h

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 2005 Hubert Figuiere
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20
21 #ifndef __XAP_COCOAWIDGET_H__
22 #define __XAP_COCOAWIDGET_H__
23
24 #import <Cocoa/Cocoa.h>
25
26 #include "xap_Widget.h"
27
28 class XAP_CocoaWidget : public XAP_Widget
29 {
30 public:
31 XAP_CocoaWidget(id w);
32
33 /** The destructor just clean up. Must not destroy the real widget. */
34 virtual ~XAP_CocoaWidget();
35
36 /** set the widget enabled/disabled state */
37 virtual void setState(bool enabled);
38 /** set the widget enabled/disabled state */
39 virtual bool getState(void);
40
41 /** set the widget visible state */
42 virtual void setVisible(bool visible);
43 /** get the widget visible state */
44 virtual bool getVisible(void);
45
46 /** set the widget int value */
47 virtual void setValueInt(int val);
48 /** get the widget int value */
49 virtual int getValueInt(void);
50
51 /** set the widget value as string */
52 virtual void setValueString(const UT_UTF8String &val);
53 /** get the widget value as string */
54 virtual void getValueString(UT_UTF8String &val);
55
56 /** set the widget value as float */
57 virtual void setValueFloat(float val);
58 /** get the widget value as float */
59 virtual float getValueFloat(void);
60
61 /** set the widget label */
62 virtual void setLabel(const UT_UTF8String &val);
63 virtual void setLabel(const std::string &val);
64 private:
65 id m_widget;
66 };
67
68 #endif