[haiku-commits] Re: r37894 - haiku/trunk/src/servers/app

  • From: "Clemens Zeidler" <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 05 Aug 2010 09:19:12 +1200

Am 05.08.2010, 10:52 Uhr, schrieb Adrien Destugues <pulkomandy@xxxxxxxxxxxxxxxxx>:


You can think about to test the new WindowBehaviour class and put it
in an
(amiga?) add-on so everybody can try it easily. The decorators are
now
persistent, so you also can use it without calling setdecor each
time.

I will definitely have a look at it when I will add te Amiga decorator
:)
btw, how doesthe new API play with the different decorators? They still
have a "Clicked" method doing different things, that I'd have expected
to move away. Is the behaviour part done afterwards and modifying the
result value of Clicked before taking any action ?


In the Clicked method the decorator just figure out which part of the decorator has been clicked. The WindowBehaviour class should then transform this into an window action. At the moment the decorator also returns CLICK_MOVE_TO_BACK and CLICK_SLIDE_TAB in the Clicked method which should be moved to WindowBehaviour IMHO. The only reason to keep them in the decorator would be if there are dedicated button for this actions in a decorator. But in the default decorator this can be calculated in the DefaultWindowBehaviour class (CLICK_MOVE_TO_BACK -> right click on CLICK_TAB).

So it could use some more refactoring (not on my list at the moment), I just reorganized the existing code.

        Clemens

Other related posts: