[Ipe-discuss] customizing ipe7: bookmarks and mouse buttons

Alexander Wolff alexander.wolff at uni-wuerzburg.de
Thu Apr 29 17:20:19 CEST 2010


dear otfried,

 >> does anyone happen to know how to configure ipe7 to always show the
 >> list of bookmarks?  (i know that i can get them manually via <Page>
 >> -> <Bookmarks>, but i'm lazy...)
 >
 > This is not currently possible.  I guess I could make it a preference.

that would be nice!

 >> can mouse buttons be configured as easily as shortcuts involving keys
 >> on the keyboard?
 >
 > nearly: function MODEL:mouseAction in tools.lua

thanks for the pointer (and the comments in the code!).
for those interested, my new mouse actions are attached.

sascha

--------------------

function MODEL:mouseAction(button, modifiers)
   -- print("Mouse action", button, modifiers.alt, modifiers.control)
   if button == 1 then
     -- left mouse button
     if modifiers.shift then
       self:startTransform("rotate", modifiers.shift)
     elseif modifiers.control then
       self:startTransform("stretch", modifiers.shift)
     else
       self:startModeTool(modifiers)
     end
   elseif button == 4 then
     -- middle mouse button
     if modifiers.control then
       self.ui:panTool(self:page(), self.vno)
     else
       self:startTransform("translate", modifiers.shift)
     end
   elseif button == 2 then
     -- right mouse button
     if modifiers.alt then
       self:propertiesPopup()
     else
       -- (non-)destructive select
       self.ui:selectTool(self:page(), self.vno,
			 prefs.select_distance, modifiers.shift)
     end
   end
end

---------------------



More information about the Ipe-discuss mailing list