Re: [anjuta-devel] Sharing code between Nemiver and Anjuta
- From: Sébastien Granjoux <seb sfo free fr>
- To: Dodji Seketeli <dodji seketeli org>
- Cc: The mailing list of the Nemiver project <nemiver-list gnome org>
- Subject: Re: [anjuta-devel] Sharing code between Nemiver and Anjuta
- Date: Sun, 13 Oct 2013 18:01:22 +0200
Hi,
Le 13/10/2013 16:58, Dodji Seketeli a écrit :
Ah, I see. You mean that components being graphical (widgets), they can
only belong to one parent widget at a time; so even if you lookup a
component that is already parented, you can't do much with it; right?
Exactly, it's more than just getting a reference to each widget out of
the perspective object. The caller will choose the parent of the widget.
So, yes, I think you need to devise a new perspective that would use the
components that the DBGPerspective type uses (call stack, breakpoint
view, etc). You could instantiate and use that widget, right?
Yes, I think it's possible to write a specific perspective object for
Anjuta. It will create the same widgets than the debugger perspective
but without doing any layout.
Where is the layout of one component vs the others done in this case?
It's done by the AnjutaShell, the equivalent of the workbench for
Nemiver. In fact, even in Nemiver, the workbench is doing a part of the
layout, as it handles the tool bars and the menu. In Anjuta, the
individual windows (editor, breakpoint view, call stack...) are handled
too like the menubar in Nemiver.
Maybe we could define a
layout kind of "none" or "embedding-friendly" that would *NOT* parent
the widgets of the components of the DBGPerspective. It would
essentially do nothing. That way, you can query the components of the
IDBGPerspective interface, get their widgets from the Anjuta shell (I
think) and parent them (effectively laying them out) as the shell sees
fit. Would that work?
Yes, I think it will work. Now I'm not sure it needs to be a perspective
if it is used only by Anjuta.
But to be even more precise, the component is an object that implements
one or more interfaces. So you need to specify the name of the object
(that name is exported/set by a naming registration mechanism) and
specify the interface that you want, from that object.
Hence something like:
IPerspective::lookup_iface<IEditor> ("org.gnome.devtools.TextEditor", "IEditor");
Yes, you need to specify the name. But we can imagine that if the name
is not specified we can take any module implementing that interface, for
the code it will be enough.
What do you mean by "split"? You mean pack them in a separate shared
library? separate directory in the source code? (they are the stuff
under src/persp/dbgperspective/nmv-*.{cc,h} today.
I mean pack them in a separate shared libraries or separate modules. If
it's possible, I think I don't need to write a specific perspective for
Anjuta and I can use these components directly, like I can already use
the gdbengine module.
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]