Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-04

editor details

28 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

spir ☣

Hello,

Some point I cannot get right:

* default save directory
How to tell Lazarus where to save (and where to load from) by default? The "Lazarus directory" seems in options/environment seems to be for Lazarus internals. Cannot set it to a custom dir, since some predef subdirs are requested.

* indentation
I set tab & indent widths to 4 chars.
But pressing tab key seems to indent according to a logic I cannot catch, eg

function ...
tab stops here: 9 chars

* selection highlight
I'm unable to have selected text highlighted. Cannot find proper class in syntax highlighting settings. Worse, When I select more than one line, relevant parts of lines (down to the last char) are not highlighted, only empty parts (after last char) get different background color. This is visually disturbing.

* duplication
Is there a "duplicate" feature (duplication current line or selection)? For info: this replaces select + copy + move + paste + move up & down (to unselect and come back) in one key press.

* place cursor at end of line
When I place the cursor on an empty part of line, the cursor weirdly stays in the middle of nowhere instead of moving to the end of the line (just after last char). Is there a way to change this (for any reason this behaviour gets on my nerves ;-)

Denis

PS: Is there a reason why I don't receive my own messages to the list? ________________________________

vit esse estrany ?

spir.wikidot.com

Reply by email

Martin
to spir ☣
spir ? wrote 7 lines
* indentation I set tab& indent widths to 4 chars. But pressing tab key seems to indent according to a logic I cannot catch, eg function ... tab stops here: 9 chars

You may want to turn off "Smart tabs", they indent according to spaces, in the line(s) above the cursor.

Also if you are looking at indent, when pressing return:
- In the options dialog, go to (in the left hand site tree) Codetools/General. There are 3 checkboxes regarding indentation here. This intentations works by analyzing your source coed, and indent depending on the
context found (e.g indent after "begin" differs from indent on normal line)
- in the Editor/General settings is "Auto indent" which always copies the indent of the previous line (this has a lower priority than the codetool intend)

* selection highlight I'm unable to have selected text highlighted. Cannot find proper class in syntax highlighting settings. Worse, When I select more than one line, relevant parts of lines (down to the last char) are not highlighted, only empty parts (after last char) get different background color. This is visually disturbing.

This sounds like you may have set the background color of all chars to a fixed color (and maybe they overwrite selection color)?

Editor options / colors

In the tree view of colors, go to "Text" / "text block"

If that does not help, please send your editor options xml file. C:\Users\<username>\AppData\Local\lazarus\editoroptions.xml\editoroptions.xml

* duplication Is there a "duplicate" feature (duplication current line or selection)? For info: this replaces select + copy + move + paste + move up& down (to unselect and come back) in one key press.

If you do any action such as move caret, or paste... The selected text should become unselected. unless you use "persistent selection"

without persistend selection this should work
- select block
- ctrl-c
- ctrl-v
- ctrl-v

with persistent block, I believe it is ctrl-K ctrl-C (actually that works for non persistent too)

you can assign your keys in "Editor"/"Key Mappings" => "Text Selection Commands"

* place cursor at end of line When I place the cursor on an empty part of line, the cursor weirdly stays in the middle of nowhere instead of moving to the end of the line (just after last char). Is there a way to change this (for any reason this behaviour gets on my nerves ;-)

Editor/General:

Disable "caret past end of line"

Note that you still can enter spaces at the end of line. You can enable them to be trimmed automatically (by default this only happens if you leave the line)
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Trim_trailing_spaces

Reply by email

Hans-Peter Diettrich
to spir ☣: Some point I cannot get right: * default save directory How to tell Lazarus where to save…
* duplication Is there a "duplicate" feature (duplication current line or selection)? For info: this replaces select + copy + move + paste + move up & down (to unselect and come back) in one key press.

Sometimes a macro (or record/replay) capability were nice - perhaps it exists already?

Show quoted text 5 lines
* place cursor at end of line When I place the cursor on an empty part of line, the cursor weirdly stays in the middle of nowhere instead of moving to the end of the line (just after last char). Is there a way to change this (for any reason this behaviour gets on my nerves ;-)

IMO cursor-past-eol and horizontal scrolling deserves some considerations. Maintaining the horizontal cursor position during vertical moves could be simplified.

DoDo

Reply by email

Martin
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 8 lines
spir ? schrieb: > * duplication Is there a "duplicate" feature (duplication current > line or selection)? For info: this replaces select + copy + move + > paste + move up & down (to unselect and come back) in one key press. Sometimes a macro (or record/replay) capability were nice - perhaps it exists already?

Macros (as in replay) don't yet exist. However I found most times people ask for this, it can be perfectly done, by regular-expression replace

something like

FooA;
FooB;
FooC;

should be made into

FooA := FooA + 1;
FooB := FooB + 1;
FooC := FooC + 1;
find (reg ex)
(F.*?);
replace with
$1 := $1 + 1;

Martin

Reply by email

Martin
to Hans-Peter Diettrich: Sometimes a macro (or record/replay) capability were nice - perhaps it exists already?…
Hans-Peter Diettrich wrote 9 lines
> * place cursor at end of line When I place the cursor on an empty > part of line, the cursor weirdly stays in the middle of nowhere > instead of moving to the end of the line (just after last char). Is > there a way to change this (for any reason this behaviour gets on my > nerves ;-) IMO cursor-past-eol and horizontal scrolling deserves some considerations. Maintaining the horizontal cursor position during vertical moves could be simplified.

Simplified, as in:

1- the implementation within synedit
2- the user experience during usage
3- the way it is configured (through the editor options)

?

Martin

Reply by email

spir ☣
to Martin: You may want to turn off "Smart tabs", they indent according to spaces, in the line(s)…
Show quoted text 20 lines
On 19/04/2010 16:14, spir ? wrote: > * indentation > I set tab& indent widths to 4 chars. > But pressing tab key seems to indent according to a logic I cannot catch, eg > > function ... > tab stops here: 9 chars > You may want to turn off "Smart tabs", they indent according to spaces, in the line(s) above the cursor. Also if you are looking at indent, when pressing return: - In the options dialog, go to (in the left hand site tree) Codetools/General. There are 3 checkboxes regarding indentation here. This intentations works by analyzing your source coed, and indent depending on the context found (e.g indent after "begin" differs from indent on normal line) - in the Editor/General settings is "Auto indent" which always copies the indent of the previous line (this has a lower priority than the codetool intend)

Right, I played with these settings & I think the guilty one is smart tabs (still don't get how it works). (Cannot find anything related to ndent in Codetools/General.)

Show quoted text 13 lines
> * selection highlight > I'm unable to have selected text highlighted. Cannot find proper class in syntax highlighting settings. > Worse, When I select more than one line, relevant parts of lines (down to the last char) are not highlighted, only empty parts (after last char) get different background color. This is visually disturbing. > This sounds like you may have set the background color of all chars to a fixed color (and maybe they overwrite selection color)? Editor options / colors In the tree view of colors, go to "Text" / "text block" If that does not help, please send your editor options xml file. C:\Users\<username>\AppData\Local\lazarus\editoroptions.xml\editoroptions.xml

Yes! The style class I was looking for is "text block". Now, I get a different bg color for the relevant parts and none for the rest of lines.

Show quoted text 15 lines
> * duplication > Is there a "duplicate" feature (duplication current line or selection)? > For info: this replaces select + copy + move + paste + move up& down (to unselect and come back) in one key press. > If you do any action such as move caret, or paste... The selected text should become unselected. unless you use "persistent selection" without persistend selection this should work - select block - ctrl-c - ctrl-v - ctrl-v with persistent block, I believe it is ctrl-K ctrl-C (actually that works for non persistent too)

All right, but what about this feature [geany fans constantly use it and can hardly leave without ;-)]

you can assign your keys in "Editor"/"Key Mappings" => "Text Selection Commands"

Right, did it already in fact. Just miss the feature to which assign ctrl+D (duplication!).

Show quoted text 6 lines
> * place cursor at end of line > When I place the cursor on an empty part of line, the cursor weirdly stays in the middle of nowhere instead of moving to the end of the line (just after last char). Is there a way to change this (for any reason this behaviour gets on my nerves ;-) > Editor/General: Disable "caret past end of line"

Thank you! By me it's called "scroll past end of line", maybe the reason why I overlooked it... There is also "cursor beyond end of line" in Codetools/General: I unchecked it before but it does not seems to have any action.

Note that you still can enter spaces at the end of line. You can enable them to be trimmed automatically (by default this only happens if you leave the line) http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Trim_trailing_spaces

Right, I don't use this because I want blank lines in an indented block to be correctly indented as well. I need this feature not to apply to blank lines (meaning be smart enough not to remove *leading* spaces that just happen to be also *trailing*)... there is an option for this in a few editors.

Thank you for all these tips,
Denis
________________________________

vit esse estrany ?

spir.wikidot.com

Reply by email

Martin
to spir ☣
spir ? wrote 21 lines
On Mon, 19 Apr 2010 16:37:56 +0100 Martin wrote > On 19/04/2010 16:14, spir ? wrote: > >> * indentation >> I set tab& indent widths to 4 chars. >> But pressing tab key seems to indent according to a logic I cannot catch, eg >> >> function ... >> tab stops here: 9 chars >> >> > You may want to turn off "Smart tabs", they indent according to spaces, > in the line(s) above the cursor. > > Also if you are looking at indent, when pressing return: > - In the options dialog, go to (in the left hand site tree) > Codetools/General. There are 3 checkboxes regarding indentation here. Right, I played with these settings& I think the guilty one is smart tabs (still don't get how it works). (Cannot find anything related to ndent in Codetools/General.)

Oh, yes, ok. I am using the SVN version => which has a lot of new features. In 0.9.28 this was/is indeed not there.

Show quoted text 19 lines
>> * duplication >> Is there a "duplicate" feature (duplication current line or selection)? >> For info: this replaces select + copy + move + paste + move up& down (to unselect and come back) in one key press. >> >> > If you do any action such as move caret, or paste... The selected text > should become unselected. unless you use "persistent selection" > > without persistend selection this should work > - select block > - ctrl-c > - ctrl-v > - ctrl-v > > with persistent block, I believe it is ctrl-K ctrl-C > (actually that works for non persistent too) > All right, but what about this feature [geany fans constantly use it and can hardly leave without ;-)]

Which one you mean? (I don't use "geany", don't even know it)
- duplicate block => you found below
- unset the selection, without moving the caret? There is a command "Hide Block", currently not set to any key => try that It is supposed to be used with persistent blocks, but seems to unset normal blocks.

Show quoted text 13 lines
Right, did it already in fact. Just miss the feature to which assign ctrl+D (duplication!). >> * place cursor at end of line >> When I place the cursor on an empty part of line, the cursor weirdly stays in the middle of nowhere instead of moving to the end of the line (just after last char). Is there a way to change this (for any reason this behaviour gets on my nerves ;-) >> >> > Editor/General: > > Disable "caret past end of line" > Thank you! By me it's called "scroll past end of line", maybe the reason why I overlooked it... There is also "cursor beyond end of line" in Codetools/General: I unchecked it before but it does not seems to have any action.

the code tool entry, allows to override your default setting for certain actions (e/g jump to declaration)

Show quoted text 7 lines
> Note that you still can enter spaces at the end of line. You can enable > them to be trimmed automatically (by default this only happens if you > leave the line) > http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Trim_trailing_spaces > Right, I don't use this because I want blank lines in an indented block to be correctly indented as well. I need this feature not to apply to blank lines (meaning be smart enough not to remove *leading* spaces that just happen to be also *trailing*)... there is an option for this in a few editors.

Sorry, but Lazarus doesn't differentiate between those.

Because in Lazarus you can use
"auto indent" and then if you press return, your new line is automatically filled with spaces, up to the same point the line above was having leading spaces (or if the line above was empty, the fiirst none empty line above)

"smart tabs" (which you didn't like => which will indent the current line, up to the point, where in the line above there is the start of a new word

Martin

Reply by email

Hans-Peter Diettrich
to Martin: Macros (as in replay) don't yet exist. However I found most times people ask for this, it…
Macros (as in replay) don't yet exist. However I found most times people ask for this, it can be perfectly done, by regular-expression replace

For me it's not a matter of *what* can be done, but of *how* it can be done. I am not a commandline freak, and I use regular expressions only after reading the syntax once more. In so far macros are much more intuitive to me, but it must be many years ago, when I wrote a macro myself.

BTW, I also would like to have the Close button on editor pages on Windows, on demand. An according option already exists, but it seems not to work. It's much easier to click on such an button, instead of selecting a page with the mouse, and then use the keyboard or further mouse clicks to close the page.

DoDi

Reply by email

Hans-Peter Diettrich
to Martin: Simplified, as in: 1- the implementation within synedit 2- the user experience during…
Show quoted text 7 lines
> IMO cursor-past-eol and horizontal scrolling deserves some > considerations. Maintaining the horizontal cursor position during > vertical moves could be simplified. Simplified, as in: 1- the implementation within synedit

Right. When I first/last inspected the code, many years ago, the entire implementation was overcomplicated and error prone, and some options were conflicting. At that time I implemented my own editor component, and found that everything could be done much simpler. But as long as the SynEdit works, there exists no urgent need for a redesign.

2- the user experience during usage

Sometimes it could be a bit less sensitive to errors in related components. But except for the current multi-window redesign, the editor and IDE was usable since 0.9.26, and has become very stable since 0.9.28 :-)

I'm also missing an option to turn off any automatism. Auto-indentation with copy&paste doesn't match my coding style and expectations, in many situations; the same for the automatic "end" insertion.

BTW, code completion *also* should work with e.g. "do" and other keywords, for DoDock or Dock...

3- the way it is configured (through the editor options)

The configuration is fine :-)

DoDi

Reply by email

Martin
to Hans-Peter Diettrich: For me it's not a matter of *what* can be done, but of *how* it can be done. I am not a…
Hans-Peter Diettrich wrote 11 lines
Martin schrieb: > Macros (as in replay) don't yet exist. However I found most times > people ask for this, it can be perfectly done, by regular-expression > replace For me it's not a matter of *what* can be done, but of *how* it can be done. I am not a commandline freak, and I use regular expressions only after reading the syntax once more. In so far macros are much more intuitive to me, but it must be many years ago, when I wrote a macro myself.

I fully understand. Macros are for many people easier to use. Speaking of reg-ex should by no means mean that macros shouldn't be done. Unfortunately at current, macros share the fate of many good features. They wait until someone has the time to implement them.

Macros itself can be broken down into 2 categories:
- record and replay (based on keystrokes)
- script language macros

of course, if you have a script language, this includes record and replay.

Show quoted text 6 lines
BTW, I also would like to have the Close button on editor pages on Windows, on demand. An according option already exists, but it seems not to work. It's much easier to click on such an button, instead of selecting a page with the mouse, and then use the keyboard or further mouse clicks to close the page.

Windows by default doesn't have that. only option is to make tabs owner drawn.
I have no idea what the plans or acceptance towards this is....

BTW, you can middle-click the tab to close it, if your mouse has a middle button (or wheel that can be clicked). CTRL-middle click does close *all* other tabs.

Martin

Reply by email

Žilvinas Ledas
to Hans-Peter Diettrich: For me it's not a matter of *what* can be done, but of *how* it can be done. I am not a…
Show quoted text 5 lines
BTW, I also would like to have the Close button on editor pages on Windows, on demand. An according option already exists, but it seems not to work. It's much easier to click on such an button, instead of selecting a page with the mouse, and then use the keyboard or further mouse clicks to close the page.

Yes, sometimes those "close buttons" are good, but for me middle mouse click does the job ;)
The only thing is that it would be nice that when closing not active tab with middle mouse button, currently active tab would remain active.

Regards
?ilvinas

Reply by email

Martin
to Hans-Peter Diettrich: Right. When I first/last inspected the code, many years ago, the entire implementation…
Hans-Peter Diettrich wrote 15 lines
Martin schrieb: >> IMO cursor-past-eol and horizontal scrolling deserves some >> considerations. Maintaining the horizontal cursor position during >> vertical moves could be simplified. > > Simplified, as in: > > 1- the implementation within synedit Right. When I first/last inspected the code, many years ago, the entire implementation was overcomplicated and error prone, and some options were conflicting. At that time I implemented my own editor component, and found that everything could be done much simpler. But as long as the SynEdit works, there exists no urgent need for a redesign.

Well that probably changed in the last 2 years.
The caret is now a class of it's own, and the x position keeping is done inside this class.

I am currently not aware of any setting in which it doesn't work as it is meant to do.
I do admit that the amount of possible combinations of settings is quite large, and that it is not necessarily always obvious how certain combinations are supposed to work:

for example:
- Caret-past-eol = false
- trim spaces = PositionOnly

Trim spaces = "position only" means that pressing a space at the end of line, doesn't insert that space (the spaces are only generated, once you type some text behind them).

So space at the end of line works almost like cursor-right-key. Except for that it is allowed to force the caret past eol (despite the other setting). And yes, that is the indented behaviour. The user has pressed a space, the user doesn't mind at which time SynEdit actually inserts this space... Pressing space at the end of line still has to work.

Show quoted text 5 lines
> 2- the user experience during usage Sometimes it could be a bit less sensitive to errors in related components.

Which related components? Or are you speaking of codetool navigation?

But except for the current multi-window redesign, the editor and IDE was usable since 0.9.26, and has become very stable since 0.9.28 :-)

In which way is the current redesign not working or making the IDE unstable? Sure there were individual revisions that exposed some bugs => that is what it says on the label: current SVN is not a released version...

Except for, if you do not like extra windows, you do not use the feature => that still means the IDE is working and usable.

Show quoted text 5 lines
I'm also missing an option to turn off any automatism. Auto-indentation with copy&paste doesn't match my coding style and expectations, in many situations; the same for the automatic "end" insertion.

Options / codetools / general

And yes there is a point => the indentation settings are hard to find / spread across to many pages....

Martin

Reply by email

Martin
to Žilvinas Ledas: Yes, sometimes those "close buttons" are good, but for me middle mouse click does the job…
?ilvinas Ledas wrote 11 lines
> BTW, I also would like to have the Close button on editor pages on > Windows, on demand. An according option already exists, but it seems > not to work. It's much easier to click on such an button, instead of > selecting a page with the mouse, and then use the keyboard or further > mouse clicks to close the page. Yes, sometimes those "close buttons" are good, but for me middle mouse click does the job ;) The only thing is that it would be nice that when closing not active tab with middle mouse button, currently active tab would remain active.

hm here it does. Can you try the latest snapshot / svn ?

Reply by email

Žilvinas Ledas
to Martin
Martin wrote 14 lines
On 20/04/2010 13:13, ?ilvinas Ledas wrote: > > >> BTW, I also would like to have the Close button on editor pages on >> Windows, on demand. An according option already exists, but it seems >> not to work. It's much easier to click on such an button, instead of >> selecting a page with the mouse, and then use the keyboard or >> further mouse clicks to close the page. > Yes, sometimes those "close buttons" are good, but for me middle > mouse click does the job ;) > The only thing is that it would be nice that when closing not active > tab with middle mouse button, currently active tab would remain active. hm here it does. Can you try the latest snapshot / svn ?

Nice, it seems it was fixes in last two weeks!
What is more, I noticed that now package lazsvnpkg does not compile (because of TDate changes). I am using Free Pascal Compiler version 2.5.1 [2010/04/12] for i386 on Windows - must I update FPC or package must be fixed?

Regards
?ilvinas

Reply by email

Hans-Peter Diettrich
to Martin: I fully understand. Macros are for many people easier to use. Speaking of reg-ex should…
Unfortunately at current, macros share the fate of many good features. They wait until someone has the time to implement them.

...and can wait so long, IMO.

Show quoted text 5 lines
Macros itself can be broken down into 2 categories: - record and replay (based on keystrokes) - script language macros of course, if you have a script language, this includes record and replay.

Record/replay would be much easier to implement - no discussion about commands, syntax etc. ;-)

Windows by default doesn't have that. only option is to make tabs owner drawn.

I see. Nonetheless a component (button with glyph) or according paint procedure for more general use would be nice to have.

BTW, you can middle-click the tab to close it, if your mouse has a middle button (or wheel that can be clicked). CTRL-middle click does close *all* other tabs.

Thanks, I'll just give it a try :-)

DoDi

Reply by email

Hans-Peter Diettrich
to Martin: Well that probably changed in the last 2 years. The caret is now a class of it's own, and…
Show quoted text 11 lines
I do admit that the amount of possible combinations of settings is quite large, and that it is not necessarily always obvious how certain combinations are supposed to work: for example: - Caret-past-eol = false - trim spaces = PositionOnly Trim spaces = "position only" means that pressing a space at the end of line, doesn't insert that space (the spaces are only generated, once you type some text behind them).

We may have more issues with the now possible multiple views.

Show quoted text 5 lines
>> 2- the user experience during usage > > Sometimes it could be a bit less sensitive to errors in related > components. Which related components? Or are you speaking of codetool navigation?

I frequently get FPDoc messages, when scrolling through source code. It's nasty to click them away.

The crashes, observed while editing (cut&paste), may be related to some other tool (auto format...), but occured only last week, no more now.

Show quoted text 6 lines
> But except for the current multi-window redesign, the editor and IDE > was usable since 0.9.26, and has become very stable since 0.9.28 :-) In which way is the current redesign not working or making the IDE unstable? Sure there were individual revisions that exposed some bugs => that is what it says on the label: current SVN is not a released version...

I had some crashes in the last weeks, but now it seems to have widely stabilized :-)

Except for, if you do not like extra windows, you do not use the feature => that still means the IDE is working and usable.

I *need* multiple editor windows, missed them since my first contact with Lazarus! That's how I came to docking, in anticipation of multiple code explorers, dockable to the editor windows.

With a more general use of docking, the SynEdits could be replaced by other editor components. Not that I don't like the SynEdits, but some users (including me) sometimes feel an wish of a different GUI. Maybe a split into interface/implementation panes, or navigation from a project or unit explorer, with edits restricted to a single selected procedure or method. A tighter coupling of the logical caret position to a navigation map or tree (code explorer...) sometimes were very nice.

I think that now, when the views have been separated from the source files, it should be easy to implement such additional (maybe user specific) components or effects.

DoDi

Reply by email

Martin
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 13 lines
Martin schrieb: >>> 2- the user experience during usage >> >> Sometimes it could be a bit less sensitive to errors in related >> components. > Which related components? Or are you speaking of codetool navigation? I frequently get FPDoc messages, when scrolling through source code. It's nasty to click them away. The crashes, observed while editing (cut&paste), may be related to some other tool (auto format...), but occured only last week, no more now.

indeed, there were some revisions where the fpdoc editor did not get all editor-change updates. But that would have only applied, if you actually had more than one window open.

Also, I always had sporadic fpdoc editor issues (this or that not found) => long before I started on the multi editor

Show quoted text 10 lines
>> But except for the current multi-window redesign, the editor and IDE >> was usable since 0.9.26, and has become very stable since 0.9.28 :-) > > In which way is the current redesign not working or making the IDE > unstable? Sure there were individual revisions that exposed some bugs > => that is what it says on the label: current SVN is not a released > version... I had some crashes in the last weeks, but now it seems to have widely stabilized :-)

Well as I said => SVN. it has temporary issues.

Show quoted text 14 lines
> Except for, if you do not like extra windows, you do not use the > feature => that still means the IDE is working and usable. I *need* multiple editor windows, missed them since my first contact with Lazarus! That's how I came to docking, in anticipation of multiple code explorers, dockable to the editor windows. With a more general use of docking, the SynEdits could be replaced by other editor components. Not that I don't like the SynEdits, but some users (including me) sometimes feel an wish of a different GUI. Maybe a split into interface/implementation panes, or navigation from a project or unit explorer, with edits restricted to a single selected procedure or method. A tighter coupling of the logical caret position to a navigation map or tree (code explorer...) sometimes were very nice.

Splitting the space inside a single tab/page (with one of those splitters on the top end of the scrollbar) came up a few times as suggestions, and I agree, it would be a nice extension. (and isn't related to docking, since docking wouldn't combine tabs).

As for coupling edits to a single procedure. I haven't thought about any of this yet. I know how it works, and I know some people may like it. but it's a different thing. Implementation wise it's not very related to the multi-view stuff.

I think that now, when the views have been separated from the source files, it should be easy to implement such additional (maybe user specific) components or effects.

Well the main part of it, would to write a wrapper around the (shared) text buffer, which limits SynEdits View to the selected range of lines. => quite do-able

The thing that needs sorting out, is the relationship between sourceEditor and Project. All the open tabs, and what is displayed in them (topline, caret, or in the above case selected procedure) need to be stored in the project. That neds to be syncronized... And I don't quite like how it's currently done (or rather where it is done) => Main is abused as the connector, because main is the only thing that knows all the parts involved.

Martin

Reply by email

Graeme Geldenhuys
to Hans-Peter Diettrich: ...and can wait so long, IMO. Record/replay would be much easier to implement - no…
Hans-Peter Diettrich wrote 6 lines
> Windows by default doesn't have that. only option is to make tabs owner > drawn. I see. Nonetheless a component (button with glyph) or according paint procedure for more general use would be nice to have.

I still think Lazarus IDE (not LCL), must have it's own custom drawn PageControl. Delphi, Eclipse, Visual Studio all do this. That way the IDE can have close buttons for all platforms, right|left|top|bottom tab positions etc...

The IDE is not a general purpose "desktop application", it is a specialize tool for software development, so it doesn't need to adhere to platform look & feel like all other [desktop] apps.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 12 lines
On 20 April 2010 14:57, Hans-Peter Diettrich wrote: > >> Windows by default doesn't have that. only option is to make tabs owner >> drawn. > > I see. Nonetheless a component (button with glyph) or according paint > procedure for more general use would be nice to have. I still think Lazarus IDE (not LCL), must have it's own custom drawn PageControl. Delphi, Eclipse, Visual Studio all do this. That way the IDE can have close buttons for all platforms, right|left|top|bottom tab positions etc...

The native windows pagecontrol does all that. No need for custom drawn stuff.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
The native windows pagecontrol does all that. No need for custom drawn stuff.

Nope, it doesn't have "close button" per tab support - at least I could not find this in MSDN.

Also the tab position (left|right) rotates the text vertical under Windows. This is definitely not easier to read than normal horizontal text (preferred). For example, GTK2 and fpGUI, the tabs left|right position still keeps the text in the horizontal orientation. In fpGUI the left|right tabs can grow to text width (default) or can be set at a hard-coded width and clipped tab text will appear in popup hint, or the user can resize the tab width at runtime to suite there personal needs.

I had to hack my Lazarus IDE to get the following: http://opensoft.homeip.net/~graemeg/laz_notebook_right.png

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
On 21 April 2010 10:13, Michael Van Canneyt wrote: > > The native windows pagecontrol does all that. No need for custom drawn > stuff. Nope, it doesn't have "close button" per tab support - at least I could not find this in MSDN.

But it does have custom draw support for the tabs, which can be used to easily create the button. I do it in my own applications.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
But it does have custom draw support for the tabs, which can be used to easily create the button. I do it in my own applications.

:-) We are talking in circles. Now you suggest exactly what I suggested - using custom draw ability.

My suggestion just went a bit further by implementing the whole PageControl as a custom drawn component (not just the tabs part). Then you remove any platform limitations and the IDE can add features as they need it, and all platforms will support those features. Like I said earlier, this is only to be used in the IDE because it's a specialized tool, that could do with a couple of specialized components.

Another example of a specialized (custom drawn) component that the IDE could use, is the area dividers used in Environment > Options > Desktop screen. Currently I believe it's a Label (font set to Bold) and two Bevel components. That could be written as a custom component, and maybe even new functionality added down the line, like Expand/Contract a section when clicked, adding gradient support etc.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 16 lines
On 21 April 2010 10:44, Michael Van Canneyt wrote: > But it does have custom draw support for the tabs, which can be used to > easily create the button. I do it in my own applications. > :-) We are talking in circles. Now you suggest exactly what I suggested - using custom draw ability. My suggestion just went a bit further by implementing the whole PageControl as a custom drawn component (not just the tabs part). Then you remove any platform limitations and the IDE can add features as they need it, and all platforms will support those features. Like I said earlier, this is only to be used in the IDE because it's a specialized tool, that could do with a couple of specialized components.

Question: does anyone actually oppose the idea? Or is it just the lack of someone who actually does it?
Honest question, I haven't followed the discussion that closely, so I do not know)

And as far as custom drawn tab, or custom drawn full page control => if no one opposes it, and someone volunteers, start with the tabs, do the rest if there is a requirement (how much is there to be drawn, other than the tabs)?

If no one volunteers for now, then it's the usual => nice idea.

Personally, I think that once matured, it can even move into the LCL (or even the widgetset), system drawn tabs by default, but if you enable features that your system doesn't have, automatically switch to owner drawn.

But that's just my 2 cent.

Show quoted text 7 lines
Another example of a specialized (custom drawn) component that the IDE could use, is the area dividers used in Environment> Options> Desktop screen. Currently I believe it's a Label (font set to Bold) and two Bevel components. That could be written as a custom component, and maybe even new functionality added down the line, like Expand/Contract a section when clicked, adding gradient support etc.

Yes, they ought to become a Frame, or even a custom component. Again afaik there is no one opposing to add an IDE-Components package with special components to be used in the IDE .... => AFAIK

And the same could happen to the drag-able tabs of the source editor => they would be nice for find-in-files results too...

Again a question of who and when.

Martin

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: :-) We are talking in circles. Now you suggest exactly what I suggested - using custom…

Zitat von Graeme Geldenhuys :

Show quoted text 15 lines
On 21 April 2010 10:44, Michael Van Canneyt wrote: > > But it does have custom draw support for the tabs, which can be used to > easily create the button. I do it in my own applications. :-) We are talking in circles. Now you suggest exactly what I suggested - using custom draw ability. My suggestion just went a bit further by implementing the whole PageControl as a custom drawn component (not just the tabs part). Then you remove any platform limitations and the IDE can add features as they need it, and all platforms will support those features. Like I said earlier, this is only to be used in the IDE because it's a specialized tool, that could do with a couple of specialized components.

If someone implements a fancy page control that looks nice on all platforms (not the crap from eclipse et al), then +1.

Show quoted text 6 lines
Another example of a specialized (custom drawn) component that the IDE could use, is the area dividers used in Environment > Options > Desktop screen. Currently I believe it's a Label (font set to Bold) and two Bevel components. That could be written as a custom component, and maybe even new functionality added down the line, like Expand/Contract a section when clicked, adding gradient support etc.

+1 for a custom control. e.g. TCustomDrawnGroupBox.

I don't see the need for expand/contract/gradient.

Mattias

Reply by email

Žilvinas Ledas
to Vincent Snijders
Vincent Snijders wrote 7 lines
?ilvinas Ledas schreef: > What is more, I noticed that now package lazsvnpkg does not compile > (because of TDate changes). I am using Free Pascal Compiler version > 2.5.1 [2010/04/12] for i386 on Windows - must I update FPC or package > must be fixed? Try updating Lazarus.

lazsvnpkg is OK now, but (revision: 24814):

E:\lazarus\ide\componentpalette.pas(87,15) Error: There is no method in
an ancestor class to be overridden: "TComponentPalette.DoBeginUpdate;"
E:\lazarus\ide\componentpalette.pas(111,15) Error: There is no method in
an ancestor class to be overridden: "TComponentPalette.UpdateVisible;"

(without override it compiles fine)

Regards
?ilvinas

Reply by email

Mattias Gaertner
to Žilvinas Ledas
Show quoted text 19 lines
On 2010-04-21 23:10, Vincent Snijders wrote: > ?ilvinas Ledas schreef: >> What is more, I noticed that now package lazsvnpkg does not compile >> (because of TDate changes). I am using Free Pascal Compiler version >> 2.5.1 [2010/04/12] for i386 on Windows - must I update FPC or package >> must be fixed? > > Try updating Lazarus. lazsvnpkg is OK now, but (revision: 24814): E:\lazarus\ide\componentpalette.pas(87,15) Error: There is no method in an ancestor class to be overridden: "TComponentPalette.DoBeginUpdate;" E:\lazarus\ide\componentpalette.pas(111,15) Error: There is no method in an ancestor class to be overridden: "TComponentPalette.UpdateVisible;" (without override it compiles fine)

You forgot to compile IDEIntf after svn update.

Mattias

Reply by email

Žilvinas Ledas
to Mattias Gaertner
Mattias Gaertner wrote 13 lines
> lazsvnpkg is OK now, but (revision: 24814): > > E:\lazarus\ide\componentpalette.pas(87,15) Error: There is no method in > an ancestor class to be overridden: "TComponentPalette.DoBeginUpdate;" > E:\lazarus\ide\componentpalette.pas(111,15) Error: There is no method in > an ancestor class to be overridden: "TComponentPalette.UpdateVisible;" > > (without override it compiles fine) > You forgot to compile IDEIntf after svn update. Mattias

[I used Lazarus Tools>Configure Build Lazarus with everything except examples set to Clean+Build.]

Ok, thank You - "Clean all" option helped

Regards
?ilvinas

Reply by email