Graphics Reference
In-Depth Information
Fluid (FLTK
GUI Builder)
(C): Application Developer
can create GUI elements and
define their appearances.
Applicati
on
developer
Application
developer
would type in
(B): Area representing
the application window
(A): Interactively
placed GUI elements
GUI elements
GUI
l
(D): Control variable
t
(D): Application
developer types in this
code to service the X
velocity slider bar event.
Figure 2.1.
Fluid: FLTK's GUI builder.
Figure 2.1, we see that (D) the application developer has the option to type in
program fragments to define a control variable for and to service events generated
by the corresponding GUI element. In this case, we can see that the developer
must type in the program fragment for handling the x -velocity slider bar events.
This program fragment will be separated from the rest of the program source code
system and will be associated with Fluid (the GUI builder). At the conclusion of
the GUI layout design, the user can instruct Fluid to generate source code files
to be included with the rest of the application development environment. In this
way, some source code files are controlled and generated by the GUI builder, and
the application developer must invoke the GUI builder in order to update/maintain
the control variables and the event service routines. FLTK implements external
service linkage.
2.4.2
MFC—Resource Editor and Direct Code Modification
Figure 2.2 shows a screenshot of the MFC resource editor, MFC's GUI builder.
Similar to Fluid ( Figure 2.1 ) , in the middle of Figure 2.2, (A) we see that the
resource editor also supports interactive designing of the GUI element layout in
(B), an area representing the application window. Although the GUI builder in-
terfaces operate differently, we observe that in (C), the MFC resource editor also
supports the definition/modification of the physical appearance of GUI elements.
However, unlike Fluid, the MFC resource editor is tightly integrated with the rest
of the development environment. In this case, a developer can register event ser-
vices by inheriting or overriding appropriate service routines. The MFC resource
editor automatically inserts code fragments into the application source code sys-
tem.
To support this functionality, the application source code organization is
 
Search WWH ::




Custom Search