Latest Posts
-
2021-12-04 - Tedious abnormal iterators
Progress on UI
GUI class design
The gui class design seems to be working well, supporting windows / user controls / common controls nicely enough.
-
2021-11-10 - Tedious brainstorm
Event Class Revisited
Discerning a satisfactorily fair class architecture for a gui is very tedious. But daily contemplation result in enduring evolution.
-
2021-11-05 - Broken windows theory
The broken windows theory
Wikipedia on the Broken windows theory
Richard Tuin relating it to software development.
-
2021-11-01 - Anonymous Lambda
Anonymous Lambda
In the following code, GetMessage return -1 on error
-
2021-10-31 - Perfect forwarding references
Perfect Forwarding References with class functions
Given that “beauty is in the eye of the beholder”, and having just learned about std::forward, let’s proceed to make our beautiful event class perfectly forward the
operator()
arguments to its _func pointer.
-
2021-10-30 - On events and templates
Event Class
Testing the assertions is not nice when the code call ExitProcess during the test execution. Assertions must raise events to allow for custom behavior.
-
2021-10-29 - Reboot and more
Reboot
While the design is working, the fact that windows are created before being assigned to a parent have become untenable. This design is depleted, a new design must take its place.
-
2021-10-26 - Copy and swap applied and removed
Copy and swap applied to a Bitmap class
Moving on with implementing a ColorPicker user control, first a Bitmap class is created. It makes sense for a bitmap to be copyable, the time for have come for the copy and swap idiom :)
-
2021-10-24 - Keep looking and you shall find
Remember, polymorphic instance must not be stored by value.
ControlGroup receives rvalue’s of Control, where control can and will often be merely a base class of something bigger. The collection of child control was stored by value, very nice and modern right?. But this break polymorphism.
-
2021-10-21 - Copy and swap idiom
Further lore sought
The quest for knowledge continues with the discovery of copy and swap.
-
2021-10-20 - Complex is simple once understood
Followup on rvalues
A refresh on rvalue and move semantics over a few days, improved the understanding enough to make them comfortable to use.
-
2021-10-16 - Move semantics and rvalue
Move semantics and rvalue
The reasoning is, since this is C++ and not C, then move semantics and rvalue references might as well be used.
Operator new will not have to be used, and the control collection (std::map) will store entire objects instead of pointers.
-
2021-10-15 - Refactor and SetParent
Refactor
Looking at the Window.cpp constructor code leaves a bad smell. It’s not self-documenting, and very hard to understand.
By adding more tests and then refactoring the class, the outcome smells much better.
-
2021-10-13 - Understanding Jekyll and Themes
Understanding Jekyll
The first step in fixing the misunderstanding which prevent the blog from working is to start previewing the pages locally. See Testing your GitHub Pages site locally with Jekyll
-
2021-10-12 - When does .NET create window handles?
ILSpy
In the current ui classes, adding controls to an instance of the DialogWindow class requires telling each control about the parent window handle, since the actual window is created inside the CTor without the WS_VISIBLE style.
-
2021-10-11 - Initial Setup
New repository
The initial code for the new generic win32 ui is imported into the new shigoto.shoujin repository. It supports EditControl, ButtonControl and tab order.
-
2021-10-10 - First blog
Today is the beginning of Shigoto Shoujin; He who place the future ahead of the present. Hard work is rewarded, and nothing is easy; Cicadas sing to forget, ants have no regret.