|
-
February 4th, 2012, 01:18 PM
#3
Re: connecting GUI to program
 Originally Posted by VictorN
No. In the most of cases it is NOT reasonable.
BTW, on and for what platform are you going to develop your GUI?
I'm using clutter as the basis.
http://www.clutter-project.org/
Here is an example of what I am talking about. This is just the GUI portion so far of what happens when the Go Back button is clicked. The actors are all inside a single container, the stage, which is basically your window.
Code:
void GoBack_Clicked (ClutterClickAction *action, ClutterActor *actor, gpointer user_data) {
for (int i=0; i < 18; ++i)
clutter_actor_hide (Actor_Notes_Text[i]);
SomethingHasBeen_Selected=false;
clutter_actor_set_size (Actor_Title, 600, 110);
clutter_actor_show (Actor_NewProject);
clutter_actor_show (Actor_LoadProject);
clutter_actor_show (Actor_DeleteProject);
clutter_actor_show (Actor_About);
clutter_actor_hide (Actor_Text);
clutter_actor_hide (Actor_Text_Box);
clutter_actor_hide (Actor_Enter);
clutter_actor_hide (Actor_Project_Title_Text);
clutter_actor_hide (Actor_Blank_Screen);
clutter_actor_hide (Actor_Line);
clutter_actor_hide (Actor_Line2);
clutter_actor_hide (Actor_Line3);
clutter_actor_hide (Actor_Line4);
clutter_actor_hide (Actor_Run);
clutter_actor_hide (Actor_Settings);
clutter_actor_hide (Actor_Files);
clutter_actor_hide (Actor_Results);
clutter_actor_hide (Actor_Exit);
clutter_actor_hide (Actor_ProjectTitle);
clutter_actor_hide (Actor_Notes);
clutter_actor_hide (Actor_Help);
clutter_actor_hide (Actor_Stop);
clutter_actor_hide (Actor_PlayPause);
clutter_actor_hide (Actor_PlayPauseAll);
clutter_actor_hide (Actor_Add);
clutter_actor_hide (Actor_AddAll);
clutter_actor_hide (Actor_Remove);
clutter_actor_hide (Actor_RemoveAll);
clutter_actor_hide (Actor_Info);
clutter_actor_hide (Actor_Blank);
clutter_actor_hide (Actor_Line5);
clutter_timeline_stop (TimeLine_Run);
clutter_actor_set_z_rotation_from_gravity (Actor_Run, 0.0, CLUTTER_GRAVITY_CENTER);
clutter_timeline_stop (TimeLine_Settings);
clutter_actor_set_z_rotation_from_gravity (Actor_Settings, 0.0, CLUTTER_GRAVITY_CENTER);
clutter_timeline_stop (TimeLine_Files);
clutter_actor_set_z_rotation_from_gravity (Actor_Files, 0.0, CLUTTER_GRAVITY_CENTER);
clutter_timeline_stop (TimeLine_Results);
clutter_actor_set_z_rotation_from_gravity (Actor_Results, 0.0, CLUTTER_GRAVITY_CENTER);
clutter_desaturate_effect_set_factor(CLUTTER_DESATURATE_EFFECT(DSRun), Saturation);
clutter_desaturate_effect_set_factor(CLUTTER_DESATURATE_EFFECT(DSSettings), Saturation);
clutter_desaturate_effect_set_factor(CLUTTER_DESATURATE_EFFECT(DSResults), Saturation);
clutter_desaturate_effect_set_factor(CLUTTER_DESATURATE_EFFECT(DSFiles), Saturation);
}
Last edited by wl3; February 4th, 2012 at 01:21 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|