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 __TASKBAR_H__
|
|
|
|
#define __TASKBAR_H__
|
|
|
|
|
|
|
|
#include <FL/Fl_Group.H>
|
2012-05-28 14:57:50 +04:00
|
|
|
#include "Applet.h"
|
2009-10-03 11:33:08 +04:00
|
|
|
|
2013-01-04 17:05:42 +04:00
|
|
|
/* if button should be on visible on all workspaces */
|
|
|
|
#define ALL_WORKSPACES -1
|
|
|
|
|
2009-10-03 11:33:08 +04:00
|
|
|
class TaskButton;
|
|
|
|
|
2012-05-30 14:23:27 +04:00
|
|
|
class Taskbar : public Fl_Group {
|
2009-10-03 11:33:08 +04:00
|
|
|
public:
|
|
|
|
TaskButton *curr_active, *prev_active;
|
2013-01-04 17:05:42 +04:00
|
|
|
bool fixed_layout; /* fixed or streched layout of buttons */
|
|
|
|
bool ignore_workspace_value; /* should all windows be shown ignoring workspace value */
|
|
|
|
|
|
|
|
int current_workspace;
|
|
|
|
|
|
|
|
bool visible_on_current_workspace(int ws) {
|
|
|
|
return ignore_workspace_value || (ws == ALL_WORKSPACES) || (ws == current_workspace);
|
|
|
|
}
|
|
|
|
|
2009-10-03 11:33:08 +04:00
|
|
|
public:
|
|
|
|
Taskbar();
|
|
|
|
~Taskbar();
|
|
|
|
|
2012-12-17 19:49:33 +04:00
|
|
|
void update_task_buttons(void);
|
2012-12-20 04:58:30 +04:00
|
|
|
void update_workspace_change(void);
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
void resize(int X, int Y, int W, int H);
|
|
|
|
void layout_children(void);
|
|
|
|
|
2012-12-17 19:49:33 +04:00
|
|
|
void update_active_button(bool do_redraw = true, int xid = -1);
|
2009-10-03 11:33:08 +04:00
|
|
|
void activate_window(TaskButton *b);
|
|
|
|
void update_child_title(Window xid);
|
2010-03-10 02:38:57 +03:00
|
|
|
void update_child_icon(Window xid);
|
2013-01-04 17:05:42 +04:00
|
|
|
void update_child_workspace(Window xid);
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
void panel_redraw(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|