29 Jun

15508

0

GSOC Project TSE Week 4

Hi, everyone!!

So you all are still with me? Good!! ;)

As I had told last week, that this week will be rather an exciting one, and yes it indeed was. And the reason is, finally, you all will see a working (prototype) of the quick launch band. (yay!!)

Let me go through chronologically, what I did this week. The first thing was to Implement the IShellFolderBand. This is a very important interface as it helps to initialize the IShellFolder and PIDL (via its InitializeSFB method) required to enumerate the folder objects. And thinking about the basic UI for the user, I added a folder browser module for getting started ( a similar thing which you see when you click on 'browse', which you must be familiar with). Basically, when you will click on 'Quick Launch' entry in taskbar context menu, the folder browse dialog will show up, where you will select any folder whose items will be shown in the band. Internally the InitializeSFB method will use the PIDL of your selected folder to initialize the CISFBand. (As this UI is not the finalized version it might be changed later.)

The next thing I learned was the enumeration part. The IShellFolder interface is very powerful and is fundamental behind the navigation of shell namespace. It helped me to retrieve an enumeration object for receiving the PIDLs. It also allowed me to get all the required attributes, especially the name and icon of the respective file/folder objects. Then the obvious task was to insert this names and icons into respective buttons. While I was doing that, Giannis taught me a better way of subclassing using CWindowImpl class. The thing is, the method I used earlier didn't allow the custom defined WndProc to access the class members and making itself the class member wasn't the correct way. CWindowImpl solved both the problems by making the subclassing task an object oriented one. All of these helped to achieve one very important task and that was to bring the buttons to life!! ;D

In the other half of the week, I sat down to learn about menus, especially the context/shortcut menus (which made the 'right-clicks' famous). I learned about menu resources and various functions used to display them. The most important interface to be implemented in this regard was the IContextMenu. I implemented its QueryContextMenu method to load the required menu resource and merge it with the taskbar context menu. So whenever you will right click on the toolbar (not on the buttons of course) you will see some new entries like 'view', 'show text', etc. For the buttons, I had to handle the right click to show the familiar file/folder context menu. Among others one important task was to get the position of the mouse click and manipulate it to respond in context with the button selected and whether left/right mouse button was clicked.

All of these enabled me to present you a working prototype of quick launch. You can see the current progress in the following snaps:-

  1. Start with clicking the 'Quick Launch' entry in taskbar context menu: 4.1
  2. Choose your respective folder whose items will be added in the band: 4.2
  3. The respective items will be showed in quick launch band: You can either use the chevron (aka ">>") : 4.5 or pull the band entirely to display its contents on taskbar: 4.3
  4. As you can see, clicking on buttons will open the respective folders and you can also check out the properties (for example) via right click:4.4

Overall it was a very exciting week. I am looking forward now to finalize the Quick Launch Band by adding remaining functionalities and debugging existing ones. And that's for the next time. See you around. ;)

#Some Important links to fast track:
  1. List of Milestones and plan
  2. Present history of commits
  3. Code Repository
This blog post represents the personal opinion of the author and is not representative of the position of the ReactOS Project.

The Blog Posts

Opinions, technical details, side projects or lovely kittens created directly by the ReactOS Devs.

Their opinions are theirs, so...well...any injuries, wounds, or dead-kittens due them, are..well..their own responsibility.

Visit the "Project News" for official statements.