last questions
- From: Nat Friedman <nat nat org>
- To: lacage email enst fr
- Cc: nat gnome-support com, miguel gnu org, gnome-components-list gnome org
- Subject: last questions
- Date: Sat, 11 Sep 1999 10:09:26 -0400 (EDT)
Mlacage@aol.com writes:
>
> Nat: is this still true ? Is this why we keep these
> GNMOE::Embeddable::get_verb_list and GNOME::View::do_verb functions
> ?
Yes. And it works. You should look at the code in
bonobo/samples. The component and container there are supposed to act
as 'reference' implementations that you can use to learn how Bonobo
works.
> 2) why is not there a ViewFactory, ViewFrameFactory and ClientSiteFactory
> interface ?
The Embeddable new_view() method basically act as a ViewFactory.
It only makes sense to create a ViewFrame when you have a
corresponding remote view, and so there is no reason that you'd ever
want to remotely instantiate a ViewFrame. Therefore, there is no
reason to have a ViewFrameFactory interface. Similarly with
ClientSite.
> 3) Conclusion: i decide to activate a component: what should i do ?
> call
I presume you are asking about in-place activation. This is a
two-step process, and it is well-described in the comments in
bonobo/samples/sample-container.c:
/*
* In-place activation of a component is a two-step process.
* After the user double clicks on the component, our signal
* callback (component_user_activate_request_cb()) asks the
* component to activate itself (see
* gnome_view_frame_view_activate()). The component can then
* choose to either accept or refuse activation. When an
* embedded component notifies us of its decision to change
* its activation state, the "view_activated" signal is
* emitted from the view frame. It is at that point that we
* actually remove the cover so that events can get through.
*/
> GNOME::View::activated, GNOME::Embeddable::activate and wait for the
> component to call GNOME::ClientSite::show_window.
The show_window() method is only used for out-of-place
(non-embedded) editing modes. Thus far, we have not yet tested those
interfaces, and I suspect that GNOME::ClientSite:show_window() might
not make sense, as interface methods go.
> When receiving the call to
> GNOME::Embeddable::activate, the container must loop through its views to
> find out what view was activated with the precedent call to
> GONME::View::activated.
There is no GNOME::Embeddable:activate() method. The activation
occurs on a per-view basis, and so the method you want to look at is
GNOME::View:activate(). In general, remember that one GnomeEmbeddable
object can map to several GnomeView objects, each of which is an
identical view of the document data contained in the GnomeEmbeddable.
> Then, the component will call
> GNOME::ClientSite::show_window to tell the container whehter it
> supports
As I said above, show_window() is only for out-of-place
(separate-window) activation, and we haven't tested it yet.
> so, if all this is wrong, what is GNMOE::View::activated used for ?
The container calls GNOME::View:activate() on a given view to
request that the view activate itself. If the view acquiesces, and
allows itself to be activated, it calls
GNOME::ViewFrame:view_activated() on its container-side ViewFrame, to
let it know that it has been activated. The container will then allow
X events to pass through to the embedded component.
Amicalement,
Nat
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]