Re: [Lazarus] Docked Form

2015-06-13 Thread Juha Manninen
Balázs,
instead of a hidden Panel could there be a nested PageControl with
tabs at the bottom?
In fact this idea is from Martin, otherwise I got no feedback.
The panel versus PageControl difference is not fundamental which means
the design is basically ok and you have green light to implement it.
The PageControl may be easy to implement and would allow selecting the
source editor / form designer with mouse, and also give visual hint
about such possibility.

Maciej,
If I interpret your mails right, it was more about the API and not
about embedding the form designer.
The API can be improved anyway later and we can now go ahead with the
form designer thing. Is this correct?

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Maciej Izak
2015-06-14 1:07 GMT+02:00 Juha Manninen juha.mannine...@gmail.com:

 Balázs,
 instead of a hidden Panel could there be a nested PageControl with
 tabs at the bottom?
 In fact this idea is from Martin, otherwise I got no feedback.
 The panel versus PageControl difference is not fundamental which means
 the design is basically ok and you have green light to implement it.
 The PageControl may be easy to implement and would allow selecting the
 source editor / form designer with mouse, and also give visual hint
 about such possibility.


Btw. In FreeSparta I already use PageControl. To get working plugable
PageControl
(with pages Code/Desig/Or even History) only few changes in sourceeditor.pp
is required:

all small changes are marked as simple comment // DaThoX
some bigger changes are marked as
// DaThoX begin
   more lines of modified code here
// DaThoX end

https://github.com/dathox/freesparta/blob/master/lazarus_sparta_patch/ide/sourceeditor.pp

Maciej,
 If I interpret your mails right, it was more about the API and not
 about embedding the form designer.
 The API can be improved anyway later and we can now go ahead with the
 form designer thing. Is this correct?


Maybe a little explanation. In FreeSparta you can find:

1. Non-invasive changes in Lazarus (the smallest).
2. what is possible, from point 1, it is added to the IdeIntf.
3. all the magic happens in the package (
https://github.com/dathox/freesparta/tree/master/1_spartaBasic).
In contrast to Typhon code, the code of docked forms, can be
completely uninstalled as a simple package.
4. everything is designed for the creation of ToolsAPI.

Few technical details from Typhon should be moved into FreeSparta (holding
form position and scrolling) for better multiplatform Docked Form.
CodeTyphon docked form solution is copied (modified and fixed) from
kzdesktop project...

btw. I need to exclude dependencies from BGRAControls in few places.

best regards,
Maciej Izak
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Maciej Izak
2015-06-13 10:31 GMT+02:00 Juha Manninen juha.mannine...@gmail.com:

 So we need the improved toolAPI before the embedded dockable form designer?


IMO  ToolsAPI should be only proxy for improved/extended IdeIntf.


 On the other hand I don't see why the dockable form designer would
 need Generics.Collections.


Maybe not directly dockable form but tools/modules around (generally I
need fast generic hash maps).


 Generics already work somehow in FPC 2.6.4, I have used the fgl unit
 myself in Lazarus code.


fgl don't contains HashMap and is not automated/and simple in use like
Generics.* for any kind of type.


 This is all very abstract.
 Now I try to figure out what is the best design for the dockable form
 designer.
 Balázs already has working code. If your solution is used, is it in
 addition to his code or does it replace it?


Both. It depends of code part. Interesting thing:
FreeSparta Docked Form installed in modified CodeTyphon works well with
CodeTyphon Docked Form...

http://i.imgur.com/7gd36LL.jpg


 In any case we need a patch and a more detailed explanation of what it
 does!
 The question remains: can you participate in practical level?


Give me 24 hours, I'll do better patch. I can participate in practical
level :).

Best regards,
Maciej Izak
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Flashing task bat icon orange on Windows 7

2015-06-13 Thread Michael Van Ham
On Fri, Jun 12, 2015 at 4:25 PM, Richard Mace richard.m...@gmail.com
wrote:

 ​Hi,
 I am trying to work out how to flash the taskbar icon in Windows 7, like
 Skype does, pragmatically. I have googled, and the closest I found was
 FlashWindowEx, but that doesn't actually flash the icon, just the form
 window.



If your app is not the foreground app, SetForegroundWindow will flash the
taskbar icon.

On a new project, drop a TTimer, paste this, run, and minimize your app.


procedure TForm1.Timer1Timer(Sender: TObject);
begin
  SetForegroundWindow(Form1.Handle);
end;


see msdn:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx

An application cannot force a window to the foreground while the user is
working with another window. Instead, Windows flashes the taskbar button of
the window to notify the user.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Flashing task bat icon orange on Windows 7

2015-06-13 Thread aradeonas
Richard please send a screen shot for better understanding.

Regards,
Ara


-- 
http://www.fastmail.com - Send your email first class


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Juha Manninen
On Sat, Jun 13, 2015 at 3:13 AM, Maciej Izak hnb.c...@gmail.com wrote:
 With properly implementing a system of Docked Form, we can create a very 
 compatible ToolsAPI.

So we need the improved toolAPI before the embedded dockable form designer?

 Can we include in some way Generics.Collections in to Lazarus...?
 Generics.Collections can work with incoming FPC 3.0.

Yes, it can be included inside IFDEFs in Lazarus trunk if really
needed. FPC 2.6.4 must be also supported for some time even when FPC
3.0 is out.
On the other hand I don't see why the dockable form designer would
need Generics.Collections.
Generics already work somehow in FPC 2.6.4, I have used the fgl unit
myself in Lazarus code.

 It will be easier for me now (I changed my job and again I program in Pascal
 :) ). Maybe in the beginning I will gather some key elements in the diagram
 (I need for this 2-3 days). I wonder whether I should override metaclass
 like TForm, TFrame and TDataModule to achieve many effects in FreeSparta
 project. This is one of the most controversial things in Sparta (and key 
 things).

This is all very abstract.
Now I try to figure out what is the best design for the dockable form designer.
Balázs already has working code. If your solution is used, is it in
addition to his code or does it replace it?
In any case we need a patch and a more detailed explanation of what it does!
The question remains: can you participate in practical level?

I still did not get feedback from other Lazarus developers about the
design. That is another open issue.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Hans-Peter Diettrich

Am 12.06.2015 um 18:15 schrieb Juha Manninen:

On Fri, Jun 12, 2015 at 4:03 PM, Maciej Izak hnb.c...@gmail.com wrote:

IMO the best option for Lazarus is synergy of solution from CodeTyphon (the
way of handling docked form in many platforms) and FreeSparta (elastic
interfaces, it handles many usefull events like:

Sounds good but how much are you willing to help with it?
I have now time for Lazarus development but I don't know where to look
for your docking code or elastic interfaces. We need a patch against
Lazarus trunk.

Two problems with docking:
1) Delphi-docking is not well supported, else the IDE DockManager could 
be used.
2) The IDE has much code for window placement, all over, instead of a 
common window layout manager.


[1] Could be fixed, but the required patches (of Controls.pas) are 
rejected by the Lazarus team. for too many changes at a time :-(


[2] I tried to replace the many window placement calls in the IDE by a 
better window management, but finally gave up. The IDE window managers 
are quite useless, except for the existing inflexible solution. Most 
probably patches will be rejected with the same rationale.


IMO a general layout manager interface would be nice, where 
Delphi-docking, AnchorDocking or any other layout manager could be 
hooked in. But it looks like impossible to remove AnchorDocking from 
Controls, it's too much interwoven with AutoSize and other basic control 
methods, and will cause conflicts with any other layout manager. That's 
why I stopped working on Lazarus a long time ago :-(


DoDi

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Juha Manninen
On Sat, Jun 13, 2015 at 12:17 PM, Hans-Peter Diettrich
drdiettri...@gmx.de wrote:
 Two problems with docking:
 1) Delphi-docking is not well supported, else the IDE DockManager could be
 used.
 2) The IDE has much code for window placement, all over, instead of a common
 window layout manager.

A docking API is a good idea. I think Maciej had similar idea with his
ToolsAPI thing.
Dodi, I remember you patches were rejected because they did not work.
They were more like shooting around blindly.
The current code has one big benefit: it works. The problem scope is
complex and a good API may not be an easy task.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Docked Form

2015-06-13 Thread Hans-Peter Diettrich

Am 13.06.2015 um 11:41 schrieb Juha Manninen:

On Sat, Jun 13, 2015 at 12:17 PM, Hans-Peter Diettrich
drdiettri...@gmx.de wrote:

Two problems with docking:
1) Delphi-docking is not well supported, else the IDE DockManager could be
used.
2) The IDE has much code for window placement, all over, instead of a common
window layout manager.

A docking API is a good idea. I think Maciej had similar idea with his
ToolsAPI thing.
Docking is only one special method for adding, removing or rearranging 
components. The basic API will arrange, measure and resize child 
components, according to its own rules, when told to do so. See the Java 
layout managers, which can be selected independently into any container 
control. It should not be hard to work out an according API, the problem 
is to make e.g. AnchorDocking work as such a selectable layout manager.

Dodi, I remember you patches were rejected because they did not work.
Perhaps the patches were already outdated when supplied, but they worked 
on my system. Who can tell which concurrent changes will affect some 
code, unless the functional responsibilities and interaction of parts of 
the affected code is well defined?

They were more like shooting around blindly.
They may *look* so, in detail the IDE patches, but how would you start 
adding an manager to previously unorganized code?


DoDi

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Flashing task bat icon orange on Windows 7

2015-06-13 Thread Simon Ameis
You'll need the taskbar's handle which you can get from WidgetSet.AppHandle.


uses JwaWindows, InterfaceBase;

procedure TForm1.Button1Click(Sender: TObject);
var
  i: FLASH_INFO;
begin
  i.cbSize := sizeof(i);
  i.hwnd := WidgetSet.AppHandle;
  i.dwFlags := FLASHW_TRAY or FLASHW_TIMERNOFG;
  i.uCount := 0;
  i.dwTimeout := 0;
  FlashWindowEx(i);
end;  

Am 12.06.2015 um 22:25 schrieb Richard Mace:
 ​Hi,
 I am trying to work out how to flash the taskbar icon in Windows 7,
 like Skype does, pragmatically. I have googled, and the closest I
 found was FlashWindowEx, but that doesn't actually flash the icon,
 just the form window.

 Any ideas?

 Thanks

 Richard​


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE is still building message

2015-06-13 Thread Giuliano Colla

Il 12/06/2015 09:59, Michael Van Canneyt ha scritto:
Quite often, I get the IDE is still building message, when the IDE 
is in fact, no longer building.


AFAIR I've met a similar issue, when the IDE wasn't actually building 
itself, but just compiling a package, or something.

A message mixup?

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus