Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Docking windows (paragraph style)
Docking windows (paragraph style)
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
knussear
Captain


Joined: Jun 19, 2003
Posts: 61
Location: Las Vegas

PostPosted: Tue Jan 13, 2004 7:42 am    Post subject: Docking windows (paragraph style)

Hi

I'm having trouble docking the floating windows in neo office J. I have tried command dragging, option dragging, and command dragging and none of these seem to work. Does Neo/j use a different method for this??

Thanks
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jan 14, 2004 10:20 am    Post subject:

From the subject of your posting, I assume that you are trying to dock the "Paragraph Styles" floating window. If so, this is not dockable because it isn't a real Mac OS X window.

NeoOffice/J (and OpenOffice.org 1.0.3 which NeoJ is based on), draws pictures of floating windows instead of creating real windows. You can tell if a floating window is one of these fake windows by dragging the window so that half of the window is in the document and half is not. If you can only see half of the window after doing this dragging, then it is a fake window.

Patrick
Back to top
nedrichards
Agent


Joined: Sep 18, 2003
Posts: 18

PostPosted: Wed Jan 14, 2004 10:36 am    Post subject:

When NeoJ moves to the 1.1 codebase the stylist becomes a proper window but until then it's 'virtual'.
Back to top
knussear
Captain


Joined: Jun 19, 2003
Posts: 61
Location: Las Vegas

PostPosted: Wed Jan 14, 2004 11:00 pm    Post subject:

Perhaps I mis-spoke. By docking I do not mean to make it drop into the apple "Dock", but rather to the side of the Open office window, the one that has the push pin symbol sometimes, just like the function list in calc.





[/img]
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jan 14, 2004 11:58 pm    Post subject:

Thanks for the clarification. I actually read the online help and tested this out and, sure enough, it works in OOo X11 but not in NeoJ.

I suspect that this is due to the old Mac OS X mouse right-click emulation. Since Mac OS X supports single button mice, pressing the Command key while clicking will send a right-click event to NeoJ.

This is one of the problems with using the Command key for all of the OOo shortcuts. We had a discussion about this many months ago in the testing forum. OOo uses the Control key and, if IIRC, we came to the conclusion that switching back to using the Control key for everything would be worse than having some of the Command-click features disabled.

Patrick
Back to top
knussear
Captain


Joined: Jun 19, 2003
Posts: 61
Location: Las Vegas

PostPosted: Thu Jan 15, 2004 6:09 am    Post subject:

OK, Thanks for the help. it is comforting sometimes just to know that I'm not crazy.
Back to top
Max_Barel
Oracle


Joined: May 31, 2003
Posts: 219
Location: French Alps

PostPosted: Fri Jan 16, 2004 2:15 pm    Post subject:

NJ 0.7.1, patch-1
pluby wrote:
Thanks for the clarification. I actually read the online help and tested this out and, sure enough, it works in OOo X11 but not in NeoJ.

In my setup, both the stylist and the navigator pseudo-windows are anchored to the right border of the main window. I remember having to fight with Neo/J to get it, but I did. Believe it or not, I don't remember how! I'm no more able to change it. Maybe it was before the special keys mapping changed (see below). Maybe I cheated and copied the setting from the OOo config file (which one?).
pluby wrote:
I suspect that this is due to the old Mac OS X mouse right-click emulation. Since Mac OS X supports single button mice, pressing the Command key while clicking will send a right-click event to NeoJ.

This is one of the problems with using the Command key for all of the OOo shortcuts. We had a discussion about this many months ago in the testing forum. OOo uses the Control key and, if IIRC, we came to the conclusion that switching back to using the Control key for everything would be worse than having some of the Command-click features disabled.

Correct me if I'm wrong, but there is once again a confusion between the Control and Command key. On my setup the Ctrl key emulates the right click, not the Command (Apple). So Command-clicking should be used for the purpose of anchoring tools windows.
On a related matter I'm still unable to reproduce the ability to Open a Menu with a shortcut. As I mentioned in an other thread, I recently accidentally went to this behaviour, but I don't know how.
As Patrick often modifies the event loop management, some features might appear and vanishe, from patch to patch?

Max
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jan 16, 2004 3:07 pm    Post subject:

I looked at the code again and now I remember why none of these key-click combinations work: I ignore the key associated with the click. While this may seem like an oversight, I put this code in because Java uses the same flags for the following:

Alt key = right button
Command key = middle button

So, when NeoJ gets a mouse event, there is no way to tell if the user is pressing the Alt key are pressing the right button or is pressing both. The same situation applies to the Command and middle button. Hence, when NeoJ runs into either case, the flag is treated as a button flag, not a key flag. In other words, an Alt-click becomes a right-click with no key.

Patrick
Back to top
ssa
Agent


Joined: Sep 29, 2003
Posts: 12
Location: Hamburg, Germany

PostPosted: Sun Jan 25, 2004 3:12 pm    Post subject:

pluby wrote:

... I ignore the key associated with the click. ... In other words, an Alt-click becomes a right-click with no key.


Hi Patrick,

What about using the Shift key here ? Of course it's not perfect to add hotkeys that are not described in the online help, but on the other hand a useful feature could be lost.
OOo is already using Shift-Mouse in other places too, like for proportionally scaling a graphics, so it's not totally uncommon.

I would suggest changing vcl/source/window/dockwin.cxx and check for all occurences of IsMod1() which originally denotes the Control-Key. You could either OR it with a check for IsShift() or, as this situation cannot occur anyway as you stated, just replace all IsMod1()'s with IsShift().

(Un-)Docking would then be possible by performing Shift-Drag or Shift-Doubleclick.

Regards,
Stephan
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Jan 25, 2004 5:07 pm    Post subject:

Stephan,

You have given me an idea. I wrote some Java test code and found that I might be able to remap Java's built-in right-click and middle-click sequences so that Shift-click and Command-click are freed up for use by the OOo code.

Right-click would still be Control-click and middle-click would still be Alt-click. The only difference is that I can trap the key-pressed event for the Shift or Command key right before the mouse is pressed. Then, if the mouse button flags are set to button1 & (button2 || button3), I can ignore Java's mouse event and, instead, forward a button1 & (Ctrl || Shift) to the OOo code.

The key part of this approach is that when the user uses the key-click combination to emulate right-click and middle-click, Java leaves the button1 flag set. This, coupled with the preceding key pressed event is the signal that the user is really pressing button1 and is not actually pressing button2 or button3.

As long as OOo does not have any use for (Shift || Ctrl || Alt || Meta ) & (button2 || button3), this aproach should work. Do you know if these combinations are used by OOo?

Patrick
Back to top
ssa
Agent


Joined: Sep 29, 2003
Posts: 12
Location: Hamburg, Germany

PostPosted: Mon Jan 26, 2004 2:22 am    Post subject:

Patrick,

Your approach sounds good to me and I cannot believe that OOo uses such awkward key-mousebutton-combinations like Control-RightClick or something. Although, you never know....
But there are definitely more places that would benfit from that change.

Perhaps you can post the final mapping of OOo vs. NeoOffice/J modifierkey-mousebutton combinations ? And also perhaps a list of impossible combinations, may be someone really finds one of them...

Stephan
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jan 26, 2004 9:31 am    Post subject:

knussear and Max,

Last night I was able to enable the Shift-click and Command-click key combinations. As I mentioned to Stephan in my previous posting, Java gives me enough subtle hints about the key-click state that I was able to properly handle the above key combinations.

Ctrl-click is still mapped to a right-click and and Alt-click is still mapped to a middle-click.

I included the change in the lastest patch ("patch-8") in the NeoJ Testing forum in the "copy and paste" topic.

Stephan,

WRT the NeoJ key mapping list, I actually have not remapped any keys expect that Command = Ctrl and Ctrl = Meta. Fortunately, OOo's online help is XML based and contains the following conditional tag:

Code:
<help:case select="MAC">Command</help:case><help:default>Ctrl</help:default>


So, I was able to have "Command" display instead of "Control" in all online help and menus in NeoJ just by setting the following XML snippet in Neo's share/config/registry/instance/org/openoffice/Office/Common.xml file:

Code:
<System cfg:type="string">MAC</System>


The real problem (and it will be a recurring one on the Mac) is Apple is continually adding system shortcuts with each release. Their "reserved" shortcut keys are continually expanding even though it really messes up many applications. From what I have seen, no key combination is safe from being included in their system shortcut keys. Sad

Patrick
Back to top
ssa
Agent


Joined: Sep 29, 2003
Posts: 12
Location: Hamburg, Germany

PostPosted: Mon Jan 26, 2004 2:48 pm    Post subject:

Patrick,

your patch works great, much better than locally using Shift as a replacement here... Having "Command" automatically appearing in the online help is really cool, however, when I looked up docking windows I still stumbled upon Ctrl strings in the section "Showing, Hiding and Docking Windows".

pluby wrote:

From what I have seen, no key combination is safe from being included in their system shortcut keys. Sad
Patrick


Yes, one examples in this contex is the F11 shortcut of OOo's stylist, but fortunately both, Exposé and OOo can be configured...

Stephan
Back to top
ssa
Agent


Joined: Sep 29, 2003
Posts: 12
Location: Hamburg, Germany

PostPosted: Mon Jan 26, 2004 5:11 pm    Post subject:

pluby wrote:
WRT the NeoJ key mapping list, I actually have not remapped any keys expect that Command = Ctrl and Ctrl = Meta.


So all that is left is the original Alt-Key, or Mod2(), which is used to open menus (Alt-f for the File menu etc.) ... But as this is not working on the X11 version as well, I guess it's a common problem.
Oh, I just saw that Option+<key> generates special characters, but what about Ctrl ? Ok, may be too confusing... So there is no good solution, right ?

Stephan
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jan 26, 2004 5:25 pm    Post subject:

ssa wrote:
[So all that is left is the original Alt-Key, or Mod2(), which is used to open menus (Alt-f for the File menu etc.) ... But as this is not working on the X11 version as well, I guess it's a common problem.
Oh, I just saw that Option+<key> generates special characters, but what about Ctrl ? Ok, may be too confusing... So there is no good solution, right ?


I assume that you say my Alt key hack in the Java code. AFAIK, only the Alt and Shift keys are used by the Mac OS X keyboard input methods to compose characters. This, I suspect, is why the X11 version does not work either.

A solution that you might consider is to disable the Alt-key menu shortcuts for Mac OS X as it does not seem common for Mac OS X applications to support the menu traversal like you can in Windows. The only menu traversal that seems supported in most applications in with a native menu are use of the arrow keys which the OOo menus already support.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.