[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    RFC: Dynamic plugin-based variables for KWord
From:       shaheed <srhaque () iee ! org>
Date:       2001-04-26 20:18:11
[Download RAW message or body]

I have been thinking for about the general problem of "variables" ("fields" 
in MsWord), and I think that we could invent some kind of a dynamic, 
plugin-based variable concept that would, I think, cover this and other needs.

What I have in mind is something like this:

1. It is not a frame, but inline with the text.

2. It behaves like a single character as far as line-wrapping etc is 
concerned (i.e. QRT's CustomItems).

3. The height is constrained to within the current line, the width is 
determined by a plugin (a KPart::Plugin => PluginCustomItem).

4. Associated with the variable is the name of the plugin, an instance 
identifier, and an argument string. Kword stores these two items in its XML, 
and no more.

5. At document load time, all plugins are loaded. The plugins can initalise 
themselves as required, and add themselves to an appropriate menu item.

6. For each variable, the appropriate plugin is called at an entry point with 
the argument which causes it to create its contents. This probably involves a 
factory method of some kind (a bit like an anchor but returning a 
PluginCustomItem). 

7. The plugin is a shared context across all its child variables. That way, 
it can, for example, present a list of all its children in a dialog for 
mass-editing etc.

The plugin design will have to allow for the plugin-computed "live" display 
value, a "dead" value (e.g., if plugin not found) etc.

Example uses:

- embedding HTML anchors in a Kword file (argument string is URL, "live" 
value is the descriptive part)

- serial letters

- KCite (I think :-))

- later on, evolving towards complete form-filling functionality

Thoughts?
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic