Is there a way I can change Lazarus to an MDI style instead of having that floating desktop style?
Thanks,
Alex C. Barberi
VisionForce
http://www.visionforceweb.com

Mailing lists / fpc-devel / 2006-01
14 messages · 9 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Is there a way I can change Lazarus to an MDI style instead of having that floating desktop style?
Thanks,
Alex C. Barberi
VisionForce
http://www.visionforceweb.com
VisionForce wroteIs there a way I can change Lazarus to an MDI style instead of having that floating desktop style?
There is a missing part on Lazarus code before MDI can be implemented. This is Docking.
If you implement Docking, then things would be much easier =)
There is MDI-like support for apps created with Lazarus, but not for Lazarus itself. Take a look at:
http://wiki.lazarus.freepascal.org/index.php/MultiDoc
Is there a way I can change Lazarus to an MDI style instead of having that floating…
Is there a way I can change Lazarus to an MDI style instead of having that floating desktop style?
No.
Mattias
There is a missing part on Lazarus code before MDI can be implemented. This is Docking.…
So where would I need to start if I wanted to add this to Lazarus?
Sincerely,
Alex C. Barberi
VisionForce
http://www.visionforceweb.com
VisionForce wroteSo where would I need to start if I wanted to add this to Lazarus?
On Lazarus website, click on "Project Roadmap". There you will find the status of "Docking (= the combination of forms)". It is marked as "In Progress", so probably someone is already started working on this. Now you need to find who is working on Docking and ask him how you can help.
Vincent probably knows who is working with docking (if someone is at all).
To implement this feature, I would:
* Search (google) how docking can be done using the Windows API on a standard Windows API program
* Search (google) how docking can be done using Gtk on a standard Gtk program (if you want to add Linux support too)
* Research how to use the Delphi docking interface and try to make methods compatible with it.
I know at least that a few methods needs to be implemented on TControl:
function ManualDock(NewDockSite: TWinControl; DropControl: TControl =
nil; ControlSide: TAlign = alNone): Boolean;
procedure Dock (NewDockSite: TWinControl; ARect: TRect); dynamic;
function ManualFloat(ScreenPos: TRect): Boolean;Use ManualFloat to undock the control programmatically.
ScreenPos is the rectangle in which the control is displayed when it starts floating
function GetDockEdge(MousePos: TPoint): TAlign; dynamic;Use GetDockEdge to get the edge on which another control should be docked when it is dragged over the control.
MousePos is the position of the mouse.
GetDockEdge is called automatically during drag-and-dock operations involving the control.
------
There are probably many other things that need to be implemented =)
Well, I'm working on it. At least from time to time I am.
These already work. But some messages are not properly delegated in the win32 interface. Although this is more a CustomForm.Parent issue, than docking.
IMHO docking with TAlign alone is not intuitive for the user. It requires an internal tree of rows and columns, which the user can't see and limits the users choices for dock layouts. That's why I started another approach: Anchor docking. Here the internal representation fits to what the user sees
- WYSISWYG. It already works, even docking in pages. see below for the ToDos.
There are probably many other things that need to be implemented =)
Yes.
- A good dock manager with smart save and restore abilities. Especially for hidden/reshown forms.
- Fix the win32 message delegation.
- Frames for gtk forms
- Form.BoundsRect changes. I'm not sure yet, how.
- Drag&Drop docking
Mattias
There is a missing part on Lazarus code before MDI can be implemented. This is Docking.…
dear friends,
I know that if want to use an external variable/procedure in fpc, i should use the following code:
function GetEnvironment (const Name: PChar): PChar; cdecl; external 'c'
name 'getenv';but how could i add for example GetEnvironment function to a class (TEnvironment)!
Is there any good (OO) way?
Is it a good idea to use a following method:
TGetEnvironmentFunction= function : PChar;
TEnvironment= class (TObject)
private
...
public
GetEnvironment: TGetEnvironment;
procedure SetGetEnvironmentFunction (AFunction: TGetEnvironmentFunction);
...
end;
procedure TEnvironment.SetGetEnvironmentFunction (AFunction:
TGetEnvironmentFunction);
begin
GetEnvironment:= AFunction;
end;This particular function could be declared as this:
TEnvironment = class
public
class function GetEnvironment(const Name: PChar): PChar; cdecl;
end;
class function GetEnvironment(const Name: PChar): PChar; cdecl; external
'c' name 'getenv';Of course this is not very useful but the idea for methods is this. Just keep in mind that methods have a hidden parameter Self pointing to the object. When method is declared as cdecl it is the first parameter.
Tia,
Geno Roupsky
В вт, 2006-01-31 в 10:05 +0330, Amir Aavani написа:
I know that if want to use an external variable/procedure in fpc, i should use the…
Note that this procedure is already available as "fpgetenv" from unit baseunix, and in a more friendly style as "getenvironmentvariable" using plain strings from sysutils.
This particular function could be declared as this: TEnvironment = class public class…
Thanks Geno
that works, but could you tell me what should i do for an external variable, var environ: ppchar; cvar; external;
function TEnvironment.GetEnvironment(const Name: PChar): PChar; cdecl;
external
'c' name 'getenv';I know that if want to use an external variable/procedure in fpc, i should use the…
I think better OO solution is to create wrapper method around the external function.
function getenv(const Name: PChar): PChar; cdecl; external 'c';
TEnvironment = class(TObject)
public
function GetEnvironment(const AName: String): String;
end;
function TEnvironment.GetEnvironment(const AName: String): String;
begin
Result := String(getenv(PChar(AName)));
end;Tomas Stejskal
Thanks Geno that works, but could you tell me what should i do for an external variable,…
Any one call a webservice (WSDL) from Freepascal. I did it using Delphi, but now i want to do it by freepascal/Lazarus.
Op Fri, 3 Feb 2006, schreef Amir Aavani:
Any one call a webservice (WSDL) from Freepascal. I did it using Delphi, but now i want to do it by freepascal/Lazarus.
You are as clear as saying "I live in Europe and don't like my neighbourhood". Please be more specific.
Daniel
It's clear for me (but I live in Europe ;) )
FPC has all the components to which you need to call a WSDL, but does not offer a simple wrapper such as Delphi does.
The current way is to
- Create a request using the DOM components. This should be quite
straightforward;- Use some network components (Synapse, lnet, Indy) to send the request and receive the result.
- Use again DOM to analyze the result of the request.
FPC contains a xmlRPC implementation, which you can use and adapt to work with WDSL/SOAP. The protocol is similar, see the directory fcl/xml of the sources.
At a later stage, xmlRPC will be extended to be able to connect to a SOAP service. At that time, it will be simple to create a wrapper wich does all the above for you.
Michael.