• Welcome to PlanetSquires Forums.
 

WinFBE v3.0.2 (BETA-2)

Started by Paul Squires, October 16, 2022, 06:02:49 PM

Previous topic - Next topic

SeaVipe

#15
Thank you, Paul,
I see where you made the manual edits, I would not have thought to change that!
The form file was successfully added to the project but would not compile - Duplicate Definitions. An easy fix using Designer; just deleted the duplicated controls.
Still won't compile though. I had this problem before and recall it was something to do with images. I'll look into it and report back.

Here is the failed compile log:

Failed Compile (Errors 1  Warnings 0  [2022-10-20  04:57:46])

Command Line:
C:\WinFBE_Suite\Toolchains\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\fbc64.exe -m "C:\SRC\DailyJournal\WinFBE_VD_MAIN.bas" "C:\SRC\DailyJournal\TMP73E7.rc" -v -g -exx -s console  -x "C:\SRC\DailyJournal\DailyJournal.exe"

FreeBASIC Compiler - Version 1.09.0 (2021-12-31), built for win64 (64bit)
Copyright (C) 2004-2021 The FreeBASIC development team.
standalone
target:      win64, x86-64, 64bit
backend:      gcc
compiling:    C:\SRC\DailyJournal\WinFBE_VD_MAIN.bas -o C:\SRC\DailyJournal\WinFBE_VD_MAIN.c (main module)
compiling C:  C:\WinFBE_Suite\Toolchains\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-format -g -masm=intel "C:\SRC\DailyJournal\WinFBE_VD_MAIN.c" -o "C:\SRC\DailyJournal\WinFBE_VD_MAIN.asm"
assembling:  C:\WinFBE_Suite\Toolchains\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\as.exe --64 "C:\SRC\DailyJournal\WinFBE_VD_MAIN.asm" -o "C:\SRC\DailyJournal\WinFBE_VD_MAIN.o"
compiling rc:              C:\WinFBE_Suite\Toolchains\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "C:\SRC\DailyJournal\TMP73E7.obj" "C:\SRC\DailyJournal\TMP73E7.rc"
ÿþ

The 2 characters on a separate line are part of the compile log.
Remove frmSettings.inc from the project and it compiles successfully.

UPDATE:
The addition of the frmSettings.inc file duplicated an image in the Image Manager which was causing the compile failure. Using Image Manager the duplicate image was removed and now the project compiles correctly.
Clive Richey

Paul Squires

Hi Clive,

Thanks for the update. I will look at that duplicate images issue as well as adding code to ensure that Form data is output first to the design file.

Thanks!
Paul
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Thanks again, Paul, all your hard work is really appreciated!
Clive Richey

Paul Squires

Tonight I finished the new internal parser. It is awesome and serves to create the lists of subs/functions and TYPES, ENUMS, PROPERTIES, CONSTRUCTORS, DESTRUCTORS, and VARIABLES. It is also a lot faster than the older hacked together version that I was using.

So, I am just about ready to post BETA 3. If you have anything that is critical that needs to be included in this next BETA then now is time to speak up. I will post BETA 3 this weekend assuming that everything goes as planned.

Here is the full list of changes:

Editor:
- Fixed bug where WinFBE 64-bit only would GPF if currently loaded file is edited by an external editor causing WinFBE to reload the file.
- Fixed bug where focus would be lost from the Find textbox as the user typed a search word and a corresponding match was found.
- Fixed bug where an invalid startup position for the editor would be saved if WinFBE closed while it is minimized to the Windows Taskbar.
- Added new internal code parser that creates codetips and autocomplete popups.

Visual Designer:
- MAJOR FILE FORMAT CHANGE: Form data separated from code file and is now saved to external file with *.design file extension.
- When selecting a control from the toolbox and then just clicking on a form (not "drawing" it), it creates a control with a height and width of 0. There are now default sizes for all controls that may be created too small.
- When double-clicking an event in the toolbox, automatically enable that event, create the placeholder (if needed) and switch to that event in the code view.
- When double-clicking a control in design view, automatically switch to the code view for the default event handler for that control (e.g.: the _Click handler if it's a button).
- Listview was not clearing columns/rows when a form is reused (e.g. via popup form).
- Added Listview property (HeaderThemed) to enable/disable theme drawing for the header portion of the Listview.
- The ability to set the default control font name and size for all new controls created for a project, rather than always defaulting to Segoe UI 9pt.
- Added Button control property (AllowFocusRect) to enable/disable drawing the rectangle around the button when it has focus. Only valid if Theme property is False.
- Added Button control property (TextForeColorHot) to set text color when mouse hovers over the button. Only valid if Theme property is False.
- Added Control property (Anchor) which allows you to specify layout resize/movement at design time (uses the WinFBX CLayout class behind the scenes).
- Added Anchor property for Forms.
- Added ChildFormParent property for Forms.
- Added check to prevent duplicate code output into the resource file for images with the same path and filename as this would cause a compile error.
- Added code to ensure that when saving Form data it is output to the JSON design file prior to any Controls on the form, otherwise a GPF may occur when loading.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Here is something that I am hoping to be able to implement before releasing BETA 3.

When you create a MENU or STATUSBAR, WinFBE will automatically generate code to handle CLICK and POPUP events. The problem is that this is a one-time occurrence. If you go back and add to your menu or statusbar then WinFBE will not add those additions to the generated code. It would be very convenient if the additional items would be added to the existing generated event code.

I will see if I can get this functionality working today.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Quote from: Paul Squires on October 22, 2022, 07:49:05 AMHere is something that I am hoping to be able to implement before releasing BETA 3.

When you create a MENU or STATUSBAR, WinFBE will automatically generate code to handle CLICK and POPUP events. The problem is that this is a one-time occurrence. If you go back and add to your menu or statusbar then WinFBE will not add those additions to the generated code. It would be very convenient if the additional items would be added to the existing generated event code.

I will see if I can get this functionality working today.

Well, that was easier to implement than I expected it to be  ;D

This new functionality should make it much easier to deal with creating and modifying MENUS, STATUSBARS, and TOOLBARS.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Petrus Vorster

Hi Paul

Thank you and José for the great amount of work all of this runs on.
Truly impressive.

I have not been able to find any link errors or issues with anchoring so far.

The High-DPI awareness and images quality on buttons and controls just makes everything looks so much better than before.
The panels work perfectly.(thank you for all the examples and help)

Wishlist:[I know I ask a LOT !]
1. A MAXLEN on the Textbox conrol.
2. A right-click property on a listview(or any control for that matter) where you can just add your choices in the property field and it generates the code for a right-click and the actions.
3. A simple output to PDF (I believe like Richard did in Powerbasic)...There may be such a thing already)

Issues:
THE ONLY little issue that I can stil lfind is the TEXT background on FRAME does not change, even if I select a different color.
Image attached. (I am not sure if this happens only on a child form, as I am pretty sure it worked on the FrmMain.

Brilliant stuff gents.

-Peter
-Regards
Peter

Paul Squires

Hi Peter, thanks for the suggestions.

(1) Text MaxLength property has now been added.

(2) Right click menu popup. This is not as easy at it sounds from within the visual designer so it would have to wait until a future version if possible. Here is an example of how you would display a popup menu from a textbox.

CONST IDM_CUT    = 1000
CONST IDM_COPY   = 1001
CONST IDM_PASTE  = 1002
''
''
Function frmMain_Text1_MouseDown( ByRef sender As wfxTextBox, ByRef e As EventArgs ) As LRESULT
  
   if e.RButton then
  
      Dim hPopUpMenu As HMENU = CreatePopupMenu()
      AppendMenu( hPopUpMenu, MF_ENABLED, IDM_CUT, wstr("Cut") )
      AppendMenu( hPopUpMenu, MF_ENABLED, IDM_COPY, wstr("Copy") )
      AppendMenu( hPopUpMenu, MF_SEPARATOR, 0, "" )
      AppendMenu( hPopUpMenu, MF_ENABLED, IDM_PASTE, wstr("Paste") )

      dim as long nResult
      nResult = TrackPopupMenu( _
                   hPopUpMenu, TPM_RETURNCMD or TPM_NONOTIFY, _
                   e.x, e.y, 0, frmMain.hWindow, 0 )
      DestroyMenu hPopUpMenu

      select case nResult
         case IDM_CUT
            AFXMSG( "CUT" )
         case IDM_COPY
            AFXMSG( "COPY" )
         case IDM_PASTE
            AFXMSG( "PASTE" )
      end select
     
   end if

   Function = 0
End Function

(3) Frame control label text backcolor. I have fixed this in both the visual designer display and in code output. You can not set the Frame forecolor due to Windows limitations.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

philbar

About the Frame backcolor: the Option Button and Checkbox have the same problem. I have a dim memory that Windows treats those three things "differently" from other controls. No idea why.

My 2¢ worth.

Petrus Vorster

Thank you Paul.

Right click Menu added to project.
The example works perfectly.


-Regards, Peter
-Regards
Peter