aboutsummaryrefslogtreecommitdiff
path: root/src/IntResMenuItem.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/IntResMenuItem.hh')
-rw-r--r--src/IntResMenuItem.hh44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/IntResMenuItem.hh b/src/IntResMenuItem.hh
new file mode 100644
index 0000000..6da3db9
--- /dev/null
+++ b/src/IntResMenuItem.hh
@@ -0,0 +1,44 @@
1// IntResMenuItem.hh for Fluxbox Window Manager
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: IntResMenuItem.hh,v 1.2 2003/05/18 21:59:14 fluxgen Exp $
23
24#ifndef INTRESMENUITEM_HH
25#define INTRESMENUITEM_HH
26
27#include "MenuItem.hh"
28#include "Resource.hh"
29
30/// Changes an resource integer value between min and max
31class IntResMenuItem: public FbTk::MenuItem {
32public:
33 IntResMenuItem(const char *label, FbTk::Resource<int> &res, int min_val, int max_val);
34
35 void click(int button, int time);
36
37private:
38 std::string m_org_label; ///< original label
39 const int m_max; ///< maximum value the integer can have
40 const int m_min; ///< minimum value the integer can have
41 FbTk::Resource<int> &m_res; ///< resource item to be changed
42};
43
44#endif // INTRESMENUITEM_HH