Book or pdf related to low level GUI widgets development

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Book or pdf related to low level GUI widgets development

Post by Kamal123 »

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
thewrongchristian
Member
Member
Posts: 425
Joined: Tue Apr 03, 2018 2:44 am

Re: Book or pdf related to low level GUI widgets development

Post by thewrongchristian »

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.
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Re: Book or pdf related to low level GUI widgets development

Post by Kamal123 »

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
Post Reply