-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVmMapControls.h
68 lines (60 loc) · 1.93 KB
/
VmMapControls.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* -*-c++-*-
* This file is part of vice-mapper.
*
* vice-mapper 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 3 of the License, or
* (at your option) any later version.
*
* vice-mapper 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 vice-mapper. If not, see <https://www.gnu.org/licenses/>.
*
* File: VmMapControls.h
* Date: Fri May 8 18:25:51 2020
* Author: pottendo (pottendo)
*
* Abstract:
* Controls widget
*
* Modifications:
* $Log$
*/
#ifndef __VmMapControls_h__
#define __VmMapControls_h__
#include <gtkmm/frame.h>
#include <gtkmm/button.h>
#include <gtkmm/togglebutton.h>
#include <gtkmm/adjustment.h>
#include "VmTile.h"
typedef enum { CZX, CZY, CRUP, CRDO, CRLE, CRRI } VmMapCtrlAdj;
class VmMapControls
{
VmMap &mw;
Gtk::Frame *cf;
Gtk::Box *unpl_tilesbox;
Gtk::Button *button_save;
// Gtk::Adjustment *adjx;
Glib::RefPtr<Gtk::Adjustment> adj[6];
Gtk::ToggleButton *zl;
bool zoom_lock;
public:
VmMapControls(VmMap &m);
~VmMapControls() {};
inline Gtk::Frame *get_widget(void) { return cf; }
inline Glib::RefPtr<Gtk::Adjustment> get_adj(VmMapCtrlAdj a) { return adj[a]; }
void add_tile(VmTile *tile);
void remove_tile(VmTile *t);
void set_dirty(bool d);
void commit_changes(void);
void set_zoom(double x, double y, bool dirty = true);
void set_crop(int u, int d, int l, int r, bool dirty = true);
void update_ctrls(void);
void toggle_zoom_lock(void);
inline bool get_zoom_lock(void) { return zoom_lock; }
};
#endif /* __VmMapControls_h__ */