1 //------------------------------------------------------------------------ 2 // DEFAULT PROPERTIES 3 //------------------------------------------------------------------------ 4 // 5 // Eureka DOOM Editor 6 // 7 // Copyright (C) 2007-2016 Andrew Apted 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 //------------------------------------------------------------------------ 20 21 #ifndef __EUREKA_UI_DEFAULT_H__ 22 #define __EUREKA_UI_DEFAULT_H__ 23 24 25 class UI_DefaultProps : public Fl_Group 26 { 27 private: 28 UI_Pic *w_pic; 29 UI_DynInput *w_tex; 30 31 Fl_Int_Input *ceil_h; 32 Fl_Int_Input *light; 33 Fl_Int_Input *floor_h; 34 35 Fl_Button *ce_down, *ce_up; 36 Fl_Button *fl_down, *fl_up; 37 38 UI_Pic *c_pic; 39 UI_DynInput *c_tex; 40 41 UI_Pic *f_pic; 42 UI_DynInput *f_tex; 43 44 UI_DynInput *thing; 45 Fl_Output *th_desc; 46 UI_Pic *th_sprite; 47 48 public: 49 UI_DefaultProps(int X, int Y, int W, int H); 50 virtual ~UI_DefaultProps(); 51 52 // see ui_window.h for description of these two methods 53 bool ClipboardOp(char op); 54 void BrowsedItem(char kind, int number, const char *name, int e_state); 55 56 void UnselectPics(); 57 58 void LoadValues(); 59 60 private: 61 void SetIntVal(Fl_Int_Input *w, int value); 62 void UpdateThingDesc(); 63 void SetThing(int number); 64 65 void CB_Copy (int sel_pics); 66 void CB_Paste (int sel_pics); 67 void CB_Delete(int sel_pics); 68 69 static const char * Normalize_and_Dup(UI_DynInput *w); 70 71 private: 72 static void hide_callback(Fl_Widget *w, void *data); 73 static void tex_callback(Fl_Widget *w, void *data); 74 static void dyntex_callback(Fl_Widget *w, void *data); 75 static void flat_callback(Fl_Widget *w, void *data); 76 static void button_callback(Fl_Widget *w, void *data); 77 static void height_callback(Fl_Widget *w, void *data); 78 79 static void thing_callback(Fl_Widget *w, void *data); 80 static void dynthing_callback(Fl_Widget *w, void *data); 81 }; 82 83 84 bool Props_ParseUser(const char ** tokens, int num_tok); 85 void Props_WriteUser(FILE *fp); 86 void Props_LoadValues(); 87 88 #endif /* __EUREKA_UI_DEFAULT_H__ */ 89 90 //--- editor settings --- 91 // vi:ts=4:sw=4:noexpandtab 92