-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwin.h
117 lines (109 loc) · 5.08 KB
/
mainwin.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef MAINWIN_H
#define MAINWIN_H
#include "container.h"
#include "scoop.h"
#include "topping.h"
#include "serving.h"
#include "order.h"
#include "server.h"
#include "customer.h"
#include "emporium.h"
#include "dialogs.h"
#include <regex>
#include <gtkmm.h>
#include <string>
class Mainwin : public Gtk::Window {
public:
Mainwin();
virtual ~Mainwin();
protected:
void on_file_open_click(); // Open an Emporium file
void on_file_save_click(); // Save an Emporium file
void on_create_order_click(); // Create a new order
void on_create_item_click(); // Create a new item
void on_create_server_click(); // Create a new server
void on_create_customer_click(); // Create a new customer
void on_fill_order_click(); // Fill an order
void on_pay_for_order_click(); // Pay for an order
void on_cancel_order_click(); // Cancel an order
void on_all_click(); // Select all roles
void on_owner_click(); // Select owner role
void on_manager_click(); // Select manager role
void on_server_click(); // Select server role
void on_customer_click(); // Select customer role
void on_about_click(); // Display About dialog
void on_quit_click(); // Exit the program
void on_easteregg_click(); // TODO: For test only
void on_view_order_click();
void on_image_container_click();
void on_image_scoop_click();
void on_image_topping_click();
void on_create_manager_click();
void on_profitloss_report_click();
void on_inventory_report_click();
void on_server_report_click();
void on_edit_server_salary_click();
void on_edit_restock_click();
void on_order_report_click();
void on_customer_report_click();
void on_edit_flavor_click();
void on_edit_container_click();
void on_edit_topping_click();
void on_file_save_as_click();
void on_file_open_file_click();
void on_file_new_emporium_click();
void on_remove_item_click();
void on_file_suspend_server_click();
void on_file_restore_server_click();
private:
bool _suspend = false;
Gtk::MenuItem *menuitem_new;
Gtk::MenuItem *menuitem_open;
Gtk::MenuItem *menuitem_save;
Gtk::MenuItem *menuitem_easteregg;
Gtk::MenuItem *menuitem_quit;
Gtk::MenuItem *menuitem_order;
Gtk::MenuItem *menuitem_customer;
Gtk::MenuItem *menuitem_item;
Gtk::MenuItem *menuitem_server;
Gtk::MenuItem *menuitem_view_order; // view current order
Gtk::MenuItem *menuitem_fill_order;
Gtk::MenuItem *menuitem_pay_for_order;
Gtk::MenuItem *menuitem_cancel_order;
Gtk::MenuItem *menuitem_image_container; // add image container
Gtk::MenuItem *menuitem_image_scoop; // add image scoop
Gtk::MenuItem *menuitem_image_topping; // add image topping
Gtk::MenuItem *menuitem_manager; // add manager
Gtk::MenuItem *menuitem_profitloss_report;
Gtk::MenuItem *menuitem_inventory_report;
Gtk::MenuItem *menuitem_server_report;
Gtk::MenuItem *menuitem_edit_server_salary;
Gtk::MenuItem *menuitem_edit_restock;
Gtk::MenuItem *menuitem_order_report;
Gtk::MenuItem *menuitem_customer_report;
Gtk::MenuItem *menuitem_edit_flavor;
Gtk::MenuItem *menuitem_edit_container;
Gtk::MenuItem *menuitem_edit_topping;
Gtk::MenuItem *menuitem_save_as;
Gtk::MenuItem *menuitem_open_file;
Gtk::MenuItem *menuitem_remove_item;
Gtk::MenuItem *menuitem_suspend_server;
Gtk::ToolButton *new_emporium_button;
Gtk::ToolButton *create_order_button;
Gtk::ToolButton *create_item_button;
void create_order(); // Create a new order
Mice::Serving create_serving(); // Create a new serving
int select_container(); // Select a container index
int select_scoop(); // Select a scoop index
int select_topping(); // Select a container index
int select_customer(); // Select a customer index
int select_order(Mice::Order_state state); // Select an order index
int select_server(); // Select a server index
int select_from_vector
(std::vector<std::string> names,
std::string title); // Select from a list of strings
void on_create_person_click(std::string role); // Create a new person
Mice::Emporium* _emp; // Currently active emporium
std::vector<Mice::Emporium*> emporiums;
};
#endif