zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 5973ff7d7f11949430e467ac7c7edc425b9a96c4
parent 2f58a5df60c7b47892b0f0e39b7ca3a20ca44421
Author: paulnasca <paulnasca>
Date:   Thu, 30 Sep 2004 18:50:53 +0000

*** empty log message ***

Diffstat:
MChangeLog | 1+
Msrc/Misc/Config.C | 6+++++-
Msrc/Misc/Config.h | 1+
Msrc/UI/MasterUI.fl | 35++++++++++++++++++++---------------
4 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -718,6 +718,7 @@ 28 Sep 2004 - Adaugata salvarea tuturor parametrilor in hostul VST (trebuie testat) - Adaugat installer pt. windows (cu NSIS) 29 Sep 2004 - Inceput sa scriu interfata utilizator pt. incepatori +30 Sep 2004 - Terminat de scris interfata utilizator pt. incepatori si se selecteaza la pornire modul dorit diff --git a/src/Misc/Config.C b/src/Misc/Config.C @@ -60,6 +60,8 @@ Config::Config(){ cfg.Interpolation=0; cfg.CheckPADsynth=1; + cfg.UserInterfaceMode=0; + winwavemax=1;winmidimax=1; //try to find out how many input midi devices are there #ifdef WINMIDIIN @@ -155,7 +157,6 @@ Config::Config(){ #endif }; - }; Config::~Config(){ @@ -207,6 +208,8 @@ void Config::readConfig(char *filename){ cfg.CheckPADsynth=xmlcfg->getpar("check_pad_synth",cfg.CheckPADsynth,0,1); + cfg.UserInterfaceMode=xmlcfg->getpar("user_interface_mode",cfg.UserInterfaceMode,0,2); + //get bankroot dirs for (int i=0;i<MAX_BANK_ROOT_DIRS;i++){ if (xmlcfg->enterbranch("BANKROOT",i)){ @@ -264,6 +267,7 @@ void Config::saveConfig(char *filename){ xmlcfg->addparstr("bank_current",cfg.currentBankDir); + xmlcfg->addpar("user_interface_mode",cfg.UserInterfaceMode); for (int i=0;i<MAX_BANK_ROOT_DIRS;i++) if (cfg.bankRootDirList[i]!=NULL) { xmlcfg->beginbranch("BANKROOT",i); xmlcfg->addparstr("bank_root",cfg.bankRootDirList[i]); diff --git a/src/Misc/Config.h b/src/Misc/Config.h @@ -42,6 +42,7 @@ class Config{ char *bankRootDirList[MAX_BANK_ROOT_DIRS],*currentBankDir; char *presetsDirList[MAX_BANK_ROOT_DIRS]; int CheckPADsynth; + int UserInterfaceMode; } cfg; int winwavemax,winmidimax;//number of wave/midi devices on Windows int maxstringsize; diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl @@ -367,10 +367,8 @@ panellistitemgroup->redraw();} {} decl {BankUI *bankui;} {} } -class MasterUI {open -} { - Function {make_window()} {open - } { +class MasterUI {} { + Function {make_window()} {} { Fl_Window masterwindow { label zynaddsubfx callback {\#ifdef VSTAUDIOOUT @@ -379,7 +377,7 @@ class MasterUI {open \#else if (fl_ask("Exit and leave the unsaved data?")) *exitprogram=1; \#endif} - xywh {555 26 390 465} type Double non_modal visible + xywh {353 127 390 465} type Double hide non_modal } { Fl_Menu_Bar mastermenu { xywh {-5 0 690 25} @@ -600,7 +598,8 @@ if (result!=0) fl_alert("Error: Could not save the file.");} masterwindow->hide(); refresh_master_ui(); simplemasterwindow->show(); -};} selected + config.cfg.UserInterfaceMode=2; +};} xywh {10 10 100 20} } } @@ -1037,7 +1036,8 @@ updatepanel();} Fl_Button {} { label Advanced callback {masterwindow->show(); -selectuiwindow->hide();} +selectuiwindow->hide(); +config.cfg.UserInterfaceMode=1;} xywh {10 165 100 35} box PLASTIC_UP_BOX color 229 labelfont 1 labelsize 20 } Fl_Box {} { @@ -1047,7 +1047,8 @@ selectuiwindow->hide();} Fl_Button {} { label Beginner callback {simplemasterwindow->show(); -selectuiwindow->hide();} +selectuiwindow->hide(); +config.cfg.UserInterfaceMode=2;} xywh {10 80 100 65} box PLASTIC_UP_BOX color 238 labelfont 1 labelsize 20 } Fl_Box {} { @@ -1152,7 +1153,8 @@ if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an simplemasterwindow->hide(); refresh_master_ui(); masterwindow->show(); -};} + config.cfg.UserInterfaceMode=1; +};} selected xywh {0 0 100 20} } } @@ -1585,10 +1587,14 @@ delete (sequi); delete(presetsui);} {} } Function {showUI()} {} { - code {if (true) selectuiwindow->show(); - - -//masterwindow->show();} {} + code {switch (config.cfg.UserInterfaceMode){ + case 0:selectuiwindow->show(); + break; + case 1:masterwindow->show(); + break; + case 2:simplemasterwindow->show(); + break; +};} {} } Function {simplerefresh()} {} { code {partenabled->value(master->part[npart]->Penabled); @@ -1667,8 +1673,7 @@ if (result<0) fl_alert("Error: Could not save the file."); updatepanel();} {} } - Function {refresh_master_ui()} {open - } { + Function {refresh_master_ui()} {} { code {ninseff=0; nsyseff=0; npart=0;