[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Proper way to program GUI's using object oriented programming

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 6
Thread images: 1

File: guiprogramming.png (103KB, 771x741px)
guiprogramming.png
103KB, 771x741px
When one is programming a GUI interface using object oriented programming (in this case, gtk libraries) what is the preferred method to creating multiple consecutive windows?

For example, user has to do a step 1 2 and 3, and all 3 steps are being done using separate windows.

Should i create separate classes for each window and then just overwrite the memory used by the old window every time I instantiate a new window? (Creating 3 consecutive objects from smaller classes, one for each window, with each object overwriting the previous when constructed)

or

Should I instead destroy the original window and redraw the new window in its place, thus reusing the original object over and over? (This method uses one large object construct from one class which handles all 3 windows within itself)
>>
>>58491567
To clarify...
>user has to do a step 1 2 and 3, and all 3 steps are being done using separate windows.
Is there a reason I shouldnt create a class for each window?
>>
>GUI
>>
>>58491746
Thanks for the bump. I figured it may take a while before someone answers. This isnt the normal "lol, windows roxxorz! ima haxor" thread I see on here
>>
>>58491567
If possible, just use one class. If you have to create different classes, create an interface or use inheritance. Otherwise, it would be needlessly complicated.
>>
>>58491816
Huh. good answer, thank you
Thread posts: 6
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.