The V C++ GUI Framework User Guide:Latest Features

From EDM2
Jump to: navigation, search

This page will cover the latest version of V. The current release is Version 1.25. See Installing V for installation instructions.

New Features - V Version 1.25

V 1.25 has no new features. It has a few bug fixes, and a few minor changes required to work with VIDE correctly. This is mostly a cleanup release. It is worthwhile to upgrade to it, but there is no new functionality.

New Features - V Version 1.24

New vApp features
  • A new method, showAppWin, was added to allow dialog-only V apps. The details are explained in vApp::showAppWin.
  • Drag and Drop support added for Windows only. Limited support for Drag and Drop on Windows has been added. For now, the support is rather limited. If you drag a file to an open V GUI app, the method vApp:DropFile(const char* fn) will be called with the dropped file name in fn. You can override DropFile in your own vApp class. The DropFile method only provides the name of the file dropped. It does not tell you which window the file was dropped on, nor does it give you where it was dropped. Maybe later. No support for the X versions yet.
DLL support for Windows
The V library will now correctly and easily build as a DLL for Windows. Only the MinGW version is explicitly supported, but it should also build for Borland or MSVC.
Major Motif Bug Fixes
V now seems to actually work with Motif. For small, single-window apps, earlier versions worked quite will. However, there were serious bugs when trying to close windows using the window manager close button. There were also problems when using the CloseAppWin method. These seem to be fixed and work quite well now.

New Features - V Version 1.23

New vTextCanvas features
  • New ChrAttr text attributes: ChBlackOnBG and ChWhiteOnBG for text. These attributes are ORed with other ChColors will use the color for the background, and use White or Black for the text color.
  • virtual void DrawAttrsText(const char* text, const ChrAttr* attr); - Draws text according to the ChrAttr array instead of a single attribute.

New Features - V Version 1.22

vPopupMenu
A new class to support Popup Menus has been added.
LessTif/Motif support
LessTif is now the main widget set supported for the X version. Athena support will continue at a reduced level.
VIDE enhancements
At the development of VIDE continues, minor features are being added to the V library. Mostly this has been bug fixes or feature additions to the vTextEdit class.

New Features - V Version 1.21

New User Guide
The V User Guide has been completely reformatted for HTML. The LaTeX version and its ugly converted HTML version have been abandoned. The new version uses style sheets, and has lots of hyperlinks to make it a truly great online manual.
Still HTML has limitations. One feature I want to add is the ability to put the reference for all classes on a single page so that it can easily be printed by the browser. Unfortunately, HTML does not have a universially supported mechanism similar to #include. So it goes.
vSList Class
The vSList class has been added to help make using lists for C_List objects easier. See vSList.
New MVC Support
A V user, Tyge Løvset, suggested some new methods for vApp and vWindow that make implementing MVC with V very easy. See vApp MVC.
OpenGL Library Separated
Because many Linux systems are configured without OpenGL or Mesa, the V OpenGL canvas has been moved to its own library. This is true for the MS-Windows version, too.
MS-Windows
MDI Empty Frame Support:A new method has been added to vApp to allow V apps to work like standard MDI apps when all command windows have been closed. See [vapp.htm#vApp::CloseLastCmdWindow vApp::CloseLastCmdWindow].
MS-Windows
Transparent Icons:Support for transparent icons in MS-Windows has been added. See vIcon.
MS-Windows
Cygwin and mingw32 support improved
Support for the GNU Cygnus and mingw32 compilers has been improved.
MS-Windows
DLL for Borland C++:You can now build a V DLL with at least Borland C++. I haven't gotten MSVC++ or the gnu win32 compilers to do this yet. Contributions welcome!
MS-Windows
Windows 3.1 no longer officially supported:I don't know how many users this will affect, but it has become impossible for me to support Windows 3.1 any longer. I haven't tested V with Windows 3.1 since about V 1.16, so I don't even know if 1.21 does or does not work with Windows 3.1. If you need 3.1 support, your are welcome to try it. If you send a diff file, I will be happy to provide that to others, and incorporate the changes for the next release. However, I will be unable to continue to confirm 3.1 compliance.
VIDE Improved
The VIDE and the V AppGen utilites have been improved.

New Features - V Version 1.20

New Features for C_List
The number of rows displayed can now be controlled by using the CommandObject element size. By specifying the attribute CA_Size and providing a value for the size element, you can specify how many rows to show. If you don't specify a size, 8 rows will be displayed. Vwill support between 1 and 32 rows. Note the that the size element is the last one of a CommandObject, and can left out of a declaration, which results in the compiler generating a zero value, giving the default 8 rows.
The width in pixels (approximately) of the list can be controlled by specifying the CA_ListWidth attribute and providing a value to the retVal parameter, which is otherwise unused for a list object. This implementation isn't perfect - you may have to play with the interaction between the width you specify, and the font used in a list control.
Tool Tips
Support for Tool Tips was added in V Version 1.18. You can easily add Tool Tips by adding the appropriate text to your existing CommandObject definitions of tool bars and dialogs. The new definition of a CommandObject follows:

typedef struct CommandObject
  {
    CmdType cmdType;    // what kind of item is this
    ItemVal cmdId;      // unique id for the item
    ItemVal retVal;     // initial value of object
    char* title;        // string
    void* itemList;     // used when cmd needs a list
    CmdAttribute attrs; // list of attributes
    int Sensitive;      // if item is sensitive or not
    ItemVal cFrame;     // Frame used for an item
    ItemVal cRightOf;   // Item placed left of this id
    ItemVal cBelow;     // Item placed below this one
    int size;           // Used for size information
    char* tip;          // ToolTip string
  } CommandObject;

char* tip

The tip parameter is used to specify an optional ToolTip string for use with a command object. If you provide a string here, that string will be automatically displayed after the user holds the mouse over that control. The exact delay before the tip is shown, and the format of the tip box is somewhat platform dependent, and all platforms might not support tool tips. (Currently, only OS/2 does not support tips.) Note that if you use a tip, you must be sure to include a value (usually 0) for the size parameter!

void vBeep()
This utility routine will sound an audible beep.
void vGetcmdIdIndex(ItemVal cmdId, CommandObject *cmdObj)
Sometimes when you work with a CommandObject array to define a dialog, you need to access the elements of a particular item in the array. This is especially true for manipulating lists. This routine will return the index into a CommandObject array of an entry with the supplied ItemVal cmdId.

Release Notes - V Versions

Version 1.00
This version was local to the University of New Mexico on January 10, 1996. Versions 1.01, 1.02, and 1.03 were local maintenance releases.
Version 1.04
This was the first major public release of V, and was announced to the world on February 14, 1996.
Version 1.05
This version had several bug fixes obtained from feedback of the public release.
Version 1.06
This was an X only release, and added 3D controls.
Version 1.07
This release was never formally announced, and included some of the changes listed for version 1.07.
Version 1.08
The 4/15/96 release added several significant features to V:
  • The vMemoryDC drawing canvas, including new methods CopyFromMemoryDC and DrawColorPoints.
  • Internal revisions for handling of color, including adding vColor::ResetColor to allow reuse of color maps, and vColor::BitsOfColor to get color capability. These revisions allow Vapps to make more effective use of default color maps.
  • vPen::SetColor(r,g,b) and vBrush::SetColor(r,g,b) are being dropped in favor of the vColor forms. These calls break the hidden management of color maps, and while still included in the code, should not be used. Support for the (r,g,b) form will be dropped entirely in future versions of V.
  • C_ToggleIconButton was added to allow a pressed in button interface look in place of check boxes and radio buttons.
  • Documentation for ChangeColor and C_ColorLabel was added, although the functionality has been there for a while.
  • The WIN32 port was finished, and the X and MS-Windows versions are now in sync.
Version 1.09
Added C_ToggleButton and C_ToggleFrame controls. It also includes a large number of Vicons suitable for building command pane tool bars.
Version 1.10
The 5/29/96 release of V includes the following enhancements and changes:
  • The V Icon Editor - an icon editor to create icons for various V controls.
  • Inclusion of accelerator key support in menus.
  • Addition of the ChangeListPtr set type to allow completely dynamic lists, combo boxes, and spinners.
  • Addition of DrawLines, DrawPoints, and DrawRectangles to vCanvas.
  • Several bug fixes for both MS-Windows and X, some relatively major.
  • The canvas page scroll messages were changed on the X version to correspond to the behavior of the MS-Windows version. A page scroll message is sent only at the completion of a scroll, not continuously as before. It is usually rather difficult to implement nice continuous scrolling, so this approach seems more useful to more people. This is the only known change that might affect compatibility with previous Vapplications.
  • Addition of a directory for outside contributions.
Version 1.11
The 7/4/96 release of V has several minor bug fixes for the MS-Windows and X versions. It also adds the WorkSlice methods to support applications that require computations to continue even if the user is not entering commands to the application.
Version 1.12
This was a bug fix release for MS-Windows. The X version was unchanged, but renumbered for consistency.
Version 1.13
This 8/24/1996 release of V is a major release with several new features, and some significant bug fixes that can change the behavior of existing Vapplications. The following includes a list of changes:
  • The V Application Generator, vgen is now included with the standard distribution. It will generate a simple V application as a starting skeleton for new apps.
  • The values being passed by V to vCanvasPane::VPage and HPage were incorrect on the X version. The documentation states that the values for Top should be in the range 0 to 100. The MS-Windows version worked correctly, but the X version was passing a range of 0 to (100-Shown). This bug actually has been in the X version since the switch to 3D Controls. With version 1.13, both MS-Windows and X work the same.
  • The MS-Windows version of vDC::DrawText was fixed to work according to the documentation. It had been drawing text with the x,y as the upper left corner of the text. Beginning with 1.13, it now draws at the lower left corner as specified in the documentation.
  • Two functions, GetHScroll and GetVScroll, were added to vCanvasPane to make dealing with scroll bars easier.
  • A new standard using enums for generating IDs for controls has been adopted beginning with 1.13.
  • C_TextIn controls now allow you to specify the width of the control in characters using the size field. This is described in Chapter 6.
  • In vCanvasPane, new parameters (with default values for backward compatibility) were added to CopyFromMemoryDC to allow subregions to be copied.
  • Using a vTransparent pen when drawing text now results in leaving the existing background when drawing, and a vSolid pen overwrites with the current background color.
  • There was a conflict on MS-Windows with using VK_ for key names. The MS-Windows version was changed long ago, and now the X version also uses lower case letters (e.g., vk_Tab).
Version 1.14
The major addition to 10/6/96 V Release 1.14 is the addition of the vTextEditor class, which is a very good first pass at a complete editing canvas. The editor is complete, can be extended to support custom command sets or file management. It is missing cut, copy, and paste, which will be implemented as general support for these is added to V. The code for vTextEditor is based on vTextCanvasPane, and is identical for the X and MS-Windows versions.Also, for the X Version, support for OpenGL has been added. This support is found in the distribution directory v/vxgl. While the VOpenGL canvas pane seems very robust, it is still somewhat experimental. I would like any feedback on its use and design.Other changes, mostly bug fixes, include:
  • X version: The little close button on the left of the menu bar has been dropped by popular request. It seems most people didn't like it. If you do, you can still get it by defining the symbol USE_CLOSE_BUTTON. Instead, Vnow supports the X WM_DELETE_WINDOW protocol. This protocol is supported slightly differently by different window managers, but accomplishes the same thing as the old close button.
  • X version: There was a minor bug in how the scroll bars worked when top == 0.
  • X version: The method used to get the size of a window was changed, and should now give correct values.
  • X version: There was a bug in drawing radio buttons that only showed up on some systems.
  • X version: There was a bug in changing the current selection in combo boxes.
  • X version: There was a bug in setting colors for the PostScript DC.
  • X and MS-Windows: There were several bugs in vTextCanvasPane exposed by the implementation of vTextEditor.
  • X version: There was a bug in the key mapping that would cause a program to terminate if an unrecognized key was pressed.
  • MS-Windows: The method to determine the size of the MDI frame and client windows was improved (I hope!).
  • MS-Windows: A bug with the work timer was fixed. The interaction between the work timer, check events, and the MS-Windows message loop was changed to work better.
  • MS-Windows: The argument order of ClearRect was fixed to correspond to X and the documentation.
  • MS-Windows: There was a bug that didn't allow SetValue to work correctly for some controls.
  • MS-Windows: A bug in handling the MS-Windows caret in text canvases was fixed. This one was a bit subtle, but nasty in possible side effects. Also, EnterFocus and LeaveFocus did not work correctly.
  • MS-Windows: A bug in setting text colors on NT and Windows 3.1 was fixed. The bug did not manifest itself on Windows 95.
Version 1.15
Release of V Version 1.15 has some non-backward compatible changes. In previous versions of V, there were inconsistencies in the order of width and height parameters. These have all been now changed to consistently use a width/height order. (Except for vIcon, which still use height/width.) The decision to fix this order came from a general consensus of the V mail list.You will need to change your code to reflect the new changes. The following things must be changed:1. Any calls to the constructor of a base or derived vCmdWindow will need the width and height order swapped.2. Calls or overrides of vApp::NewAppWin need the order of width and height swapped.3. Calls to vCanvasPane::SetHeightWidth(h,w) need to be changed to vCanvasPane::SetWidthHeight(w,h).4. Calls or overrides of all versions of Redraw(x,y,h,w) need to be changed to Redraw(x,y,w,h).5. Calls or overrides of all versions of Resize(h,w) need to be changed to Resize(w,h). (The vTextCanvas row/column versions retain their row/column order.)Also, the makefiles have been revised for more flexible building on different *nix platforms.A new method, vDialog::DialogDisplayed has been added to allow dynamic setting of dialog control values.
Version 1.16
Version 1.16 has no significant changes in V functionality. It mostly has some bug fixes. The only major change is the release of a completely new set of Makefiles for the Unix version. These new makefiles were contributed by a V user, and are much cleaner than the old versions.A summary of the changes:
  • A small change to the code generated by vAppGen.
  • A fix to scrolling in the V Icon Editor.
  • Some changes to the v_defs.h file for MS-Windows, including compatibility changes needed for Microsoft VC++. Project files were added for MSVC++.
  • The == and != operators for brushes, fonts, pens, and colors were changed to use reference parameters consistently.
  • Various minor changes to enhance compiler compatibility, both on MS-Windows and X.
  • VReply was fixed to work over multiple shows.
  • A void* was added to vAppWinfo.
  • Vmemdc had height and width switched.
  • Sizing of buttons on MS-Windows was fixed for Windows 95.
  • A resource leak was fixed for MS-Windows.
  • A major bug that showed up only under Microsoft VC++ was fixed.
  • Initialization of text in strings was fixed for MS-Windows.
  • Changing the values of radio buttons on MS-Windows now works.
  • Spinners now honor the size specification.
  • A tab keystroke now works correctly on MS-Windows.
  • A bug in
  • Various new tests were added to the test program.
  • A couple of bugs were fixed in the X OpenGL V interface.
Version 1.17
Version 1.16 has proven to be remarkably stable. A few minor bugs have been reported and corrected for Version 1.17. Some enhancements have been added, the most significant allows you to specify the number of rows displayed in a list box.A summary of the changes:
  • Lists by default display 8 rows, buy you can now specify and size between 1 and 32 rows.
  • A bug in Windows when closing multiple windows was fixed.
  • The vReply dialog has been changed to allow a default string in the input field.
  • Direct printing to lpr has been added to the X version.
  • The PostScript driver was modified to print better lines.
Version 1.18
Release 1.18 has a major enhancements to V. The main addition is support for Tool Tips - little boxes with text info that are automatically displayed when the user holds the mouse over a control. Tool Tip support is very trivial to add to your programs, and greatly enhances the user interface.There are some minor enhancements, and a few bug fixes. Beginning with the 1.18 release, there will be a separate document that summarizes the changes for that version. This will simplify the upgrade path for past users.
Version 1.19
Release 1.19 has some minor enhancements, and a few bug fixes. The main enhancement is the addition of password support for text in controls. There have also been some improvements to vgen, especially for support for the mingw32 MS-Windows compiler. The support for the mingw32 compiler has been improved.
Version 1.20
Release 1.20 is has some major new features.
  • Support for OpenGL. OpenGL is now supported on both X and MS-Windows. While the interface to the vBaseGLCanvasPane class has not changed, the X version was revised to be properly derived from vCanvasPane, and is now included as a standard class in the library.
  • The clipboard is finally supported - at least for text.
  • The text editor class has been improved. The included text editor based on the class now supports C++ syntax highlighting.
  • The first version of the V Integrated Development Environment for the GNU g++ compiler has been included. It currently works with makefiles you generate. It will be improved to include full project management, a class browser, a dialog builder, and other neat features.
  • Vgen, the Vshell application generator, has been improved, and also includes support for generating OpenGL app shells.
  • There has been a serious bug ever since version 1.00 when closing multiple windows. The void vApp::CloseAppWin class did not properly allow the user to cancel the close sequence by the app. This class has been changed to int vApp::CloseAppWin, and if your override returns 0, the exit process will now be properly aborted. Unfortunately, this means you must change all of you apps to conform to the new int type.
  • The vApp::xxAll methods were broken on the X version.
  • A problem with tool tips on MS-Windows with multiple opens and closes on dialogs has been fixed.
  • The startup code has been separated to allow easier building of DLLs.
  • On MS-Windows, the Esc key is now the same as clicking the Cancel button. This has not been implemented on X yet. This change potentially causes a problem with MS-Windows apps. MS-Windows handles the Esc key by reserving the value 2. Unfortunately, there is no way to tell if the 2 is from the Esc key or from a menu or dialog command item you've defined with the value 2. So, you must change the value of any button or command object you have with the id value of 2 to something else. Sorry.

Future Plans

  • The VIDE will be enhanced. It will be released as a separate package, apart from the standard V library.