source: abuse/tags/pd/macabuse/imlib/include/tools.hpp @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
File size: 1.1 KB
Line 
1#ifndef __TOOLS_HPP_
2#define __TOOLS_HPP_
3
4#include "jwindow.hpp"
5#include "input.hpp"
6#include "specs.hpp"
7#include "scroller.hpp"
8#include "visobj.hpp"
9
10class tool_picker : public spicker
11{
12  filter *map;
13  visual_object **icons;
14  int *ids;
15  int total_icons;
16  int iw,ih;
17  palette *old_pal;
18
19  public :
20
21  // you are expected keep image and id list in memory, tool_picker does not copy them
22  tool_picker(int X, int Y, int ID,
23              int show_h, visual_object **Icons, int *Ids, int total_ic,
24              palette *icon_palette, palette *pal, window_manager *wm, ifield *Next);
25
26  virtual void draw_item(window_manager *wm, image *screen, int x, int y, int num, int active);
27  virtual int total() { return total_icons; }
28  virtual int item_width(window_manager *wm) { return iw; }
29  virtual int item_height(window_manager *wm) { return ih; }
30  virtual void note_new_current(window_manager *wm, image *screen, input_manager *inm, int x)
31  { wm->push_event(new event(ids[x],NULL)); }
32
33  void remap(palette *pal, window_manager *wm, image *screen);
34  ~tool_picker();
35} ;
36
37
38#endif
39
40
41
42
43
44
45
Note: See TracBrowser for help on using the repository browser.