/usr/include/Wt/Ext/AbstractToggleButton is in libwtext-dev 3.3.3+dfsg-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef EXT_ABSTRACT_TOGGLE_BUTTON_H_
#define EXT_ABSTRACT_TOGGLE_BUTTON_H_
#include <Wt/Ext/FormField>
namespace Wt {
class WAbstractToggleButton;
namespace Ext {
/*! \class AbstractToggleButton Ext/AbstractToggleButton
* Ext/AbstractToggleButton
* \brief Abstract base class for radio button and check box.
*
* A toggle button provides a button with a boolean state (checked or
* unchecked), and a text label.
*
* To act on a change of the state, you can listen to the checked() or
* unChecked() signals.
*
* The current state (checked or unchecked) may be inspected using the
* isChecked() method.
*
* The API is identical to the WAbstractToggleButton API.
*
* \ingroup ext
*/
class WT_EXT_API AbstractToggleButton : public FormField
{
protected:
AbstractToggleButton(WAbstractToggleButton *wtWidget,
const WString& text, WContainerWidget *parent);
public:
/*! \brief Change the text of the label.
*/
void setText(const WString& text);
/*! \brief Get the text of the label.
*/
const WString text() const { return text_; }
/*! \brief Returns the state of the button.
*/
bool isChecked() const;
public slots:
/*! \brief Change the state of the button.
*
* Does not emit the checked() or unChecked() signals.
*
* \sa setChecked(), setUnChecked()
*/
void setChecked(bool);
/*! \brief Set the button checked.
*
* Does not emit the checked() signal.
*
* \sa setChecked(bool)
*/
virtual void setChecked();
/*! \brief Set the button unChecked.
*
* Does not emit the unChecked() signal.
*
* \sa setChecked(bool)
*/
virtual void setUnChecked();
public:
/*! \brief %Signal emitted when the button gets checked.
*
* \sa unChecked()
*/
EventSignal<>& checked();
/*! \brief %Signal emitted when the button gets unChecked.
*
* \sa checked()
*/
EventSignal<>& unChecked();
private:
WAbstractToggleButton *wtWidget_;
WString text_;
virtual std::string createJS(DomElement *inContainer);
virtual std::string getExtName() const = 0;
virtual void useAsTableViewEditor();
protected:
WAbstractToggleButton *wtWidget() const { return wtWidget_; }
virtual void createConfig(std::ostream& config);
virtual WFormWidget *formWidget() const;
virtual bool applySelfCss() const;
};
}
}
#endif // EXT_ABSTRACT_TOGGLE_BUTTON_H_
|