OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 19, 2024 11:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Book or pdf related to low level GUI widgets development
PostPosted: Tue May 07, 2024 10:26 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 97
Hello everyone,

I am having trouble regarding low level GUI widgets implementation. I have somehow implemented some basic GUI widgets, but I want to study it that how it should work and its practical implementations before implementing. Is there any standard books or pdf's related to low level GUI widgets implementation ?

Thank you,
Manas Kamal Choudhury


Top
 Profile  
 
 Post subject: Re: Book or pdf related to low level GUI widgets development
PostPosted: Tue May 07, 2024 6:21 pm 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 404
Kamal123 wrote:
Hello everyone,

I am having trouble regarding low level GUI widgets implementation. I have somehow implemented some basic GUI widgets, but I want to study it that how it should work and its practical implementations before implementing. Is there any standard books or pdf's related to low level GUI widgets implementation ?


You could do worse than study https://tkdocs.com/tutorial/index.html, which contains many of the concepts you'd want to copy in a GUI toolkit:

  • Windows/Widgets/Controls.
  • Widget hierarchies.
  • Event loops.
  • Callbacks on events.
  • Layout and geometry management.

So, being rather presumptuous, I am assuming you've done some rendering, and now need to put in some behaviour behind the images. So you'll want to study up on how GUI applications send and receive events in an event loop, with GUI components consuming those events to implement their behaviour.

For example, a simple button widget will consume mouse button click/release events, and respond to such events by redrawing the button in the clicked/released state, and generate further events that indicate a user has actioned (pressed and released) a button. A dialog box, for example, might complete and close when the "Ok" button is actioned. Said button might also consume keyboard events, to implement hot-keys (such as Return to action the button.)

As well as event handling, you'll also perhaps want to look at layout management. This is using container widgets into which other widgets can be grouped and have their size and position automatically managed according to simple rules, meaning your client code only has to define the layout rules, and not the details of the size and position of every widget, making GUIs easier to write and maintain.

If you're looking for code to implement all the above, Tk is complicated by being cross platform, so platform specifics are spread among different directories, but can be found at https://github.com/tcltk/tk and is implemented in C.


Top
 Profile  
 
 Post subject: Re: Book or pdf related to low level GUI widgets development
PostPosted: Thu May 09, 2024 10:14 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 97
Thank you thewrongchristian for your reply, it's helpful for me. Just I want to know information regarding the basic or required standard properties that each widgets should contain. Also the mathematical works each widgets include, like for example, relation between scroll thumb movements within a scrollbar and movements of list items within list view.

Thank you,
Manas Kamal Choudhury


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 40 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
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group