Dialogs.Columns
Basically this is same as Dialogs.ListBoxes except that it has a header for the title and that the number of list boxes can be dynamically altered.  There are 2 predefined entry types, text or executable.  By default the list box entry type is text.  The difference is that for an executable, double clicking on it will execute that program instead of text renaming.  The user may defined their own column types, for example a column of numbers.  Unlike Dialogs.ListBoxes, the entries may be displayed in text or icons, colors may be changed and column widths may be resized.  This is by far the most complicated package since there are 4 other supporting packages.

Note: Although the dialog can be set to be read only for all columns, this action may be            overridden for individual columns or entries through the use of handlers.

Limitations
As of the current implementation,
1.   All columns must fit the screen
2.   The order of the columns though may not be changed.
3.   Graphic objects are limited to Icons.

Handlers
procedure AddToEntryTypeMenuHandler(Container          : in out Containers;
                                                                EntryTypeMenu : OS.Windows.Menus.Menus'Class;
                                                                OrderIndex        : positive);
--
-- Allows user defined column types to be added.
--

procedure CreatedEntryHandler(Container    : in out Containers;
                                                  OrderIndex : positive;
                                                  EntryIndex  : positive);
--
-- Actions to be done after an entry is created.
--

procedure CreateHeadingHandler(Container : in out Containers; OrderIndex : positive);
--
-- Actions when a heading is created.  If an empty name is used, the heading creation is cancelled and
-- the handler is not invoked.
--

procedure DeleteEntryHandler(Container    : in out Containers;
                                                 OrderIndex : positive;
                                                  EntryIndex : positive);
--
-- Actions to be taken when an entry is about to be deleted.
--

procedure DeleteHeadingHandler(Container : in out Containers; OrderIndex : positive);
--
-- Actions to be taken when a heading is about to be deleted.
--

function EntryCanBeEmptyHandler(Container   : Containers;
                                                       OrderIndex : positive;
                                                        EntryIndex : positive) return boolean;
--
-- Determines whether a particular entry may have empty value.
--

procedure EntryInputRightClickHandler(Container    : in out Containers;
                                                                EditBox       : OS.Windows.Controls.EditBoxes.Controls'Class;
                                                                OrderIndex : positive;
                                                                 EntryIndex : positive);
--
-- Actions to be taken when clicking on the right mouse button while an entry is being edited.
--

procedure ExtendEntryContextMenuHandler(Container : in out Containers;
                                                                      Menu       : OS.Windows.Menus.Menus'Class;
                                                                      ReadOnly : boolean);
--
-- Extends the context menu when right clicking on the list box area.  ReadOnly indicates whether the
-- clicked column (list box area) is editable.
--

procedure ExtendHeaderContextMenuHandler(Container : in out Containers;
                                                                         Menu       : OS.Windows.Menus.Menus'Class;
                                                                         ReadOnly : boolean);
--
-- Extends the context menu when right clicking on the header area.  ReadOnly indicates if the column
-- under the clicked header is editable.
--

procedure ExtendMainMenuHandler(Container : in out Containers;
                                                         Menu        : OS.Windows.Menus.Menus'Class;
                                                         ReadOnly : boolean);
--
-- Extends the main menu.  ReadOnly refers to the global state of the dialog box being able to be
-- edited.
--

procedure ExtendMenuItemIdHandler(Container       : in out Containers;
                                                             MenuItemID : OS.Ids;
                                                             ReadOnly      : boolean;
                                                             HasChanged  : out boolean);
--
--  Actions to be handled when a menu item option is selected.  ReadOnly refers to the global state of
-- the dialog box being able to be edited.  HasChanged is an indicator to inform SaveHandler to save
-- altered data.
--

function FormattedInputTextHandler(Container : Containers; RawText : Wide_String)
             return Wide_String;
--
-- Transforms the raw input text into a display formatted form.  By default the input data returns
-- unchanged.
--

procedure ListBoxEntryUserDrawHandler(Container             : in out Containers;
                                                                  DC                      : OS.DeviceContexts.DCs'Class;
                                                                  ListBox     : OS.Windows.Controls.ListBoxes.Controls'Class;
                                                                  EntryIndex           : positive;
                                                                  EntryLeftTop        : OS.Points.Points;
                                                                  EntrySize              : OS.Points.Points;
                                                                  GraphicFileName  : Wide_String;
                                                                   EntryText            : Wide_String;
                                                                   UserTypeTag        : natural;
                                                                   IsHighlighted       : boolean;
                                                                   TextColor             : OS.Colors.Colors;
                                                                    BackgoundColor  : OS.Colors.Colors);
--
-- Instructs the application how to paint an user defined entry type value.  The default is as if the
-- value is an executable type.  EntryLeftTop & EntrySize indicates the area to be drawn.  UserTypeTag
-- is a general value to indicate the user defined column type.  For example,
--
--    type NumericTypes is (Negative, Integer, Natural, Positive, Float);
--
--  if the column type is an Integer, then UserTypeTag has a value of NumericTypes'Pos(Integer).
-- IsHighlighted indicates if the entry to be drawn in a selected entry ie highlighted.  GraphicFileName
-- is the name of the imageto be drawn.  EntryText is the text representation of the image.
--

procedure LoadHandler(Container : in out Containers; Loaded : out boolean);
--
-- Instructs the application how to load data into the structures.
--

procedure MoveEntryHandler(Container : in out Containers;
                                               From        : positive;
                                               To            : positive;
                                               PreMove  : boolean);
--
-- Actions to be taken when an entry is just about to move or after it has been moved as indicated
-- by PreMove.
--

procedure SaveHandler(Container : in out Containers; Saved : out boolean);
--
-- Instructs the application on how to save the data.
--

procedure UserControlHandler(Container     : in out Containers;
                                                 Control        : OS.Windows.Ops.Windows'Class;
                                                 ControlID    : OS.Ids;
                                                  Notification : OS.Windows.Notifications;
                                                  Handled      : out boolean);
--
-- Actions to be done when user defined controls are pressed.  Notification can contain additional
-- information which is usually set by RouteToControlHandler.
--

procedure ValidEntryTypeHandler(Container       : in out Containers;
                                                      OrderIndex    : positive;
                                                       EntryIndex    : positive;
                                                       EntryText      : Wide_String;
                                                       EntryValue    : System.Address;
                                                       UserTypeTag  : natural;
                                                       ErrorMessage : out awStrings.awStrings;
                                                       IsValid           : out boolean);
--
-- Make sure the entry data is valid when the column type is being changed to type other than
-- Dialogs.Text.  For example, when a column type of text is being made into a numeric type, each
-- entry must be ensured to be in a numeric form.  ErrorMessage indicates the kind of error detected.
-- If so IsValid is false and the user is prompted to make the change.  If the escape key is pressed
-- the during the course of editing an invalid entry, the entire operation is cancelled and all the data is
-- reverted to its original form.  This handler is invoked when the column type is interactively changed.
--

procedure ValidateTextInputHandler(Container        : in out Containers;
                                                          RawText          : Wide_String;
                                                          FormattedText : Wide_String;
                                                          Accepted          : out boolean;
                                                          ErrorMessage  : out awStrings.awStrings);
--
-- Validates the input text.  If it is not Accepted, the ErrorMessage indicates the kind of error occurred.
-- This is when the column type is Dialogs.Text.
--

Home
Back To Dialogs.ListBoxes
Dialogs.TreeViews