Enhanced GUI Functionality


PLBCMP GUI Only, 9.6

 

To provide more advanced Windows GUI functionality for PLB applications, it has become necessary to build the PLB runtimes around newer platform toolsets that require new Windows libraries to allow the latest features for PLB applications. Therefore, the 9.6 and later runtimes (PLBWIN, PLBNET, PLBCLIENT, PLBCLINET, PLBCON, PLBCONET, PLBCLICON, PLBCLI, and PLBRUN) now require a 'comctl32.dll' version 6. In addition, new Windows 'C' runtime library versions are required for the new 9.6 runtimes:

 

Library

Version required

msvcp100.dll

10.0.40219.325

msvcr100.dll

10.0.40219.325

Note:

  1. The 'C' runtime libraries must EXIST on a Windows system the is executing the PLBNET runtime. This is required because the .NET runtime can only be built to dynamically load the 'C' runtime libraries. This applies to PLBNET, PLBCLINET, PLBCONET, PLBCLI, and PLBRUN.

  2. The 'C' runtime libraries for all other runtimes (except .NET runtimes) have been built such that the 'C' runtime libraries do not have to exist on a Windows executing the runtime. This applies to PLBWIN, PLBCON, PLBCLIENT, and PLBCLCON.

  3. With the implementation of newer features and functionality that requires a newer platform toolset, the PLBNET, PLBCLINET, PLBCLI, and PLBRUN runtimes now require a .NET Framework 4.0.30319 as the minimum version.

 

Since prior versions of PLB runtimes require a 'comctl32.dll' version 5, the 9.6 release includes runtimes built to a platform toolset that requires OS libraries at the same level as a 9.5B version. These version 5 runtimes have the same 9.6 updates but they cannot provide the new look and features available when using 'comctl32.dll' version 6. The version 5 runtimes are named: PLBWIN5, PLBNET5, PLBCON5, PLBCONET5, PLBCLIENT5, PLBCLINET5, PLBCLICON5.

Note:

  1. The version 5 runtimes are implemented to ignore any version 6 features that are not available in 'comctl32.dll' version 5.

  2. The PLBNET5, PLBCLINET5, and PLBCONET5 .NET runtimes require a .NET Framework version of 3.0 or later.

 

The new 'comctl32.dll' version 6 features that have been implemented as new properties and methods are described as follows:

Overview

The GUI controls implemented using 'comctl32.dll' version 6 give the new Vista look. In this case, the controls have a flat face format with color coded presentations. The new Vista look applies to any PLB application that is executed using a runtime that uses the 'comctl32.dll' version 6.

 

Windows Ribbon framework support has been added. Ribbon support is only available when using a runtime built for 'comctl32.dll' version 6.

Ribbon Support

 

Windows Ribbon Controls

 

The Windows Ribbon framework is a rich command presentation system that provides a modern alternative to the layered menus, toolbars, and task panes of traditional Windows applications.

 

The Ribbon framework provides this flexibility by separating functionality from presentation with two distinct development structures: an Extensible Application Markup Language (XAML)-based markup language to declare controls and the visual layout of a Ribbon implementation, and runtime interfaces to initialize the framework and handle events at program execution time.

 

Additional information is available from Microsoft:

 

Title

URL

Ribbons

http://msdn.microsoft.com/en-us/library/cc872782.aspx

Windows Ribbon Framework

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371191(v=vs.85).aspx

Introducing the Windows Ribbon Framework

http://msdn.microsoft.com/en-us/library/windows/desktop/dd316910%28v=vs.85%29.aspx

 

Ribbon System Requirements

  1. Ribbon support is not available for Windows XP.

  2. Ribbon support is available for OS versions VISTA and later.

  3. The Windows Ribbon Framework is required.

Ribbon Components

Application Button

The button that appears on the upper-left corner of a ribbon. The Application button replaces the File menu and is visible even when the ribbon is minimized. When the button is clicked, a menu that has a list of commands is displayed.

Quick Access Aoolbar

A small, customizable toolbar that displays frequently used commands.

Category

The logical grouping that represents the contents of a ribbon tab.

Category Default Button

The button that appears on the ribbon when the ribbon is minimized. When the button is clicked, the category reappears as a menu.

Panel

An area of the ribbon bar that displays a group of related controls. Every ribbon category contains one or more ribbon panels.

Ribbon elements

Controls in the panels, for example, buttons and comboboxes.

PL/B Language Ribbon Support

Ribbons are defined and created using the XAML based markup language to declare individual controls on a ribbon. Ribbons are only processed/used as a resource for a Windows application. Therefore, to give the maximum flexibility and functionality for ribbons using the PLB language, the PLB runtimes use a Windows resource DLL specified by the PLB application to load ribbon resources. This gives the most flexible and generic solution for the PLB developer to meet any program application requirements.

Note:

  1. The generation and definition of the resource DLL that contains the ribbon resources are implemented by the PLB program developer. See the section on Ribbon creation for more details.

  2. Sunbelt provides a sample ribbon resource DLL named 'plbribres.dll' along with the XAML definitions to give a PLB developer a starting point toward developing ribbons as needed.

  3. Ribbons can be loaded from any resource dll, using the RIBDLL=<svarslit>, and RIBNAME=<svarslit> properties of a WINDOW object.

  4. One ribbon is supported per WINDOW object.

  5. The ribbon size and position are controlled by the Windows ribbon framework.

  6. The RIBMODE=<dnumnvar> property controls the how the WINDOW object adjusts to ribbon sizing and positioning. A value of $ShowRibModeAllwill cause the ribbon size to be used to re-size the window, and shift all other objects down. A value of $ShowRibModeDockOnly will cause the current size of the ribbon to be added to the dock top padding size.

  7. The ribbon interacts with the WINDOW object by sending a $Click event with the event result containing the identifier of the ribbon element.

  8. The properties of the ribbon can be obtained using the RibbonGetProp method of the WINDOW object.

  9. The properties of the ribbon can be modified using the RibbonSetProp method of the WINDOW object.

  10. The RibbonSetModes method specifies the application modes to enable. This allows assigned groups of ribbon elements to be displayed and hidden under program control.

  11. The RibbonShowContext method invokes a Context Popup for the element identified with the Id parameter at the given location.

Ribbon Creation

The generation and definition of the resource DLL that contains the ribbon resources are done by the PLB program developer. The minimum system requirements to generate a ribbon resource dll are defined as follows:

 

  1. Requires Visual Studio 2005, 2008, 2010 or VC++ Express to be installed.

  2. Windows 7 SDK is required.

  3. Sunbelt is providing a sample 'plbribres' VC++ project to a create resource dll from a sample XAML definition file.

  4. The 'plbribres.dll' ribbons are used in sample programs named 'ribhtml.pls' and 'ribctx.pls'.

Ribbon Designers (3rd Party)

Another option to the PLB developer who wants to create a ribbon resource DLL is to use a third party ribbon designer. One possible option is a ribbon designer described as follows:

 

Visual Ribbon Creator (http://www.turboirc.com/vrc/)

 

VRC requires

  1. Visual Studio 2005, 2008, 2010 or VC++ Express to be installed.

  2. Windows 7 SDK is required.

 

This ribbon designer generates a DLL that can be loaded and used by a Windows PL/B runtime. The sample VRC DLL named 'Ribedit.dll' is available to the PLB developer for evaluation.

Ribbon Restrictions

  1. A ribbon can only be created for a Window that is a top-level window of the desktop.

  2. A ribbon can not be created for a Window that is a child Window. A ribbon can not be created on a Window that has a parent.

  3. A ribbon can not be created on a Window has a tool window style.

  4. A ribbon can not be created on a Window that does not have a caption. If a Window has a caption and a ribbon is attached to the Window, unpredictable rendering of the ribbon may result.

Sunbelt Ribbon Sample Programs

Sunbelt is providing example PLB programs that use sample ribbon resource DLLs. These programs and dlls are described as follows:

PlbRibRes.DLL

Sunbelt sample ribbon resource DLL. This resource dll includes the following XAML file definitions as resources:

 

plbrib_cont.xml

plbrib_font.xml

plbrib_gall.xml

plbrib_html.xml

plbrib_simp.xml

RibDll32.DLL

This resource DLL was created using the Visual Ribbon Creator. This resource DLL demonstrates that the Sunbelt runtime can use a third party generated ribbon resource DLL.

RibTest.pls

Uses MRU (Most Recently Used) list.

Uses Context Menu.

Uses ribbon font properties.

Uses ribbon modes.

Uses ribbon events.

 

Ribbon Resources from PlbRibRes DLL using RIBNAME property:

RIB_SIMP_RIBBON

RIB_GALL_RIBBON

RIB_HTML_RIBBON

RIB_CONT_RIBBON

RIB_FONT_RIBBON

 

Ribbon Resources from RibDll32 DLL using RIBNAME property:

APPLICATION_RIBBON

RibHtml.pls

Uses ribbon font properties.

Uses ribbon modes.

Uses ribbon events.

Ribbon Resources from PlbRibRes DLL using RIBNAME property:

RIB_HTML_RIBBON

Ribctx.pls

Uses the RibbonShowContext method operations.

Uses Context Menu.

Uses ribbon events.

Ribbon Resources from PlbRibRes DLL using RIBNAME property:

RIB_CONT_RIBBON

RibEdit.pls

Uses Font Properties.

Uses ribbon events.

Resources from RibDll32 DLL using RIBNAME property:

APPLICATION_RIBBON

 

 



PL/B Language Reference