[Libreoffice] [GSOC][PATCH] Multiline inputbar

Anurag Jain anuragjainfzd at gmail.com
Sun Jun 26 10:23:46 PDT 2011


Hello Noel,

On Fri, Jun 24, 2011 at 7:53 PM, Noel Power <nopower at novell.com> wrote:
> Hi Anurag
> On 22/06/11 15:51, Anurag Jain wrote:
>>
>> Hi Noel,
>>
>> Resending the patch again along with the source files here.
>
> as mentioned on Wed on iRC I pushed the patch to the feature branch. I had
> hoped to see the latest changes you made to correct the control size problem
> that I identified that was preventing your new control from being displayed
> before reviewing the patch further, I am not *that* familiar with
> libreoffice ui bits and pieces and was hoping to have something to run to
> test. Additionally on IRC it wasn't clear how you now were calcuating the
> the ScInputBarGroup width, I'd like to have seen the code for that
>

I'm sending the fix patch here which calculates the height and width
of the ScInputbarGroup and makes the border invisible.

> Anyway some comments on what is there so far, I think the ScInputBarGroup is
> taking shape, clearly it's very rough at this stage (  understandable since
> you had problems getting it to show ). One thing I would suggest here to
> a) change the name of ScTextWindow to something like ScMultiLineTxtWin ( or
> any other suitable name )
> b) restore the orig ScTextWindow class
>

There is no class named as ScTextWindow  and never was. It has always
been ScTextWnd-->ScInputWindow and now it has become like
ScTextWnd-->ScInputBarGroup-->ScInputWidow


> I suggest this because it is intended when the gsoc code is initially
> integrated that it be configurable and for this reason it probably makes
> sense to preserve the original ScTextWindow class and distinguish it from
> your new implementation. This will make maintenance easier.

So I guess there should not be any problem with the maintenance of
code as I've not renamed any pre existing class and just inserted a
new class i.e ScInputBarGroup.

> Then next thing to concentrate on is getting the multi-line textbox
> functionality to work and to make that behaviour switchable. I believe Kohei
> suggested adding a button to the ScInputBarGroup window. So, you need to be
> able to detect the button click and switch the state of the bIsMultiLine
> flag that you have already added ( presumably for this purpose ) please do a
> grep for PushButton & SetClickHdl in sc for sample code for handling the
> button.

Next hurdle which I'm trying to get through is getting the Scrollbar
and Button at the right position after the Textbar ends. Does the
function SetPosSizePixel() or SetPosPixel() in window.hxx can be used
for getting them at the desired position. Or is there any other more
modular way to decide the ordering of these items similar to
InsertWindow() and InsetItem() methods used in ScInputWindow ?

> When you get a button click you will need to resize your InputBarGroupbox
> window based on the new state of the bIsMultiLine flag and of course
> increase the height in multiples of the calculated height of a single line.
> e.g. in Multiline mode the ScInputGroupBox height should be some multiple of
> the calculated singleline height ( maybe 10 as a default ? ) Of course the
> size of the ScMultiLineTxtWin (let's call it that for now but please rename
> it as you wish ) window needs to also be adjusted and everything resized. I
> would do this first before worrying about scrollbar behaviour.
>
yes as soon as I get things placed in right place I'll be working on
switching from single line to multiline mode on the button click.

> regards
> Noel
>
>
>

Thanks and regards

-- 
Anurag Jain
Final yr B.Tech CSE
SASTRA University
Thanjavur(T.N.)-613402
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.diff
Type: text/x-patch
Size: 3964 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110626/fd271916/attachment-0001.bin>


More information about the LibreOffice mailing list