2012-08-06 16:00:25 +04:00
|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Sanel Zukan
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2009-10-03 11:33:08 +04:00
|
|
|
#ifndef __TASKBUTTON_H__
|
|
|
|
#define __TASKBUTTON_H__
|
|
|
|
|
|
|
|
#include <FL/Fl_Button.H>
|
|
|
|
#include <FL/x.H>
|
|
|
|
|
|
|
|
class TaskButton : public Fl_Button {
|
|
|
|
private:
|
|
|
|
/* window ID this button handles */
|
2012-04-19 16:49:30 +04:00
|
|
|
Window xid;
|
|
|
|
bool image_alloc;
|
|
|
|
Atom net_wm_icon;
|
|
|
|
|
|
|
|
void clear_image(void);
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
TaskButton(int X, int Y, int W, int H, const char *l = 0);
|
2012-04-19 16:49:30 +04:00
|
|
|
~TaskButton();
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
void draw(void);
|
|
|
|
void display_menu(void);
|
|
|
|
|
|
|
|
void set_window_xid(Window win) { xid = win; }
|
|
|
|
Window get_window_xid(void) { return xid; }
|
|
|
|
|
|
|
|
void update_title_from_xid(void);
|
2010-03-09 01:44:32 +03:00
|
|
|
void update_image_from_xid(void);
|
2009-10-03 11:33:08 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|