~ubuntu-branches/ubuntu/raring/lmms/raring-proposed

« back to all changes in this revision

Viewing changes to plugins/zynaddsubfx/fltk/FL/Fl_Tree_Item.H

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl_Tree_Item.H 6957 2009-12-08 08:39:31Z greg.ercolano $"
 
2
// "$Id: Fl_Tree_Item.H 8340 2011-01-30 20:22:06Z greg.ercolano $"
3
3
//
4
4
 
5
5
#ifndef FL_TREE_ITEM_H
18
18
//////////////////////
19
19
//
20
20
// Fl_Tree -- This file is part of the Fl_Tree widget for FLTK
21
 
// Copyright (C) 2009 by Greg Ercolano.
 
21
// Copyright (C) 2009-2010 by Greg Ercolano.
22
22
//
23
23
// This library is free software; you can redistribute it and/or
24
24
// modify it under the terms of the GNU Library General Public
56
56
/// When you make changes to items, you'll need to tell the tree to redraw()
57
57
/// for the changes to show up.
58
58
///
59
 
class Fl_Tree_Item {
 
59
class FL_EXPORT Fl_Tree_Item {
60
60
  const char             *_label;               // label (memory managed)
61
 
  int                     _labelfont;           // label's font face
62
 
  int                     _labelsize;           // label's font size
 
61
  Fl_Font                 _labelfont;           // label's font face
 
62
  Fl_Fontsize             _labelsize;           // label's font size
63
63
  Fl_Color                _labelfgcolor;        // label's fg color
64
64
  Fl_Color                _labelbgcolor;        // label's bg color
65
65
  char                    _open;                // item is open?
83
83
  Fl_Tree_Item(const Fl_Tree_Prefs &prefs);     // CTOR
84
84
  ~Fl_Tree_Item();                              // DTOR
85
85
  Fl_Tree_Item(const Fl_Tree_Item *o);          // COPY CTOR
86
 
  void draw(int X, int &Y, int W, Fl_Widget *tree, const Fl_Tree_Prefs &prefs, int lastchild=1);
 
86
  int x() const { return(_xywh[0]); }
 
87
  int y() const { return(_xywh[1]); }
 
88
  int w() const { return(_xywh[2]); }
 
89
  int h() const { return(_xywh[3]); }
 
90
  void draw(int X, int &Y, int W, Fl_Widget *tree, Fl_Tree_Item *itemfocus, const Fl_Tree_Prefs &prefs, int lastchild=1);
87
91
  void show_self(const char *indent = "") const;
88
92
  void label(const char *val);
89
93
  const char *label() const;
95
99
  inline void* user_data() const { return _userdata; }
96
100
  
97
101
  /// Set item's label font face.
98
 
  void labelfont(int val) {
 
102
  void labelfont(Fl_Font val) {
99
103
    _labelfont = val; 
100
104
  }
101
105
  /// Get item's label font face.
102
 
  int labelfont() const {
 
106
  Fl_Font labelfont() const {
103
107
    return(_labelfont);
104
108
  }
105
109
  /// Set item's label font size.
106
 
  void labelsize(int val) {
 
110
  void labelsize(Fl_Fontsize val) {
107
111
    _labelsize = val; 
108
112
  }
109
113
  /// Get item's label font size.
110
 
  int labelsize() const {
 
114
  Fl_Fontsize labelsize() const {
111
115
    return(_labelsize);
112
116
  }
113
117
  /// Set item's label foreground text color.
163
167
  void clear_children();
164
168
  void swap_children(int ax, int bx);
165
169
  int swap_children(Fl_Tree_Item *a, Fl_Tree_Item *b);
166
 
  const Fl_Tree_Item *find_item(char **arr) const;
167
 
  Fl_Tree_Item *find_item(char **arr);
 
170
  const Fl_Tree_Item *find_child_item(char **arr) const;        // const
 
171
        Fl_Tree_Item *find_child_item(char **arr);              // non-const
 
172
  const Fl_Tree_Item *find_item(char **arr) const;              // const
 
173
        Fl_Tree_Item *find_item(char **arr);                    // non-const
168
174
  //////////////////
169
175
  // Adding items
170
176
  //////////////////
175
181
  int depth() const;
176
182
  Fl_Tree_Item *prev();
177
183
  Fl_Tree_Item *next();
 
184
  Fl_Tree_Item *next_sibling();
 
185
  Fl_Tree_Item *prev_sibling();
 
186
  Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs);
 
187
  Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs);
178
188
  
179
 
  /// Return the parent for this item.
 
189
  /// Return the parent for this item. Returns NULL if we are the root.
180
190
  Fl_Tree_Item *parent() {
181
191
    return(_parent);
182
192
  }
183
 
  /// Return the const parent for this item.
 
193
  /// Return the const parent for this item. Returns NULL if we are the root.
184
194
  const Fl_Tree_Item *parent() const {
185
195
    return(_parent);
186
196
  }
293
303
  char is_active() const {
294
304
    return(_active);
295
305
  }
 
306
  /// See if the item is visible.
 
307
  int visible() const {
 
308
    return(_visible ? 1 : 0);
 
309
  }
 
310
  int visible_r() const;
 
311
 
296
312
  /// Set the user icon's image. '0' will disable.
297
313
  void usericon(Fl_Image *val) {
298
314
    _usericon = val;
317
333
#endif /*FL_TREE_ITEM_H*/
318
334
 
319
335
//
320
 
// End of "$Id: Fl_Tree_Item.H 6957 2009-12-08 08:39:31Z greg.ercolano $".
 
336
// End of "$Id: Fl_Tree_Item.H 8340 2011-01-30 20:22:06Z greg.ercolano $".
321
337
//