Lazarus

Using the Lazarus IDE => General => Topic started by: Tikani on July 30, 2017, 10:31:19 pm

Title: Single Window Mode
Post by: Tikani on July 30, 2017, 10:31:19 pm
I have Lazarus IDE of 1.6.4 version. How can I make it to be single-windowed? This horrible bunch of little separate windows puts me out of temper. I have tried to install ceratin "Anchordockdesign" (or something with the similar name) package, but nothing changed + if I maximize code editor window and try to resize it via dragging an edge of it, IDE raises a strange WinLoop exception. Any suggestions?
Title: Re: Single Window Mode
Post by: RAW on July 30, 2017, 10:39:17 pm
The easiest way would be to set the window position of all windows and then save it ...
Title: Re: Single Window Mode
Post by: Leledumbo on August 27, 2017, 09:57:39 pm
Anchordockingdsgn only enables IDE windows to be dockable, the layout is totally up to you. There are some readily available layout here (https://github.com/FlKo/LazarusDockedDesktops). I can send mine, too if you want. Mind you, it's my own taste which may not be everyone's taste.
Title: Re: Single Window Mode
Post by: xaskell on August 28, 2017, 06:28:42 am
Actually I noticed one thing.
I installed Anchordockingdsgn previously on latest stable Lazarus IDE 1.6.4.
And It looked like a total mess there honestly.  So I gived up and forgot about it.
Later I had one problem reported bug(My Form's size returned to default after I clickedon any component at Linux Mint).
Developers advised me to use newest release of Lazarus. I tested 1.8.0RC4. There are this problem gone.
So now I use 1.8.0RC4. And I installed Anchordockingdsgn. Here it looks quite good by default.
So I hope in next stable release of Lazarus everything will be ok.
I guess there should be option to do Lazarus Single Window(without any additional packages), like it is in Gimp for example
Title: Re: Single Window Mode
Post by: Leledumbo on August 29, 2017, 08:14:59 pm
I guess there should be option to do Lazarus Single Window(without any additional packages), like it is in Gimp for example
Do you know that there's actually more than 1 package that enables docking IDE windows? ;)
Better let it be there as a package, don't kill the modularity, but make it pre-installed instead.
Title: Re: Single Window Mode
Post by: ArminLinder on December 05, 2017, 10:20:27 am
Excuse me jumping in here, I have just switched from 1.6.4 to 1.8.0 RC-5, because that version does get along better with my multi-monitor environment.

In doing so, I did once again wonder, how for christ's sake one can seriously work with that multi-window default design. Who is advocating it, and why? I mean, given that most of us have multiple programs running, a browser, an e-mail application and a bunch of development tools at least, how do you manage switching between and distinguishing between applications? What is your benefit if you can arrange the zillions of Lazarus tool windows around zillions of tool windows from other programs, and how do you avoid getting totally confused about which windows does now belong to which program? I regularly get lost in what to me feels like window clutter on my screen.

There must be reasons, but honestly, I can't imagine what they may be.

Armin.

With 1.6.4 I tried Anchorchocksomething, but I felt that Lazaus got instable, but this may have been a mistake of mine, I later found out that 1.6.4 has a problem with multi-monitor, maybe the anchoring solution wasn't the culprit at all. I'll give it another try with 1.8.
Title: Re: Single Window Mode
Post by: Thaddy on December 05, 2017, 01:04:45 pm
I don't know if the changes in trunk are backported to recent Lazarus 1.8 RC candidates, but the issue does not occur in trunk (1.9) anymore.
Title: Re: Single Window Mode
Post by: JuhaManninen on December 05, 2017, 05:50:38 pm
... how for christ's sake one can seriously work with that multi-window default design. Who is advocating it, and why?
I don't think anybody is really advocating it but AnchorDocking used to be buggy. Now in 1.8 it works rather well. Please test.
I hope the possible remaining issues get fixed soon.

Quote
I mean, given that most of us have multiple programs running, a browser, an e-mail application and a bunch of development tools at least, how do you manage switching between and distinguishing between applications?
By using virtual desktops. I personally use KDE but the concept is implemented in many DE systems.
So, one virtual desktop here is dedicated for a console and Lazarus started from it.
Yes, I like separate windows better than a docked IDE, because:
1. Windows can overlap each other. A small visible part is often enough to see what is going on. See my Messages window in the screenshot. The visible part shows that compilation happened and succeeded. When I need more info, I select the window.
2. Source editor can be from screen top to bottom. I want to see as many lines as possible at a time. For the same reason the editor toolbar is located left side. Sometimes I want to see 2 parts of source code at the same time. Then I open another equally high editor window, moving them side by side.

The screenshot is what I happened to have open now. In debugging situations I often have stacktrace window and maybe other debug windows open. They can overlap the OI which is not needed then.
All in all, this means more efficient usage of screen area.
I fully understand your point in a system without virtual desktop. The sole desktop can become messy then.
The OS in the screenshot is Manjaro Linux with KDE. I used to have 4 virtual desktops but now just 2 feels enough.

[Edit] I had to scale down the screenshot to match the forum's file size limit. It became messy but you get the idea.
Title: Re: Single Window Mode
Post by: Eugene Loza on December 05, 2017, 08:04:14 pm
how for christ's sake one can seriously work with that multi-window default design.
I understand you. I found it extremely inconvenient when I first started working with Lazarus. And actually I also didn't have any "pros" for it until recently - I just got used to it and it stopped irritating me.
However, at the current moment, working with an over 20-thousand lines of code program in ~60 units... well, it's not just convenient to work with multi-window interface design... It'd be just impossible to work with the program code otherwise. I need space for several source editors, for console output, for Project explorer and so on. Sometimes changing configuration of windows to see all the lines I need. Really handy.
Thou, of course an easy switching between modes (like switching between displaying just a single button in the taskbar) would be more than welcome, especially by new users.
Title: Re: Single Window Mode
Post by: ArminLinder on December 11, 2017, 08:04:25 am
Thanks for your opinions. I can see your points, and while I don't completely agree with all, I have too got used to the interface after some time.

Good news/feedback: I have been on 1.8RC5 for a week now, with AnchorDocking activated, and didn't have a single IDE crash. So it seems, at last everyone can work the way he likes best.

Thumbs up for Lazarus, I've come to love it even more with 1.8, with the multi-monitor issues fixed I had a smooth ride the whole last week, and got a really good piece of software done (so the test users say) and rolled out into the wild.

Thumbs up for the team,

Armin.
Title: Re: Single Window Mode
Post by: Handoko on December 11, 2017, 08:55:00 am
Me too disliked the multi-window interface and I used AnchorDocking. But then I found single window mode is less flexible. So I switched back to multi-window mode.

For most users especially beginners,  multi-window interface is annoying. But if you know how to use it properly, with the helps of Single-Button-Taskbar and Desktop (as described by RAW), it's really handy for users who has a big monitor and doing lots of multitasking while doing programming.
Title: Re: Single Window Mode
Post by: istoica on January 25, 2018, 10:07:43 am
I still do not understand what I have to do to have it working in a single window.
I am a beginner and find it very annoying chasing windows all the time.
Do you have an updated guide for 1.8.0 ? (I am using Ubuntu 16.04)
Title: Re: Single Window Mode
Post by: istoica on January 25, 2018, 10:20:08 am
I have just found out it can be done by installing following the steps here:

https://github.com/FlKo/LazarusDockedDesktops#how-to-install

But it really breaks the 1.8 IDE, the form Designer is embedded in the window as a new tabl, but dbl-click on a button drawn on the form does not work anymore.
Neither all the Window top level menu submenus, excep the first one(Manage source editors..)

I am uninstalling AnchorDockingDsgn and sparta_DockedFormEditor as they damaged the IDE, will return to the default MDI :(
Title: Re: Single Window Mode
Post by: Paul_ on February 09, 2018, 12:49:37 am
I still do not understand what I have to do to have it working in a single window.

I'm using anchordockingdsgn only. Docked form have weird behaviour and it's slow if you have more components.
It's not perfect but still better than have 4 separated windows somewhere.

You can show edited form by pressing F12.
Title: Re: Single Window Mode
Post by: avra on February 09, 2018, 12:48:23 pm
But it really breaks the 1.8 IDE
Not in my case.

the form Designer is embedded in the window as a new tab
This is normal.

but dbl-click on a button drawn on the form does not work anymore.
This is not normal.

Neither all the Window top level menu submenus, excep the first one(Manage source editors..)
This is not normal.
Title: Re: Single Window Mode
Post by: Janus on March 18, 2018, 08:29:31 pm
Hello world, new forum user here with a question.
I was trying to figure out how to ask this basic question when I found this subject.

Is there a method, addon, option, whatever.
That will make lazarus ide a single window, making the source, menu editor, or other working windows, tabs in the same basic manner as VS does.
Not like VScode, which is horrid, but plain old vanilla VS.
Just list all the open windows, and let me switch between them as I do in notepad++.

I have been using pascal for many years, making utilities for my own and customer use.
I switched from TP to FPC a long time ago, and it works great.
However, all of my stuff has been command line or TUI, which the FPC IDE handles just fine.
What it falls short on, is handling large projects, especially with a gui, which is what I have to do next.

The text handling in the text IDE lacks many features I use everyday in other programs, and I miss them.
I looked at trying to tweak it, but it is currently beyond my understanding, and I do not have time to learn it.

Now I am needing to make something with a gui, and I have no wish to deal with C/C++/VS for it.
While I can work with those languages, they are horrible.

Yet VS itself is at least consistent, and workable.
The file/class explorer on the left, open edit windows on the right, with various outputs on the bottom, much the same way that QT creator works as well, and codelite, and codeblocks, etc.
I see many of the same components/functions in Lazarus, but they are scattered, and I can find no way to organize them with my desktop sticking through, there is no way for me to tell what is what.
I have also not found the file tracker, but if it is there, I will.

I have looked, but nothing has looked right, and I am hoping I just missed it.
Here is me hoping I have simply been blind or not known the right words to look for.


Janus.
Title: Re: Single Window Mode
Post by: Thaddy on March 18, 2018, 09:08:45 pm
Install AnchorDocking and AnchorDockingDsgn. Rebuild IDE.
Title: Re: Single Window Mode
Post by: Janus on March 19, 2018, 04:42:27 pm
Thank you very much.

It is not quite what I was hoping for, but close enough to use until I know enough to know how to ask the right questions in stead of floundering.


Janus.
Title: Re: Single Window Mode
Post by: Handoko on March 19, 2018, 07:34:00 pm
If you don't use AnchorDockingDsgn, you may interested to:

Enable Single Button in Taskbar
Lazarus main menu > Tools > Options > Window > Show single button in Taskbar

Use Desktop Feature to manage multiple layouts of your desktop
Lazarus main menu > Tools > Desktop

You mentioned File Tracker, maybe:
Lazarus main menu > Project > Project Inspector
Title: Re: Single Window Mode
Post by: Janus on March 19, 2018, 09:43:59 pm
@Handoko

Thank you very much again.

I have adjusted GUI stuff in VS & QT, those were existing projects.
Setting up and starting a whole GUI project is confusing.

Project inspector is one of the pieces I was missing.
Is there a way to dock it like code explorer or object inspector is/does with anchoring?


Janus.
Title: Re: Single Window Mode
Post by: Handoko on March 20, 2018, 04:07:58 pm
For newbies, it is usually easier to enable Anchor Docking. I personally don't use it. To enable Anchor Docking:

Lazarus main menu > Package > Install/Uninstall Packages > on the right panel, choose "anchordockingdsgn 0.5" > Install Selection > Save and rebuild IDE > Continue > wait some minutes, then the IDE will be restarted

To uninstall it, do the similar things above but choose it on the left side and click "Uninstall selection".

If you interested to read more about Anchor Docking:
http://wiki.freepascal.org/Anchor_Docking

Setting up and starting a whole GUI project is confusing.

The steps should be:

01. Use your file explorer to create a new folder and rename it
02. Lazarus main menu > File > New > Project > Application > OK
03. File > Save > browse to that folder and name the project (must end with .lpi)
04. You will be asked to name the unit (must end with .pas)

Note: I usually name the unit main.pas because it is the unit that contains the main form.

~~~ off topic ~~~

If you're new on using Lazarus IDE,  you should read:
http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools

Tutorials with wide range of topics:
http://wiki.lazarus.freepascal.org/Lazarus_Documentation
Title: Re: Single Window Mode
Post by: Janus on March 20, 2018, 06:01:48 pm
@Handoko

Finally managed to get a starting point.

I realize this is a stupid question.
But, is there a way just use lazarus as an FPC ide, not displaying the form controls or object tracking.
Keeping the stuff that is the same, for compiling and debugging, so I can have up just what I need.
The issue is entirely me, and the way I work.

I had originally started with using wxwidgets DLLs called from fpc, but the fpc ide is just to limited to use that way.
If the IDE worked like notepad++ textwise, and handled larger text windows, it would be usable for what I need.
I had hoped someone had already made a unit to use wxwidgets with lazarus.
It is not listed anywhere however, and converting the headers from C/C++ is a pain, especially limited by the FPC IDE in 80 column mode.

However, now that I have stumbled my into a starting point, I can see that using lazarus the way it is designed, for people who do GUI programming regularly, will not work for me.
I need control of the files and file structure.

I also make my tools opposite of how most people work.
I have no idea what it will look like when I start, only what it will do.
I design the UI as I go, to match what I need at the time.
Only when it does its job, do I move things around to make it more friendly, or at least less unfriendly, for other people.

I am aware this is the 'wrong' way to program, but I am also not a large project programmer.
I normally work at the hardware/register/electrical/mechanical level.
Assembly is my preferred language, and abstraction is not my friend.

As I have indicated.
I have worked with C/C++/VS/QT/Codelite/Codeblocks, and do not like them.
I can use them however: I use my own custom forks of notepad++, Celestia, and Explorer++ which uses a customized voidtools 'everything' DLL to give folder sizes without disk thrashing.
Modifying those however, was only navigating existing structure(s), not creating one from scratch.

I may eventually be able to do UI first, but today is not that day.
So what I am after, is making a smart system, which gets in my way, into a dumb compiler, which is all I need, or currently want.
I have managed to turn off most of what I do not need, but I am unable to dock the 'project inspector' which keeps track of files, and would be useful.
Is there a setting to enable docking it?
Or do I need to go through the sourcecode to do a compare and contrast to things that do dock?

Thank you for your help, your patience, and your understanding.
I will eventually grok GUI programming, but until then I keep doing what I do.


Janus.
Title: Re: Single Window Mode
Post by: Handoko on March 20, 2018, 06:47:22 pm
You can use Lazarus IDE to write non-GUI programs:
Lazarus main menu > New > Project > Simple Program / Program / Console application

You may need to enable Terminal Output:
Lazarus main menu > View > Debug Windows > Terminal Output

Unfortunately on my tests on Linux, the Terminal Output has issue with unit CRT.

I'm not familiar with non-GUI programming, you can read more here:
http://wiki.lazarus.freepascal.org/Console_Mode_Pascal
Title: Re: Single Window Mode
Post by: Janus on March 20, 2018, 07:30:09 pm
@Handoko

The largest difference between GUI vs non GUI programming is surprisingly simple.
Loosely, it can be defined as whether the program is active or responsive.

GUI programming is almost exclusively responsive, nothing happens until the user does something, then the program responds by doing something in return.
The GUI subsystem also keeps the display updated based on progress markers from running code.

In non GUI programming, almost exclusively active, there is always something happening, and the UI is only updated deliberately, not as a byproduct of another process.

I write active programs because with rare exception, what I write has one, up to three jobs, then it exits.

Whereas a responsive system waits, using as little resources as possible, until it has a job, does it, then goes back to waiting.

I do not know/understand/grok GUI systems well enough to determine if a problem is because I made a mistake in my code, or if I sent the wrong message/taken via the GUI.
So until I do, I am only going to use enough of the GUI code to make a window and display stuff when I want it displayed.
No GUI loops for me until I am ready.

I do very poorly at the memorize or use blindly until you understand it game.
I use what I know, to learn as much as I can of what I need, then rinse and repeat.

Once I figure out how to get the 'Project Inspector' to anchor, I will have enough to get started.
It is refusing to so far, but I am patient.

Though getting rid of the lpr file stuff would also be great.
I want to work in nothing but 'pas' files, but even 'simple program' opens in an lpr.
I guess I will have to try modifying the lpi file.

Thank you for the help.


Janus.
Title: Re: Single Window Mode
Post by: kupferstecher on March 21, 2018, 12:01:49 am
@Janus:
Why you don't want to use the lpr-extension? It just tells you that there is the entry point of the program (program section). besides that its a normal pascal file. But you may try to just save it as pas.

In the beginning I also didn't like the floating window style, but it really is flexible. The advantage that you can make use of the complete screen height for the editor window was said before. Adding some icons to the editor window's tool bar, e.g. project inspector, project settings, makes it really handy.
Especially when you don't need the object inspector, you have enough space on the left side besides the editor window to place the project inspector. But you have to arrange all windows you need on the screen in a way that each of them is accessable by a single click and not completely hidden. But that should be clear~
Title: Re: Single Window Mode
Post by: Janus on March 21, 2018, 12:47:53 am
@kupferstecher

The issue, and it is me, is how I work.
I use the file extension, it tells me what a file is.
Which is part of what I hate about newer versions of windows, they take away the things I use.

I am not a GUI programmer, it is not something I think I will ever be good at.
The floating window style of the default layout is not usable for me.
It prevents how I work, from working.
The layering and covering up, especially with the desktop showing through, simply does not work for me.
I have no trouble keeping several dozen open program windows straight, as long the task bar lists them in the order I open them in.
Grouping on the taskbar is a thought process destructive as tabs in a web browser for me.
Though I use tabs in notepad++ & VS & QT creator and many other programs, each window on the taskbar contains only one context.

All I want is to keep track of is the files in the current project, with nothing else there.
For pascal I use .pas for regular files, and .pp for units.
Until I have a mental picture to go with the rest, it is just interference or noise to me.

I do not memorize, I learn by coming to understand.
Which I do by experimenting one piece at a time.
Once I understand its pieces, I see all of it, from the inside and outside both, together.

My intention is to do what I have done for my cmdline TUI stuff.
Prep everything, init, then never call what the lazarus version of tapplication.run is.
All I want is a graphic based window I can display in.

I am moving away from VS, while I am still learning it because I prefer opensource.
I am avoiding QT creator because I do not like its license.
I prefer pascal to C/C++ because the former has structure, while the latter is more like the scattered gunk from a broken pipe.

I may eventually get where I can use the gui first coding, but not until I can understand/follow/comprehend/grok the underpinnings.

My desire is the simplest most direct visual flow, which anchoring mostly provided, except project inspector that is, it refuses to dock.
Once I can work in it the way I work in the text ide, then I can start adding pieces, in the meantime, it is simply in the way.


Janus.


P.S. Has anyone ever made a unit/header for wxwidgets?
Title: Re: Single Window Mode
Post by: thierrybo on May 16, 2018, 10:35:34 pm
Hi,

I decided to try again anchor docking after first trying it 1 or 2 years ago when it was "buggy". I just  build FPC 3.0.5 (fixes branch), then build lazarus 1.8.3 (1.8.2 fixes branch) "bigide" and deleted my previous ~/.lazarus folder. Then added anchordocking. It crashes sometimes when  building a desktop but less than before.

But what is annoying me is "desktop switching" that is not working at all.  If I change desktop, I have only a partial desktop. If I restart Lazarus the  desktop is well displayed. you can see what happens here (https://framapic.org/1qTMauWidlKX/O3wzlASmkfVZ.gif)

Is it working for you, linux or win32 ?
Title: Re: Single Window Mode
Post by: thierrybo on May 17, 2018, 01:43:16 pm
well, it's me, because I just tried those from https://github.com/FlKo/LazarusDockedDesktops and no problem switching mode. I will try to redo my changes starting from this one and see if it still works  ::)
TinyPortal © 2005-2018