File: objbutton.h

package info (click to toggle)
icewm 1.3.8%2Bmod%2B20161220-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 7,160 kB
  • ctags: 5,575
  • sloc: cpp: 48,848; ansic: 1,813; makefile: 1,129; sh: 339; xml: 48
file content (39 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __OBJBUTTON_H
#define __OBJBUTTON_H

#include "ybutton.h"
#include "ymenu.h"

class Program;

class ObjectButton: public YButton {
public:
    ObjectButton(YWindow *parent, DObject *object): 
        YButton(parent, 0), fObject(object) {}
    ObjectButton(YWindow *parent, YMenu *popup):
        YButton(parent, 0, popup), fObject(NULL) {}
    ObjectButton(YWindow *parent, YAction *action):
        YButton(parent, action, 0), fObject(NULL) { /* hack */ }

    virtual ~ObjectButton() {}

    virtual void actionPerformed(YAction *action, unsigned int modifiers);
    virtual ref<YFont> getFont();
    virtual YColor * getColor();
    virtual YSurface getSurface();

private:
    DObject *fObject;

    static ref<YFont> font;
    static YColor *bgColor;
    static YColor *fgColor;
};

extern ref<YPixmap> toolbuttonPixmap;

#ifdef CONFIG_GRADIENTS
extern ref<YImage> toolbuttonPixbuf;
#endif

#endif