Windowing Systems by Example: 9 - Coup de Grace

Okay, we're at the end. Though it's not perfect, and you can always find a reason to add a feature to something, all we really have left to cover are a few flourishy details and a demo of how all this junk works. Today is the day, though. After this, you're on your own. But I think you'll have picked up enough tools by the end of all this that that should be more exciting than terrifying. We have a lot to write today, so let's just dive right in: Pretty Mouse I think I can almost hear a collective »

Windowing Systems by Example: 8 - Getting Dirty

Screw introductions today. If you've made it this far, it means you already know what we're up to, here. And if you haven't, then... well, frankly, you probably have some reading to do if you really want to grok every detail of this article -- in short: Hi, nice to meet you, we're elbow-deep into writing a windowing system, find a seat in the back somewhere. No. In lieu of telling you explicitly what our goals are going to be this week, I'll just show you the first change we're going to make today: //The desktop overload for process_mouse »

Windowing Systems by Example: 7 - Control Issues Part II

Sorry to leave you dudes and dudettes on a cliffhanger, there. Apparently building a robust, recursive framework for window controls is relatively nontrivial. I was shocked. Last week saw us moving a lot of the core components of the Desktop class over into the Window class -- most critically the list of child windows which we're going to be using to implement a tree of controls -- subsequently using some C-style inheritance in order to update the Desktop class to be a sub-class of Window. Finally, we also added rectangle intersection to our Contex's clipping area tools in order to »

Windowing Systems by Example: 6 - Control Issues Part I

So here's where our window manager starts to actually get really exciting: We have a desktop, and the desktop contains windows. But the windows themselves contain bupkis. What the hell good to anyone is a window that doesn't actually have anything in it? It's time to change that. It's time to implement controls. There's a really obvious thought staring us in the face that you might not even have realized: What if our windows could have windows in them? I mean, what's so special about a desktop? It's a rectangular region with windows inside of it. Why couldn't we do »

Windowing Systems by Example: 5 - Be Clipped

Hey, all you groovy fellas and dames, welcome to yet another week of WSBE. I'll lay it down quick: As it stands, we have a desktop object that holds some window objects and a drawing context object[1]. We set up our desktop object to handle mouse events and do a redraw of its windows whenever it gets one. Then, yesterday, we decided to get a little smarter and begin implementing a simple clipping system made out of rectangles and temporarily replaced our old desktop drawing code to visualize how our function for splitting rectangles into the collection of clipping »