https://bugs.freedesktop.org/show_bug.cgi?id=82641

Maxim Monastirsky <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Maxim Monastirsky <[email protected]> ---
Hi Stefan,

(In reply to comment #8)
> 2. After that I read through the source code of
> NumberFormatPropertyPanel.cxx which implements the current Button. AFAIK
> this code implements only the handler for the button. (makes sense for me)
No. This one is for the sidebar only.

> 3. I searched the source code for hints on the code for the button itself
> (couldn't find the code).
I guess there is no such code. Any "simple" toolbar button is handled by a
generic controller, that simply executes the associated command. For a complex
button, you need a specific controller that will manage it. What you need to do
is to create a whole new class (which inherits from SfxToolBoxControl), and
register it for the particular command by putting a call to
YourClass::RegisterControl in the right place
(f60424b29622033ae02491bda328c304ae1bc05d covers this too).

> 4. After your hint on the signal/slot search and the ui interface I read
> some more code. This is where I stuck because of the concept of signal,
> slots and other stuff. (don't understand the implementation and dependencies
> of the current button)
For the beginning you don't need to worry about that stuff. All that you need
to know is that you're able to execute commands, and also get status
notifications. Anyway [1] is a good source to understand how it works (although
a bit outdated).

> I don't know where I should start with the implementation of the custom
> widget
A simple PopupMenu or ToolbarMenu should be enough I guess.

[1]
https://wiki.openoffice.org/wiki/Framework/Article/Implementation_of_the_Dispatch_API_In_SFX2

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to