If you have comments or questions concerning this source file, discuss them in the forum.
/*
Copyright (c) 2002 Nicolai Haehnle
See the license.txt for details. If that file was not included in the
source distributions, please email <prefect@rtts.org>
*/
// gui_checkbox.h
#ifndef GUI_CHECKBOX_H
#define GUI_CHECKBOX_H
#include "gui_button.h"
class GCheckBox : public GButton {
public:
bool m_bOn;
public:
GCheckBox(GPanel *pParent, int x, int y, int w, int h, const char *szText = 0,
int iAlign = 0, int id = -1);
GCheckBox(GPanel *pParent, const char *szPic, int type, u32 colorkey,
int x, int y, int w, int h, int id = -1);
LSignal1<bool> OnChanged;
void SetOn(bool on);
void Toggle(int dummy = -1);
public:
virtual void GetIconSize(int *pw, int *ph);
virtual void DrawIcon(int x, int y, int r, int g, int b, int a);
};
#endif
// GUI_CHECKBOX_H