Re: [MSEide-MSEgui-talk] Issue with hint window

2017-12-31 Thread Krzysztof
Ok I think I found it, in application object:

   function screenrect(const awindow: twindow = nil): rectty;
  //nil -> virtualscreeen
   function workarea(const awindow: twindow = nil): rectty;
  //nil -> current active window

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Issue with hint window

2017-12-31 Thread Krzysztof
Quick question. How to obtain screen / desktop resolution? I want to
adjust volume window position if it popup outside desktop

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Issue with hint window

2017-12-31 Thread Krzysztof
Works. Thanks!

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Issue with hint window

2017-12-31 Thread Martin Schreiber
On Saturday 30 December 2017 22:30:51 Krzysztof wrote:
> Hi Martin,
>
> Another issue which I think worked long time ago. In my app I have
> volume form which inherit from hint window. Main behavior of this form
> is that it should be freed when click on ANY other widget or just
> hidden when click on window from another app (and bring back when
> click on my app). So basically similar behavior of popup menu.
> Everything is working fine except that volume window is not released
> when click on window decorator (top bar outside the X window which
> have _ and X buttons). In this topic I mentioned about this but you
> wrote that it is hard to implement:
> https://www.mail-archive.com/mseide-msegui-talk@lists.sourceforge.net/msg09
>969.html Although, I remember that I reported same issue for popup menu and
> you finally managed to fix it (which you also see on attached video). So my
> question is, what trick did you use in popup menu?

"
constructor TfrmVolume.create(const atransientfor: twidget);
begin
  inherited create(nil);
  width := 80;
  sdVolume.onsetvalue := @InternalVolumeChanged;
  cbMute.onchange := @InternalMuteChanged;
  application.registeronapplicationactivechanged(@AppActiveChanged);
  show(ml_none,atransientfor);
  window.capturemouse(); //<<<
end;
"
Alternatively the demo
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/forms/popupform
repositions the popup form while dragging the base form by window decorator 
instead to close the popup form.
>
> Regards and happy new year by the way :)
>
Happy new year!

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] Issue with hint window

2017-12-30 Thread Krzysztof
Hi Martin,

Another issue which I think worked long time ago. In my app I have
volume form which inherit from hint window. Main behavior of this form
is that it should be freed when click on ANY other widget or just
hidden when click on window from another app (and bring back when
click on my app). So basically similar behavior of popup menu.
Everything is working fine except that volume window is not released
when click on window decorator (top bar outside the X window which
have _ and X buttons). In this topic I mentioned about this but you
wrote that it is hard to implement:
https://www.mail-archive.com/mseide-msegui-talk@lists.sourceforge.net/msg09969.html
Although, I remember that I reported same issue for popup menu and you
finally managed to fix it (which you also see on attached video). So
my question is, what trick did you use in popup menu? OnDeactivate and
OnExit events are not triggered. Thought that this proc has to be
extended:

procedure TfrmVolume.applicationev(const sender: tactcomponent;
  var aevent: tmseevent; var handled: Boolean);
begin
  writeln('Event ', aevent.kind);
  if (aevent.kind = ek_buttonpress) then begin
   with tmouseevent(aevent) do begin
if (fwinid <> window.winid) or //click in other window
not pointinrect(fpos,widgetsizerect) then begin
   //click out of window in case of modal
 writeln('Release volume');
 release();
end;
   end;
  end;
end;

... but none events are triggered when click on decorator :/

Regards and happy new year by the way :)

https://drive.google.com/open?id=1D-i8pN0Pq4mBYz7798u3QkewKHNT8X9g


volumeissue.7z
Description: application/7z-compressed
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk