1 /*
2   FXiTe - The Free eXtensIble Text Editor
3   Copyright (c) 2009-2012 Jeffrey Pohlmeyer <yetanothergeek@gmail.com>
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of the GNU General Public License version 3 as
7   published by the Free Software Foundation.
8 
9   This software is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18 
19 
20 
21 #ifndef TOOLBAR_H
22 #define TOOLBAR_H
23 
24 class TopWindow;
25 
26 // This thing behaves something like an FXHorizontalFrame that can "wrap" its contents across two rows.
27 class ToolBarFrame: public FXVerticalFrame {
28 private:
29   FXDECLARE(ToolBarFrame);
ToolBarFrame()30   ToolBarFrame(){}
31   FXHorizontalFrame*rows[2];
32   bool wraptoolbar;
33   FXFont*toolbar_font;
34   static void SetTBarBtnColorCB(FXButton*btn, void*user_data);
35   static void SetTBarBtnFontCB(FXButton*btn, void*user_data);
36   static void NullifyButtonDataCB(FXButton*btn, void*user_data);
37   static void ClearTBarBtnDataCB(FXButton*btn, void*user_data);
38   static void EnableFilterBtnCB(FXButton*btn, void*user_data);
39   void ForEachToolbarButton(void (*cb)(FXButton*btn, void*user_data), void*user_data);
40   void reconf();
41   void normalize();
42 public:
43   long onConfigure(FXObject*o,FXSelector sel,void*p);
44   void NullifyButtonData(void*user_data);
45   void SetToolbarColors();
46   void SetTBarFont();
47   void EnableFilterBtn(bool enabled);
48   void CreateButtons(TopWindow*tw);
49   virtual void show();
50   virtual void hide();
51   virtual void create();
52   ToolBarFrame(FXComposite *o);
53   ~ToolBarFrame();
54 };
55 
56 
57 #endif
58 
59