User Tools

Site Tools


axcontrolgrid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
axcontrolgrid [2019/10/02 17:44]
bloguintosh created
axcontrolgrid [2019/10/10 20:01] (current)
bloguintosh [Version History]
Line 1: Line 1:
-====== AXControlGrid ​1.0 ======+====== AXControlGrid ======
  
 AXControlGrid is a complete and powerful Xojo desktop UI component for macOS and Windows that it makes possible to put Canvas-based controls in a Page or a series of Pages of a given size (width and height). AXControlGrid is a complete and powerful Xojo desktop UI component for macOS and Windows that it makes possible to put Canvas-based controls in a Page or a series of Pages of a given size (width and height).
Line 23: Line 23:
  
 AXControlGrid requires Xojo 2017r3 or later on macOS, and Xojo 2018r3 or later on Windows; both for generating 32 and 64 bit executables. AXControlGrid requires Xojo 2017r3 or later on macOS, and Xojo 2018r3 or later on Windows; both for generating 32 and 64 bit executables.
 +
 +> **Note**: The compatibility with **Xojo 2019r2** is in the works. Stay tuned!
 +
 +Supported Xojo Editions:
 +
 +  * Xojo Desktop
 +  * Xojo Pro
 +  * Xojo Pro Plus
  
 Both the AXControlGrid component and the provided Demo Project had been tested on the following Operating Systems versions: Both the AXControlGrid component and the provided Demo Project had been tested on the following Operating Systems versions:
Line 36: Line 44:
 AXControlGrid license users are entitled to receive for free all the component updates published for 12 months after purchase. AXControlGrid license users are entitled to receive for free all the component updates published for 12 months after purchase.
  
-===== Source Code =====+===== Licensing The Component ​==== 
 +Call the License method on the BaseBoard class with the data received from AprendeXojo in order to license your copy of AXControlGrid:​
  
-Feel free to contact me if you are interested in an edition with no encrypted components ​(access to the source code).+''​BaseBoard.License("​Name","​Surname","​Data"​)''​ 
 + 
 +===== Source Code =====
  
 +Feel free to [[https://​www.aprendexojo.com/​en/​contact/​|contact me]] if you are interested in an edition with no encrypted components (access to the source code).
 ===== How to setup AXControlGrid in your projects ===== ===== How to setup AXControlGrid in your projects =====
  
Line 89: Line 101:
   * Change Page: Click and change the value in the lower left text field. Use the left and right arrow cursor keys. Press the Alt key (Ctrl on Windows) in combination with the mouse wheel or horizontal trackpad gesture.   * Change Page: Click and change the value in the lower left text field. Use the left and right arrow cursor keys. Press the Alt key (Ctrl on Windows) in combination with the mouse wheel or horizontal trackpad gesture.
   * Select Items: Drag the mouse or trackpad cursor to draw a selection marquee around the items to be selected.   * Select Items: Drag the mouse or trackpad cursor to draw a selection marquee around the items to be selected.
-  * Copy / Move items: Use Command + C keyboard shortcut (Ctrl + C on Windows) to cut the selected Items. Press the Alt key (Ctrl on Windows) while dragging the mouse to move the selected items to a new position in the Page.+  * Copy / Move items: Use Command + C keyboard shortcut (Ctrl + C on Windows) to cut the selected Items. Press the Alt key (Shift key on Windows) while dragging the mouse to move the selected items to a new position in the Page.
   * Insertion Point: After a Cut or Move action, move the mouse cursor to the insertion point for the items available in the Clipboard. The insertion point is previewed with a vertical red line.   * Insertion Point: After a Cut or Move action, move the mouse cursor to the insertion point for the items available in the Clipboard. The insertion point is previewed with a vertical red line.
  
Line 117: Line 129:
 ===== BaseBoard Container Control Methods ===== ===== BaseBoard Container Control Methods =====
  
-### Public Function AddControl(byref ControlTemplate as RectControl) as Boolean +^Method Signature^Description^ 
-Adds a new control instance to the main board (Page). The control passed as a reference must be configured as a **Control Set** in the app Window Layout. This **Control Set** acts like a **template** for the operation of this UI component and properties like the Width, Height, Visibility and others **should** be managed by the component itself, including **closing** (disposing) it when not is necessary anymore; for example, when the user (or via code) has decided to **delete** it from the Page. +|Public Function AddControl(byref ControlTemplate as RectControl) as Boolean|Adds a new control instance to the main board (Page). The control passed as a reference must be configured as a **Control Set** in the app Window Layout. This **Control Set** acts like a **template** for the operation of this UI component and properties like the Width, Height, Visibility and others **should** be managed by the component itself, including **closing** (disposing) it when not is necessary anymore; for example, when the user (or via code) has decided to **delete** it from the Page.| 
-### Public Function CaptionForControl(c as RectControl) as CaptionTextArea +|Public Function CaptionForControl(c as RectControl) as CaptionTextArea|Returns the Text **Caption** control associated with the **RectControl** received as parameter. The Caption UI control is a subclass of **TextArea**. Properties like Height, Width, Visibility, TextSize, TextFont, Alignment (and SelAlignment) **should** be left managed exclusively via the AXControlGrid component.| 
-Returns the Text **Caption** control associated with the **RectControl** received as parameter. The Caption UI control is a subclass of **TextArea**. Properties like Height, Width, Visibility, TextSize, TextFont, Alignment (and SelAlignment) **should** be left managed exclusively via the AXControlGrid component +|Public Sub CaptionGutter(Size as integer)|Set the Gutter (upper margin) used for the layout of the Text Caption boxes to the new value. This value is applied to all Caption Boxes.| 
-### Public Sub CaptionGutter(Size as integer) +|Public Sub CaptionHeight(size as integer)|Set the Text **Caption** height to the new value. This value is applied to all Caption Boxes.| 
-Set the Gutter (upper margin) used for the layout of the Text Caption boxes to the new value. This value is applied to all Caption Boxes. +|Public Sub CaptionsAlign(Alignment as integer)|Set the Text **Caption** alignment to the new value. This value is applied to all Caption Boxes.| 
-### Public Sub CaptionHeight(size as integer) +|Public Sub CaptionsEnabled(Enabled_Value as Boolean)|Enables/​Disables the visibility state for the Text Caption Boxes.| 
-Set the Text **Caption** height to the new value. This value is applied to all Caption Boxes. +|Public Sub CaptionsFont(FontValue as String)|Set the Text **Caption** Font to the new value. This value is applied to all Caption Boxes.| 
-### Public Sub CaptionsAlign(Alignment as integer) +|Public Sub CaptionsTextSize(Size as integer)|Set the Text **Caption** text size to the new value. This value is applied to all Caption Boxes.| 
-Set the Text **Caption** alignment to the new value. This value is applied to all Caption Boxes. +|Public Sub ClearPasteboard()|Deletes the **Paste** status of the AXControlGrid Pasteboard. Useful, for example, when you don't want to keep the reference to the previously cut Controls (so they couldn'​t be pasted after this).| 
-### Public Sub CaptionsEnabled(Enabled_Value as Boolean) +|Public Sub Cut|Invoke this method to cut and paste in the Pasteboard the selected controls.| 
-Enables/​Disables the visibility state for the Text Caption Boxes. +|Public Sub DeleteSelectedControl()|Deletes the selected Controls. This action is Undoable while a new action is not be done.| 
-### Public Sub CaptionsFont(FontValue as String) +|Public Sub FirstPage()|Displays the first Page in the main Board.| 
-Set the Text **Caption** Font to the new value. This value is applied to all Caption Boxes. +|Public Function GetCaptions() as captionTextArea()|Returns all the Text Caption controls for all the available pages.| 
-### Public Sub CaptionsTextSize(Size as integer) +|Public Function GetLastUndoActionText() as String|Returns the text of the last undoable action. Use this method, for example, to change the text shown by the "​Undo"​ menu item in the app or Window MenuBar.| 
-Set the Text **Caption** text size to the new value. This value is applied to all Caption Boxes. +|Public Function GetPage(pageNumber as integer) as Picture|Returns a Picture with the same Width and Height set to the main Board (Page). The contents of the Picture is the rendition of the Controls and Captions (if visible) for the PageNumber received as parameter. If the PageNumber parameter is greater than the available pages, then it will return the rendition for the last page available.| 
-### Public Sub ClearPasteboard() +|Public Function GetPageItems() as RectControl()|Returns all the Controls (without Text Captions) for the current displayed Page in the main Board.| 
-Deletes the **Paste** status of the AXControlGrid Pasteboard. Useful, for example, when you don't want to keep the reference to the previously cut Controls (so they couldn'​t be pasted after this). +|Public Function GetPagesForRange(initialPage as integer, lastPage as integer) as Picture()|Returns an Array of Pictures with the same Width and Height set to the main Board (Page). The contents of every Picture is the rendition of the Controls and Captions (if visible) for the range of pages received as parameters. If the LastPage parameter is greater than the available pages, then it will return the rendition for the last page available.| 
-### Public Sub Cut +|Public Sub GoToPage(page as Integer)|Displays the layout for the page received as parameter in the main Board.| 
-Invoke this method to cut and paste in the Pasteboard the selected controls. +|Public Function HasContentToPaste() as Boolean|Invoke this method to know if there are contents to paste available in the AXControlGrid Pasteboard. For example, this is useful for enabling/​disabling the Paste MenuItem in the App or Window MenuBar.| 
-### Public Sub DeleteSelectedControl() +|Public Function HasUndoItems() as Boolean|Invoke this method to know if there are more undo actions available in the AXControlGrid Undo Stack. For example, this is useful for enabling/​disabling the Undo MenuItem in the App or Window MenuBar.| 
-Deletes the selected Controls. This action is Undoable while a new action is not be done. +|Public Sub InitBoardSize(NewWidth as Integer, NewHeight as integer)|Use this method to Init the main Board (and Page size) to the Width and Height passed as parameters. Unlike the method `SetBoardSize`,​ this action is not registered by the AXControlGrid Undo Stack.| 
-### Public Sub FirstPage() +|Public Sub LastPage()|Displays the layout for the last available Page.| 
-Displays the first Page in the main Board. +|Public Sub NextPage()|Displays the layout for the next available Page.| 
-### Public Function GetCaptions() as captionTextArea() +|Public Function PageCaptions() as CaptionTextArea()|Returns an Array with the Text Captions Controls for the currently displayed page in the main Board.| 
-Returns all the Text Caption controls for all the available pages. +|Public Sub Paste()|Paste the available Pasteboard contents at the user specified insertion point.| 
-### Public Function GetLastUndoActionText() as String +|Public Sub PreviousPage()|Displays the layout for the previous Page.| 
-Returns the text of the last undoable action. Use this method, for example, to change the text shown by the "​Undo"​ menu item in the app or Window MenuBar. +|Public Sub selectAll()|Selects all the contents for all the available pages in the main Board. AXControlGrid will draw a selection rectangle around every selected item.| 
-### Public Function GetPage(pageNumber as integer) as Picture +|Public Sub SetBoardSize(newWidth as integer, newHeight as Integer)|Set the main Board (and Page) size to the Width and Height received as parameters. If the Text Captions are set to **Visible** and the new Height value is lower than that needed for the correct layout of the Controls plus the Text Captions, then this method will raise an **Exception** you can **Catch** to do further operations. The AXControlGrid will keep the layout in a stable status and the new Width and Height values will not be applied.| 
-Returns a Picture with the same Width and Height set to the main Board (Page). The contents of the Picture is the rendition of the Controls and Captions (if visible) for the PageNumber received as parameter. If the PageNumber parameter is greater than the available pages, then it will return the rendition for the last page available. +|Public Sub SetControlWidthAndHeight(newWidth as Integer, newHeight as integer)|Set the Controls size to the Width and Height received as parameters. This value will be applied to all the Controls for all the Pages, except for the Text Captions. Use the Method `CaptionHeight` if you need to change the TextCaption boxes height, the width will be adjusted to the width of the associated Controls.| 
-### Public Function GetPageItems() as RectControl() +|Public Sub SetGutter(newValue as integer)|Set the Gutter (margin) for the main Board Controls to the received parameter value. This setting is applied to the controls margins both vertically and horizontally (gap or gutter).| 
-Returns all the Controls (without Text Captions) for the current displayed Page in the main Board. +|Public Sub Undo()|Call this method to Undo the last action registered by the AXControlGrid Undo Stack.
-### Public Function GetPagesForRange(initialPage as integer, lastPage as integer) as Picture() + 
-Returns an Array of Pictures with the same Width and Height set to the main Board (Page). The contents of every Picture is the rendition of the Controls and Captions (if visible) for the range of pages received as parameters. If the LastPage parameter is greater than the available pages, then it will return the rendition for the last page available. +==== Version History ==== 
-### Public Sub GoToPage(page as Integer) +^Version^Release Date^Description^ 
-Displays the layout for the page received as parameter in the main Board. +|1.0|3 October 2019|Initial Release| 
-### Public Function HasContentToPaste() as Boolean +|1.0.1|10 October 2019|Minor fix to the Demo Project so it runs "out of the box" with Xojo 2019r2|
-Invoke this method to know if there are contents to paste available in the AXControlGrid Pasteboard. For example, this is useful for enabling/​disabling the Paste MenuItem in the App or Window MenuBar. +
-### Public Function HasUndoItems() as Boolean +
-Invoke this method to know if there are more undo actions available in the AXControlGrid Undo Stack. For example, this is useful for enabling/​disabling the Undo MenuItem in the App or Window MenuBar. +
-### Public Sub InitBoardSize(NewWidth as Integer, NewHeight as integer) +
-Use this method to Init the main Board (and Page size) to the Width and Height passed as parameters. Unlike the method `SetBoardSize`,​ this action is not registered by the AXControlGrid Undo Stack. +
-### Public Sub LastPage() +
-Displays the layout for the last available Page. +
-### Public Sub NextPage() +
-Displays the layout for the next available Page. +
-### Public Function PageCaptions() as CaptionTextArea() +
-Returns an Array with the Text Captions Controls for the currently displayed page in the main Board. +
-### Public Sub Paste() +
-Paste the available Pasteboard contents at the user specified insertion point. +
-### Public Sub PreviousPage() +
-Displays the layout for the previous Page. +
-### Public Sub selectAll() +
-Selects all the contents for all the available pages in the main Board. AXControlGrid will draw a selection rectangle around every selected item. +
-### Public Sub SetBoardSize(newWidth as integer, newHeight as Integer) +
-Set the main Board (and Page) size to the Width and Height received as parameters. +
-If the Text Captions are set to **Visible** and the new Height value is lower than that needed for the correct layout of the Controls plus the Text Captions, then this method will raise an **Exception** you can **Catch** to do further operations. The AXControlGrid will keep the layout in a stable status and the new Width and Height values will not be applied. +
-### Public Sub SetControlWidthAndHeight(newWidth as Integer, newHeight as integer) +
-Set the Controls size to the Width and Height received as parameters. This value will be applied to all the Controls for all the Pages, except for the Text Captions. Use the Method `CaptionHeight` if you need to change the TextCaption boxes height, the width will be adjusted to the width of the associated Controls. +
-### Public Sub SetGutter(newValue as integer) +
-Set the Gutter (margin) for the main Board Controls to the received parameter value. This setting is applied to the controls margins both vertically and horizontally (gap or gutter). +
-### Public Sub Undo() +
-Call this method to Undo the last action registered by the AXControlGrid Undo Stack.+
axcontrolgrid.1570031078.txt.gz · Last modified: 2019/10/02 17:44 by bloguintosh