aboutsummaryrefslogtreecommitdiffstats
path: root/unix/tx/TXCheckbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tx/TXCheckbox.h')
-rw-r--r--unix/tx/TXCheckbox.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/unix/tx/TXCheckbox.h b/unix/tx/TXCheckbox.h
index 76cdc950..179e3e84 100644
--- a/unix/tx/TXCheckbox.h
+++ b/unix/tx/TXCheckbox.h
@@ -48,14 +48,15 @@ public:
class TXCheckbox : public TXWindow, public TXEventHandler {
public:
TXCheckbox(Display* dpy_, const char* text_, TXCheckboxCallback* cb_,
- bool radio_=false, TXWindow* parent_=0, int w=1, int h=1)
- : TXWindow(dpy_, w, h, parent_), cb(cb_), text(0),
+ bool radio_=false, TXWindow* parent_=nullptr,
+ int w=1, int h=1)
+ : TXWindow(dpy_, w, h, parent_), cb(cb_), text(nullptr),
boxSize(radio_ ? 12 : 13), boxPad(4),
checked_(false), disabled_(false), radio(radio_)
{
setEventHandler(this);
setText(text_);
- gc = XCreateGC(dpy, win(), 0, 0);
+ gc = XCreateGC(dpy, win(), 0, nullptr);
XSetFont(dpy, gc, defaultFont);
addEventMask(ExposureMask| ButtonPressMask | ButtonReleaseMask);
}
@@ -109,7 +110,7 @@ private:
text, strlen(text));
}
- virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
+ void handleEvent(TXWindow* /*w*/, XEvent* ev) override {
switch (ev->type) {
case Expose:
paint();