Results 1 to 4 of 4

Thread: TBGL window events: Discussion

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    TBGL window events: Discussion

    Hi,

    Rene mentioned in other thread it would be nice to capture some events occuring to TBGL window. I started to write notes on paper and quickly found out this can be expanded further.

    I would like to discuss first, what would be considered the best approach.

    My currently considered syntax is:
    TBGL_BindWindowEvent( hWnd, <eventType>, handlerFunction)
    
    Where eventType would be:
    %TBGL_OnOpen
    %TBGL_OnClose
    %TBGL_OnMaximize
    %TBGL_OnMinimize
    %TBGL_OnSizeChanging
    %TBGL_OnSizeChanged

    Your handler function could process the event as you want, and some events could be cancelled also by using return value:
    %TBGL_Cancel
    %TBGL_Pass (default)

    The handler functions would receive metadata to easen the processing. For example:
    Client.Width, Client.Height, Window.Position.x, Window.Position.y, Window.Width, Windows.Height


    Let me know...
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    since we have already a TBGL_BindWindowEvent for OnDropFiles (remember?) the syntax was already clear.
    I did not dare to ask for minimize & maximize because we can already retrieve size. But if we had this, then we could differ maximized & normalized size much easier.

    Only thing I can think of that we probably can't do right now - except to avoid closing the window is to request from TBGL if TBGL-window is the one that has currently focus.

    Also in some cases it could be useful to know the real size (not just client-size) of the window. But i fear this one is complicated.
    I think there are missing some Forum-sections as beta-testing and support

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    as usually - great feedback, thank you Information about focus is nice catch. What about %TBGL_OnGotFocus, %TBGL_OnLostFocus?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #4
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    Yes sounds great. Not just to retrieve the current state (hasFocus) but being able to react on state-change immediately without the need to watch current state myself is much better
    Last edited by ReneMiner; 05-12-2015 at 18:21.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. UI & TBGL -- active window
    By RobbeK in forum TBGL General
    Replies: 9
    Last Post: 16-11-2013, 16:37
  2. TBGL module from Petr Schreiber How do I handle events in TBGL?(such as WM_COPYDATA)
    By leonhardt in forum TBGL module by Petr Schreiber
    Replies: 2
    Last Post: 22-05-2013, 14:18
  3. TBGL Development Pipeline Tools ( Vaporware discussion :) )
    By Petr Schreiber in forum TBGL General
    Replies: 1
    Last Post: 29-07-2007, 11:20
  4. tbgl window to a given handle
    By kryton9 in forum TBGL General
    Replies: 2
    Last Post: 04-07-2007, 01:23
  5. TBGL window
    By Reinking in forum TBGL General
    Replies: 15
    Last Post: 16-01-2006, 19:02

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •