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
|
#ifndef gui_extend_edit_h
#define gui_extend_edit_h
#include "gui_frame.h"
#include "gui_container.h"
#include "components/gui_textinput.h"
#include "components/gui_scrolled_list.h"
#include "components/gui_scrollpane.h"
#include "components/gui_tab_panel.h"
#include "components/gui_divider.h"
#include "components/gui_button.h"
#include "components/gui_image.h"
#include "components/gui_fixedwidth_textarea.h"
#include "gui_convoiinfo.h"
#include "../utils/cbuffer_t.h"
#include "../simtypes.h"
class karte_t;
class spieler_t;
#define COLUMN_WIDTH (int)(D_BUTTON_WIDTH*2.25)
#define SCL_HEIGHT (15*LINESPACE-1)
#define LINE_NAME_COLUMN_WIDTH (int)((D_BUTTON_WIDTH*2.25)+11)
#define N_BUTTON_WIDTH (int)(D_BUTTON_WIDTH*1.5)
#define MARGIN (10)
/**
* Window.
* Will display list of schedules.
* Contains buttons: edit new remove
* Resizable.
*
* @author Niels Roest
* @author hsiegeln: major redesign
*/
class extend_edit_gui_t :
public gui_frame_t,
public action_listener_t
{
private:
sint16 tab_panel_width;
protected:
spieler_t *sp;
karte_t* welt;
cbuffer_t buf;
gui_fixedwidth_textarea_t info_text;
gui_container_t cont;
gui_scrollpane_t scrolly;
gui_scrolled_list_t scl;
gui_tab_panel_t tabs;
//image
gui_image_t img[4];
button_t bt_obsolete, bt_timeline, bt_climates;
sint16 offset_of_comp;
sint16 get_tab_panel_width() const { return tab_panel_width; }
bool is_show_trans_name;
void resize(const koord delta);
virtual void fill_list( bool /* translate */ ) {}
virtual void change_item_info( sint32 /*entry, -1= none */ ) {}
public:
extend_edit_gui_t(const char *name, spieler_t* sp, karte_t* welt);
/**
* Does this window need a min size button in the title bar?
* @return true if such a button is needed
* @author Hj. Malthaner
*/
bool has_min_sizer() const {return true;}
bool infowin_event(event_t const*) OVERRIDE;
bool action_triggered(gui_action_creator_t*, value_t) OVERRIDE;
};
#endif
|