gbVisualDesigner
gbVisualDesigner is a comprehensive programmers IDE whose customizable
user interface integrates a mouse-based visual designer, 5 source code editors, 4 source
code libraries, 27 source code analysis reports and 7 different reference sources to provide unmatched
information and IDE options at the fingertips of a programmer!
To create an application, a user simply draws the application controls using a mouse. gbVisualDesigner
can then generate the corresponding code and compile it into a working application. Both DDT and SDK
code may be generated. The generated source code may also be passed to a user-specified IDE
(such as the PowerBASIC IDE).
Multiple files may be opened simultaneously in gbVisualDesigner. The name of each opened file
is shown in a file TAB just above the layout area. Projects are supported as well, where a
project file is simply a list of supported file types (*.bas, *.inc and *.lay).
gbVisualDesigner emphasizes placing as much information at the fingertips of the programmer
as possible. To that end, 4 different libraries of information are available - a snippets library
of almost 1500 compilable source code examples and reference materials, a local procedures library
that contains all procedures found on the users's PC, a library of all 50K+ PowerBASIC forum
threads and a Quick Procedure library for inserting simple functions into source code listings.
gbVisualDesigner provides 5 integrated source code editors, each with very powerful
Intellisense editing features. There is a source code editor for each opened file,
one for the snippets library and one for the local procedures library. There's also an independent
scratch pad editor and there is one additional editor in which the various source code analysis
reports may be viewed and edited.
Additionally, a total about 27 source code analysis reports (such as Call Trees, Sorted Procedure
Listing, etc.) are available and may be generated against source code found in any of the source code
editors.
For programmers who want to provide their own source code generation, source code formatting,
custom source code analysis reports and pre-processor code modification capabilities,
gbVisualDesigner allows the use of user-supplied DLLs that replace the built-in capabilities.
Download (beta56, 13M)
The following screenshot shows gbVisualDesigner, with just a few controls in the layout area.
Key Features List
gbVisualDesigner provides powerful, yet easy-to-use features for creating single-dialog
applications. Key features include:
- Design a PowerBASIC application using only a mouse
- Automatic source code generation from the visual layout
- DDT and SDK source code output
- 5 Built-in source code editors with Intellisense-like features
- Open source code in PowerBASIC IDE
- Compile and execute source code
- Open multiple files at one time, including Project support
- 4 Libraries: source code snippets, local procedures listing, forum threads and Quick procedures
- 27+ Source Code analysis reports
- External, user-supplied DLLs can be used to replace internal features
- Fully customizable user interface
Another very useful feature of gbVisualDesigner is its extremely customizable
user interface, which allows the user to specify which information to display.
Table of Contents
Beta Status
These areas are incomplete, or have issues that I'm working as the highest priority:
- SDK Code Generation
- Source Code Editor Performance
- Control Property Dialogs
I'm not working on these are as part of the initial release, but they
are significant improvements which I will work in later releases
- Save User Code on Build
- Online Update Strategy
- DPI Awareness
- Unlimited Controls per Dialog
- VB6 Clone
And these are simple changes/updates I've thought of that I'll want to make in near-term relesaes:
- Open a saved session at last selected Open file
- Resolve persistent graphics problem with 2 graphic reports
- Flow Diagram report
- Allow Open or Drop of more than 1 file
- Register supported file extensions
- Gray out menus which are not available
- Better manage auto-rebuild of reports that take a while to create
- Permanent source code bookmarks
- Toolbars for threads and local procedure libraries
- Enhanced context menus, particularly for reports
- Recognize FastProc/Macro in various reportss
- Provide search for App Notes
- Sort Call Tree by quantity
- Display actual toolbar icons in Layout area
- Display actual dialog NC in Layout area
OverView
gbVisualDesigner provide a wide array of features, including many options not usually
associated with a simple IDE or visual designer. Its feature set and interface design can be
summarized as in the following image:
Across the top is the main toolbar. It handles opening/closing files and manages the code generation,
compile/run actions and various settings options. A second toolbar, from which controls are selected
fro drawing into the layout area, may also be displayed.
On the top left is a listing of the content of the currently selected library. Below that is
displayed the results of searches against the library. Each of the library GUI elements can
be independently selected for display.
In the top right of the dialog is the visual designer - an area where the user uses a mouse to
draw controls that go into the application. A wide variety of options are provided for modifying
the controls (select, resize, delete, ...). Popup dialogs for editing control properties are
available in this area by simply double-clicking on a control.
At the bottom/right of the dialog is a secondary toolbar through which the 5 source code editors are
accessed, as well as PowerBASIC forum threads, the 25+ source code analysis reports, 7 reference
resources and application notes.
Using gbVisualDesigner
Creating a PowerBASIC application with gbVisualDesigner is a very straight-forward process
requiring only a minimum of steps.
- Draw controls using the mouse
- Edit dialog/control properties as needed
- Add optional features - Menu, Toolbar, StatusBar, Resources, Fonts
- Build source code (one button press)
- Compile/Execute (one button press)
That's petty much it! But don't forget that you can edit the generated source
code and that you have 4 libraries of programming information (snippets, local
procedures, forum threads and quick procedures) to drawn on! Plus, if you have a favorite, external
editor, gbVisualDesigner can pass the source code to that editor.
Video Tutorials
In addition to this Help file, I've created several video tutorials, each
lasting about 2 minutes and covering various aspects of how to use gbVisualDesigner.
I hope you'll find these a useful adjunct to the online Help.
Limitations
At this time, the following key limitations apply to layouts generated by gbVisualDesigner.
- Only 25 files can be open at one time
- Applications are limited to 100 controls
- Code generator overwrites previous user edits
- Cannot automatically create layout from source code (limited capability)
- Control level callback functions are not supported
Users can, of course, manually modify the generated source code to extend the code beyond these
limits.
Customizing The GUI
The user has several options for controlling how the various graphic elements of gbVisualDesigner
are displayed.
Basic IDE
If all the user wants is to use gbVisualDesigner as a standard IDE which opens only source code files
(*.bas/*.inc), then gbVisualDesigner can be minimally configured as in this image where both the
Library and Layout sections are not displayed.
Here, the File TAB lists all open files. The Code TAB provides 8 different tabs, including the
'File Code' tab which displayed the source code for each opened file. all 8 tabs in the Code TAB
are discussed fully in another section.
IDE With Layout and Code TAB
The Layout section allows the user to create applications by drawing controls with a mouse. gbVisualDesigner
can then generate the corresponding source code as well as compile and run the resulting EXE. By default,
the Layout and Code TAB elements are displayed at the same time, as shown in this next image.
To allow the user to maximize the work space for GUI elements, gbVisualDesigner can be configured to show
just the Layout section or just the Code TAB, as shown in these next two images.
Layout Only:
Code TAB Only:
Layout Toolbar Elements
In all three images above, the main toolbar contains several buttons that were not visible
in the "basic ide" GUI configuration. There are several toolbar configurations provided, each intended
to allow the user to modify the gbVisualDesigner GUI to their own preferences.
By default, gbVisualDesigner opens up with the Layout element showing and with the following toolbar, which
contains 4 basic buttons for controlling drawing of controls in the layout:
A slight tweak on the toolbar can also be made which adds a few additional buttons to the toolbar.
These additional buttons are also available from the layout context menu, but are available as an option
for some users might prefer to have them always visible, even though it requires a wider dialog to display
the additional buttons.
As another option, the main toolbar can have all layout-related buttons removed and a second toolbar,
the control toolbar, can be displayed:
The details of each toolbar button are discussed in a later section.
Library Elements
gbVisualDesigner includes 3 libraries (snippets, local procedures, forum threads), any of which may optionally
be displayed on the left side of gbVisualDesigner. The Library display consists of two parts - a listing
of all library elements and a section for searching the library and displaying a list of elements
which match the search criteria.
This earlier image shows gbVisualDesigner with a Library (snippets) displayed:
To select a Library for display, use the dropdown menu of the main toolbar Library toolbar button. Then select
the Library button itself to toggle display of the selected Library.
Note that only the snippets library includes a toolbar. Context menus are available for the controls
in all 3 libraries.
Library Content
A library display is split into two sections. The top section is a summary listing of all items found
in the library. The bottom section provides search capabilities in the library.
When the user selects an item from the list in either section, the details of that item are displayed in the
corresponding tab ('Snippets', 'Procedures', 'Threads') in the Code TAB section to the right.
In the library bottom section, the user may enter a search term and search settings, then search the library
for all matching items. A summary listing of all matching items are displayed in the bottom section.
The main toolbar Library button dropdown menu is used to select which Library to display, and which
combination of Library elements (complete listing, search results, or both) will be shown.
A couple of shortcuts are available to manage library/element display. Click on the word "Library" in the
label above the library section to cycle through the available libraries. Click to the right n &
of the word "Library" in the label to cycle through the element display combinations.
This next image shows the Library content for each of the available libraries.
Session Options
By default, when you close gbVisualDesigner a list of all open files is kept. Those files are
then re-opened when gbVisualDesigner is started again. Before closing, the user is asked whether
to save or discard those changes.
Optionally, gbVisualDesigner can be configured to save a session to a temporary file, containing
a list of all open files and any unsaved changes to those files. Then, when a new session of
gbVisualDesigner is started the temporary file is used to restore gbVisualDesigner to the state
of the previous session. When a session is saved, the original files will not be modified.
The advantage of saving a session is that there's no action to take other than just to close
gbVisualDesigner. All files are re-opened and all pending changes to each open file are restored.
You do not have to take any other action - just close and open, and you'll be right back where you left off!
Automatically Saved Session Data
While the user must select the option to save a session, some gbVisualDesigner content is
always saved and restored between sessions. In particular, the content of the snippet,
local procedure and scratch pad source code editors are automatically maintained between sessions.
In the case of the Snippets Library, whose Library elements can be modified by gbVisualDesigner,
the user will be asked to Save the snippets library when gbVisualDesigner closes and where
changes to the library have been made.
Supported File Formats
gbVisualDesigner can open files of several formats.
- *.BAS,*.INC - standard source code files
- *.LAY - custom file format containing layout information and source code
- *.PRJ - a gbVisualDesigner project file (any combination of BAS/INC/LAY file types)
A Save action saves maintains the original file extensions/format.
For example, when an opened ".lay" file is saved, both layout changes and generated code (as well as
any user modifications to the generated code) are contained in the Saved file with the extension ".lay".
Likewise, if a *.BAS or *.INC file is opened and Saved, only source code is contained in the saved file.
Saving a file as a *.BAS or *.INC file loses any layout editing done while the file is opened. To save
layout information, a file must be saved as a *.LAY file.
Projects
gbVisualDesigner allows grouping files into projects, which can be opened and saved
as a group.
Here are the basic Project features supported by gbVisualDesigner.
- A project file is simply a list of layout and/or source code files.
- A project file uses the file extension ".prj".
- There is an "Open Project" menu option
- Opening a project opens all files in the project. Files already open are not closed.
- There is a "Save As Project..." menu option
- "Save As Project..." does not save the content of each file. It only saves the *.prj Project file
- Any file open when "Save As Project..." is used will be listed in the project file
- Files can belong to more than one project
- There is no "Project Close" or "Project Save" menu option
Layout Area
When a new file is created, its layout area consists simply of an image of an empty dialog. To
resize the dialog, just drag the "Resize Client" icon shown in the lower right corner of the dialog.
The layout area rulers refer to the size of the dialog client area (coordinates 0,0 are
at the top left of the dialog).
The next image shows a layout area just a few controls drawn on the dialog.
The layout area is where all controls are drawn. To draw a control, select the control type
and draw the control outline with the mouse. Once the mouse is released, an image of the
control will be drawn in the layout area. By default, once a control
is drawn, gbVisualDesigner enters 'Select' mode. However, 'Repeat' setting
is available that will let controls of the same type to be drawn repeatedly. It also
lets you double click to create a control using a default size.
Controls may be drawn inside or outside the dialog area, but by default source code will be
generated only for controls located fully inside the dialog client area. The area outside
the dialog can be thought of as a simple 'holding' area for controls that may be moved in
or out of the dialog design.
Selecting a Control to Draw
One of two toolbar options is used to select a control to draw. If the main toolbar
is set to display layout button, then the dropdown menu in the control button (to the
right of the 'Select' button) will provide a list of available controls, as shown in this
image:
If the control toolbar is displayed, the user can simply select the button corresponding to
the control to be drawn.
The control toolbar also includes buttons for several actions which can also be taken
via the layout area context menu. The tradeoff is a wider display requirement vs fewer
clicks to get to the option.
Auto-Drawn Controls
The main menu, toolbar, and statusbar of a dialog are not drawn by the user. Instead,
the user enables these controls by checking the appropriate checkbox on the Dialog
Property dialog. gbVisualDesigner handles the details of drawing the controls in the
correct location in the dialog.
However, once the controls are enabled, you can double-click on the Toolbar or Statusbar (as
is done with all other controls) to edit their properties. The main menu is edited from
within the Dialog Property dialog.
Custom Controls
Users can manually edit the generated source code to add controls not specifically
supported by gbVisualDesigner. A generic "control" can be selected and drawn
as a visual place holder for custom controls.
Editing Controls in the Layout
Once controls are drawn in the layout area, they may be further edited in several different
methods:
- Via the Mouse - controls may be moved or resized using the mouse
- Layout Area Context Menu - offers features for modifying selected controls
- Control Property Dialog - double-click on a control to open its control property dialog
- Control List Report - displays a list of all controls, allows various editing options
Many of the gbVisualDesigner layout features are optional, such as the grid markers
and ruler. Other features, such as the text information displayed with each control may also
be controlled. A complete list of settings is found on the Settings dialog, which is available
through the main toolbar Settings button dropdown menu.
Managing Controls With a Mouse
The position and size of controls may be adjusted using just the mouse, using any of the
following options:
- Click an unselected control to select it and to unselect all other controls
- Click an empty area of the layout to unselect all controls
- Dragging will move all selected items
- Ctrl-Click will add/remove a control from the selection
- Resize markers are displayed around each selected control
- Drag resize markers to resize all selected items at one time
- Del, Ctrl-X, Ctrl-C, Ctrl-V keyboard combinations do not apply to the layout area
- When moved, controls snap to grid points (if setting is enabled)
- Press Ctrl while dragging a control to ignore snap-to-grid settings
Control properties can also be edited using the keyboard. Just double-click on a control
to open its property dialog, which allows you to use the keyboard to set the control properties.
gbVisualDesigner Layout Context Menu
A context menu is available from the layout area, and provides these menu items which act
on (one or more) controls that have been selected in the layout area.
- Cut/Copy/Paste/Delete
Standard functions, except that they work on controls
within the layout
- Remove Last Added Control
Removes the last control added by the user
to the layout area.
- Restore Last Added Control
Restores the last removed control
- Clear
Remove all controls from the layout area, including
menus, toolbar, statusbar. This action does not reset the resources selection list.
- Duplicate Selected Controls
Creates a copy of the selected controls, slightly
offset in position from the currently selected items
- Control Property Dialog
Opens the Control Property dialog for the control
under the mouse. If no control is under the mouse, a Beep is played.
- Dialog Property Dialog
Opens the Dialog Property dialog
- Select All
Selects all items in the layout
- UnSelect All
UnSelects all items in the layout
- Align Selected Item
Places the top/left corner of selected items at the nearest
grid coordinates
- Left Align Selected Item
Align all selected items with the leftmost selected item
- Top Align Selected Item
Align all selected items with the rightmost selected item
- Group Selected Items
Places all selected items into a common group
- UnGroup Select Items
Removes all selected items from all groups
- Bring Selected Items to Front
Draws the selected items prior to all other layout items
- Send Selected Items to Back
Places the selected items at the back of the drawing order
- Capture Dialog Image
Places an image of the dialog from the layout area onto the clipboard
- Build Source Code From Layout
Generates source code based on the content of
the layout area. This overwrites all previously generated code, including any user modifications
to that code.
Dialog Property Dialog
The properties of the dialog are edited with the Dialog Properties dialog. To display
the dialog, just double click on any unused location of the layout area.
The following properties may be set:
Resources/Menu/Fonts Dialogs
As was mentioned in the section above, the Dialog Properties dialog allows the user to
enable the use of resources, a main menu and pre-defined fonts. Checking the resource
enables the use and the "..." button next to each calls up a dialog for editing those
features.
Resources Dialog
This dialog allows the user to create a list of resources which are embedded in the
application, making them available to controls and statements. These resources need
not be distributed with the EXE.
While resource files in the list can be selected from any location on the users
PC, gbVisualDesigner is distributed with a subfolder 'resources' of ~20 useful icons
and images. That folder is the default location whose content is used to fill the
resource list, as shown in this image:
Any resources in the list that are checked are included in the application (i.e., the
generated code includes the checked resources).
Main Menu Dialog
This editor makes it very easy for a user to create a multilevel main menu, which is
displayed along the top edge of the dialog. As this image shows, the user just types
in the desired content, with a "..." used to show one level of indentation.
Font Editor
This editor lets the user define up to 5 fonts which are then available for use by
any control. The Control Property dialogs will contain a dropdown combobox allowing the
user to select which of the 5 fonts are to be used by that control.
Control Properties Dialog
The properties of all controls can be edited using the Control Properties dialog. To display
the dialog, just double-click on a control in the layout area. Or, you can double-click
on a control in the Layout Control List report. The following image is an example of a control
properties dialog. However, not all controls have exactly the same properties so the content of the
Control Property dialog may differ from the image shown, depending on the control type
The size and location properties of controls are handled via mouse in the layout area. They
cannot be changed on the Control Properties dialog.
- Caption
This is the text that would normally be used in the PowerBASIC Control Add
statement as the text to be initially display in a control. gbVisualDesigner allows the
use of this text, the control ID, or the control type as the text to be displayed in
the layout area or to be used in the Control Add statement during a 'Build'.
- Background Color
The control background color. This is shown in the compiled
application, not in the layout area.
- Caption Color
The control foreground color. Used to display text in the compiled
application, not in the layout area.
- Ctrl ID
Control ID numbers are assigned when the source code is generated, but may be overridden by
the user by editing the Control Properties dialog using the appropriate toolbar Settings
button dropdown menu option.
- Initial Content
Entry of initial values, as simple text, is supported for the ComboBox, ListBox, ListView,
TextBox, and TreeView controls.
Initial values are entered in simple popup textbox for the supported controls. The following
image shows how to enter initial values for each of these five controls.
- Context Menu
gbVisualDesigner provides an easy way to create a content menu for the ComboBox, Graphic,
ListBox, ListView, ProgressBar, TextBox, TreeView and StatusBar controls. A simple text
box is used to enter the context menu, using the same format as is used for entering the
main menu. See the "Menu" tab discussion for additional details.
- Image
The image property can be a file name or the name of a resource item, depending on the requirements
of the control. The "..." button allows the user to select a file, if one is required.
Where a resource name is required, the available image resources are shown in the dropdown
list of the combobox control.
Only the Graphic control allows the use of an external file for an image. The Image, ImageX,
ImgButton, and ImgButtonX controls require a resource image, and the image must have been
selected in the 'Resources' TAB. The list of selected images is available in the dropdown
combobox adjacent to the Image selection checkbox.
The default styles or extended styles assigned to controls are the same as specified in the
PowerBASIC Help file. Simply check or uncheck a style to add/remove it from the dialog's style.
- Font
Enables the use of a font from the pool of fonts defined in the 'Font' TAB.
- Styles/ExtStyles
Each control is assigned default style/extended style values. To override the defaults, just check
or uncheck the values shown.
- Use Default Styles/ExtStyles
This setting tells gbVisualDesigner to apply default control settings during a Build. It does not
change the selected style/extstyle values, as shown in this dialog. These are left intact so that
the user can return to them at a later point in time.
Code Generation
The gbVisualDesigner toolbar 'Build' command generates the source code needed to
create an application matching the layout and dialog/control settings entered by the user.
The generated code is found in the 'Source Code' tab below the layout area.
Note that when a 'Build' command is executed it will overwrite all source code already in the File
Code editor (TAB#1) - including all user edits!. All previously generated source code and user edits
are discarded by gbVisualDesigner and replaced with newly generated source code. If a user wishes
to save their edits, the opened file may be saved or just the source code may be saved to a new *.bas or
*.inc file.
Here's an image of the Build toolbar button, with its dropdown menu:
The dropdown menu offers the following items:
- Build as SDK Code - generated code will be SDK code
- Minimal Code Result - only the Control Add statements will be generated
- Custom Code Generate - a user supplied DLL will be used to build the code
In addition to the Build button dropdown menu options, there are several other build settings available
on the Setting dialog, as shown in this image:
See the section on the Settings dialog for more information about these settings.
Building a Layout from Source Code
gbVisualDesigner has the option to create a layout and dialog/control settings from pre-existing
DDT source code (see the "Build Layout" feature), but that option creates a very minimal layout from
the source code as it is only able to interpret Control Add statements. The option does not recognize
SDK at this time.
User Editing of Source Code
There are 5 source code editors built into gbVisualDesigner - one for the layout-generated
source code, one each for the snippets and local procedures library, a scratch pad editor, and
another editor used to display source code generated by several of the custom code analysis reports.
Source code in any of the 5 editors can be manually modified, compiled and executed, or sent to
the user-specified IDE (such as the PowerBASIC IDE) for further editing. The code of an open file
can be saved in the original file, which is then opened in the IDE. Or, gbVisualDesigner can
save the source code of an open file to a temporary file, which is then opened in the IDE. Code from
the snippet, scratch pad and report code editors is always saved to a temporary file before being
opened by the IDE. The same applies to compiling and running code from one of the editors.
The following editing features are available in all of the gbVisualDesigner source code
editors:
Syntax Highlighting
Colors are used to distinguish keywords, strings, and comments from the rest
of the snippet content. User may select all highlighting colors.
The list of PowerBASIC keywords is kept in the file keywords.txt in the support_files
subfolder. That file may be edited as desired.
Unlimited Undo/Redo
The text editor supports undo/redo actions, limited only by the amount of memory
available on your PC. Undo/redo actions are taken by pressing the appropriate toolbar
button. If an action is not available, the toolbar button will be grayed out.
Code Formatting
gbProcedureLibrary can apply indentation to code, according to settings made by
the user. Settings are available for managing how blank lines, comments, indentation
and TABs are handled during formatting.
Before And After Formatting:
Brace Highlighting
This feature highlights the matching parenthesis, ( or ), when the cursor is placed
in front one of the character. An alternate highlighting is also applied if no matching
parenthesis is found.
Indentation Guidelines
The code editor can display vertical lines that correspond to a standard indentation,
which by default is 3 spaces. The vertical lines can help you align code, or it can
help you scan code to find starting and ending lines of code pairs, such as If/End If.
Greenbar Effect
In the early days of computing, source code was printed on wide paper whose
lines were alternately given white and green background colors. The alternating
background colors made it easier for the eye to track across lines of code.
The greenbar display provides a similar effect by alternating (every 3 lines)
between white and gray line backgrounds.
AutoIndentation
When the user presses enter, the cursor will be placed at the same level of indentation
as the line where enter was pressed. However, if the line begins with one of several
code constructs, indentation will be made one level lower than the current line.
Code constructs which result in extra indentation include:
If For
Else Do
Select Loop
Case While
Call Tips
When a PowerBASIC function is typed in by the user, the text editor can display
a popup label containing a list of the arguments allowed by the function.
Some examples of call tips are shown in the image to the right.
When the popup label is displayed, the user continues typing, filling in
the argument list per the displayed syntax. Pressing a space bar will
remove the display.
If the user enables Persistent Call Tips. the keyword sequence and the call tip
text are displayed permanently in the StatusBar, until the user takes another action
which reports status to the StatusBar.
The user may modify the list of recognized functions and the
corresponding argument syntax/list that is displayed. See the three files
words1.txt, words2.txt, and words3.txt in the support_files subfolder for
more information.
Persistent Call Tips
Places a copy of the Call Tip into the StatusBar that persists even when the
Call Tip disappears from the screen.
AutoCompletion
PowerBASIC keywords are often used in combination with one another, such as
"Control Add" or "Thread Get Priority". When the user types in a PowerBASIC
keyword that is part of a combination, a popup list of allowed keywords
needed to finish the combination, is displayed. The user can select from
that list (press TAB) or simply continue typing.
The user may modify the list of recognized keyword combinations.
See the two files members1.txt and members2.txt in the support_files subfolder
for more information.
Code Folding
When reviewing code it can be convenient to hide the code within procedures and
other code constructs. This is called folding and is demonstrated in the image below.
Code constructs may be folded by clicking on the minus symbol in the margin,
or unfolded by clicking on the plus symbol in the margin. The toolbar provides buttons
for folding/unfolding all constructs in a snippet.
The code constructs which gbVisualDesigner recognizes are:
Type End Type Class End Class
Macro End Macro Interface End Interface
Sub End Sub Method End Method
Function End Function Property End Property
Callback End Function Union End Union
In general, folding can also be applied to lesser structures, such as Select/End Select,
but that level of folding is not currently supported by gbProcedureLibrary.
Open Help to Highlighted Word
Once a word is selected, the PowerBASIC Help file may be opened to the corresponding
Help file topic.
Line Numbers
The text editor supports the display of line numbers, contained in a left margin that
is separate from the text.
Active Links
gbProcedureLibrary supports hypertext links. Just as in a browser, the links are highlighted
and underlined, needing only to be clicked to open the link location. Simply type
in an HTTP address and click on the link to open the URL in your default browser.
Context Menus
The source code editors share a common context menu, which is discussed further down
this page in the TAB #1 (File Code) section.
Main Toolbar
This toolbar, located across the top of the gbVisualDesigner dialog, is always visible.
It provides options for opening and saving files, as well as for selecting controls to be drawn
in a layout. It also provides options for opening an opened file in the PowerBASIC IDE or to
compile/run the currently selected file. The toolbar may be configured for 3 levels of content,
as shown in these images:
Basic Toolbar:
Basic Toolbar + Minimal Layout Options:
Basic Toolbar + Complete Layout Options:
The Settings dropdown menu provides the menu options to select the main toolbar content.
Selection of a library, opening the Settings dialog and opening external tools is also
performed from this toolbar.
The following options are available from the toolbar. Several of the buttons provide
additional dropdown menu options.
- Open
Opens a dialog for selecting a layout file to open in gbVisualDesigner.
It has an adjacent dropdown menu with the following options:
|
- Reload - reload the currently selected file
- Close - close the currently selected files
- Close All Other - close all files except the currently selected file
- Open Project - open an existing project
- Open Project And Files Folder - open the "projectsandfiles" subfolder (contains all examples of files types)
- Import VB6 Project - imports a VB6 project (*.vbp) as a new layout
- Clear Recent File List - clear the more recent list
- Recent Files - list of recently opened files
- Projects And Files Folder - list of files found in "projectsandfiles" subfolder
|
- New (L)
Creates a new, empty layout (*.lay) file
It has an adjacent dropdown menu with the following options, all of which are templates
that can be used in creating a new file.
|
- button.lay
Dialog and a single button
- default.lay
Empty dialog
- graphic.lay
Dialog and a single graphic control
|
- New (B)
Creates a new, empty source code (*.bas) file.
It has an adjacent dropdown menu with the following options, all of which are templates
that can be used in creating a new file.
|
- dialog_button.bas
Simple dialog plus a button
- dialog_graphic.bas
Simple dialog with a single graphic control
- gbtemplate.bas
Complete sample application with 110+ features
- gbtemplate_lite.bas
Complete sample application with selected features from gbTemplate
- minimal.bas
Minimal content - just enough to compile
- timed_event.bas
Provides a template for insertion of code to be accurately timed
- timer.bas
Creates a timer with a 1s interval
|
- Save
Saves the current layout without asking the user for confirmation. Uses the
current filename.
It has an adjacent dropdown menu with the following options:
|
- Save As...
Save the currently selected file as a new file name
- Save All
Save all open files (no user confirmation requested)
- Save As Project...
Save all open file names to a specified project
|
- Remove
Removes the last control added to the layout
- Restore
Restores the last control removed from the layout
- Select
Enters Select mode, allowing the user to draw select controls
as discussed above, or by drawing a rectangle around controls to select them. A selection
rectangle need only cross a control to select it.
- Repeat
When pressed, allows a user to repeatedly draw the selected control.
Also lets the user double-click to create a control using a default size.
When not pressed, gbVisualDesigner automatically enters 'Select' mode after drawing a
control.
- Build
When pressed, generates the source code based on the current dialog/control layout.
It has an adjacent dropdown menu with the following options:
|
- Build as SDK Code
Generates SDK style code instead of DDT style code
- Minimal Code Result
Returns only Control Add statements in the generated source code
- Custom Code Generator
Source code generation is performed by a user-written code
generator DLL. See the section DLL below for more details.
|
- IDE
When pressed, the generated source code is saved to a file and that file is then
opened in the selected IDE. To send source code from other source code editors to the IDE, use the
options from the toolbar located above the Code TAB.
It has an adjacent dropdown menu with the following options:
|
- Select Primary IDE
Select default IDE to be used to open source code
- Select Secondary IDE
Select another IDE that can be used to open source code
- Select Help File
Select the PowerBASIC Help file
- Send Temp File to IDE
Saves current source code content to a temporary file, then
sends that to the specified IDE. The original files are not saved.
- Use Secondary IDE
Use the secondary IDE to open source code files
|
- Compile
When pressed, generated the source code is saved to a file and that file
is then compiled and executed. To compile source code from other source code editors to the IDE,
use the options from the toolbar located above the Code TAB.
It has an adjacent dropdown menu with the following options:
|
- Select Compiler
Select the EXE used to compile source code
- Select PowerBASIC Include Folder
Select the folder containing the PowerBASIC
include files
- Select Jose Roca Include Folder
Select the folder containing the Jose Roca
include files
- Use Jose Roca Includes
determines whether the PowerBASIC or Jose Roca includes
will be used
- Compile Without Saving
Saves current source code content to a temporary file, then
uses that for compiling. The original files are not saved.
|
- Library
Toggles display of the current Library.
It has an adjacent dropdown menu with the following options:
|
- Snippets
Display the snippets library
- Threads
Display the threads library
- Local Code
Display the local code library
- Data Only
Show only the library content listing
- Search Results Only
Show only the results of the most recent library search
- Data + Search Results
Show both the library content and the library search results
|
- Tools
When pressed opens the 'References' TAB to the Ascii Code table.
It has an adjacent dropdown menu with the following options:
|
- gbSearch
Open the external gbSearch utility
- gbSearchLite
Open the external gbSearchList utility
- gbHexViewer
Displays a file in hexadecimal code
- gbMagnify
Open the external gbMagnify screen magnifier utility
- gbRuler
Open the external gbRuler on-screen ruler utility
- WinSpy++
Utility for extracting Window information
- Poffs
Offline PowerBASIC threads search utility
- Task Manager
Windows Task Manager
- Process Explorer
SysInternals Process Explorer utility
- User1: NotePad
Windows NotePad (text editor)
- User2: Calc
Windows Calculator
- User3: MSPaint
Windows Paint utility
- Select Tools
Allows user to select up to 3 tools for inclusion in the dropdown menu,
as well as to select the Left/Right text comparison tool.
|
Additional detail on each of these is provided in the Tools section further down this page.
- Settings
When pressed, toggles display of the grid as dots or as lines.
It has an adjacent dropdown menu with the following options:
|
- Settings Dialog
Open the Settings dialog
- Settings Button Toggles Layout
Allows the toolbar settings button to cycle through GUI configurations
- Source Code GUI Configuration
Sets GUI configuration to a minimal source code editor configuration
- Layout GUI Configuration
Sets GUI configuration to a minimal Layout editor configuration
- Layout Only
Hides the Code TAB
- Code TAB Only
Hides the Layout area
- Layout+Code TAB
Displays both the Layout and Code TAB
- Show Control Toolbar
Toggles display of the control toolbar
- Show Layout Controls in Main Toolbar
Add layout options to the main toolbar
- Build Local Procedures
Creates library of source code found on the user's PC
- Select Local Library Folders
Opens dialog which lists folder to include or exclude from the local library
|
- Help
Opens the online Help page (this page).
It has an adjacent dropdown menu with the following options:
|
- Online Update (EXE Only)
Checks server for new EXE
- Tutorials (Video)...
Provides links to gbVisualDesigner video tutorials
- Online Help for Reports
Online Help for the ~30 code analysis reports
- Email Author
Open local email client with email addressed to author
- PowerBASIC Help File
Opens the local copy of the PowerBASIC Help file
- PowerBASIC Home Page
Opens default browser to PowerBASIC home page (http://www.powerbasic.com)
- PowerBASIC Forums
Opens default browser to PowerBASIC forums page (http://www.powerbasic.com/forums)
- PowerBASIC Tutorial
Opens default browser to PowerBASIC tutorial (http://www.garybeene.com/power)
- Win32.hlp
Opens the local file, win32.hlp
|
Controls Toolbar
Display of this toolbar is optional. It allows the user to select which control will be
drawn in the layout.
It also provides Repeat, Remove/Restore and Build Source Code options.
All controls supported by PowerBASIC, except for the line control, are supported by
gbVisualDesigner:
- Button
- Calendar
- Check3State
- CheckBox
- ComboBox
- DateTime Picker
- Frame
- Graphic
- Image
- ImageX
- ImgButton
- ImbButtonX
- Label
|
- ListBox
- ListView
- Option
- ProgressBar
- RichEdit
- Scrollbar
- TAB
- TextBox
- TrackBar
- TreeView
- UpDown
- Control
|
This toolbar also provides actions other than just selection of the control
to be drawn:
Select - Allows using the mouse to select one or more controls
Remove - Remove the last added control
Restore - Restore the last removed control
Lock - Disables the Build button
Build - Build source code from the layout
Library Overview
gbVisualDesigner supports 3 libraries which may be displayed, one at a time, on the left side of the
gbVisualDesigner dialog - the snippets library, the local procedures library and
the PowerBASIC forums thread library. There's also a 4th library which is accessed via
context menu in any of the source code editors, but that library is discussed in another section.
Regardless of which library is shown, the display can consist of a full listing
of the library content and a listing of the results of searching the library against
specific terms and other user search settings. The user can select which one, or both,
of these library elements are displayed.
All library elements have various sort options and all have context menus with which to
manipulate the content. Context menus are discussed in the individual library sections.
Only the snippets library can be edited by the user. It also is the only library for which
a custom toolbar is provided. See the Snippets Library section below for more details.
The local procedures library is generated by scanning source code files on the
user's PC (at user request). In addition to listing the procedures, gbVisualDesigner can
identify procedures which are duplicates of one another.
While the local procedures code shown in the source code editor can be edited, those edits
will not be saved to the local procedures code library, not will they affect the original
source code files in any way. There are some capabilities for removing procedures from the
local procedures library. See the context menu in the Local Procedures library section below
for more details.
The complete thread libraries are distributed with gbVisualDesigner. Threads cannot be added
or removed from the library, and individual threads cannot be edited. A built-in HTML browser
is provided for viewing threads (thread files are HTML files).
All libraries can be searched in a variety of ways. See the Searches section for details about
how to execute a library search.
Snippets Library
The Snippets Library consists of approximate 1500 snippets, presented as a tree of
categories which contain the individual code snippets. Each of the snippets typically
contain the following sections:
- Introduction - introductory text and or reference materials
- Primary Code - list/discussion of the primary code which is demonstrated in the snippet
- Compilable Code - compilable example demonstrating how to use the primary code
To display the snippets library, use the dropdown menu next to the main toolbar Library button.
This next image shows gbVisualDesigner with the snippets library displayed. The top section
is a Tree control containing all snippets in the library. The bottom section contains the results
of a search against the library.
Click on a snippet in the Tree or in the search results to display the snippet in the snippet
source code editor, which is found in the Code TAB, the "Snippets" tab.
When the user selects the option to open code from the snippets library (i.e., the code
in the snippets source code editor) in the IDE, pre-process the code, or to compile/run the code,
the action is taken only on the extracted compilable example found within the code.
The first line of each snippet is exempted from syntax highlighting and is displayed
as the snippet title in the Snippet Library TreeView listing. Titles in the snippet
library TreeView and source code editor are kept synchronized. As you edit one, the other
is changed real-time to match the edits.
Snippet Library Toolbar
This toolbar is available only when the snippets library is displayed. It provides various
editing options for the snippets library.
- Open - open an existing snippets library (user asked to save changes to current library)
- New - create a new snippets library (user asked to save changes to current library)
- Save - save library to file specified by user
- Collapse - collapse all nodes in the snippet library Tree
- Expand - expand all node in the snippets library Tree
- Sibling - add a sibling node to the currently selected node
- Child - add a child node to the currently selected node
- Delete - delete selected node from snippets library Tree
Snippet Library Context Menu - TreeView
The complete listing of the snippets library is displayed in a TreeView control, which
has the following context menu options:
|
- Node Cut
Remove the selected node from the Tree and Copies the node to a private clipboard
- Node Copy
Copy the selected node to a private clipboard
- Node Delete
Remove the selected node from the Tree
- Node Paste As Child
Add the copied node to the Tree as a child to the selected node
- Node Paste As Sibling
Add the copied node to the Tree as a sibling to the selected node
- Set Bookmark
Set the bookmark property of the selected node
- Clear Bookmark
Clear the bookmark from the selected node
- Clear All Bookmarks
Clear all bookmarks
- Sort Entire Tree
Sort the entire tree, all parents and children
- Sort Children of Selected Node
Sort only the selected node, including it's children
- Add To Search Results List
Add the node to the Search Results list
- Edit Label
Begin in-place editing the text of the currently selected node
|
Snippet Library Context Menu - Search Results
The following context menu is available from the snippets search results list (the bottom list).
|
- Remove From List - Remove the selected line from the search results list
- Clear List - Remove all lines from the search results list
- Copy List - Copy all search results to the clipboard
- Print List - Print a listing of all items in the search results list
|
Local Procedures Library
To display the local procedures library, use the dropdown menu next to the main toolbar Library button.
Local Procedures Library Context Menu - Complete Listing
The following context menu is available from the Local Procedures list (the top list).
|
- Bookmark Procedure - Bookmark the currently selected procedure
- Clear Bookmark - Remove the bookmark from the currently selected procedure
- Clear All Bookmarks - Remove the bookmark from all procedures
- Open Parent File - Open the file containing the currently selected procedure
- Open Parent Folder - Open the folder containing the parent file of the currently selected procedure
- Display Local Library Summary - Display summary information about the contents of the Local library
- Search for Duplicates of This Procedure - Find procedures which are identical to this procedure
- Search for Unique Procedures - List only unique procedures (no dupes)
- Search for ASM Procedures - Find any procedure that contains ASM lines of code
- Search for Bookmarked Procedure - Find any procedure that the user has bookmarked
|
Local Procedures Library Context Menu - Search Results
The following context menu is available from the Local Procedures search results list (the bottom list).
|
- Bookmark Procedure - Bookmark the currently selected procedure
- Clear Bookmark - Remove the bookmark from the currently selected procedure
- Clear All Bookmarks - Remove the bookmark from all procedures
- Clear List - Remove all items from the list
- Open Parent File - Open the file containing the currently selected procedure
- Open Parent File in IDE - Open the parent file in the PowerBASIC IDE
- Open Parent Folder - Open the folder containing the parent file of the currently selected procedure
|
Threads Library
To display the threads library, use the dropdown menu next to the main toolbar Library button.
Threads Library Context Menu - Complete Listing
The following context menu is available from the Threads Library list (the top list).
|
- Open Thread in PowerBASIC Forum - Open the selected thread
- Open GoTo Thread Dialog - Opens the GoTo Thread# Dialog
- Display Thread Summary - Display a summary of threads in the Thread Library
- Open Threads Folder - Open the folder containing the thread files
- Sort by Thread Numbers - Sort the complete thread list by thread number
- Search for Threads Started by This Author - Display a search results listing containing all threads by the author of the currently selected thread
- Search for Threads From This Forum - Display a search results listing containing all threads from the same forum as the currently selected thread
- Search for Author - Display a search results listing containing all threads that contain the author's name from the currently selected thread
|
Threads Library Context Menu - Search Results
The following context menu is available from the Threads Library search results list (the bottom list).
|
- Open Thread in PowerBASIC Forum - Open the selected thread
- Open GoTo Thread Dialog - Opens the GoTo Thread# Dialog
- Display Thread Search Summary - Display a summary of threads in the Thread Library
- Open Threads Folder - Open the folder containing the thread files
- Sort by Thread Numbers - Sort the complete thread list by thread number
- Search for Threads Started by This Author - Display a search results listing containing all threads by the author of the currently selected thread
- Search for Threads From This Forum - Display a search results listing containing all threads from the same forum as the currently selected thread
- Search for Author - Display a search results listing containing all threads that contain the author's name from the currently selected thread
- Clear List - Clear the search results listing
- Copy List to Clipboard - Copy the search results list to the clipboard
|
Library Searches
Searches on all 3 libraries are made using the search controls shown in this
image. The controls are typically located on the left side of the gbVisualDesigner
dialog, between the library content listing and the search results listing.
A search is begun by typing in search terms and pressing ENTER or pressing the Search button.
When a search is made, the search terms are added to the top of the search term listing. A list of
the most recent search terms may be viewed by pressing the down arrow next where the search terms
are enter.
Context Menu
The search button has an adjacent dropdown menu with the following options:
|
- Match Case
Search results contain items whose case matches that of the search terms
- Whole Words
Search results contain items whose
- Any Word
Search results contain items which have at least one of the search terms
- All Words
Search results contain items which must have all of the search terms
- As String
Search results contain items where the search terms are treated as a string
|
These settings apply to searches in any of the 3 libraries. However, depending on the library
being displayed, a few additional context menu entries are provided which allow the search to
be further restricted to elements in the library. The additional options are shown in this
next image:
Quick Procedure Library
gbVisualDesigner provides a quick and easy method of saving snippets, called Quick Procedures,
of code and of re-inserting those snippets into source code listings.
Create a Quick Procedure
To create a Quick Procedure, just highlight some code in an editor control and select the
context menu "Create Quick Procedure". All source code editors support Quick Procedures.
That will bring up the following dialog, in which you enter a short title for the Quick Procedure.
A default title of ".untitled" is provided.
Pressing ENTER or clicking the OK button will create a Quick Procedure and then return
to the source code editor.
Insert a Quick Procedure
To open the Quick Procedure Library, select the "Insert Quick Procedure..." context menu, which
will call up the Quick Procedure Library dialog, which lists the titles of all procedures in the library.
To insert a Quick Procedure at the caret in a source code editor, just double-click on a
procedure in the list. The title of the Quick Procedure is not inserted into the document.
Only the content of is inserted.
The Quick Procedure Library is pre-loaded with a few dozen entries which the author has found
useful. Additionally, the Quick Procedure Library is pre-loaded with 3 special entries,
.Date$, .Time$, and .Date$Time$, which direct gbVisualDesigner to insert the corresponding
date/time information into the source code editors.
Context Menu
The Quick Procedure Library dialog has the following context menu options to help users manage the
library.
- Insert Procedure - Inserts the selected procedure and closes the Quick Procedure dialog.
- Delete Procedure - Deletes the Quick Procedure from the library
- Open Quick Procedure Library - Opens the library (a text file) using Notepad
There is no built-in feature for editing the content of a Quick Procedure. However, the library is
just a text file and can be manually edited when it is opened using the Open Quick Procedure
Library menu selection.
Code TAB Overview
Just below the layout area is a Code TAB control which allows the user to select from various
source code editors, reports, forum threads and reference materials. The Code TAB is divided into
these individual tabs:
- File Code - source code generated by gbVisualDesigner
- Snippets - source code for the selected snippets library
- Procedures - source code for the selected local procedures library
- Scratch Pad - source code loaded by the user but not associated with any library
- Reports - 25+ source code analysis reports (applied to any of the source code editors)
- Threads - display of a thread from the PowerBASIC forum thread library
- References - display of 6 different reference information data sets
- App Notes - text comments by the user
Tab#1: File Code
The first tab contains a source code editor which displays the source code
associated with the currently selected open file, which may be a *.BAS, *.INC
or *.LAY file type.
The editor is also where generated source code is placed when the Build function
is executed. Build always acts on the layout of the currently selected file to generate code.
The user may edit the code in the editor, and the code is saved whenever the
file is saved. But as noted earlier, subsequent Build actions will overwrite the code in this
editor!
The toolbar IDE and Compile buttons act on the code in this editor by saving the code
to a temporary file and then opening the code in the PowerBASIC IDE or compiling the
code with the PowerBASIC compiler, respectively.
File Code Toolbar
The toolbar above the File Code tab provides the following source code editing features:
- Cut - Copy the selected text, then delete it
- Copy - Copy the selected text
- Paste - Paste text from the clipboard at the cursor
- Delete - Delete the selected text
- Split Screen - Display source code in two synchronized screens
- Procedure List - Display Procedure List
- Search - Open search dialog
- Undo - Undo the last edit to the source code listing
- Redo - Restore the last undo operation
- Comment - Comment the lines containing the selected text
- UnComment - UnComment the lines containing the selected text
- Indent - Indent the lines containing the selected text
- OutDent - Outdent the lines containing the selected text
- Fold All - Fold all procedures in the source code
- UnFold All - Unfold all procedures in the source code
- Send to PowerBASIC IDE - Send the source code to the PowerBASIC IDE
- Compile and Run - Compile the source code and run the EXE
Context Menu
The following context menu is available by right-clicking on the control.
|
- Clear
Remove all code from the RichEdit control
- Select All
Select all code to the clipboard
- Copy All
Copy all code to the clipboard
- Left Justify Selection
Left justify all lines containing selected code
- Format Selection
Apply formatting to the selected code. A user-defined
formatting DLL may be used to replace the built-in formatting procedure.
- Go To Line ...
Open the GoTo Line dialog, where the user can specify which
line to scroll to
- Go To Highlighted Procedure
Scrolls to the procedure whose name is highlighted
- Go To Previous Position
Scrolls to the line from where the last jump was made
- Open Help at Selection
Open the PowerBASIC Help file at the selected word
- Save As Left
Save selection to a temporary file, to be used as the left side in a text comparison
- Save As Right
Save selection to a temporary file, to be used as the right side in a text comparison
- Compare Left/Right
Compare the left/right files against on another. A user-defined
external comparison tool may be used in place of the default comparison tool.
- Insert Quick Procedure ...
Opens a popup dialog which lists available procedures. Double-click
on a procedure to insert it at the cursor
- Create Quick Procedure ...
Create a new quick procedure from the selected code. The user
will be prompted for a procedure name
- Open Source Code ...
Insert source code from an existing source file. The user
selects the file and its content is inserted at the cursor
- Save Source Code As ...
Save the source code to a new file
- Export as HTML
Creates an HTML file and opens the file in the user's default browser. The
HTML code is also placed on the clipboard
- Export as BBCode
Places forum-ready syntax highlighted code onto the clipboard. A Beep
is heard when the export is complete
- Copy to Scratch Pad
Copies the source code to the Scratch Pad source code editor
(replaces content).
- Build Layout From Code
Attempts to use the source code to create a layout
(replaces current layout). Note that this is an in-work feature and the results are very limited.
|
Procedures
At the right of the source code is an optional list of the procedures found in the selected source
code listing. It can be configured in a narrow and wide view. Double-clicking on a procedure will
scroll the source code editor to that procedure.
|
The following columns of information are provided in the procedure list:
- Procedures
- Type
- Line #
- File #
- File Name
- File Path
The procedure list can be horizontally scrolled to view these additional columns. |
When created, the list places procedures in the order they are found. The procedure list may then
be sorted by clicking on the list header. There is also a context menu with these options:
|
- Refresh - rebuilds the procedure list
- Copy - copies the procedure list to the clipboard
- Wide View - increases the width of the procedure list
- All Files - the procedure list will have the procedures for all open files
|
Search File Code
The File Code listing may be searched by pressing the Search button on the toolbar to open
up the following dialog.
Find and replace actions are supported as are beginning a search in the Next/Previous opened file.
When a search is advanced to the Next/Previous file and reaches the end of the File TAB, the search
will loop to the file at the other end of the File TAB. Also, when a jump occurs, it always jumps
to the top of the next file and the search begins automatically, towards the end of source code listing.
The same Find dialog is used on the File Code, Snippets, Procedures, Scratch Pad and Report source
code editors.
Tab#2: Snippets Code
The second tab contains a single code editor, in which gbVisualDesigner displays the
selected library snippet.
The user may edit the snippet content and will be prompted to save the changes to the
library/snippet when gbVisualDesigner is closed. The Snippets library can also be
save at any time using the snippets library toolbar. Content of the snippets
editor will be saved from session to session.
Toolbar/Context Menu/ProcedureList/SearchDialog
The snippets library source code editor uses the same toolbar, context menu and search dialog
as was discussed in the File Code TAB#1. It also supports the procedure list.
Tab#3: Local Procedure Code
The third tab contains a single code editor, in which gbVisualDesigner displays the
selected library procedure.
The user may edit the procedure content but changes cannot be saved (changes to a user's
source code file must be made by opening the original file). Content of the local procedures
editor will, however, be saved from session to session.
Toolbar/Context Menu/ProcedureList/SearchDialog
The local procedures library source code editor uses the same toolbar, context menu and search dialog
as was discussed in the File Code TAB#1. It also supports the procedure list.
Tab#4: Scratch Pad
The fourth tab contains a single code editor, which acts as a scratch pad editor. The
user may enter any source code of their choosing, as well as compile and run the code.
The user may edit the scratch pad content. Content of the scratch pad editor will be automatically
saved from session to session.
Toolbar/Context Menu/ProcedureList/SearchDialog
The scratch pad source code editor uses the same toolbar, context menu and search dialog
as was discussed in the File Code TAB#1. It also supports the procedure list.
Tab#5: Reports
The fifth tab is used to display one of the 25+ gbVisualDesigner code analysis reports. The
user selects the code source (generated code, snippet code, local procedure or test code)
on which the code will be based, then selects the report to be presented.
This section gives an overview of the Reports tab. For details on each report, visit
the separate Report Help page.
Reports Toolbar
The above the Reports tab provides the following options:
- Refresh the report
- Display the source code on which the report is based
- File Code tab code is used to generate reports
- Snippets tab code is used to generate reports
- Procedures tab code is used to generate reports
- Scratch Pad tab code is used to generate reports
Context Menus
Some, but not all of the reports have context menus. Available report context menus are discussed on
a separate Report Help page.
Reports
Here's a list of the available reports, each of which can be created from
source code in any of the 4 source code editors (Generate Code, Snippets, Local Procedure
Code and Test Code). Just click on the report name to jump to a description of the
report (located on another HTML page).
There are two exceptions to the earlier comment that all reports can be based on content any of the
4 source code editors. The Layout Control List always is drawn from the Layout of the currently
selected file, and the Last Compile Log is always the log from the latest source code compilation (which
may be from any of the source code editors).
The 'Text' and 'Graphic' custom reports allow the user to specify two DLLs, one of which can return a
text report and another which can return a graphical report. Custom DLL requirements are discussed in
a separate section.
Tab#6: Threads
The sixth tab contains a built-in browser, in which gbVisualDesigner displays the
selected PowerBASIC forum thread. All threads within the forum are included in the
gbVisualDesigner distribution file.
Thread Toolbar
The toolbar above the Threads tab provides the following options:
- Previous URL
Display the last most recently displayed URL
- Next URL
- Top of Page
Scroll to the top of the page
- Bottom of Page
Scroll to the bottom of the page
- Previous Post
Scroll to the first post above the current cursor position
- Next Post
Scroll to the next post below the current cursor position
- Highlight Search Terms
Highlight all search terms on the page
- Search Thread
Open the "Find" dialog for searching the currently displayed page
- Bookmark Thread
Bookmark the currently displayed thread.
It has an adjacent dropdown menu with the following options:
|
- Clear Bookmarks
Clear the bookmark from all threads
- Open Selected Thread
- Print Thread
|
Context Menu
There is no custom context menu for the embedded browser. It uses the default browser
as provided by the browser control itself.
Tab#7: Reference Materials
This TAB provides quick access to a variety of information useful in programming.
References Toolbar
The toolbar above the References tab provides the following options:
- Ascii Table
Display a listing of all Ascii values
- Built-In Equates
Display a list of all built-in string equates
- Built-In RGB Colors
Display a list of all built-in rgb values, including a sample of each color
- Virtual Key List
Display a list of virtual key equates and the corresponding hex values
- Built-In UDT Structures
Display a list of UDT structures recognized by the PowerBASIC compiler
- Number Conversions
Display a converter (to and from Dec/Hex/Bin values)
- Regular Expression Tester
Display a regular expression tester
Context Menu
At this time, none of the References has a context menu.
Settings Dialog
Settings Dialog - Layouts
- AutoSelect Mode - automatically convert to 'Select' mode after drawing a control
- Auto Select Frame - when selecting a Frame control, also select controls within the frame
- Landscape Printing - set default orientation used by Print Preview
- Show Ruler - show the rule in the layout area
- Auto Show Library - when selecting a Code TAB (snippets/procedures/threads), automatically display the corresponding library
- Control IDs as Desc - display the control ID as its description in the layout area
- Caption as Desc - display the control caption as its description in the layout area
- Control Type as Desc - display the control type as its description in the layout area
- Show Grid - show grid dots in layout area
- Grid Lines - use grid lines (vs grid dots)
- Snap to Grid - when creating/moving/resizing, set control properties to grid points
- Snap Half Grid - when creating/moving/resizing, set control properties to half grid points
- Grid - select color to display grid dots
- Ruler - select color to display the ruler
- Layout - select color of layout area background
- Dialog - select color of dialog client area
- Default Colors
Set all colors to default values
Settings Dialog - Code Editors
- Syntax Highlighting - apply syntax highlighting to source code
- Line Numbers - display line numbers
- GreenBars - alternative line background colors
- Active URLs - activate lines in source code
- Brace Highlighting - highlighting matching braces
- Indentation Guides - show vertical indentation guides
- Call Tips - display call tips as the user types
- AutoCompletion - display AutoCompletion dialog as user types
- AutoIndent - autoindent caret to appropriate level of indentation when starting a new line
- Code Folding - enable code folder
- Persistent Code Tips - display code tips in the Statusbar. do not automatically erase.
- External Comparator - apply the user-specified external text comparator
- Side By Side - use side by side split screens (vs over/under split screens)
- Upper Case - display text as upper case
- Lower Case - display text as lower case
- Mixed Case - display test in mixed case
- Keywords - select the color used to display Keywords
- Comments - select the color used to display Comments
- Strings - select the color used to display Strings
- Operators - select the color used to display Operators
- Numbers - select the color used to display Numbers
- Default Colors - select colors to default values
Settings Dialog - Application
- Existing Instance - when starting gbVisualDesigner, use the instance already open
- As Confirmation - when taking some actions, require user to confirm action
- Save Session - when closing gbVisualDesigner, save open files as a session file (vs requiring user to save all open files)
- Backup Files - create backup copies (up to 5) when saving a file
Settings Dialog - Threads
- Thread # in Title - show the thread number at the end of the title
- GreenBars - alternate line colors
- Last Post Date - use last post date in listing (vs date thread was started)
- Attribution on Copy - when copying content of a thread, include the name of the post author
- Display Images - display thread images in the browser (vs just the text URL)
- Use Offline Images - use a local copy of thread images (vs going online to get the image)
- Redirect Threads - redirect online thread URLs to the local copy of the thread
- Open Links Locally - open external links in the gbVisualDesigner browser
Settings Dialog - Local Code
- Ignore Minor Differences - ignore case and white spaces when comparing procedures
- Mark Duplicates - display icons which indicate duplicate procedures
- File Extensions
select extensions of source bearing text files (default is .bas/.inc/.htm)
- Sub - include this construct in the local library
- Function - include this construct in the local library
- Declare - include this construct in the local library
- Callback - include this construct in the local library
- Thread - include this construct in the local library
- FastProc - include this construct in the local library
- Enum - include this construct in the local library
- Type - include this construct in the local library
- Macro - include this construct in the local library
- Union - include this construct in the local library
- Class - include this construct in the local library
- Interface - include this construct in the local library
- Property - include this construct in the local library
- Method - include this construct in the local library
- All - select all construct types in the local library
- None - unselect all construct types in the local library
Settings Dialog - Build/Compile
- Build as SDK Code - generated code will be SDK code
- Minimal Code - only the Control Add statements will be generated
- Close EXE - attempt to close the existing EXE when compiling
- Ignore Outside - ignore controls in layout which are not fully inside the dialog
- New Control IDs - give controls new IDs when building code
- Control Separators -
- Unicode - utilize unicode API in generated code
- OverlappedWindow - use OverlappedWindow as the default dialog style
- SS_Notify - allow graphics controls to detect mouse clicks
- Subclass Controls - include code to subclass common textbox
- Debug Statements - generate debug statements in generated code
- Select TAB on Build - automatically selects the Code TAB from where the source code was used
- Indentation - sets indentation levels (number of spaces per TAB level)
Settings Dialog - Custom DLLs
- Code Formatter - user supplied DLL, if available, will be used to format code
- Code Generator - user supplied DLL, if available, will be used to generate code
- PreProcessor - user supplied DLL, if available, will be applied to code before compiling
DDT and SDK Code Generation
gbVisualDesigner can provide both SDK and DDT code output from the same
layout.
By default, DDT code is generated. To get SDK code, select the "Build as SDK Code"
option under the toolbar Build button.
DDT Control Conversions
The list of controls in the Controls Toolbar consists primarily of the DDT controls
supported by PowerBASIC, some of which have no exact SDK equivalent. So when SDK code is
generated for such controls, the results will be similar to, but not exactly
as, the specified DDT control.
Keyboard Shortcuts
The following key combinations are available to the user to access
gbVisualDesigner features:
- F1 - Help
- F2 - Show Procedure List in Generated Code TAB
- F3 - Open Find dialog for current source code editor
- F4 - Cycle through Library display options (Content, Search Results, Both)
- F5 - Display Quick Procedure dialog
- F6 - Toggle layout (Layout, Code TAB, Both)
- F7 - Insert DateTime as cursor in source code editors
- F8 - Toggle display of extra layout buttons in Main Toolbar
- F9 - Adjust settings to provide a Layout GUI with minimal toolbalr content
- F10 - Adjust settings to provide a source code only "IDE" GUI configuration (no layout)
- Alt-F8 - Centers horizontal splitter bars
- Alt-F9 - Same as F9, except maximizes the dialog
- Alt-F10 - Same as F10, except maximizes the dialog
- Ctrl-A - Select all items
- Ctrl-D - Set focus on the Search combobox
- Ctrl-E - Compile and Run
- Ctrl-F - Open Find dialog for source code editors
- Ctrl-G - Align selected items to grid
- Ctrl-I - Capture image of the dialog from the layout areas
- Ctrl-J - Open Journal file with NotePad
- Ctrl-M - Open Settings dialog
- Ctrl-N - Sequentially number selected items
- Ctrl-P - Print source code editor content
- Ctrl-N - Create a New Layout file
- Ctrl-Q - Display Quick Procedure dialog
- Ctrl-S - Save current file tab
- Ctrl-W - Toggle width of Procedure Lists
External Tools
The toolbar 'Tools' button provides access to several external tools that are distributed
with gbVisualDesigner. Additionally, the user can specify up to 3 tools which will
be listed on the Tools dropdown menu. The user many also specify a text comparison tool which
will be use for Left/Right text comparisons.
Here's an image of the tools currently supported, along with a brief description of the tool and
the URL of its home page.
gbSearch
This is my most powerful search utility. I use it regularly to search the contents of
*.bas and *.inc files all over my hard drive.
It's home page is here.
gbSearchLite
This smaller-profile search utility is no less capable of finding *.bas and *.inc content,
but it also provides more specific information about where the content is found within the files.
It's home page is here.
gbHexViewer
Displays content of a file in hexadecimal format.
It's home page is here.
gbMagnify
I use gbMagnify for all of my close up graphics work. When counting pixels, it's a great way
to visually verify that your code does exactly what you want it to do!
It's home page is here.
gbRuler
gbRuler allows you to make onscreen vertical and horizontal measurements.
It's home page is here.
WinSpy++
WinSpy++ is use to examine windows properties of running applications.
It's home page is here.
Poffs
View and search PowerBASIC forum thread content with this text-based utility. It's similar
to the threads library supported by gbVisualDesigner.
It's home page is here.
Task Manager
This is the Windows Task Manager. It can also opened with Ctrl-Shift-ESC.
Process Explorer
This is a process inspection tool by SysInternals.
It's home page is here.
User1: NotePad
This is the first user-selectable tool, which defaults to NotePad. Use the 'Select Tools'
dropdown menu to change the tool. The name of the selected EXE will be displayed in the Tools dropdown menu.
User2: Calc
This is the second user-selectable tool, which defaults to the Window calculator utility.
Use the 'Select Tools' dropdown menu to change the tool. The name of the selected EXE will be
displayed in the Tools dropdown menu.
User3: MSPaint
This is the third user-selectable tool, which defaults to the Window MSPaint application.
Use the 'Select Tools' dropdown menu to change the tool. The name of the selected EXE will be
displayed in the Tools dropdown menu.
User - Local Procedures Generator
gbVisualDesigner allows users to provide an external DLL for creating the Local Procedures
library, as an alternative to the built-in functions that create the local procedures library.
An example of such a DLL is included in the gbVisualDesigner distribution, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function CustomLocalLibrary(fNameLibrary As String, IncludeFolders As String, _
ExcludeFolders As String, Folders() As DirData, Files() As DirData) As String
The following arguments are used:
- fNameLibrary - file containing the source code on which the report is based
- IncludeFolders - list of folders whose files are to be included in the local procedures library
- ExcludeFolders - list of folders whose files are not to be included in the local procedures library
- Folders() - array of folders resulting from the IncludeFolders and Exclude folders constraints
- Files() - array of files found in the Folders() array, whose extensions match the user settings.
The custom DLL generates a procedure library in the file 'fNameLibrary'. Indexing and display of
that file is handled by gbVisualDesigner.
User - Custom Code Generator
gbVisualDesigner allows users to provide an external DLL for generating the source
code associated with a layout. An example of such a DLL is included in the gbVisualDesigner
distribution, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function CustomGeneratedCode(fNameOUT As String, gbUDT As gbUDTType) As String
The following arguments are used:
- fNameOUT - file containing layout information (*.lay format)
- gbUDT - variable containing user settings for code generation (type gbUDT)
All UDT elements correspond to gbVisualDesigner settings of the same name and have
values of 0 or 1.
Type gbUDT
SDK As Long
MinimalCode As Long
IgnoreOutsideControls As Long
NewControlIDsOnBuild As Long
CommentSeparators As Long
Unicode As Long
WS_Overlapped As Long
SS_Notify As Long
CommonEditSubClassing As Long
DebugStatements As Long
End Type
This data type, and other data types that will be needed to read the layout file (fNameOUT) are
located in the provided include file, gbtypes.inc.
The CustomGeneratedCode function reads the layout file and returns the generated custom code as a string.
User - Custom Formatter
gbVisualDesigner allows users to provide an external DLL for formatting source
code. An example of such a DLL is included in the gbVisualDesigner
distribution, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function FormattedCode(fNameOUT As String) As String
The following arguments are used:
- fNameOUT - file containing the source code that is to be formatted
The FormattedCode function reads the source code from the file and returns the formatted
code as a string.
User - Custom Text Report
gbVisualDesigner allows users to provide an external DLL for generating a custom report
from a source code listing. An example of such a DLL is included in the gbVisualDesigner
distribution, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function CustomReportT(fNameOUT As String) As String
The following arguments are used:
- fNameOUT - file containing the source code on which the report is to be based
The CustomReportT procedure reads the source code from the file and returns the content
of the text report as a string.
User - Custom Graphic Report
gbVisualDesigner allows users to provide an external DLL for generating a custom graphics report
from a source code listing. An example of such a DLL is included in the gbVisualDesigner
distribution, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function CustomReportG(fNameOUT As String, fImageNameOUT As String, w As Long, h As Long) As String
The following arguments are used:
- fNameOUT - file containing the source code on which the report is to be based.
- fImageNameOUT - file where the DLL will place the report (*.bmp format)
- w - width of the report image (returned by DLL)
- h - height of the report image (returned by DLL)
The CustomReportG function reads the source code from the file, generates the graphic report
(a bitmap) and saves the report to the file fImageNameOUT.
The return value of the function is not used by gbVisualDesigner.
User Pre-Processor
gbVisualDesigner allows users to provide an external DLL for processing code before the
code is sent to the PowerBASIC compiler. An example of such a DLL is included in the
gbVisualDesigner distribution file, in the 'customdlls' subdirectory.
The DLL uses a single function used as the interface between gbVisualDesigner and the
external DLL, declared as follows:
Declare Function PreProcessCode(fNameOUT As String) As String
The following arguments are used:
- fNameOUT - file containing the source code which is to be processed.
The PreProcessCode function reads the source code from the file and returns
modified ("pre-processed") code as a string.
Miscellaneous
This section is a catchall for information that doesn't fit in one of the sections
above.
INI File
gbVisualDesigner application settings are saved in an INI file,
kept in the same folder as the gbVisualDesigner application.
Comments and suggestions are welcome!