Hi Nice to see you here, it would be great that if you can spare some of your time to help me go through this. I have trouble implementing multiple window application on Processing.
Basic Background: I am developing a software for brain-computer interface to get my graduation thesis done, I want to configure it like this.Fig1The purple area is the control panel. The gray area is the layout for the sub-window. If the users want to have a new sub-window, they click the Plot , Fig2 show up , and select the time series Plot( three ways for visualizing the brain signal as you can see), the control panel will generate a new subwindow to show the brain signal in the time domain. For the exact design for subwindow, it has plot and configuration droplist. Like this Fig 3 It has both the Plot component and the configuration component.
Based on information above
So I need a multiwindow display:
- The close of them did not affect the main control Bar(main window).
- I can customize the controllers(i.e drop-down list, button). to make it compatible with my UI style.
- I can use Grafica or other packages to help me with the plot stuff. And I can access them through t
Then I search online:
G4P can help me with1 definitely. For 3 there is a solution but not seem convenient if I have to manage multiple sub-windows.
So I want to make a new class extended from G4P so that I can manage each sub-window as a new object. pseudocode should be like
class MyClass extend Gwindow(){
Control P5
MyClass(pos_x,pos_y,w_width,w_height)
{
//initiate a series of relevant variable
}
viod setup(){}
void draw(){
//some globale variable about the plot.
}
void action_on_close(){
//delete variable about the plot.
}
}
Then in the main pde file it will be
void setup()
{
//some button;some droplists
}
ControlEvent(){
//define the behavior of the droplist
// if select the option timeseries plot
//create a new window by
MyClass timeseries = new MyClass(0,0,20,20);
}
In summary, I am looking for a way to make the view of the subwindow customizable while keep the good feature of the G4P( close the main window without closing the main thread) and My solution is to consider each type of subwindow(timeseries, FFT) as types of class so that I can put the controlP5 and Grafica component into these classes which will ease my development. But I did not find a way to extend the Gwindow object of G4P like pseudocode here.
it would be very nice of you if you can provide help or just leave some comments. Plus: I am also open to other ways to implement it(or another language).
Appreciate your time!