GUI

From BR Wiki
Revision as of 21:19, 25 February 2013 by Laura (talk | contribs) (Created page with "A '''Graphic User Interface''' or '''GUI''' refers to the user interface and not what goes on behind the scenes. GUI is commonly considered to include at least one or more ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A Graphic User Interface or GUI refers to the user interface and not what goes on behind the scenes.

GUI is commonly considered to include at least one or more of the following widgets:

  • proportional fonts
  • Grids
  • ComboBoxes
  • Dropdown Menus
  • Object Oriented Design
  • Mouse or Keyboard driven

External Links


GUI Mode

For disambiguation purposes, see also GUIMode

The GUI Mode does NOT permit bleed through the way the old console does.

If a field is written to a window that already has an overlapping field, then the field which it overlaps (the original field on the screen) is automatically deleted. There is one exception to this. Labels printed to a window using a proportional font can sometimes extend beyond the area that they would occupy using a fixed width font. When this happens, BR extends the control (text space) to the length of the data. If a label is subsequently displayed on this extended area, it is positioned *under* the previous label extension.

Print statements that do not specify a window number display output on the command console only. Print FIELDS statements that do not specify a window number go to window #0 (the GUI console).

The console may operate in GUI or non-GUI mode and may switch between the two modes. Non-GUI is the old console style. GUI is the new style. The old GUI style, however, no longer supports proportional fonts by rendering them into fixed fonts; it only works with fixed fonts.

The new console extends graphical controls, such as buttons and text fields, by three pixels on each side. This means you should allow one blank between controls (fields) to avoid overlap.

There are two CONFIG primary operands that are supported

{\b CONFIG GUI} - This determines whether BR displays the console in GUI mode or character mode.
{\b CONFIG CONSOLE} - This determines whether the console is displayed during calls to the VB or Delphi interface.

The following GUI configurations are supported

{\b CONFIG GUI OFF} - Use OLD console mode.

1.) allows window bleedthrough
2.) allows PRINT to screen or window - with scrolling
3.) allows LINPUT
4.) non-proportional fonts only
5.) STATUS FONTS shows only fixed fonts

{\b CONFIG GUI ON} - Use NEW console mode. (Command console goes away while the new console is being used. A ctrl-A will interrupt processing and cause the command console to reappear.)

1.) no window bleedthrough
2.) no PRINT to screen - must ref a FIELD
3.) LINPUT not allowed
4.) STATUS FONTS shows both fixed fonts and proportional fonts


VB and Delphi GUI Support

In addition to the new console, the VB and Delphi interfaces may be used to augment the user interface. These are described in detail in another document. However, the CONFIG statements that manage this process are described here. The first is:

CONFIG GUI SUPPRESS ( [ON] / OFF)

This setting only relates to the BR_VB (or Delphi) automatic GUI interface. When SUPPRESS is ON then any "Project=" keywords in OPEN strings are ignored. This setting operates independently of the CONFIG GUI ON|OFF statement.

CONFIG CONSOLE Settings

CONFIG CONSOLE ON (default setting) - The BR console stays visible while "Project=" forms are being displayed.

CONFIG CONSOLE OFF - The BR console goes away while "Project=" forms are showing. It reappears if an attention halt occurs, during an error halt and when no forms are open.

CONFIG CONSOLE OFF ALWAYS - The BR console only appears when BR processing is interrupted via Ctrl-A or an error occurs. If no forms are visible for more than three seconds, a 'now processing' message box appears.

GRAPHICS LINE DRAW

The following linedraw modes are supported:

CONFIG GRAPHIC_LINEDRAW THINRAISED Thin line Windows mode.
CONFIG GRAPHIC_LINEDRAW THIN Default BR thin line sunken.
these do not require any bitmap files to be present)

CONFIG GRAPHIC_LINEDRAW RAISED BR linedraw as before.
CONFIG GRAPHIC_LINEDRAW SUNKEN
(these require DRAWLINE.BMP or DRAWSUNK.BMP to be present)

We have provided a new CONFIG statement:

CONFIG GRAPHIC_LINEDRAW { ON  RAISED  SUNKEN  OFF }

(Becomes effective upon the next OPEN of window #0.)

RAISED is the default and is synonymous with ON.

SUNKEN indents line draw characters giving a bit more conservative appearance. Also try SCREEN R FF for interesting results on the conservative side.

Using "GRAPHIC_LINEDRAW OFF" will be useful when editing programs that contain line drawing characters. With "GRAPHIC_LINEDRAW ON" program code that contains line drawing characters may be difficult to read.

Linedraw can be HOT - see HOT TEXT elsewhere in this section

1.) Lines may be drawn on a window by printing linedraw characters in any positions. Linedraw characters may be generated via the numeric keypad using the numbers 0-9 when you are in linedraw mode in BR. To toggle linedraw mode on and off, press {\b Ctrl-\\}
2.) Custom linedraw sets may be used by modifying the bitmaps DRAWLINE.BMP and DRAWSUNK.BMP.



GUI Mode ON Fkey values

When GUIMODE is on, Fkey values may be assigned to controls either by PRINT or INPUT statements. If they are assigned with PRINT statements, they need not be specified in corresponding INPUT statements in order to be active. However, in order to clear them an Fkey value of minus one (-1) must be specified in either a PRINT or INPUT statement for the control.

When GUIMODE is on, a single click on a hot text field that is part of an active INPUT FIELDS statement will not trigger an FKEY interrupt, but it will cause the cursor to move to that field. If it is double clicked, focus is moved to the control and then the specified Fkey interrupt is generated.

Labels and inactive text fields with Fkey values assigned will continue to trigger an Fkey interrupt when they are single or double clicked.

The appearance of PRINTed sunken fields has been improved.

Input Fields-

To specify the color attributes of an inactive field you must set the attribute "[ INACTIVE]" i.e.

00200 execute "config attribute [ INACTIVE]N/#0000FF:#FFFFFF,font=SWISS:MEDIUM"
Print Fields-

A debug dump facility has been added to BR. It produces a file named BR_CRASH_DUMP.DMP which is very useful for resolving GPFs and assertion failures. This is produced only when using BRdebug.exe as opposed to BRnative.exe.

TABs do not switch in response to PRINT FIELDS.

DIR reports true filename case.

HOT Controls

All controls now appear active when hot (fkey value assigned).

Protected Fields

Protected fields using Windows colors are now displayed as [ inactive], not as background.

2D SECTION COLORING
01500 PRINT FIELDS "nn,nn,GRID 10/40,ATTR": (mat start, mat end, mat attr$)

Overrides the attributes of a range of cells/rows for a GRID/LIST display. This allows you to shade or otherwise alter the display of a range of cells / rows in a 2D control.

AEX and P are now supported in HEADERS column attributes. This applies this attribute to ALL cells in the column.

Force Visibility

The Force Visibility config statement requires Business Rules! 4.16 or higher.

CONFIG FORCE VISIBILITY [ ON / OFF ]

The new GUI mode does NOT permit bleed through the way the old console does. That is, anything written to an underlying window is not seen until the overlaying window is removed. However, a capability called FORCE VISIBILITY (described in a separate section) overcomes this limitation for programs designed for the old BR console.

Upon OPEN, this causes labels and text boxes that underlay the window being opened (including underlying portions of fields that span across child window boundaries) to be copied to the window being opened. THIS SIMULATES THE WAY THE OLD BR CONSOLE WORKS WITH SEE-THROUGH WINDOWS.

References to controls that BEGIN in the portion of the parent window that is covered by the child window are converted to corresponding addresses on the child window.

CLOSE FREE: Clears the underlying parent area and copies the child window controls to the parent window.

Note that Force Visibility has no affect on GUI controls (such as GRID and LISTVIEW). Only labels and text are processed by Force Visibility. This feature accommodates certain old BR window behaviors in existing programs. *It should not be used for new development.*


The Shaded Sunken Appearance

Normal Windows behavior is to grey out any data entry fields that are inactive. Consequently, that is how labels appear when they are sunken. This defeats the ability to use a sunken approach to highlight screen headings. For example if you specify SCREEN U 0173 and then specify U as a leading attribute in a PRINT FIELDS specification, the field will be displayed sunken but grey.

You can now override the normal Windows behavior with regard to greying out sunken labels by specifying S as a leading attribute. The S (sunken - formerly shaded) field attribute calls for a white sunken field, irrespective of whether the field is available for keyboard entry.

The name of this example is: SUNKEN.BR

00100 EXECUTE "CONFIG SCREEN U 0173"
00200 PRINT FIELDS "1,1,C 11,U": "Sunken grey"
00300 PRINT FIELDS "1,12,C 12,S": "Sunken white"

Output:


Graphic Images - Pictures

See Picture.