SoC :: Ribbons :: Weekly Report #7
15 07 2007Hi!
This week has been a bug hunting week. Indeed, the following bugs have been found and fixed:
- ToolPack does not correctly display multiple buttons. Fixed!
- The expand button is displayed on top of the label. Fixed!
- Could not change the image or label of a button. Fixed!
- The visible property of widgets is ignored in Button, RibbonGroup, ToolPack. Fixed!
- The SyntheticWindow sends bad synthetic events to window-less widgets. Fixed!
- The padding was not handled correctly by the layout routine. Fixed!
- The expand button does not fire the right event. Fixed!
In addition, several enhancements have been commited:
- Better button design, but could be enhanced further.
- Updated sample to expose functionalities of the expand button.
Finally, I have documented the public API.
Thanks to this work, the code base is now a lot more solid (shall I dare, rock solid?). Next week, I plan to add the ability to add a drop down menu to buttons; and to get multiple rows of buttons in a single RibbonGroup. The last one will required some effort to find the right API to implement this in Gtk.
After this, the project will be ready to get support for Galleries. I hope to start the development of this in 1 to 1.5 week.
Laurent.
Comments : 3 Comments »
Categories : SoC 2007
SoC :: Ribbons :: Weekly Report #6 (with Screenshot and Screencast)
9 07 2007Last week was my first week without exam since the beginning of the development of Ribbons. As a consequence, I’ve been able to advance at a far better pace. The following tasks have been completed:
- Addition of the ability to add shortcuts widgets to the main Ribbon (the Menu button in the screenshot)
- Addition of the expansion button to groups (the + buttons in the screenshot)
- Addition of ToolPack (I’ve no idea whether the name sucks or not), this make it possible to create a single row of buttons, which are joined together in a single block (see the screenshot).
- Support for an icon in Button.
- Updated layout logic for both Ribbon, and RibbonGroup.
The known bugs:
- I have troubles with the Visible property of widgets. I will have to study how it works because it changes to True automatically.
- It seems I can’t change the Child property of a Bin widget once it has been assigned. I experimented this problem recently in Button.
- The Button widget should override the fore color of its child when the background is painted.
- The expand button in RibbonGroup can be placed on top of the label (the size requisition is right however), but shouldn’t.
The mandatory screenshot (at revision 798):
The screencast:
http://groups.google.com/group/mono-soc-2007/web/Ribbons-r798.ogg (87 KiB)
Laurent.
Comments : 3 Comments »
Categories : SoC 2007
SoC :: Ribbons :: Weekly Report #5
1 07 2007Hello!
This week, I have been working on the implementation of events for the ribbon widget (which should be complete now), polished the design, and started the implementation of the button widget. The button is used both standalone or in a toolbar. In the short-term, I will implement the support for popup menus in button, and implement toolbars.
The good news is that my exams are now over. I have obtained my master degree in computer sciences with great distinction.
I will post screenshots next week.
Laurent.
Comments : Leave a Comment »
Categories : Uncategorized
SoC :: Ribbons :: Weekly Report #4
24 06 2007This week has been extremely exhausting for me… I’d like to say that it is due to my hard work for ribbons, but it isn’t. It’s was due to exams. Nevertheless, I’ve been able to fix a critical bug in my ribbon which prevented me from switching from one tab to another. I have also started the implementation of the button. So, in the short-term I will have to:
- Add the popup button to RibbonGroup. It is used to open a popup menu or a window.
- Implement the drawing of Button.
- Implement events for Ribbon, RibbonGroup, and Button to be used by the end-user application.
Afterwards, I plan to implement the toolbar. It should be fast, thanks to Button. As time permits before the mid-term evaluation, I will try to implement Gallery or something else.
Laurent Debacker.
Comments : Leave a Comment »
Categories : SoC 2007
SoC :: Ribbons :: Weekly Report #3
17 06 2007Hi
This week I have completed the synthetic emission of some mouse events (Enter, Leave). In addition, you can now click on a tab to open it. Nevertheless, there is a bug while switching the page. Finally, some refactoring was required in the Ribbon to continue the development.
I have still ten days of exams. By then, I should have my Ribbon and RibbonGroup in an almost complete form.
Afterwards, I will be working on the implementation of the RibbonButton. I have to develop my own button because it must match the style of the ribbon (it is transparent if not hovered) and it must support drop down menus. This button will make it possible to complete the RibbonGroup. If everything works fine, I should have a few more days to begin the implementation of toolbars before the mid-term evaluation.
Laurent Debacker.
Comments : 3 Comments »
Categories : SoC 2007
SoC :: Ribbons :: Weekly Report #2
10 06 2007Hi!
Now that the drawing of the ribbon and ribbongroups is completed, I have been focusing on user interactions. To do this, I need mouse gesture events. However, this is not as simple as it seems. Indeed, for now I only use no-window widgets. This decision was made because I must have transparent widgets. For example, the ribbongroups must have its body transparent, to see the underlying ribbon. In order to have a transparent widgets, I see three ways:
- Using the RGBA color space in a widget with its own window, and painting the background with a transparent color. I’m not an expert in X.or, but AFAIK it requires some ‘advanced’ compositing features that are still rare. For example, only one of my three Linux installations supports it. Therefore it is not an option.
- Use the the ShapeCombineMask method with a widget that has its own window. But this only make it possible to have transparent widgets, not translucent ones. However it could be an option, but I would have to both draw the actual widget, and draw the mask…
- Use no-window widgets as I currently does. However some websites tell that this option has three side-effects:
- There is a risk that a child could draw out of its allocated space. This is not an issue, just clip the region in cairo.
- It is not possible to draw a background. Well, I have never understood this one since I just have to call paint in cairo.
- The only event that is received in such a widget is Expose. Well this one is a killer.
So, that’s what I have been studying this week, the synthetic propagation of some events to no-window widgets. The propagation of cursor motion and clicks has been trivial. On the other hand, the propagation of mouse leave/enter events is another story. First, Gtk# does not seem to provide a way to create such an event. You must be provided with an IntPtr from somewhere. As a consequence I have create my own managed struct that mimics the native GdkCrossingEvent. My struct is designed to be marshaled, and compatible with both 32 and 64-bits systems. But this as a consequence, my library is now “unsafe” because I must get the address of the struct and create an IntPtr from it. In order to use this new mechanism, the developer has to inherit from SyntheticWindow instead of Gtk.Window. I think that Gtk# should offer a way to create our own events, because a C programmer could. But since it is not possible now, I have to implement this littly hack.
The synthetic propagation is not complete yet, but almost. I have not been ably to do more, because I have had 3 exams during the week.
Comments : 1 Comment »
Categories : SoC 2007
SoC :: Ribbons :: Weekly Report
2 06 2007Well, in my l10n the last day of the week is Sunday, but since everybody seem to reports already, I will follow the train :p
So, What has been completed this week ?
- Completed drawing of the ribbon.
- Refactoring of the theme. The theme handles the drawing, widgets handle allocations.
- Switched from HSV to HSL color space. My goal is to be able to get a bright or darker color, in the same hue. The problem with HSV is that at V=max get the saturated color. However, I would prefer white, this is what HSL provides me.
- I fixed the foreground color issue with issue. Cairo uses color channels in the 0;1 range, Gdk 0;255, of course 1;1;1 is white in cairo and black in Gdk…
I know it is not that much, but my exam starts now, and lasts till the end of the month. I will work a bit on my project thought to relax. As promised, I started coding before the official lauch to compensate this. I will have two weeks between the end of my exams and the mid-term evaluation. As a consequence, I hope to make the tabs of my Ribbon clickable, and add events to my ribbons, to implement the new button class, and add the expand button on the ribbongroup for the mid-term.
Comments : Leave a Comment »
Categories : SoC 2007
First screenshot! Bink blink!
27 05 2007So, here it is, the First screenshot of my Ribbon for SoC 2007.
It is using Cairo for all drawing, Pango for all text rendering running on my lovely Arch Linux. I think that the drawing of tabs is quite nice, but the rendering of the body is still not completed. You can see the Ribbon widget (inherits Gtk.Container) and RibbonGroup (inherits Gtk.Bin). The button is the 1st group is just a Gtk.Button. The height of a group is 90 pixels by default. It width is automaticaly computed to fit the content. If it is empty, it fits the label.
I have one big problem for now: how the hell do I change the color of the text in a Gtk.Label ??? I have tried ModifyFg and ModifyText without success. Any idea ?
Here is the code of the sample:
VBox master = new VBox ();
Title = "Ribbons Sample";
AppPaintable = true;
button0 = new Button ();
button0.Label = "Hello World";
group0 = new RibbonGroup ();
group0.Label = "Summer of Code";
group0.Child = button0;
group1 = new RibbonGroup ();
group1.Label = "I will be back";
HBox page0 = new HBox (false, 2);
page0.PackStart (group0, false, false, 0);
page0.PackStart (group1, false, false, 0);
HBox page1 = new HBox (false, 2);
HBox page2 = new HBox (false, 2);
Label pageLabel0 = new Label ("Page 1");
Label pageLabel1 = new Label ("Page 2");
Label pageLabel2 = new Label ("Page 3");
ribbon = new Ribbon ();
ribbon.AppendPage (page0, pageLabel0);
ribbon.AppendPage (page1, pageLabel1);
ribbon.AppendPage (page2, pageLabel2);
TextView txt = new TextView ();
master.PackStart (ribbon, false, false, 0);
master.PackStart (txt, true, true, 0);
Add (master);
Laurent Debacker.
Comments : 11 Comments »
Categories : SoC 2007
Master Thesis Completed
18 05 2007Hi, I’m Laurent Debacker, working on Ribbon widgets for Gtk# for Google Summer of Code.
I’m happy to announce that my Master Thesis is finally completed. What this means for the project is that I am gonna have a lot more time to work for Mono. The upcoming weeks, until the end of June, will be a mix of exams and Mono. The hard part, which consisted of learning how to build custom transparent widgets using Cairo, is now over. On the other hand, I will have to learn how to build custom layouts (but it should be a lot easier).
I will use this web log to publish big updates to my project, and post screenshots.
I apologize if some sentences may look a little bit weird, I’m Belgian, and my mother tongue is French
I’m so excited about this project! (or maybe am I so excited because I just finished my master thesis…)
Comments : Leave a Comment »
Categories : SoC 2007