It is currently Fri Oct 18, 2019 10:30 pm

All times are UTC + 1 hour

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [Module] ModuleEx - Mastermodul for custom gadgets
PostPosted: Tue Apr 02, 2019 2:58 pm 
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 912
Location: Germany
ModuleEx - Mastermodul (all OS / 64Bit / DPI)

Management of the tab key (shortcut) within a window (#Tabulator)
  • Switches from one gadget to the next via tabulator or skips this gadget (#IgnoreTabulator).
  • Temporarily releases the tab key when the gadget gets the focus (#UseTabulator).

Global cursor event (thread) for all gadgets that need a blinking cursor (#CursorEvent)
  • BindEvent(ModulEx::#Event_Cursor, @_CursorDrawing(), WindowNum)
  • Cursor thread is automatically terminated when the last window is closed.

Uniform EventType constants for PostEvent() to avoid conflicts with different modules.
  • PostEvent(#PB_Event_Gadget, WindowNum, GadgetNum, ModulEx::#EventType_Button)

; ModuleEx::AddGadget()                - add a gadget for tabulator handling  (#UseTabulator|#IgnoreTabulator)
; ModuleEx::AddWindow()                - enables the tabulator handling and cursor event for this window  (#Tabulator|#CursorEvent)
; ModuleEx::CursorFrequency()          - changes the cursor frequency (default: 600ms)
; ModuleEx::ExitCursorThread()         - exit cursor thread

Example for use within own modules:
; Cursor event and EventTypes for PostEvent()

CompilerIf Defined(ModuleEx, #PB_Module)
    #Event_Cursor       = ModuleEx::#Event_Cursor
    #EventType_Button   = ModuleEx::#EventType_Button
  Enumeration #PB_Event_FirstCustomValue
    ; .....
  Enumeration #PB_EventType_FirstCustomValue
    ; .....
; Add Window and gadgets

CompilerIf Defined(ModuleEx, #PB_Module)

  If ModuleEx::AddWindow(Window, ModuleEx::#Tabulator|ModuleEx::#CursorEvent)
    ModuleEx::AddGadget(Gadget, Window, ModuleEx::#UseTabulator)
 ; .....

Download: ModuleEx.pbi

Sorry for my English. My language is German.
(Translated with

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye