Re: Vincent_ GSOC2012: Dialog improvements_ Part 1

From: vincent vincent <vincent.abiword_at_gmail.com>
Date: Tue Mar 27 2012 - 07:52:06 CEST

Hi Pradeeban,

thanks for your reply and suggestions. I will update my time-line and
change to indicate the start - end dates. I think the exactly date is
better.

now I try to post to GSOC site and keep on updating it. And I also try
to post my patch about fixing some bugs from Abiword bugzilla.

thanks,
vincent

在 2012年3月27日 上午4:29,Kathiravelu Pradeeban <kk.pradeeban@gmail.com> 写道:
> Hi Vincent,
> In the time-line, instead of mentioning 2 weeks, it would be better if
> you can indicate the start - end dates. In that way, it would be
> easier to map the tasks to the project mile-stones such as the
> mid-evaluations and pencils-down, and see how your time-line fits.
> Moreover, I prefer the tasks to be more descriptive.
>
> Pls note, the application period has begun. Hence apply directly to
> the melange, and keep improving that. It is a more effective way to
> review the application, than sending the application to the entire
> list.
>
> Thank you.
> Regards,
> Pradeeban.
>
>
> 2012/3/26 vincent vincent <vincent.abiword@gmail.com>:
>> Hi,
>> the attachment is my application about GSOC : Dialog improvements
>>
>> I will post it in GSOC site tomorrow and keep updating it until the
>> end date. thanks
>>
>> thanks for giving me suggestions.
>>
>> I think we also have some works in frontend(UI) side. We need to make
>> this feature useable for all OS(Linux, Mac, Windows). so that we need
>> to add it in abstract level firstly, and then implemented in all OS
>> GUI.
>>
>>
>> and I will investigate deeply in the backend and frontend.
>>
>>
>> Many thanks!
>>
>> Vincent
>>
>>
>>
>> 在 2012年3月25日 下午6:16,Martin Sevior <msevior@gmail.com> 写道:
>>> Hi Vincent,
>>>
>>> Yes. This what you have to do in the backend.
>>>
>>> Cheers
>>>
>>> Martin
>>>
>>> 2012/3/24 vincent.abiword <vincent.abiword@gmail.com>:
>>>> Hi,
>>>> I am Vincent. About my interested idea: Dialog improvements. I would like to split this idea to two part:
>>>> 1. Table Setting: including dimension setting and 'rotate-angle' setting
>>>> 2. Frame expandable, makeing Frame expandable when users enter extra line of text, which has been discussed in last mail.
>>>>
>>>> I also have some opinions about the Table Setting (part 1). Correct me if I have something wrong.
>>>> Same as Frame expandable, 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 need to add 'rotate-angle'.
>>>>
>>>> in AP_Dialog_FormatTable, we will correct all attribution values and store them in vector. (UT_PropVector m_vecProps;)
>>>> Example: setBorderColor : background-color:
>>>> m_vecProps.addOrReplaceProp ("background-color", bgcol.c_str ());
>>>>
>>>>
>>>> Steps to implement:
>>>> So that in order to add the priority of setting the width and height. We need to add width and height to the vector.
>>>> 1. Add evoke function in AP_Dialog_FormatTable
>>>> 2. In the evoke function, setting corresponding value to the UT_PropVector.
>>>> 3. These two functions will render the attributions:
>>>> bool pt_PieceTable::_realChangeStruxFmt
>>>> bool pt_PieceTable::_fmtChangeFmtMark
>>>>
>>>>
>>>>
>>>> Add 'rotate-angle', we need to do:
>>>> 1. Add attribution in static const char * AbiPropertyName[PP_PropertyMap::abi__count]
>>>> 2. Init this attribution in static PP_Property _props[], we init them to:
>>>> * Property Nme: Initial Value: Can Inherit: Pointer to class : tPropLevel
>>>> * tPropLevel should be set by or-ing the values defined in PP_Property.h
>>>> 3. the most important step:
>>>> Add render function to rotate-angle (this relate with another GSOC topic, I also have some interesting to implement it)
>>>> 4. Add evoke function in AP_Dialog_FormatTable
>>>> 5. In the evoke function, setting corresponding value to the UT_PropVector.
>>>> 6. These two functions will render the attributions:
>>>> bool pt_PieceTable::_realChangeStruxFmt
>>>> bool pt_PieceTable::_fmtChangeFmtMark
>>>>
>>>>
>>>>
>>>> Please Give me some suggestions and correct me if I have something wrong, thanks
>>>>
>>>>
>>>> Vincent
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> vincent.abiword
>>>>
>>>> 发件人: vincent vincent
>>>> 发送时间: 2012-03-24 16:04
>>>> 收件人: Martin Sevior; Xun Sun; Kathiravelu Pradeeban; larochelle.simon.1
>>>> 抄送: abiword-dev; Hub Figuière
>>>> 主题: Re: Vincent_ GSOC2012: Dialog improvements_ part 2: Frame
>>>> Hi,
>>>> I am Vincent. Thanks for your reply. I have looked into the code about
>>>> setting the Frame expandable.
>>>> Following is my opinions about this idea, Correct me if I have
>>>> something wrong, thanks
>>>>
>>>> Presently, users can set the height and the width of a frame by
>>>> dragging and releasing the frame to a suitable dimension. Currently,
>>>> If users enters an extra line of text in an already full text frame,
>>>> the Frame will hide the text until the user changes the size of the
>>>> box. And in this idea, We would like to change the frame dimensions
>>>> automatically if the user enters an extra line of text. we call
>>>> 'frame-expand-height' in Abiword.
>>>>
>>>> In fact, abiword already has this feature but does not allow users to
>>>> define it or change it from within the abiword User Interface.
>>>>
>>>> So my suggestions are:
>>>> 1. expose 'frame-expand-height' to users when users use 'Frame' in
>>>> abiword, since I think 'frame-expand-height' is more friendly to
>>>> users.
>>>> 2. in UI (Dialog : Format text box), users can turn it on or off
>>>> on : enable frame-expand-height
>>>> off: disable frame-expand-height
>>>> in code level:
>>>> in function: void FV_FrameEdit::mouseRelease(UT_sint32 x, UT_sint32 y)
>>>> we need return a valid value for "frame-expand-height",m_sExpandHeight.c_str(),
>>>>
>>>> Steps to do this:
>>>> Firstly, all properities are defined in the array AbiPropertyName.
>>>> static const char * AbiPropertyName[PP_PropertyMap::abi__count] = {
>>>> "frame-col-xpos",
>>>> "frame-col-ypos",
>>>> "frame-expand-height",
>>>> "frame-height",
>>>> "frame-horiz-align",
>>>> "frame-min-height",
>>>> "frame-page-xpos",
>>>> "frame-page-ypos",
>>>> "frame-pref-column",
>>>> "frame-pref-page",
>>>> "frame-rel-width",
>>>> "frame-type",
>>>> "frame-width",
>>>> }
>>>>
>>>> and then in static PP_Property _props[], we init them to:
>>>> * Property Nme: Initial Value: Can Inherit: Pointer to class : tPropLevel
>>>> * tPropLevel should be set by or-ing the values defined in PP_Property.h
>>>> {"frame-expand-height", "0.0in", false, NULL, PP_LEVEL_FRAME},
>>>> {"frame-height", "0.0in", false, NULL, PP_LEVEL_FRAME},
>>>> {"frame-horiz-align", "left", false, NULL, PP_LEVEL_FRAME},
>>>> {"frame-min-height", "0.0in", false, NULL, PP_LEVEL_FRAME},
>>>> {"frame-page-xpos", "0.0in", false, NULL, PP_LEVEL_FRAME},
>>>>
>>>> when user change the frame, presently they drag and release the frame,
>>>> the following action happens:
>>>> 1. ap_EditMethods::releaseFrame(AV_View * pAV_View, EV_EditMethodCallData * )
>>>> 2. void FV_View::releaseFrame
>>>> 3. bool pt_PieceTable::_fmtChangeStruxWithNotify
>>>> 4. fl_ContainerLayout::lookupProperties()
>>>> 5. in the lookupProperties function:
>>>> 1, we get Frame Type: pSectionAP->getProperty("frame-type",pszFrameType))
>>>> 2, we get Position-to value:
>>>> pSectionAP->getProperty("position-to",pszPositionTo))
>>>> 3, also: wrap-mode wrap-mode
>>>> 4, ...
>>>> the one about this idea:
>>>> if(pSectionAP &&
>>>> pSectionAP->getProperty("frame-expand-height",pszExpandHeight))
>>>> {
>>>> m_iMinHeight = m_iHeight;
>>>> m_bExpandHeight = true;
>>>> }
>>>>
>>>> at this time, Abiword can receive "frame-expand-height" after user
>>>> enter extra lines. and the two values will be used to refresh Frame's
>>>> dimensions:
>>>> m_iMinHeight = m_iHeight;
>>>> m_bExpandHeight = true;
>>>> Please Give me some suggestions and Correct me if I have something wrong, thanks
>>>>
>>>>
>>>> Vincent
>>>>
>>>> 在 2012年3月23日 上午4:24,Martin Sevior <msevior@gmail.com> 写道:
>>>>> 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
>
>
>
> --
> Kathiravelu Pradeeban.
> Software Engineer.
> WSO2 Inc.
>
> Blog: [Llovizna] http://kkpradeeban.blogspot.com/
Received on Tue Mar 27 07:52:16 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 07:52:17 CEST