~israeldahl/jwm-settings-manager/trunk

« back to all changes in this revision

Viewing changes to fltk/jwm-window.cxx

  • Committer: Israel Dahl
  • Date: 2014-07-06 02:48:28 UTC
  • Revision ID: israeldahl@gmail.com-20140706024828-1bt17riyy2ep06bt
actually added the themes, buttons, etc...
* Alpha Version update
 * Desktop
 - Added Rox checkers, and getters and setters, but haven't finished/enabled it
 - Finished gradient support
 - finished Single color support
 - moved the image setting code to flDesktop(h/cpp)
 * Window
 - fixed Window icon code to reliably open the directory containing icons
 - added 'BoxShaped' window buttons

Show diffs side-by-side

added added

removed removed

Lines of Context:
889
889
  ((WindowUI*)(o->parent()->parent()->parent()->user_data()))->cb_inactive_o_slider_v_i(o,v);
890
890
}
891
891
 
892
 
void WindowUI::cb_Close_i(Fl_Button*, void*) {
 
892
void WindowUI::cb_Close_i(Fl_Button* o, void*) {
893
893
  flWindow w;w.loadTemp();
894
 
std::string dir = "themes";
895
 
std::string home = w.homePath(dir);
896
 
const char * f = home.c_str();
897
 
const char * m="Choose a Button";
898
 
const char *p="*.{xbm,XBM}";
 
894
std::string label = "Choose ";
 
895
label += o->label();
 
896
std::string tempPath = w.buttonPath();
 
897
const char *path = tempPath.c_str();
 
898
const char * f = path;
 
899
const char * m=label.c_str();
 
900
const char * p="*.{xbm,XBM}";
899
901
int r = 0;
900
902
char *result = fl_file_chooser(m,p,f,r);
901
903
if(result!=NULL){w.setButton(result,"ButtonClose");};
904
906
  ((WindowUI*)(o->parent()->parent()->parent()->user_data()))->cb_Close_i(o,v);
905
907
}
906
908
 
907
 
void WindowUI::cb_Maximize_i(Fl_Button*, void*) {
 
909
void WindowUI::cb_Maximize_i(Fl_Button* o, void*) {
908
910
  flWindow w;w.loadTemp();
909
 
std::string dir = "themes";
910
 
std::string home = w.homePath(dir);
911
 
const char * f = home.c_str();
912
 
const char * m="Choose a Button";
913
 
const char *p="*.{xbm,XBM}";
 
911
std::string label = "Choose ";
 
912
label += o->label();
 
913
std::string tempPath = w.buttonPath();
 
914
const char *path = tempPath.c_str();
 
915
const char * f = path;
 
916
const char * m=label.c_str();
 
917
const char * p="*.{xbm,XBM}";
914
918
int r = 0;
915
919
char *result = fl_file_chooser(m,p,f,r);
916
920
if(result!=NULL){w.setButton(result,"ButtonMax");};
919
923
  ((WindowUI*)(o->parent()->parent()->parent()->user_data()))->cb_Maximize_i(o,v);
920
924
}
921
925
 
922
 
void WindowUI::cb_Maximize1_i(Fl_Button*, void*) {
 
926
void WindowUI::cb_Maximize1_i(Fl_Button* o, void*) {
923
927
  flWindow w;w.loadTemp();
924
 
std::string dir = "themes";
925
 
std::string home = w.homePath(dir);
926
 
const char * f = home.c_str();
927
 
const char * m="Choose a Button";
928
 
const char *p="*.{xbm,XBM}";
 
928
std::string label = "Choose ";
 
929
label += o->label();
 
930
std::string tempPath = w.buttonPath();
 
931
const char *path = tempPath.c_str();
 
932
const char * f = path;
 
933
const char * m=label.c_str();
 
934
const char * p="*.{xbm,XBM}";
929
935
int r = 0;
930
936
char *result = fl_file_chooser(m,p,f,r);
931
937
if(result!=NULL){w.setButton(result,"ButtonMaxActive");};
934
940
  ((WindowUI*)(o->parent()->parent()->parent()->user_data()))->cb_Maximize1_i(o,v);
935
941
}
936
942
 
937
 
void WindowUI::cb_Minimize_i(Fl_Button*, void*) {
 
943
void WindowUI::cb_Minimize_i(Fl_Button* o, void*) {
938
944
  flWindow w;w.loadTemp();
939
 
std::string dir = "themes";
940
 
std::string home = w.homePath(dir);
941
 
const char * f = home.c_str();
942
 
const char * m="Choose a Button";
943
 
const char *p="*.{xbm,XBM}";
 
945
std::string label = "Choose ";
 
946
label += o->label();
 
947
std::string tempPath = w.buttonPath();
 
948
const char *path = tempPath.c_str();
 
949
const char * f = path;
 
950
const char * m=label.c_str();
 
951
const char * p="*.{xbm,XBM}";
944
952
int r = 0;
945
953
char *result = fl_file_chooser(m,p,f,r);
946
954
if(result!=NULL){w.setButton(result,"ButtonMin");};