GithubHelp home page GithubHelp logo

zertovitch / gwindows Goto Github PK

View Code? Open in Web Editor NEW
19.0 6.0 5.0 62 MB

GWindows: GUI framework for MS Windows

Home Page: https://sf.net/projects/gnavi/

Batchfile 0.13% Ada 93.87% Makefile 0.24% C++ 0.23% HTML 3.01% C 0.69% TeX 1.10% Lex 0.20% Yacc 0.47% VBA 0.01% NASL 0.04% Visual Basic 6.0 0.01%
ada ada-language windows gui-framework ada-library

gwindows's People

Contributors

febrex avatar nicopy avatar patschkowski avatar zertovitch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gwindows's Issues

Missing Common Control notification callbacks

I need WM_ERASEBKGND and WM_PAINT callbacks for a custom Status_Bar_Type.

These callbacks are declared for GWindows.Window.Window_Type but not for GWindows.Base.Base_Window_Type.
StatusBar_Type is derived from GWindows.Base.Base_Window_Type.

What is the best way to add WM_ERASEBKGND and WM_PAINT management to my Status Bar ?

  • Change derivation type for Status_Bar in GWindows.Common_Controls ? That might lead to compatibility problems.
  • Add WM_ERASEBKGND and WM_PAINT management to GWindows.Base.Base_Window_Type ?
  • Add WM_ERASEBKGND and WM_PAINT management to my custom control using On_Message ?
  • Other solution ? Like some sort of mixin.

Bug in gwindows-scintilla.adb

There's a bug in file gwindows-scintilla.adb at line 2981.

NM.modificationType is of type Int_32. It is casted to Interfaces.Unsigned_32 which will raise an exception with negative numbers.

Replacing the cast with Ada.Unchecked_Conversion solves the problem.
But maybe it would be best to modify STRUCT_SCNotification definition by replacing modificationType : Int_32; with modificationType : Interfaces.Unsigned_32;.

MDI window menu issue on x64

Someone has noticed an issue ( https://sourceforge.net/p/l-e-a/tickets/1/ ) that is actually affecting GWindows, for multi-document windows.

You can see it happening on the sample : ./gwindows/samples/mdi/mdi_example.adb , which can be built through the project file gwindows_samples.gpr .

When built for 64-bit, the application adds to the Window menu new entries corresponding to news MDI child windows, as expected; the behaviour is identical to 32-bit build.

But a click on the menu entries themselves are doing nothing in the 64-bit version. Notably, the method On_MDI_Activate is not called.

Similarly, when there are more than 9 child windows, the "More windows..." (text in Windows user's language) is in the menu, but nothing happens when this menu entry is selected.

The issue seems to be tricky, since the system manages this part automatically - at least theoretically...
In the MS doc, you can read:

https://docs.microsoft.com/en-us/windows/win32/winmsg/about-the-multiple-document-interface

"The system can add up to ten menu items to the window menu. When the tenth child window is created, the system adds the More Windows item to the window menu. Clicking this item displays the Select Window dialog box. The dialog box contains a list box with the titles of all MDI child windows currently available. The user can activate a child window by clicking its title in the list box."

Warnings due to violation of supposed usage of sync-builtin (GNATCOM.Initialize, sync_fetch_and_add)

The issue is the name used with the pragma Import on sync_fetch_and_add in gnatcom-initialize.adb, using a recent version of GNAT Pro. See:

https://sourceforge.net/p/gnavi/bugs/14/

Unfortunately the suggested fix (replacing __sync_fetch_and_add_4 by __sync_fetch_and_add_N) breaks compatibility with previous versions of GNAT (as recent as GNAT CE 21).
I get (trying with both 'N' and 'n'):
gnatcom-initialize.adb:85:1: undefined reference to __sync_fetch_and_add_N
gnatcom-initialize.adb:85:1: undefined reference to __sync_fetch_and_add_n

Perhaps it is better to try disabling the warning.

GWindows.Application: Explorer_Path_At_Location does not work on Windows 11

The hack allowing to get the directory path from an Explorer window at an arbitrary (X, Y) location doesn't work anymore.
You can notice by running the sample (project: gwindows_samples.gpr) cap_test.adb.

Some keywords to explore a solution:

SHDocVw
ShellWindowsClass
path

NB: Ada generated code exists for SHDocVw, see tutorials\msie\ie.ads
Additionally the recommended method seen on Stack Overflow is to enumerate objects in the SHDocVw.ShellWindows collection; for each ie in that collection, match those with ie.FullName = "explorer" (after some treatement); grab the path via ie.LocationURL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.