Re: Vincent_ GSOC2012: Dialog improvements

From: Martin Sevior <msevior_at_gmail.com>
Date: Thu Mar 22 2012 - 21:24:12 CET

Hi Vincent,

Thanks very much for your interest in abiword and your screen shot.
AbiWord presently has a feature in it's backend that allows the width
of a textbox to specified but the height of the text box is then
determined via the amount of text in the text box.

The project would be to enable the user to actually USE this feature
by exposing it in the UI. At present abiword successly imports
textboxes from Open Office documents with this feature but does not
allow users to define it or change it from within the abiword User
Interface.

If AbiWord sees that the the frame property "frame-expand-height"
defined to be non-null it has behaviour.

Cheers

Martin

On Wed, Mar 21, 2012 at 4:38 PM, vincent vincent
<vincent.abiword@gmail.com> wrote:
> HI,
> I am Vincent from Beijing University of Aeronautics and Astronautics,
> the Computer technology and sciences institution. This is the third
> year of my university life. Just as last talking in abiword mail list
> before, I have check-out the code and read about it carefully.
>
> My interested idea:  Dialog improvements
> I am quite interested about the idea: Dialog improvements. And I read
> some codes about this idea.
> Overall, Abiword is platform independent software. In Oder to achieve
> this, we need a very abstract definition of interface and model, such
> as PD_Document, pt_PieceTable. And all of this class will be override
> in Windows, Linux, MAC OSX using OS-dependent GUI library. Using this
> architecture, we can reuse code fully.
>
> I have tested in the released version and the debug version; users
> can’t precisely set the widths and heights. And the function of
> setting the line width also has some bugs too.
> All the attributions are stored in :
> static const char * AbiPropertyName[PP_PropertyMap::abi__count] = {
>        "annotation-author",
>        "annotation-date",
>        "annotation-title",
>        "background-color",
>        "background-image",
> ………..
> };
> including "table-width". we can also add 'rotate-angle'.
>
>
> Take Windows for example:
> The code is in : src\wp\ap\xp\ ap_Dialog_FormatTable.cpp
>
> The process of changing the attributes of TABLE:
> 1 Evoke the command in User Interface
>  These two functions are upper level to change TABLE’s border color
> and border thickness.These two functions are used to set the
> prosperity of Table.
>   void AP_Dialog_FormatTable::setBorderColor(UT_RGBColor clr)
>   void AP_Dialog_FormatTable::setBorderThickness(UT_UTF8String & sThick)
>   And all property of table is restored in a vector.
>   UT_PropVector        m_vecProps;
>   Including: background-color   left-color  top-color  bot-color
> left-thickness right-thickness
>   background-color: m_vecProps.addOrReplaceProp ("background-color",
> bgcol.c_str ());
>   So that in order to add the priority of setting the width and
> height. We need width and height into add to the vector.
>
> 2 Call function ‘applyChanges’ to apply changes in FVView
>   case AP_RID_DIALOG_FORMATTABLE_BTN_APPLY: applyChanges();
>
> 3 Abstract level setCellFormat. This Function is plat-independent.  We
> copy the data from m_vecProps to propsArray which is acceptable by
> FV_View
>   pView->setCellFormat(propsArray, m_ApplyTo,m_pGraphic,m_sImagePath);
>   Set cells in a table to a given format. The formatting of the
> current selection, row, column or the whole table can be changed.
>
> 4. Do the actual change
>   m_pDoc->changeStruxFmt(PTC_AddFmt,posStart,posEnd,NULL,properties,PTX_SectionCell);
>  roperties,pts);
>   bool pt_PieceTable::_realChangeStruxFmt
>   bool pt_PieceTable::_fmtChangeFmtMark
>
> 5 So that class ‘ABI_EXPORT pf_Frag_Strux : public pf_Frag’ has a lot
> of property but we don't expose to users.
>
>
>> This project would also allow the Table and Frame dialogs to accept rotated text, which is the subject of another GSoC Project.
>   About this we need to add the property into the property vector. But
> also need to be acceptable by abstract class PieceTable.
>
> My question:
>   About another part of this idea, what is the meaning of ‘allow the
> frame height or width to expand the capture all the text enteed into
> the table’? Can someone give an example? Thanks
>
> I am looking forward to hearing from you, thanks
>
>
> Regards~
>
> vincent
Received on Thu Mar 22 21:24:23 2012

This archive was generated by hypermail 2.1.8 : Thu Mar 22 2012 - 21:24:23 CET