On Tue, 2004-11-30 at 19:49 +0100, Pablo León wrote:
> Hi all!
>
> I'm involved in a proyect that will use abiword as a text processor for
> a document management system. For that purpose I should limit the
> actions the user can perform. Is there a way to configure (or disable)
> abiword's menu items? If not, what do you think is the best way to
> acomplish this?
>
> Also, the ability to include protected text (aka external fields) would
> be nice for this proyect. Any suggestion on how to achieve this?
>
>
Hi Pablo,
It is rather easy to reconfigure the menus. They're all defined
via header file(s).
Look at:
abi/src/wp/ap/xp/ap/ap_Menu_Layouts_MainMenu.h
I think you'll be able to work out how to use it in a few minutes.
You might also want to play with the context menus (the ones you get
when you right click). See
abi/src/wp/ap/xp/ap_ML_Context*.h
Regarding protected fields, I guess you mean uneditable text of some
sort?
I suspect you have to invent a new text property, "protected", that can
be applied to text runs (like font,font size,..). If the crant is within
these disable text insertion or deletion.
So you'll need to define a new method in the
abi/src/text/fmt/xp/fv_View.h
FV_View class, called
FV_View::isInProtected(PT_DocPosition pos)
Which returns true if the document position is within a range of
protected text.
If it is disable the text insert and delete functions
abi/src/wp/ap/xp/ap_EditMethods.cpp
( just return out of defun(insertData), defun(delLeft), defun(delRight)
and if isInProtected() is true)
You'll also have work out a UI for enable and disabling the protection.
Cheers
Martin
> Thanks in advance,
>
> Pablo León.
Received on Wed Dec 1 00:52:32 2004
This archive was generated by hypermail 2.1.8 : Wed Dec 01 2004 - 00:52:32 CET