* * *

Author Topic: Single Window Mode  (Read 9090 times)

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #15 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.

Thaddy

  • Hero Member
  • *****
  • Posts: 6544
Re: Single Window Mode
« Reply #16 on: March 18, 2018, 09:08:45 pm »
Install AnchorDocking and AnchorDockingDsgn. Rebuild IDE.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #17 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.

Handoko

  • Hero Member
  • *****
  • Posts: 2444
  • My goal: build my own game engine using Lazarus
Re: Single Window Mode
« Reply #18 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

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #19 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.

Handoko

  • Hero Member
  • *****
  • Posts: 2444
  • My goal: build my own game engine using Lazarus
Re: Single Window Mode
« Reply #20 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
« Last Edit: March 20, 2018, 04:25:56 pm by Handoko »

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #21 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.

Handoko

  • Hero Member
  • *****
  • Posts: 2444
  • My goal: build my own game engine using Lazarus
Re: Single Window Mode
« Reply #22 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

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #23 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.

kupferstecher

  • Full Member
  • ***
  • Posts: 208
Re: Single Window Mode
« Reply #24 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~

Janus

  • New member
  • *
  • Posts: 11
Re: Single Window Mode
« Reply #25 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?

thierrybo

  • Full Member
  • ***
  • Posts: 121
Re: Single Window Mode
« Reply #26 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

Is it working for you, linux or win32 ?

thierrybo

  • Full Member
  • ***
  • Posts: 121
Re: Single Window Mode
« Reply #27 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  ::)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus