1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00
Commit graph

419 commits

Author SHA1 Message Date
FellippeHeitor
a43283f897 Restructure. 2016-12-18 04:24:47 -02:00
FellippeHeitor
04a8009583 Restructure. 2016-12-18 04:19:46 -02:00
FellippeHeitor
abd7cf1ded Restructure. 2016-12-17 22:05:37 -02:00
FellippeHeitor
5340cf063c Restructure. 2016-12-17 21:46:33 -02:00
FellippeHeitor
ed85fde107 Begin restructure of files for distribution. 2016-12-17 21:44:49 -02:00
FellippeHeitor
4554f7cc07 New buttons come with a temporary caption filled. Also:
Buttons without caption remain that way (previously the drawing enging automatically printed the control's name).
2016-12-17 18:19:06 -02:00
FellippeHeitor
7c3e3fc779 Set theme jekyll-theme-minimal 2016-12-17 18:07:31 -02:00
FellippeHeitor
f503bf0cae Reworked WordWrap routine. Also:
- Clicking the form in design mode now also generates a __UI_Click event.
- Accept \n to add a line break for Labels and Tooltips.
2016-12-17 17:38:59 -02:00
FellippeHeitor
3a65e1bf11 New PasswordField property for TextBox control.
Uses CHR$(7) for inbuilt fonts or UTF-8 e2978f for ttf fonts.
2016-12-16 20:44:29 -02:00
FellippeHeitor
d9fc27385c New icon. Also:
- Default Editor font in Linux set to NotoMono (included).
2016-12-16 11:11:50 -02:00
FellippeHeitor
2053818e30 Embed editor images in code. Also:
- Set proper focus when Open and Z-Ordering panels are shown.
- Typing on the File Name textbox (open panel) searches for items in the File list.
2016-12-16 11:02:49 -02:00
FellippeHeitor
c86bd796ee Make new labels automatically middle-aligned. 2016-12-16 10:10:44 -02:00
FellippeHeitor
1315c314a2 Restore default fallback for not found fonts to _FONT 16. 2016-12-16 02:29:07 -02:00
FellippeHeitor
adb363acc2 Fix MessageBox calls and var declarations for macOS/Linux. 2016-12-16 02:13:41 -02:00
FellippeHeitor
07cffdf138 Fix vertical alignment for labels. Also:
- Fix hotkey indicator for labels with wordwrap property.
- Remove "ctrl to snap" temporarily.
- Fix z-ordering controls with parentID.
2016-12-16 00:55:59 -02:00
FellippeHeitor
436f8fe4a5 Improved Undo/Redo and File->New functionality. 2016-12-15 21:01:43 -02:00
FellippeHeitor
dd77bb94f9 Undo/Redo implemented. 2016-12-14 13:31:53 -02:00
FellippeHeitor
4e1c631747 Edit menu -> Z-ordering. Also:
- More modern-looking selection rectangle.
- Improved horizontal/vertical distribution of controls.
- New ResetList method.
- Vertical alignment for labels.
- Beginning of Undo/Redo procedures.
- Hotkey indicators reviewed.
2016-12-13 12:54:39 -02:00
Fellippe Heitor
32eec34699 Allow form icons without 32bit images.
User will be warned that the indicated file may be corrupted.
2016-12-10 21:22:29 -02:00
FellippeHeitor
514cfbd91d Removed __UI_ from key constants and methods. Also:
- Add an Open "dialog" to the editor: a hidden frame with file browsing capabilities to load a form. Code taken from ide_methods.bas (QB64)
- Add a New option to File menu.
- Remove custom icon from the preview so that QB64's default icon is shown unless an icon file is specified.
- Detect if a control name matches QB64's keywords (not allowed).
2016-12-09 12:27:35 -02:00
FellippeHeitor
8a5b943f63 Improved detection of edits to loaded forms. Also:
- Make control IDs more user friendly by encapsulating them in an easily recognizable variable.
- Trigger __UI_TextChanged with backspace and delete as well.
- Indicate in the title bar that a form was edited (*).
- Only show confirmation at exit if form was edited.
- If the preview app is launched by the user, a new messagebox informs that the main app must be launched.
2016-12-07 11:42:10 -02:00
FellippeHeitor
c756445186 Remove __UI_ from some key arrays' names for external access. Also:
- $SCREENHIDE until the form is defined.
- Set _ICON even if no icon was set, so that at least the QB64 is brought in.
- Minimizing the editor will also minimize the preview (Windows only).
- Fix position of menu separators.
2016-12-06 22:30:47 -02:00
FellippeHeitor
75b68f9f1c xp.uitheme: Replace falcon's uspacing& with uheight& (aligning). Also:
- Make hotkeys always visible in Design Mode.
- Add a call to __UI_MakeHardwareImage for frames (fixes a bug that wouldn't show resize handles for frames or its contained controls).
- Show "Add new" in the menu bar and in menu panels if in Design Mode.
2016-12-05 11:03:24 -02:00
FellippeHeitor
12dfea5ea1 UiEditorPreview: AutoNameControls (AdaptName$()). Also:
- Allow only one menu bar control to be right-aligned.
- Automatically inform the editor that a context menu can't be shown (too small a form).
2016-12-05 11:01:20 -02:00
FellippeHeitor
fd3a270fe3 UiEditor: New AutoNameControls feature. Also:
- New Align menu, for when the preview window is too small to display the contextual menu.
- The Align menu is automatically opened when the user right clicks the Preview Window, if it's too small.
- Less calls to __UI_GetID inside event procedures.
- A message box now asks user if the current form should be saved upon exiting.
- Display the project's name in the Title bar.
- Display the container's font if a control with the same font is selected.
- Properly enable/disable options when menu bar/menu items are selected.
- First property shown is now Caption, as the new AutoNameControl feature will automatically rename based on captions.
- New event: __UI_TextChanged (for textboxes).
- Color Mixer textboxes are now editable (they were editable before but they didn't trigger a change in the sliders' values).
- $RESIZE is saved within the .frm file, if CanResize is enabled.
- Padding is now properly saved for controls that have it set.
2016-12-05 10:59:23 -02:00
FellippeHeitor
b02bc14c2d InForm.ui: Move the $RESIZE metacommand into .frm files. Also:
- Communicate to the preview app that a context menu doesn't fit the current window.
- Receive from the preview app Align commands.
- Add option to Align centers, vertically and horizontally, to Design Mode.
- Bypass screen redraw if Window is minimized.
- Properly recalculate menu bar's height.
- Properly recalculate tooltip's height.
- Properly recalculate menu panel's height.
- Properly align text inside controls.
- Allow hotkeys to invoke contextual menu items in Design Mode.
- Fix centering of controls inside frames.
- Restore and keep aspect ratio of picture boxes when resizing by the corners.
- Bypass contained controls when selecting with drag-to-select.
- Auto-set Stretch property for new PictureBox controls.
2016-12-05 10:52:47 -02:00
FellippeHeitor
f30982b92c xp.uitheme: Show "Add new" for Menu "Bar" and "Item" controls (DesignMode). 2016-11-27 18:29:11 -02:00
FellippeHeitor
2ec4a957f1 UiEditorPreview: Constanly inform the editor that a menu is active. Also:
- Accept "new menu bar" and "new menu item" commands.
- Automatically adapt menu bar when form colors are changed.
- Automatically adapt menu bar when form font is changed.
2016-11-27 18:27:51 -02:00
FellippeHeitor
c1f0eb5770 UiEditor: Insert menu. 2016-11-27 18:26:12 -02:00
FellippeHeitor
62e3c47b4e InForm.ui: Menus (bar and items) can be added. Also:
- Fix font height for _FONT 8 and _FONT 16.
- Control names can now have only up to 40 characters to prepare for "Control.Property" syntax.
- Default font set to SegoeUI (editor and preview).
- Improved design mode context menu (Distribute Vertically/Horizontally).
- When designated .TTF font can't be found, new default is _FONT 8.
- Improved ControlName search to avoid duplicated names (__UI_NewControl).
- Trim controls' captions if CHR$(0) is found.
2016-11-27 18:25:29 -02:00
FellippeHeitor
a91c32c8b1 Fixes and improvements to UiEditorPreview:
- Segoe UI is now used as default font for new forms.
- Fix: preview window now properly reloads if inadvertenly closed.
- Internal contextual menus are not saved any longer.
2016-11-21 23:20:13 -02:00
FellippeHeitor
abcdebbf73 Fixes and improvements to UiEditor:
- Fix: saving a form now properly saves controls' captions.
- New event: __UI_BeforeInit
2016-11-21 23:17:53 -02:00
FellippeHeitor
ac858a5de5 Fixes and improvements to xp.uitheme:
- Single-line textboxes can now use variable width fonts.
- Adds images for future implementation of horizontal scrollbars.
2016-11-21 23:16:14 -02:00
FellippeHeitor
101590d650 Fixes and improvements to InForm.ui:
- Design mode now has a contextual menu for alignment and clipboard operations.
- Fix: Menu bar items can't be invoked by hovering if a context menu is active.
- Selection rectangle for Design Mode.
- New Event: __UI_BeforeInit
- Fix: Crash after last control is deleted in Design Mode - limits the use of hardware images.
- Single line textboxes can now use non-fixedwidth fonts.
- ESC unselects all controls (design mode)
- Pasting the same control over and over positions the new instance in a different spot.
- New controls are created after all controls in the array; empty slots will occur, but it fixes incorrect creation of new controls.
- New listbox method: __UI_GetListBoxItem$
- Fix: selecting a listbox item by typing its name now properly triggers __UI_ValueChanged event.
2016-11-21 23:14:20 -02:00
FellippeHeitor
b9bebbee59 Overall: Replaces QB64's _PRINTSTRING with *uprint* aka falcon.h. Also:
- Adds padding (left/right) to labels.
- Adds multiline support for textboxes.
- Improves wordwrapping for labels - bypasses the function if the same text passed has already been processed for the same width and _font conditions.
- Restores internal textfield contextual menu.
- Textfield contextual menu limits options based on clipboard/selection status.
- Creates a new helpercanvas automatically upon creating a new picturebox control.
- New ReplaceText function which enables \n for adding items to a listbox at design time.

UiEditor.bas:
- Indicator on textbox shows if current input value has been accepted by the Preview renderer.
- Improves saving of nested controls.
- New "icon" property for the main form.

UiEditorPreview.bas:
- Loads the icon specified in the editor and shows it in real time (.ico files encoded as bmps and pngs accepted).
2016-11-02 01:03:46 -02:00
FellippeHeitor
4188be2a76 File loading/saving routines implemented. Also:
- New list box method: __UI_ReplaceListBoxItem.
- Menu items can have icons.
2016-10-22 10:09:59 -02:00
FellippeHeitor
7a3dc578dc Add separators to menus. Also:
- Fix the bug the didn't allow controls placed in frames to be selectable when they had been created before the frame.
- Add "\#" automatically to ProgressBar's caption, so Show Percentage will work.
2016-10-21 01:02:45 -02:00
FellippeHeitor
f5ce607970 Auto-select text upon entering a textbox. 2016-10-20 23:34:36 -02:00
FellippeHeitor
bc1cd37c41 Clipboard operations with controls in design mode. Also:
- Allow preview to be detached from the editor window.
- Checked items in menus.
- Show message while compiling the Preview component.
- New controls are placed inside the selected frame.
- Fixed selecting text when textbox is inside a frame.
- Fix detection of Preview window and the relaunch routine.
- Make frames always be redrawn in DesignMode.
2016-10-20 22:49:10 -02:00
FellippeHeitor
e3a27a54ae UI.BAS split into InForm.ui and xp.uitheme. Also:
New UiEditor and UiEditorPreview.
2016-10-19 02:16:49 -02:00
FellippeHeitor
1cbc8830af Add context menus, tooltips and a slider control. Also:
- Context menu for textboxes will be embeded automatically, though the user may replace it with a custom control.
- Fix MessageBox incorrectly mixing title and message.
- MessageBox uses main form's title if no title is provided.
- New event __UI_ValueChanged.
- Focus outline (dotted line around control) is only shown if keyboard input is received.
- Adds NotoMono-Regular.ttf (licensed under the SIL Open Font License)
2016-10-13 21:11:35 -03:00
FellippeHeitor
3e595972d9 Theme images are now all embeded into the .bas source. Also:
- Fix save routine to properly save the .Stretch property of controls.
- Fine adjustments to ProgressBar drawing.
- Find adjustments to ListBox/Scrollbar drawing.
2016-10-12 23:29:09 -03:00
FellippeHeitor
9daf8a6e2c New controls without name take default Control# name pattern.
Create a new button and it'll be automatically named Button1. Also:

- All existing controls are properly destroyed when loading a saved form.
- Fix hovering to select that stopped working for dropdown lists.
- List or Dropdown list controls have their __UI_Caption set based on the selected item, if any.
2016-10-12 19:57:14 -03:00
FellippeHeitor
75b2616e1b Fix proper indication of __UI_DefaultButton. Also:
- Fix focus outline (dotted line indicator) when _FONT 16 is used.
- Adds a microdelay before showing a MessageBox so the interface can be properly redrawn.
- Fixes __UI_NewControl so that no control can be created without a name or type indication.
- Destroy menu panels before activating menu items, so that the event will be fired only after menu is closed.
- Fix save form routine so that no temporary menu panels are saved.
2016-10-12 16:54:22 -03:00
FellippeHeitor
566ebdae75 Fixed unintended clicks when __UI_DoEvents is called in a loop. 2016-10-11 12:09:13 -03:00
FellippeHeitor
0c3e99b977 Refinements to menu control. Also:
- Basic save/load form functionality (still a bit buggy).
2016-10-11 07:43:07 -03:00
FellippeHeitor
a02b129767 New control: Picture box (read more:)
Can be used to display a picture on a form. Also:

- Theme images can now be embeded in the code, removing the need for external image files (check the icon that shows when the image assigned to the picture box cannot be found).
- Menu items now respond properly to hotkeys.
- Improved menu hover behavior.
- More parameters can be passed to __UI_NewControl (Top, Left)
2016-10-09 15:00:25 -03:00
FellippeHeitor
3e151a305f Working menu system.
Every menu item is a control in __UI_Controls. Needs visual polishing. Functionality is implemented (except keyboard). Also:

- New TIMER approach for DoEvents.
2016-10-08 22:04:28 -03:00
FellippeHeitor
5aad4e3790 Every menu item is now an independent control.
The shift in paradigm allows for more flexibility. Also:
- Improvements to dragging the scrollbar thumb.
2016-10-08 16:42:42 -03:00
FellippeHeitor
268b4ffae3 - Implements hotkeys (Alt+Letter). Also:
- Menus are now accessible using Alt.
- More default settings are automatically defined upon control creation.
- Dropdown now lists have hover to select behavior.
- Alt+ASCII CODE inserts extended characters.
2016-10-08 09:43:03 -03:00