input_filter.cc
Go to the documentation of this file.
1 /*
2  * Roboception GmbH
3  * Munich, Germany
4  * www.roboception.com
5  *
6  * Copyright (c) 2024 Roboception GmbH
7  * All rights reserved
8  *
9  * Author: Heiko Hirschmueller
10  */
11 
12 #include "input_filter.h"
13 
14 #include <sstream>
15 
16 InputFilter::InputFilter(int x, int y, int w, int h, const char *label) : Fl_Input(x, y, w, h, label)
17 {
18  cb=0;
19  user=0;
20 }
21 
22 int InputFilter::handle(int event)
23 {
24  std::string v=value();
25 
26  // handle event in superclass
27 
28  int ret=Fl_Input::handle(event);
29 
30  // call callback if value has changed
31 
32  if (cb && v != value())
33  {
34  cb(this, user);
35  }
36 
37  return ret;
38 }
InputFilter::InputFilter
InputFilter(int x, int y, int w, int h, const char *label)
Definition: input_filter.cc:16
input_filter.h
InputFilter::user
void * user
Definition: input_filter.h:33
InputFilter::cb
Fl_Callback * cb
Definition: input_filter.h:32
InputFilter::handle
int handle(int event)
Definition: input_filter.cc:22


rcdiscover
Author(s): Heiko Hirschmueller , Raphael Schaller
autogenerated on Thu Aug 1 2024 02:55:56