Hi Niklas, The following idea is Carsten's from framework-dev list. According to my apprehension, his advice is to create a new class,the new class is derived class Window in vcl, the new class will implement the paint and some mouse events,it will be added to toolbar item. In addition, I need to create the other new class that is derived class SfxToolBoxControl, I will use CreateItemWindow(...) in SfxToolBoxControl method. Whether my idea is right? I'm looking forward to your advice!
Thanks & Best Regards, maoyg 2008.04.25 maoyg wrote: > I have created a new issue88521# about Print Output Scaling Factor > on page preview, I will start to analyze class SvxZoomSliderControl. > If we want to implement the print scaling slider,whether it is derived from > SfxToolBoxControl, > we see class SfxToolBoxControl,it has not mouse events related. > I hope you can give me some hints. Niklas wrote: >Maybe you have to use an additional window (overload CreateItemWindow). >You could ask on the framework-dev list if someone has a different idea. Yan Wu wrote: > I want to add a slider(not derived from vcl/slider) controller, like the > ZoomSlider in writer's statusbar of OOo3.0, in the toolbar, But it seems > that there is missing event Paint and some mouse events(like > MouseMove,MouseButtonDown...) for the svt::ToolboxController. Do I need > to implement those events ? Some hints? Carsten wrote: >The svt::ToolboxController is just an implementation class to integrate >into the OpenOffice.org framework. A item window based toolbar >controller, that's something you want to implement, uses a window for >the output. It must be added to the toolbar item (see SetItemWindow(...) >method at the toolbar). The window which you add to the toolbar item >must implement the paint and mouse events. >The status bar uses a different approach. There are no child windows >which are added to the status bar. The status bar consists of logical >areas which are controlled by the controller implementation. Therefore >the controllers are responsible for painting and receiving the mouse events.
