~ubuntu-branches/ubuntu/wily/flrig/wily

« back to all changes in this revision

Viewing changes to .pc/0001-License-Declaration.patch/src/include/combo.h

  • Committer: Package Import Robot
  • Author(s): Kamal Mostafa
  • Date: 2014-10-25 11:17:10 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20141025111710-n32skgya3l9u1brw
Tags: 1.3.17-1
* New upstream release (Closes: #761839)
* Debian Standards-Version: 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*-C++-*-
2
 
 
3
 
   "$Id: Fl_Combobox.H,v 1.4 2000/02/13 04:43:56 dhfreese Exp $"
4
 
   
5
 
   Copyright 1999-2010 by the Dave Freese.
6
 
   
7
 
   This library is free software; you can redistribute it and/or
8
 
   modify it under the terms of the GNU Library General Public
9
 
   License as published by the Free Software Foundation; either
10
 
   version 2 of the License, or (at your option) any later version.
11
 
   
12
 
   This library is distributed in the hope that it will be useful,
13
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
   Library General Public License for more details.
16
 
   
17
 
   You should have received a copy of the GNU Library General Public
18
 
   License along with this library; if not, write to the Free Software
19
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
 
   USA.
21
 
   
22
 
   Please report all bugs and problems to "flek-devel@sourceforge.net".
23
 
 
24
 
*/
25
 
 
26
 
#ifndef _FL_COMBOBOX_H
27
 
#define _FL_COMBOBOX_H
28
 
 
29
 
#include <FL/Fl_Window.H>
30
 
#include <FL/Fl_Group.H>
31
 
#include <FL/Fl_Button.H>
32
 
#include <FL/Fl_Select_Browser.H>
33
 
#include <FL/Fl_Input.H>
34
 
 
35
 
#define FL_COMBO_UNIQUE 1
36
 
#define FL_COMBO_UNIQUE_NOCASE 2
37
 
#define FL_COMBO_LIST_INCR 100
38
 
 
39
 
class Fl_ComboBox;
40
 
 
41
 
struct datambr {
42
 
  char *s;
43
 
  void *d;
44
 
};
45
 
 
46
 
struct retvals {
47
 
  Fl_Input *Inp;
48
 
  void   * retval;
49
 
  int     * idx;};
50
 
 
51
 
class Fl_PopBrowser : public Fl_Window {
52
 
 
53
 
  friend void popbrwsr_cb(Fl_Widget *, long);
54
 
 
55
 
  protected:
56
 
        Fl_Select_Browser *popbrwsr;
57
 
        retvals  Rvals;
58
 
        int hRow;
59
 
        int wRow;
60
 
  public: 
61
 
        Fl_PopBrowser (int x, int y, int w, int h, retvals R);
62
 
        ~Fl_PopBrowser ();
63
 
        void popshow (int, int);
64
 
        void pophide ();
65
 
        void popbrwsr_cb_i (Fl_Widget *, long);
66
 
 
67
 
        void add (char *s, void *d = 0);
68
 
        void clear ();
69
 
        void sort ();
70
 
        int  handle (int);
71
 
 
72
 
        Fl_ComboBox *parent;
73
 
 
74
 
};
75
 
 
76
 
class Fl_ComboBox : public Fl_Group  {
77
 
  friend int DataCompare (const void *, const void *);
78
 
  friend class Fl_PopBrowser;
79
 
  
80
 
  protected:
81
 
        Fl_Button               *Btn;
82
 
        Fl_Input                *Output;
83
 
        Fl_PopBrowser   *Brwsr;
84
 
        datambr                 **datalist;
85
 
        int                             listsize;
86
 
        int                             maxsize;
87
 
        int                             listtype;
88
 
        int                             numrows_;
89
 
 
90
 
  private:
91
 
        int                             width;
92
 
        int                             height;
93
 
        void                    *retdata;
94
 
        int                             idx;
95
 
        retvals                 R;
96
 
        Fl_Color _color;
97
 
 
98
 
  public:
99
 
 
100
 
        Fl_ComboBox (int x, int y, int w, int h, const char * = 0);
101
 
        ~Fl_ComboBox();
102
 
        
103
 
        const char *value ();
104
 
        void value (const char *);
105
 
        void put_value( const char *);
106
 
        void fl_popbrwsr(Fl_Widget *);
107
 
 
108
 
        void type (int = 0);
109
 
        void add (const char *s, void *d = 0);
110
 
        void clear ();
111
 
        void sort ();
112
 
        int  index ();
113
 
        void index (int i);
114
 
        void *data ();
115
 
        void textfont (int);
116
 
        void textsize (uchar);
117
 
        void textcolor (Fl_Color c);
118
 
        void color (Fl_Color c);
119
 
        void readonly();
120
 
        int  numrows() { return numrows_; }
121
 
        void numrows(int n) { numrows_ = n; }
122
 
        int  lsize() { return listsize; }
123
 
 
124
 
};
125
 
 
126
 
 
127
 
#endif