Control, Moniker explanation



Hi Archit,

	Here we are:

@Q: What is a Control?

	A Control is a componentized version of a Widget.

	A Control wraps an X Plug / Socket that allows a graphical
component to be inserted into another graphical container. Bonobo
makes controls particularly easy to use in conjunction with GtkWidgets
and GtkContainers.

	A Control has associated 'properties', providing an easy way
to customize basic features of the control without creating an idl
interface.


@Q: What is a Moniker?

	Monikers are used to name objects, they effectively implement
an object naming space. The naming space is extremely abstract.

	The best way to understand a moniker is to realize that its
roots are in compound documents, particularly cut and paste.  The cut
operation generates a 'Moniker' object that can be passed to a paste
site in another application. The destination application will call the
'resolve' method on the Moniker object it has been passed passing the
resolve method the interface it is interested in.  A Moniker can also
be converted to a string and back again, it can also be chained to
other monikers to provide a more complicated behavior, a little like a
directory tree perhaps. The same moniker string can be resolved to
radicaly different objects, the bonobo_get_object method encapsulates
both creation and resolution:

	Eg. to open a file:
	a = bonobo_get_object ("file:/demo/a.jpeg",
"IDL:Bonobo/PersistStream:1.0");

	Or. to open a web browser control:
	a = bonobo_get_object ("file:/demo/a.jpeg",
"IDL:Bonobo/Control:1.0");

	HTH,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]