Re: [Lazarus] PDF generator: please test

2016-04-10 Thread Dmitry Boyarintsev
On Sun, Apr 10, 2016 at 4:23 AM, Michael Van Canneyt  wrote:
>
>
> No, why ? One is about encoding of the supplied text.
>
> The other about whether the current font has the necessary glyphs to render
> the text.


I see the issue now. It's in my perception of PDF format.
I always assumed it represents text as a sequence of glyphs, rather than
sequence of characters. But it seems like both options are possible.

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


Re: [Lazarus] PDF generator: please test

2016-04-10 Thread Dmitry Boyarintsev
On Sun, Apr 10, 2016 at 3:15 AM, Michael Van Canneyt  wrote:

It feels like, these two paragraphs:

>
> The user of the API should not have to care what font is used.
> the API should do whatever is necessary to emit correct PDF for the
> current font.
>
> If internally there are different calls needed for different fonts, then
> that is OK, but they should not be exposed to the user, at the best they
> should be made protected.
> (if need be, we can expose them later)
>

contradict to:


> If the currently used font does not contain the necessary glyphs to
> represent
> the text, we will not check it, that is the responsability of the user.


The APIs should either do the font-substitution  (with whatever level  of
control from the user side). (something what graphic APIs are doing for
text rendering)
or should not do them at all (leaving full font-substitution to the user)

Then there should be some cross-platform APIs provided (not necessary part
of PDF package) that would perform font substitution by the (unicode) text
and the desired font (font-size).

Eventually, someone would provide  WriteUTF8TextSmart() function, that
would split the text into parts (by fonts used) and would populate the PDF
accordingly, if PDF library doesn't the font-substitution itself.

For example, rendering a text with mix of latin letters and hieroglyphs,
using Times New Roman font. Typically for hieroglyphs one of system default
CJK fonts are used.

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


Re: [Lazarus] The return of the dreaded "The IDE is still building"

2016-04-01 Thread Dmitry Boyarintsev
On Fri, Apr 1, 2016 at 4:52 AM, Michael Van Canneyt 
wrote:

>
> See attachment.
>
> The IDE main window caption does not say 'building', and it is not
> building.
>

The messages window shows the package compilation is in progress.
I typically get this message when trying to run a compilation while
something else compiles.

It feels like IDE doesn't distinguish between IDE and a package building.

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


Re: [Lazarus] Xamarin becomes free and open-source

2016-03-31 Thread Dmitry Boyarintsev
On Thu, Mar 31, 2016 at 4:31 PM, vfclists .  wrote:

>
> Microsoft are not interested in FreePascal and Lazarus.
>
> They are going all out against Apple and Redhat.
>

Xamarin is using native controls, just like LCL does.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 12:19 PM, Dmitry Boyarintsev <
skalogryz.li...@gmail.com> wrote:

> On Tue, Mar 29, 2016 at 12:15 PM, Martin Frb <laza...@mfriebe.de> wrote:
>
>> If 0 currently means unlimited, then:
>> 1) a new value is needed for unlimited
>> 2) the configfile version must be increased, so the config reader knows
>> according to the version what 0 means.
>>
>>
> So why to change IDE instead of an IDE plugin?
>

Here's the plugin

https://github.com/skalogryz/clearrecent

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


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 12:15 PM, Martin Frb  wrote:

> If 0 currently means unlimited, then:
> 1) a new value is needed for unlimited
> 2) the configfile version must be increased, so the config reader knows
> according to the version what 0 means.
>
>
So why to change IDE instead of an IDE plugin?

This question bothers me all the time. Despite of the fact there's a decent
plugin API (IDEIntf), a lot of changes are making into IDE itself.

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


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Dmitry Boyarintsev
On Mon, Mar 28, 2016 at 2:25 PM, Ondrej Pokorny  wrote:

> On 28.03.2016 18:14, max.lemradt2 wrote:
>
>> I'd like to be able to disable or clear the "Recent files" and "Recent
>> projects" lists, e. g. for privacy reasons.
>>
>
> I will probably never use it but if you need it, feel free to create such
> a function and send a patch to mantis. A good place would be to create a
> button in Options -> Environment -> Files.
>

Why a patch instead of an IDE plugin?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a transparent PNG?

2016-03-19 Thread Dmitry Boyarintsev
On Wed, Mar 16, 2016 at 3:25 PM, Gabor Boros  wrote:

> I want to draw onto a PNG image and save it without background. Tried
> Transparent, TransparentColor, TransparentMode properties without success.
> I need the A character in the PNG with black color without background. Any
> idea?
>
> procedure PNG;
> var
>   P:TPortableNetworkGraphic;
> begin
>   P:=TPortableNetworkGraphic.Create;
>   P.SetSize(20,20);
>   P.Canvas.TextOut(0,0,'A');
>   P.SaveToFile('TEST.PNG');
>   P.Free;
> end;
>
IIRC this is a bug in PNG component. Try to make at least one pixel
half-transparent.

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


Re: [Lazarus] Default keymapping adapted to OS X

2016-03-14 Thread Dmitry Boyarintsev
On Mon, Mar 14, 2016 at 9:25 AM, Mattias Gaertner  wrote:

>
> The Windows/Linux scheme was not available til yesterday. How did you
> use it?
>

Lazarus has been providing 3 schemas. One of them was more or less close to
Windows/Linux schema.
It did require some manual adjustment to match exactly, but it typically
took only 10-15 minutes to reconfigure.

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


Re: [Lazarus] Default keymapping adapted to OS X

2016-03-14 Thread Dmitry Boyarintsev
On Mon, Mar 14, 2016 at 7:03 AM, Mattias Gaertner  wrote:

> I don't know anyone who wants the Windows/Linux (Lazarus default)
> scheme under OS X without Ctrl-Meta mapping.
>

Count me in.
I typically start by going to OSX preferences and disabling OSX defaults
not to interfere with the IDE.
Can't use Lazarus without Windows/Linux scheme (quite a torture).

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


Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Dmitry Boyarintsev
On Mon, Mar 7, 2016 at 3:25 PM, Ondrej Pokorny  wrote:

> I implemented "class code creation" in r51851. I was already tired of
> creating/copying object variables by hand. The idea is the same as with
> code creation (ctrl+shift+c), but the variable is created in one of the
> class section:
>
> procedure TClass.Test(y: integer);
> begin
>   x| := y;
> end;
>
> how about inline notation.
procedure TClass.Test(y: integer);
begin
  x pvt| := y;
end;

or

procedure TClass.Test(y: integer);
begin
  x private|:= y;
end;

hit ctrl+shift+x

type
  TClass = class
  private
x: Integer;
procedure Test(y: integer);
  end;

implementation

{ TClass }

procedure TClass.Test(y: integer);
begin
  x |:= y;
end;

Eventually people will know the dialog well, so selecting the needed item
in the dialog might be painful.
As well as adding more items to the dialog (by further IDE improvement)
will frustrate users.

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


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Dmitry Boyarintsev
On Wed, Feb 24, 2016 at 3:16 PM, Anthony Walter  wrote:

> I expect their price to come down, maybe even into the free price range,
> as a result of this acquisition.
>

Skepticism: what software became better after acquisition by Microsoft?

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


Re: [Lazarus] Incompatibility: dynamic array and TStream

2016-02-23 Thread Dmitry Boyarintsev
On Tue, Feb 23, 2016 at 9:39 PM, Donald Ziesig  wrote:

> I am trying to read the contents of a memory stream into a dynamic array
> of characters and the program keeps crashing when I try to free the dynamic
> array.
>
> Only one line is wrong, do the following:

Stream.Read(Buf[0], Stream.Size);


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


Re: [Lazarus] non Unicodode application

2016-02-12 Thread Dmitry Boyarintsev
On Fri, Feb 12, 2016 at 9:16 AM, Michael Van Canneyt  wrote:

> {$define String:=RawByteString}
>
> and you are done.
>

How to achieve the same effect from command line?

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


Re: [Lazarus] non Unicodode application

2016-02-12 Thread Dmitry Boyarintsev
On Fri, Feb 12, 2016 at 11:24 AM, Sven Barth <pascaldra...@googlemail.com>
wrote:

> Am 12.02.2016 17:16 schrieb "Dmitry Boyarintsev" <
> skalogryz.li...@gmail.com>:
> >
> > On Fri, Feb 12, 2016 at 9:16 AM, Michael Van Canneyt <
> mich...@freepascal.org> wrote:
> >>
> >> {$define String:=RawByteString}
> >>
> >> and you are done.
> >
> >
> > How to achieve the same effect from command line?
>
> Just don't. There are things that are not worth the trouble and this is
> one of them.
>
In this particular case (of porting Delphi 7 code straight to FPC 3.0.0) is
a matter of backward compatibility.

I could agree that there are very little options left:
* Delphi (whatever version supports 64bit) - changes in code are needed
* FPC 3.0.0 - {$define String:=RawByteString} must be added to every unit
(or a single .inc file if used)
* FPC 2.6.4 - no changes needed (?)
So it might be indeed a thing not worth the trouble.

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


Re: [Lazarus] How to set defines for a project? Lazarus crashes...

2016-02-09 Thread Dmitry Boyarintsev
On Mon, Feb 8, 2016 at 6:22 PM, Mattias Gaertner 
wrote:

> Do you mean you added -dUseCThreads in
> Project/Project_Options/Custom_Options,
> but it is not appended to options passed to FPC?
>

Is it true to say that there are only 2 ways in IDE to set defines.
1) Project Options/Custom Options
2) Project Options/Additions and Overrides (+ Custom Option)

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


Re: [Lazarus] Video Tutorial: Introducing Lazarus

2016-02-09 Thread Dmitry Boyarintsev
On Tue, Feb 9, 2016 at 3:35 AM, Anthony Walter  wrote:

> I've published a new video in my tutorial series.
>

Just curios, is it your voice on the video?

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


Re: [Lazarus] Video Tutorial: Introducing Lazarus

2016-02-09 Thread Dmitry Boyarintsev
On Tue, Feb 9, 2016 at 4:59 PM, Anthony Walter  wrote:

> I have a friend who is a television news talent reading my scripts.
>

Thanks for clarification!
The pro voice indeed makes it pro quality video.

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


Re: [Lazarus] Tool to convert a multiline text to a pascal string constant

2016-02-02 Thread Dmitry Boyarintsev
On Tue, Feb 2, 2016 at 4:33 PM, Luiz Americo Pereira Camara <
luizameri...@gmail.com> wrote:

> Hi is there any tool for Lazarus to convert a multi line text (xml snipet,
> SQL) to a string constant?
>

Shouldn't there be something already in Lazarus itself that you could use?
Back at the time when all resources were pascal string constants?


>
> Currently i'm using the following regular expression
>
> http://regexr.com/3cna5
>

I think it doesn't replace single-quote character (') by doubled
single-quote character ( '' )

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


Re: [Lazarus] [OT] Why Mantis doesn't notify the changes?

2016-01-27 Thread Dmitry Boyarintsev
On Wed, Jan 27, 2016 at 12:43 PM, silvioprog  wrote:

> I can't receive any Mantis notification, even using this configuration:
>

Maybe Mantis is not configured to notify the Reporter?
You might want to add yourself to Monitor list.

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


Re: [Lazarus] [PATCH] components/turbopower_ipro: added the Iphttpbroker and its example

2016-01-25 Thread Dmitry Boyarintsev
On Mon, Jan 25, 2016 at 3:08 PM, Michael Van Canneyt  wrote:

> On Mon, 25 Jan 2016, silvioprog wrote:
>
>>
>> Many units in Free Pascal and Delphi uses C libraries... when aren't using
>> a C library (an API system call, an third party library call, etc.), are
>> using assembly, ie, mostly time Pascal is used as a high-level language to
>> consume some low-level code written in C or assembly.
>>
>
> There is a simple reason: Debugging and bugfixing is a lot easier if all
> the code is in pascal.
>

Here's another reason - cross-platform availability.
FPC is cross platform. To some extent (Java?) is more cross-platform that C
is.

When using an external library, there might be a risk that the library is
not *easily* available for another platform that is targeted. It's common
for open-source projects, not to provide any binary builds, requiring a
library user to build the library themselves. Luckily, the most common
projects do have some satellite projects that actually provide binaries.

Building C (C++) library could be a real pain for some Pascal users.
(Pascal spoils!)
Building C/C++ library for a desired target platform, could be even more
painful, specifically if some sort of cross-tools required or when building
configuration needs to be changed.

Thus a pure pascal library would be a number one choice for most users.
With though it might be outdated and/or slower than its C-counterpart (i.e.
paszlib vs zlib)

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


Re: [Lazarus] [PATCH] components/turbopower_ipro: added the Iphttpbroker and its example

2016-01-25 Thread Dmitry Boyarintsev
On Mon, Jan 25, 2016 at 5:02 PM, Dmitry Boyarintsev <
skalogryz.li...@gmail.com> wrote:

>  With though it might be outdated ...
>
correction:
* Even though it might be outdated ...

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


Re: [Lazarus] Get Lazarus January 2016 Update

2016-01-20 Thread Dmitry Boyarintsev
On Wed, Jan 20, 2016 at 4:53 PM, Anthony Walter  wrote:

> A new Lazarus layout with the component pallet removed and coolbar buttons
> in its place. The a docked form designer is now the default form editor.
>
Nice job! Feels like switching for D7 to Turbo Delphi :)

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


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 12:29 PM, Anthony Walter  wrote:

> For businesses web development is probably a better fit for their software
> needs.
>
> For people who are computer enthusiasts that use their computers to
> process tasks or solve problems, desktop development is probably better.
>
> What are your opinions on the subject title ?
>

I think you're missing security considerations as well.

When a desktop application is compromised, it's likely that only a
particular user would a victim.
For web-applications, all users might be compromised as well.

The trend is actually switching to web+desktop applications. I.e. Steam
client or Delphi's "help" window.
So each application is a browser on its own.
A smarter framework might suggest an alternative to html+js, so it could
integrate with any application easily, rather than for a browser
application.

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


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 2:52 PM, Aradeonas  wrote:
>
> I know its a Open Source world and  but I saw many great thing but not
> this,is there a problem or disagree about making these apps in FPC?
> As you can see they will be more apps like these and their problem is
> speed sometimes that it can be solved with FPC easily.
>
See many threads (on the forum) about  integrating ChromeKit or Gecko into
LCL app

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


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Dmitry Boyarintsev
On Fri, Jan 15, 2016 at 11:55 PM, Aradeonas  wrote:
>
> Of course I saw them but as I said I surprised from that I cant find any
> particular good one because I have habit that always there will be good
> thing made with FPC and Lazarus.
>
> But if you know a especial one please give me a link.
>

Sorry, I'm not following any on them.

But, the biggest issue here is that most of the engines are C++ based.
FPC support of C++ classes is in initial state (and is on long term todo
list).
Thus building a bridge (i.e. C wrappers) for web library is required in
most cases.
So it's an extra step that a rare pascal developer would like to make and
maintain. And the quality of integration depends on the quality and
flexibility of created wrappers.

Take Qt as example -  C-wrappers are maintained by a single person and a
lot of Qt APIs is still missing.

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


Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?

2016-01-12 Thread Dmitry Boyarintsev
Isn't it already there?
It seems like it replaced column selection (in terms of shortcuts).

thanks,
Dmitry

On Tue, Jan 12, 2016 at 10:47 AM, Graeme Geldenhuys <
mailingli...@geldenhuys.co.uk> wrote:

> If I was to create a bounty to have this implemented in Lazarus (and
> hopefully somebody has the skill and time to implement it), what would
> the cost be?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?

2016-01-12 Thread Dmitry Boyarintsev
On Tue, Jan 12, 2016 at 10:53 AM, Graeme Geldenhuys <
mailingli...@geldenhuys.co.uk> wrote:

> On 2016-01-12 15:51, Dmitry Boyarintsev wrote:
> > Isn't it already there?
> > It seems like it replaced column selection (in terms of shortcuts).
>
>
> I'm afraid I don't know what you mean.
>
Ugh. sorry, nevermind. I was referring to multi-caret

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


Re: [Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32

2016-01-11 Thread Dmitry Boyarintsev
On Mon, Jan 11, 2016 at 10:32 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:

> There is no overload. There is only one definition:
>
> {$define PathStr:=RawByteString}
>
why not
type
  PathStr= RawByteString; ?

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


Re: [Lazarus] Something the examine Lazarus or applications?

2016-01-11 Thread Dmitry Boyarintsev
On Mon, Jan 11, 2016 at 12:58 PM, Anthony Walter  wrote:

> Others: If I can dig up my D7 SE installer I'll attempt to verify. I
> distinctly remember being surprised at this behavior in D5 1999, but I
> could be mis-remembering.
>
I've D7 here.
I tried Ondrej's sample here and it throws the assertion error.

It's also hard to understand how would
  Owner = nil
be forced to
  Owner = Application
for console programs, where "Forms" unit is not used.

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


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-10 Thread Dmitry Boyarintsev
The bottom one. It's more "calm". Doesn't look like a circus.​
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-08 Thread Dmitry Boyarintsev
On Fri, Jan 8, 2016 at 2:48 AM, Marc Santhoff  wrote:

> It is. I'm living in Germany, and the law forbids the use of Nazi
> symbols. I don't know exactly, what it looks like, but there actually is
> a clear definition how it looks like. Probably the circle around the
> swastika and the color scheme play a role.
>

This is some sort of odd coincidence:
http://news.sky.com/story/1618909/hitlers-mein-kampf-on-sale-again-in-germany
But bans are expiring.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-08 Thread Dmitry Boyarintsev
On Fri, Jan 8, 2016 at 2:43 AM, Marc Santhoff  wrote:

> People see something and are driven by feelings. I watched a case like
> this already regarding FreeBSD. Some users insisted of changing the
> deamon logo because they are afraif of the devil. Rather  ridiculous, it
> actually was a cuddly toy or comic like figure, but in the end the logo
> got changed.
>

Was it changed? I can still see it on their official site.
https://www.freebsd.org/

Btw, this is bsd thread (
http://lists.freebsd.org/pipermail/freebsd-questions/2010-July/219173.html)
seems to be identical to PaintSwastika.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-07 Thread Dmitry Boyarintsev
On Thu, Jan 7, 2016 at 3:20 PM, Juha Manninen 
wrote:
>
> What means "political correctness" exactly?
>

It's use of language. Use the words that would not provoke, insult of make
feel bad anyone.

I doubt the thread would ever come up, if the function were named
PaintCrookedCross as Ondrej pointed.
Anthony was going through the documentation and the word "Swastika"
clicked. Swastika = Nazis, by default these days.
(Even though is still used for example by Finnish defense forces)

In the end Mattias applied a reasonable technical solution to the political
(yes, it is) problem.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 9:54 AM, Marc Santhoff  wrote:

> One could demand to remove any religious reference, then the name would
> have to be changed.
>
IIRC even "Lazarus" name was discussed at some point as having religious
reference.
Which is kind-of is... but to avoid another Phoenix bird named project.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 10:31 AM, Bart  wrote:

>
> So, yes, IMVPAPO, it should be removed.
>
>
Swastika glyph is in Unicode standard. That actually an excuses for having
the function available.
(i.e. if a font doesn't support swastika, it could be drawn manually).

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 12:42 PM, Juha Manninen 
wrote:

> Dmitry, you have full SVN write access, don't you? You can commit it
> without any bug reports.
> There could be more variations. Swastika has been drawn standing on
> its side, clockwise and counter-clockwise, and standing on its corner.
>

I was actually awaiting for someone's else approval to commit :) (r51215)
As for "corner standing" there's already RadAngle parameter.

It has a very long and rich history. ...
> And so on ...
>

Imho, the reason the procedure is there it's because it's quite easy to be
drawn.
(Specifically using Polygon method).
ExtGraphics doesn't really have any other religions/cultural symbols there.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 11:20 AM, Vojtěch Čihák 
wrote:

> I vote for keeping procedure but there should be added boolean parameter +
> patch for painting anti-clockwise swastika (which is religious symbol
> only).
>

Fair enough.
Here's the patch. (Anyone,) please create a bug report, so it could be
applied.

thanks,
Dmitry


Index: extgraphics.pas
===
--- extgraphics.pas(revision 51191)
+++ extgraphics.pas(working copy)
@@ -56,7 +56,7 @@
 procedure PaintRightTriangle(Canvas: TCanvas; const PaintRect: TRect;
   RadAngle :Extended=0.0);
 procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;
-  RadAngle :Extended=0.0);
+  RadAngle :Extended=0.0; ClockWise: Boolean = true);
 procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;
   RadAngle :Extended=0.0);
 procedure PaintTriangular(Canvas: TCanvas; const PaintRect: TRect;
@@ -583,8 +583,10 @@
 end;


-procedure InitSwastika(var P:array of TPoint;const R: TRect;var
NumPts:Integer);
+procedure InitSwastika(var P:array of TPoint;const R: TRect;var
NumPts:Integer; CW: Boolean = true);
 var x1,x2,y1,y2:Integer;
+  t: TPoint;
+  i: integer;
 begin
   x1:=(R.Right-R.Left) div 5;
   y1:=(R.Bottom-R.Top) div 5;
@@ -601,8 +603,21 @@

P[16].x:=P[15].x;P[16].y:=R.Bottom-y1;P[17].x:=R.Left+x2;P[17].y:=P[16].y;
   P[18].x:=P[17].x;P[18].y:=R.Bottom-y2;P[19].x:=R.Left;P[19].y:=P[18].y;
   NumPts:=20;
+  if not CW then
+for i:=0 to NumPts -1 do
+  p[i].x:=R.Right - (p[i].x - R.left);
 end;

+procedure InitSwastikaCW(var P:array of TPoint;const R: TRect;var
NumPts:Integer);
+begin
+  InitSwastika(P, R, NumPts, true);
+end;
+
+procedure InitSwastikaCCW(var P:array of TPoint;const R: TRect;var
NumPts:Integer);
+begin
+  InitSwastika(P, R, NumPts, false);
+end;
+
 procedure InitTriangle(var P:array of TPoint; const R: TRect;
   var NumPts:Integer);
 begin
@@ -719,9 +734,12 @@
   InitPolygon(Canvas,PaintRect,RadAngle,@InitRightTriangle);
 end;

-procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle
:Extended=0.0);
+procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle
:Extended=0.0; ClockWise: Boolean = true);
 begin
-  InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastika);
+  if ClockWise then
+InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCW)
+  else
+InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCCW);
 end;

 procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;RadAngle
:Extended=0.0);
Index: extgraphics.pas
===
--- extgraphics.pas (revision 51191)
+++ extgraphics.pas (working copy)
@@ -56,7 +56,7 @@
 procedure PaintRightTriangle(Canvas: TCanvas; const PaintRect: TRect;
   RadAngle :Extended=0.0);
 procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;
-  RadAngle :Extended=0.0);
+  RadAngle :Extended=0.0; ClockWise: Boolean = true);
 procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;
   RadAngle :Extended=0.0);
 procedure PaintTriangular(Canvas: TCanvas; const PaintRect: TRect;
@@ -583,8 +583,10 @@
 end;
 
 
-procedure InitSwastika(var P:array of TPoint;const R: TRect;var 
NumPts:Integer);
+procedure InitSwastika(var P:array of TPoint;const R: TRect;var 
NumPts:Integer; CW: Boolean = true);
 var x1,x2,y1,y2:Integer;
+  t: TPoint;
+  i: integer;
 begin
   x1:=(R.Right-R.Left) div 5;
   y1:=(R.Bottom-R.Top) div 5;
@@ -601,8 +603,21 @@
   P[16].x:=P[15].x;P[16].y:=R.Bottom-y1;P[17].x:=R.Left+x2;P[17].y:=P[16].y;
   P[18].x:=P[17].x;P[18].y:=R.Bottom-y2;P[19].x:=R.Left;P[19].y:=P[18].y;
   NumPts:=20;
+  if not CW then
+for i:=0 to NumPts -1 do
+  p[i].x:=R.Right - (p[i].x - R.left);
 end;
 
+procedure InitSwastikaCW(var P:array of TPoint;const R: TRect;var 
NumPts:Integer);
+begin
+  InitSwastika(P, R, NumPts, true);
+end;
+
+procedure InitSwastikaCCW(var P:array of TPoint;const R: TRect;var 
NumPts:Integer);
+begin
+  InitSwastika(P, R, NumPts, false);
+end;
+
 procedure InitTriangle(var P:array of TPoint; const R: TRect;
   var NumPts:Integer);
 begin
@@ -719,9 +734,12 @@
   InitPolygon(Canvas,PaintRect,RadAngle,@InitRightTriangle);
 end;
 
-procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle 
:Extended=0.0);
+procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle 
:Extended=0.0; ClockWise: Boolean = true);
 begin
-  InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastika);
+  if ClockWise then
+InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCW)
+  else
+InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCCW);
 end;
 
 procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;RadAngle 
:Extended=0.0);
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 2:45 PM, Marc Santhoff  wrote:

>
> How about that:
>
>   PaintFivePointLineStar(PaintBox1.Canvas, r);
>
> Got some silver knifes and black candles at hand?
>

That's the point :) It's FivePointLineStart, not Pentagram. (
https://en.wikipedia.org/wiki/Pentagram)
It might look the same, but in the end it's FivePointLineStart.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 2:21 PM, Anthony Walter  wrote:

> There are many versions of the religious swastika symbol, but is only one
> version of the swastika is draw with the squared capped leaves and a stroke
> width exactly equal to 1/5th of the linear diameter. Guess which one the
> lcl function draws?
>

r51217 introduced LineWidth parameter (which should probably be renamed to
LeafWidth) that allows to specify a different than default 1/5th diameter.

That also brings the memory of my childhood. Unfortunately I was about 2-3
years old that the event the occurred, so I could not be a witness myself,
but...
But a couple of older kids (4-6 years) were left at home for a short period
of time (less than an hour or so). However, after a few minutes of playing,
they got really scared that the nazis might come in. Being terrified of
being captured they took all black markers, pens and pencils they could
find at home and started drawing swastikas all over the house. (I cannot
confirm if they were the right 1/5th proportion). But in a few minutes all
walls in were covered in swastikas.

Despite their hopes and worries, instead of Nazis, parents appeared! They
were really mad about what has happened and caused kids to do some labor
and cleaning up the mess.

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 3:06 PM, Marc Santhoff  wrote:

> I see. But from that view: the Nazi symbol is named "Hakenkreuz", not
> "Swastika". If you argue like this, you can revert the patch. ;)
>
> Indeed! PaintSwastika draws a religious rune, not a Nazi symbol!

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 3:23 PM, Ondrej Pokorny  wrote:

> Indeed! Therefore PaintSwastika should be renamed to "PaintCrookedCross"
> to comply with "PaintFivePointLineStar".
>
> It doesn't make sense to have Swastika and then omit Pentagram. Lazarus
> sources should be uniform.
>

Any objection if I add PaintHammerAndSickle procedure too?

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


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-06 Thread Dmitry Boyarintsev
On Wed, Jan 6, 2016 at 3:29 PM, Anthony Walter  wrote:

> Regarding a patch, can whomever creates/applies it insure the
> PaintSwastika procedure does not default to the Nazi symbol characteristics?
>
It's easy, just changing  LineWidth: Single = 0.20 to whatever
But how about backwards compatibility?
I doubt anyone is using the function, but introducing an incompatibility
requires at least documenting it.
As you know there're far more important notes to be done for the coming
Lazarus release.

Besides, Nazi's swastika should be turned by 45 degrees. The procedure is
using 0 degrees by default.
As Graeme pointed out colors don't match either.

In the end. It's not about a routine. It's about how an end user
(developer) apply it.
Maybe they're developing the very next version of Wolfenstain 3d game or
creating a historic application or whatever.
Library is a tool, it's not intended to be a cultural symbol of any kind.

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


[Lazarus] IDE extension and Debug Output window

2015-12-27 Thread Dmitry Boyarintsev
Hello,

What's the correct IDEIntf APIs to show "Debug Output" window as well as
populate with some debugging output?

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 2:26 AM, Ondrej Pokorny  wrote:

> What I don't like on fsStayOnTop is the fact that fsStayOnTop-Window wants
> to stay on top of all windows - also those from other applications. This is
> IMO a seriously bad UI design. I know that Delphi behaves the same but then
> we need some FormStyle that makes the window stay only on top of its
> application windows and not system-wide.
>

I thought that
fsStayOnTop - stay on top of all windows within the application
fsSystemStayOnTop - stay on top of all windows within system.

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 12:11 PM, Ondrej Pokorny  wrote:

> No, this is not true. It does bother my email client such as any other
> fsStayOnTop window, see attachment - from the Win10 theme you can recognize
> that the email client window is focused and active and is still covered by
> "Leaks and Traces".
>
I also have Win10 and Mozilla Thunderbird, cannot reproduce the issue
(using trunk).
Do you have any local LCL (win32) changes?

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 1:23 PM, Ondrej Pokorny  wrote:

> No, I have no local changes. I always commit them to trunk :)
>
> Steps to reproduce: use Alt+Tab when switching to Thunderbird.
>

I can only reproduce it by opening Lazarus in the front and then trying to
resize (by dragging) the underlying Thunderbird screen. Actually it doesn't
have to be Thunderbird application, the similar would occur for any other
application.
But if I click on the Thunderbird window, it comes over the leakview...
Tricky!

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 1:46 PM, Ondrej Pokorny  wrote:

> Not for me :(
>
>
> https://drive.google.com/file/d/0Bx-flYubOTroY3BCaFlScVl2NzA/view?usp=sharing
>

What happens if you enable Windows thumbnails (shown on alt-tab by default)
back?

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 11:42 AM, Ondrej Pokorny  wrote:

>
> For the sake of backwards compatibility the other way round would
> be more appropriate, IMO:
> fsAppStayOnTop - stay on top of all windows within the application
> fsStayOnTop - stay on top of all windows within system. (current behavior)
>
Backwards?
fsStayOnTop and fsSystemStayOnTop  has been in Lazarus for quite awhile.
Changing the behavior will make it backwards incompatible.

I don't really see fsAppStayOnTop in delphi VCL either.
http://docwiki.embarcadero.com/Libraries/Seattle/en/Vcl.Forms.TForm.FormStyle

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 11:26 AM, Dmitry Boyarintsev <
skalogryz.li...@gmail.com> wrote:

> fsStayOnTop - stay on top of all windows within the application
> fsSystemStayOnTop - stay on top of all windows within system.
>

As an example.
LeakView allows a user to switch between "fsStayOnTop" and "fsNormal".
And it never bothers any other application.

Screenshot: http://pasteboard.co/fDxvGHT.png

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 11:26 AM, Dmitry Boyarintsev <
skalogryz.li...@gmail.com> wrote:

> StayOnTop - stay on top of all windows within the application
> fsSystemStayOnTop - stay on top of all windows within system.
>

Yes, it is in Lazarus documentation as well.
http://lazarus-ccr.sourceforge.net/docs/lcl/controls/tformstyle.html

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 12:04 PM, Ondrej Pokorny  wrote:

> So it means that Lazarus' LCL and Delphi's VCL fsStayOnTop are not
> compatible, which I don't really understand why this decision was made.
> (Maybe some historic reason I am not aware of [?])
>
> From my point-of-view, it would be a better decision to have fsStayOnTop
> that behaves equally with Delphi (system-wide) and another stay-on-top type
> application-wide just as I suggested before.
>

For the sake of the best User Interface practices and historical reasons.

"fsSystemStayOnTop" is more of an exception, rather than the rule.
In most cases, an application wants to be system friendly application and
only want to put a form on top of its own windows not system wide.

IIRC, at the time fsSystemStayOnTop was introduced frStayOnTop was
inconsistent across widgetsets. Introducing fsSystemStayOnTop forced
consistency.

Also, since Delphi doesn't have any variant of either "fsSystemStayOnTop"
or "fsAppStayOnTop" it's quite clear that Delphi is not LCL compatible :)

Also, having "fsStayOnTop" is not even critical to be Delphi compatible.
1) Delphi advises NOT to change the FormStyle in run-time (thus any
existing code written for Delphi, is not guaranteed to work "as expected"
even in Delphi).
2) Since Lazarus doesn't use Delphi .dfm files, who ever ports an Delphi
project to Lazarus need to pay attention to the flag (if it's used)

To sum things up: using fsStayOnTop in the new menu designer is not bad.

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


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
Here's the patch. Please test, It should work now for you.

Index: lcl/interfaces/win32/win32proc.pp
===
--- lcl/interfaces/win32/win32proc.pp   (revision 51009)
+++ lcl/interfaces/win32/win32proc.pp   (working copy)
@@ -870,9 +870,10 @@
 WindowInfo^.StayOnTopList := StayOnTopWindowsInfo^.StayOnTopList;
 EnumThreadWindows(GetWindowThreadProcessId(AppHandle, nil),
   @EnumStayOnTopRemove, LPARAM(StayOnTopWindowsInfo));
-for I := 0 to WindowInfo^.StayOnTopList.Count - 1 do
-  SetWindowPos(HWND(WindowInfo^.StayOnTopList[I]), HWND_NOTOPMOST, 0,
0, 0, 0,
+for I := 0 to WindowInfo^.StayOnTopList.Count - 1 do begin
+  SetWindowPos(HWND(WindowInfo^.StayOnTopList[I]), HWND_BOTTOM, 0, 0,
0, 0,
 SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER or
SWP_DRAWFRAME);
+end;
 Dispose(StayOnTopWindowsInfo);
   end;
   inc(InRemoveStayOnTopFlags);

thanks,
Dmitry

On Wed, Dec 23, 2015 at 12:43 PM, Ondrej Pokorny <laza...@kluug.net> wrote:

> On 23.12.2015 18:25, Dmitry Boyarintsev wrote:
>
> On Wed, Dec 23, 2015 at 11:26 AM, Dmitry Boyarintsev <
> <skalogryz.li...@gmail.com>skalogryz.li...@gmail.com> wrote:
>
>> StayOnTop - stay on top of all windows within the application
>> fsSystemStayOnTop - stay on top of all windows within system.
>>
>
> Yes, it is in Lazarus documentation as well.
> http://lazarus-ccr.sourceforge.net/docs/lcl/controls/tformstyle.html
>
>
> Yes, you are right. I didn't check it before. But as I stated in my last
> emails:
> 1.) fsStayOnTop is Delphi-incompatible. Delphi's fsStayOnTop corresponds
> with Lazarus' fsSystemStayOnTop.
> 2.) fsStayOnTop in Lazarus can and does overlap other application windows
> in Windows 10 (although not always).
> 3.) fsStayOnTop in Lazarus always does overlap other application windows
> in Linux/KDE.
>
> According to 2+3, fsStayOnTop in Lazarus is anything else than
> application-wide, regardless what the documentation states :(
>
> So either the documentation or LCL code has to be fixed - or both. The
> question is how:
> A.) Make it backwards compatible: fsStayOnTop / fsSystemStayOnTop
> B.) Make it Delphi compatible: fsStayOnTop + fsAppStayOnTop (if needed and
> supported).
>
> Ondrej
>
> --
> ___
> 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] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 4:14 PM, Ondrej Pokorny  wrote:

> Thanks Dmitry! It works for this issue but opened a regression: Lazarus
> IDE is moved to the very last place in Alt+Tab history.
>
It's a little bit different regression, the fsStayOnTop window is moved to
the bottom. Which also not good, since it should remain on top of the
application windows itself. Just more work needed.

Did you try restoring thumbnail mode for Alt-tab?

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


Re: [Lazarus] LGPL versions between RTL and LCL

2015-11-23 Thread Dmitry Boyarintsev
On Mon, Nov 23, 2015 at 7:40 AM, Mattias Gaertner  wrote:

>
> For simplicity the LCL should use the same license as FCL/RTL.
>
> Can you extract the differences, so we can ask for permission from
> contributors?
>

I took a lazy path and let a tool do the comparison.

The resulting PDF could be downloaded from here:
https://www.dropbox.com/s/ao0ckgud0gix9xw/lgpl_from_2_to_2_1.pdf?dl=0

The change I was talking about could be found on page 6 on the document (at
the very bottom) the new section was introduced specifically requiring the
dynamic loading.

Reminder: LCL is using LGPL 2, RTL is using LGPL v2.1

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


Re: [Lazarus] Extending TRect breaks Lazarus

2015-11-06 Thread Dmitry Boyarintsev
On Fri, Nov 6, 2015 at 1:25 PM, Mattias Gaertner 
wrote:

>
> Does Delphi alter some other records too, e.g. TPoint and TSize?
>
> It does
http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Types.TPoint
http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Types.TSize

so it's just a matter of time when FPC RTL replicates them.

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


Re: [Lazarus] Extending TRect breaks Lazarus

2015-11-06 Thread Dmitry Boyarintsev
On Fri, Nov 6, 2015 at 10:45 AM, Marco van de Voort  wrote:

> I haven't investigated deeper yet, but I suspect the heavy use of WITH in
> interfaces etc is the cause.  (if you assign width and height of a
> component in a component method in a WITH with a TRECT as argument, then
> now
> width and height of the trect are assigned instead of the component's ?
>

This is odd. How adding  the method to TRect didn't break much for Delphi?
(or maybe it did, we just don't know it).
I'd think that Delphi /3d party components code also uses a lot of WITHs
with TRects

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


Re: [Lazarus] annoying *SPAM* (attn: Michael Schnell)

2015-10-23 Thread Dmitry Boyarintsev
Hello Michael

It seems like your email client is adding "*SPAM*" to the subject of emails
coming from lazarus mailing list.
Could you please add Lazarus@lists.lazarus.freepascal.org to the white list?

Otherwise getting an email with *SPAM* prefix in the subject ruins the
whole thread.

I apologize if it's not your email client, but someone else's.
But whoever's email client does that, please fix it. Changing thread
subject ruins the whole idea of mailing lists.

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


Re: [Lazarus] annoying *SPAM* (attn: Michael Schnell)

2015-10-23 Thread Dmitry Boyarintsev
On Fri, Oct 23, 2015 at 9:38 AM, Henry Vermaak 
wrote:

>
> If your mail client is threading based on the subject, it's broken or
> misconfigured.  My client has no issues with the subject changing.
>

I totally agree that gmail.com is totally broken and misconfigured. (no
irony, but sorrow)

That's why I'm asking the participant to adjust his email client, rather
than doing anything on my end.

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Dmitry Boyarintsev
On Sun, Oct 18, 2015 at 10:11 AM, Anthony Walter  wrote:

> A question, are type helpers limited to one per type? That is to say, if I
> write a "type MyStringHelper = record helper for string" and Michael adds a
> "type LazStringHelper = record helper for string" in SysUtils, will only
> one of them work when I have both units added to the my uses clauses of
> another unit?
>

Only one of them will work, but you can use helpers inheritance.

http://www.freepascal.org/docs-html/ref/refse57.html#x114-12400010.5

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


[Lazarus] LGPL versions between RTL and LCL

2015-09-25 Thread Dmitry Boyarintsev
Hello,

I know lots of developers don't like licensing questions, but I'll ask
anyway.
Is it intended that RTL is using LGPL v2.1 as its base, while LCL is using
an earlier verions LGPL v2?

Yes, both RTL and LCL are using the same "exception" to the license, but
I'm just curious.

One (not-so) important difference between LGPL v2.1 and LGPL v2 is section
6.b)
In v2.1 it sort of implies usage of the library as dynamically
linked/loaded library rather than part of executable.
In v2 there's no such requirement at all.

Be careful, your reply might be copy-pasted by me to this wiki page
http://wiki.freepascal.org/licensing

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


Re: [Lazarus] Embedded Firebird bundled with OSX application

2015-06-22 Thread Dmitry Boyarintsev
On Mon, Jun 22, 2015 at 7:54 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 That was my initial thought too... should be similar to Linux. But it
 ended up not being the case (at least for me).
 For example:
   * Libraries need to be included inside the application bundle. I'm
still trying to get my head around application bundles.


They're. If Firebird comes in a form of framework or dynamic library you
should unclude them in your application bundle.
Just Frameworks directory needs to be created, within Contents
directory.
Put firebird framework/dynamic library there and that's
it. No changes in the code needed, if firebird is already dynamically
linked.

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


Re: [Lazarus] QuestionDlg block mouse and keyboard input under OSX

2015-06-17 Thread Dmitry Boyarintsev
On Tue, Jun 16, 2015 at 9:48 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 See screenshot...

   http://geldenhuys.co.uk/~graemeg/laz_osx_corrupt_text_rendering.png

Could you please copy-paste (cmd+c , cmd+v) the contents to a text file?

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


Re: [Lazarus] QuestionDlg block mouse and keyboard input under OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 8:25 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:


 Is this a know issue under OSX? Anybody have a work-around?

 Please bug report. I'll take a look tonight.

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


Re: [Lazarus] Conflicting IDE keyboard shortcuts with OSX out-of-the-box

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 9:01 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Are these considered bugs - if so I'll report them in Mantis. Or is it
 expected from the developer to find there own workable shortcuts on each
 platform, or disable standard shortcuts from the OS's desktop environment?


It's better to report them, so the issue is not forgotten.
These shortcuts were introduced at the time of 10.4 when it was not
overlapping with standard OSX environment.
Any new OSX shortcut introduced (in very next version of OSX) is
potentially causing a problem with Lazarus.

Overlapping within IDE shortcuts are introduced by the similar issue.
Each short-cut needs to be revised when adding to OSX, and since it's very
easy to match the existing one.

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


Re: [Lazarus] Font errors in console output on OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 6:55 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:


 Is this normal (something that can be ignored), or is there something
 wrong in the application, or in LCL-Carbon?

 Ignore it. Though you can create a bug report about it.

Carbon is deprecated, no actual interest in fixing the issue.
Btw, ATSU APIs has been deprecated since OSX 10.5, and there's no good
replacement API for it.

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


Re: [Lazarus] QuestionDlg block mouse and keyboard input under OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 9:17 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Thanks for trying. Here is my video showing the problem.

 No, sir, this is not an issue! Please don't bug report.
That's OSX feature.

You're trying to launch GUI application not from a bundle. OSX considers
the application as command-line utility and passes all user input to the
console, rather than GUI.

OSX is using bundles to organize GUI application files. Bundles are shown
as a single file in the file system (for non-advanced users), but instead
this is a directory with a very strict structure and some extra files in it
(including the executable file).

So what you can do. In the terminal do the following:
cd project1.app/Contents/MacOS
./project1


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


Re: [Lazarus] Font errors in console output on OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 9:52 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 On 2015-06-15 14:15, Dmitry Boyarintsev wrote:
  Carbon is deprecated, no actual interest in fixing the issue.

 Is the issue with Carbon or with LCL-Carbon?


It's LCL-Carbon issue.

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


Re: [Lazarus] Font errors in console output on OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 9:56 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Or is LCL-Qt a better option under OSX?

 You can (should) definitely try LCL-Qt.
LCL-Cocoa is the best option, but it will require lots of patience and bug
reporting.

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


Re: [Lazarus] QuestionDlg block mouse and keyboard input under OSX

2015-06-15 Thread Dmitry Boyarintsev
On Mon, Jun 15, 2015 at 9:35 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Ah. Thank you very much for that info. It is working now. I'll try and
 close/cancel the bug report. I'm very new to development under OSX - I
 guess it shows. ;-)

 The next big thing for a new OSX developer is to get debugger working:

http://wiki.freepascal.org/GDB_on_OS_X_Mavericks_and_Xcode_5

Lots of forum threads about the issue as well.

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


Re: [Lazarus] IDE under OSX causes TDefaultComponentEditor error

2015-05-29 Thread Dmitry Boyarintsev
You probably need to Tools-Rescan FPC Source Directory?

thanks,
Dmitry

On Fri, May 29, 2015 at 7:50 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Hi,

 New Lazarus v1.4 install from the files on SourceForge, using OSX
 10.9.5. If I create a new application and drop a button on the empty
 form, double click the button so I can implement a OnClick event
 handler, the IDE pops up with an error Error in
 TDefaultComponentEditor unable to find method. The IDE also
 opened the lclclasses.pp unit and the Messages Window shows that on line
 26 it can't find the Classes unit.??

 I did some Google searching and found references to this same error back
 in 2010, for Lazarus 0.9.29 under Windows. The forum comments weren't
 much help in my case though.

 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/

 --
 ___
 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] Mac retina pain

2015-05-29 Thread Dmitry Boyarintsev
On Fri, May 29, 2015 at 11:17 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 eg: in Lazarus on OSX I
 pressed F12 to see the form designer, but OSX grabbed the shortcut and
 rather showed be the useless desktop widgets (clock, calendar etc)
 screen.

That's defaults hate. (an application is bad because its defaults are not
matching a users's preference)
OSX shortcuts can be configured. As well as Lazarus shortcuts can be
remapped to be more Nix/Win like.

Just spend some time to configure your environment!

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


Re: [Lazarus] New coding process - TDD is now old school

2015-05-12 Thread Dmitry Boyarintsev
On Tue, May 12, 2015 at 10:56 PM, Dmitry Boyarintsev 
skalogryz.li...@gmail.com wrote:


 ... and porting to Lazarus

 and done! https://havefunsoft.com/share/fpccodemonkey.zip
(win32 tested)

Sadly enough, the GUI version is using Application.ProcessMessages!
You might find that it runs nonblocking proc (with fancy
anonymous/closure functions used), but in the end it all executes in the
main loop running ProcessMessages.

As a matter of fact, the same result could be achieved with TTimer used -
just wait for the first timer event and then sign the song (with
ProcessMessages)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New coding process - TDD is now old school

2015-05-12 Thread Dmitry Boyarintsev
And yes.. the video explains the purpose (and critical need) of ''
identifiers
http://freepascal.org/docs-html/ref/refse4.html#x16-150001.4


On Tue, May 12, 2015 at 10:56 PM, Dmitry Boyarintsev 
skalogryz.li...@gmail.com wrote:

 On Tue, May 12, 2015 at 6:47 PM, Graeme Geldenhuys 
 mailingli...@geldenhuys.co.uk wrote:

 :-)

 But still the video is worth seeing (... and porting to Lazarus)


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


Re: [Lazarus] New coding process - TDD is now old school

2015-05-12 Thread Dmitry Boyarintsev
On Tue, May 12, 2015 at 6:47 PM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 :-)

 Despite of the video could be funny and quite smart (though not original,
since matching code to human language has been out for years)

I foresee the video back-firing at pascal developers:
Are you a pascal (delphi) developer? - go sign about it! or Pascal
(delphi) developers) are real code monkeys.

All in all, if the best application of a language is to create a song
video, we're at the dusk of programming languages evolution.
Or maybe at the dawn of the regression.

But still the video is worth seeing (... and porting to Lazarus)

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


Re: [Lazarus] Feature request/inquiry

2015-04-26 Thread Dmitry Boyarintsev
On Sun, Apr 26, 2015 at 8:13 AM, Michael Van Canneyt mich...@freepascal.org
 wrote:


 At first I thought it would operate directly on the list items itself, but
 it seems it has it's private copy of the data and rebuilds the listview
 using that. For some strange reason the author decided it was enough to use
 an array of strings. Quod non :(


Check this thread, please.
http://forum.lazarus.freepascal.org/index.php/topic,27901.msg

Certainly, having only TextHint property only is not enough.

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


Re: [Lazarus] Feature request/inquiry

2015-04-26 Thread Dmitry Boyarintsev
On Sun, Apr 26, 2015 at 3:17 PM, silvioprog silviop...@gmail.com wrote:


 I implemented this feature in an old project that I maintain,
 LazSolutions, and it was cross-platform.


Nice!  EM_SETCUEBANNER doesn't have Ansi version, it only accepts WideChars
(even for Ansi windows)
But, why was cross-platform? Is it broken now?

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


Re: [Lazarus] Feature request/inquiry

2015-04-26 Thread Dmitry Boyarintsev
On Sun, Apr 26, 2015 at 1:35 PM, luiz americo pereira camara 
luiz...@oi.com.br wrote:


 I implemented here long time ago:
 https://code.google.com/p/luipack/source/browse/trunk/luicontrols/searchedit.pas

 If agreed i can add to LCL as TEdit.TextHint


Two notes here:

#1
for the case of TSearchEdit - it should be (optionally) a stand alone
widget, rather than a hard-coded pure LCL control.
otherwise it would not be rendered properly for OSX
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ControlsText.html#//apple_ref/doc/uid/2957-CH51-SW5

and maybe (https://developer.gnome.org/gtk3/stable/GtkSearchBar.html) gtk3
?

Win32 as well as Qt doesn't seem to have native controls, thus having
LCL-level wrapper is a good solution for them.

#2
Is luipack being moved to other source hosting service? (i.e. github,
sourceforge). code.google is closing.

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


Re: [Lazarus] Feature request/inquiry

2015-04-26 Thread Dmitry Boyarintsev
On Sun, Apr 26, 2015 at 8:58 PM, luiz americo pereira camara 
luiz...@oi.com.br wrote:


 Only TextHint support would be merged to TEdit.


True. TextHint is required for Delphi compatibility in the first place.
But to go a bit better than Delphi, IconHint method could be introduced as
well... as requested by MVC originally!


 In fact SearchEdit is a bad name. Better would be ActionEdit


why ActionEdit?

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


Re: [Lazarus] Version 1.4

2015-04-16 Thread Dmitry Boyarintsev
On Tue, Apr 14, 2015 at 3:26 PM, Bob B. parkingspac...@yahoo.com wrote:

 Unlike RichMemo, with lzRichEdit you don't have to wrestle with svn, just
 download the zip file from


Well, not anymore. I've added a link to a downloadable .zip package for
richmemo.
http://wiki.freepascal.org/RichMemo#Download
It's nightly built.

Btw, previously Alejandro Gonzalo has been using email address:
parkingspac...@yahoo.com
However, now it's Bob B. who is sending the email. Is it a pen name?
I guess gmail classifies this kind of name change as spam.

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


Re: [Lazarus] OSX Dynamically-linked Libraries Need cdecl Exports

2015-04-14 Thread Dmitry Boyarintsev
On Tue, Apr 14, 2015 at 11:02 AM, ADTEC (Pty) Ltd ad...@adtec.co.za wrote:

 Anyone else had this problem?

It's not a problem it's rather a common convention.

Windows platform is using stdcall for dynamic libraries.
Unix platforms (OSX included) is using cdecl.

An example OpenGL binding in FPC are working fine this way.

Also, where do you put the library? I've been copying it to /usr/lib
 to get it to work. How do I store it in the MacOS or Resources
 directory of the .app and have it found at run-time?


Try to put the library into:
youprogram.app/Contents/Frameworks/

https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html

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


Re: [Lazarus] Z-order not working

2015-04-01 Thread Dmitry Boyarintsev
TImage is a graphic control (it doesn't have its own handle), thus cannot
be put above any other control than it's parent.

It should be a place into another control (i.e. TPanel) that is TWinControl
(and does have a handle)

thanks,
Dmitry

On Wed, Apr 1, 2015 at 9:45 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Hi,

 Why can I place a TEdit above a StatusBar, but a TImage I can't? See
 attached screenshot.


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/

 --
 ___
 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] Z-order not working

2015-04-01 Thread Dmitry Boyarintsev
On Wed, Apr 1, 2015 at 10:23 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 And that's where my second (actually I lost count today) problem lies.
 How do I add a TPanel inside a TStatusBar for example. The TStatusbar
 doesn't seem to accept child widgets.

I'd think that's an editor (design time) limitation . TStatusBar is
TWinControl (has it's own handle).
Thus it can accept any child control.

If you assign Panel's parent in run time
Panel1.Parent:=StatusBar1;
You might get what you're looking for.

Keep in mind though StatusBar rearranges its children automatically.


 So based on that and what you said, I have to now place a TPanel on the
 form, then place a TImage inside the TPanel, then make sure the z-order
 of the TPanel is correct so it appears above the TStatusBar, then
 position the TPanel at the correct location relative to the right edge
 of the statusbar. This is a pretty nasty solution.


The only nastiness about it is that TPanel might draw a background, thus
the transparent image would look square.
Let me see...
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Z-order not working

2015-04-01 Thread Dmitry Boyarintsev
On Wed, Apr 1, 2015 at 9:45 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Why can I place a TEdit above a StatusBar, but a TImage I can't? See
 attached screenshot.

Follow up on the forum.
http://forum.lazarus.freepascal.org/index.php/topic,27932.0.html

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


Re: [Lazarus] Can the Lazarus IDE itself be compiled for a different OS and architecture?

2015-03-31 Thread Dmitry Boyarintsev
On Tue, Mar 31, 2015 at 11:25 AM, vfclists . vfcli...@gmail.com wrote:


 Is it possible to compile the Lazarus version of Windows 32bit or 64bit on
 a Linux system, including the components, zip it up and transfer it to a
 Windows system for installation?


It is possible, as long as FPC cross-compilers are set up.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazbuild command options.

2015-03-26 Thread Dmitry Boyarintsev
On Thu, Mar 26, 2015 at 9:47 AM, vfclists . vfcli...@gmail.com wrote:

 Is there a document with more detail on the syntax of lazbuild's options?
 lazarus --help doesn't offer much.

 Web version of lazbuild --help
http://wiki.freepascal.org/lazbuild

Are you looking for something specific?

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


Re: [Lazarus] Errors in win32winapi.inc and elsewhere spotted by compiler

2015-03-24 Thread Dmitry Boyarintsev
On Tue, Mar 24, 2015 at 2:06 PM, Juha Manninen juha.mannine...@gmail.com
wrote:

   // ToDo: Fix Result and the loop. I is not used for anything.
   for I := 0 to FrameWidth - 1 do
 Result := Boolean(DrawEdge(DC, ARect, Edge[Style], BF_RECT or
 BF_ADJUST));


false positive.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd162477%28v=vs.85%29.aspx
BF_ADJUST causes ARect to be different on every call. Side-effect function
:)

hmm... of is DrawEdge declaration wrong having ARect be passed as const
rather than var?

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


Re: [Lazarus] Errors in win32winapi.inc and elsewhere spotted by compiler

2015-03-24 Thread Dmitry Boyarintsev
On Tue, Mar 24, 2015 at 4:36 PM, Dmitry Boyarintsev 
skalogryz.li...@gmail.com wrote:

  of is DrawEdge

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


Re: [Lazarus] Errors in win32winapi.inc and elsewhere spotted by compiler

2015-03-24 Thread Dmitry Boyarintsev
On Tue, Mar 24, 2015 at 4:36 PM, Dmitry Boyarintsev 
skalogryz.li...@gmail.com wrote:

 hmm... or is DrawEdge declaration wrong having ARect be passed as const
 rather than var?

 it's var!
function DrawEdge(hdc: HDC; var qrc: TRect; edge: UINT; grfFlags: UINT):
BOOL; external 'user32' name 'DrawEdge';

Imho, the compiler should be adjusted for these cases not to give a note.
Since number of iterations is important in this case, not the iterator
value.

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


Re: [Lazarus] Errors in win32winapi.inc and elsewhere spotted by compiler

2015-03-24 Thread Dmitry Boyarintsev
On Tue, Mar 24, 2015 at 2:06 PM, Juha Manninen juha.mannine...@gmail.com
wrote:

 I also added some ToDo items for things I could not fix.
 I would need help for the ToDo items especially in LCL-Win32 code. I
 know there are people here who know that code.
   // ToDo: WinBmp is not initialized at all. Should it be initialized from
 Bmp?
   HasAlpha := (Windows.GetObject(bmp, SizeOf(WinBmp), @WinBmp)  0)


According to the specs, there's no need for initialization.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd144904%28v=vs.85%29.aspx

It's pure out parameter. (for parameters requiring initialization it would
be _In_ or _In_Out_)

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


Re: [Lazarus] Ways of making new style design

2015-03-23 Thread Dmitry Boyarintsev
On Mon, Mar 23, 2015 at 4:47 PM, Felipe Monteiro de Carvalho 
felipemonteiro.carva...@gmail.com wrote:

 Please don't use our mailling list for propaganda of unrelated
 software, fpgui has its own communication channels, use them to talk
 about fpgui.


Didn't Greame do that for the past 10 years anyway?  Competition should be
welcomed :)

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


Re: [Lazarus] Ways of making new style design

2015-03-23 Thread Dmitry Boyarintsev
On Mon, Mar 23, 2015 at 4:53 PM, Felipe Monteiro de Carvalho 
felipemonteiro.carva...@gmail.com wrote:

 Yes, our mailling list has had almost no moderation since 10 years.

 That's why I prefer the forum.


The topic is (was?) ignored on the forum:
http://forum.lazarus.freepascal.org/index.php/topic,27827.msg172439/topicseen.html#new

I personally would ban anyone who double-post on forum and the mail list :)
(no offense, Ara!)
But I can understand why people are doing that.

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


Re: [Lazarus] How to cast a Interface to a Object in Lazaeus

2015-03-13 Thread Dmitry Boyarintsev
On Fri, Mar 13, 2015 at 10:21 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 Sorry, but that is a false statement. It works for both COM and CORBA
 interfaces. Simply don't use the 'as' syntax - just cast it.


Wait, how can a syntax work, if not used? :)

Don't forget that Pascal is safe-type language.
So as has also intent of checking an interface for being castable to an
object instance.

If an interface is originating from non-FPC environment (i.e. delphi, c++
or whatever langauge)  such casting should fail.
This is not the case for OP, but should be used as good practices.

Please note that casting Interface to TObject via as was not originally
in the compiler. It was eventually added for Delphi compatibility.
Previously compiler would just fail with an error that interface is not
castable to object at all (I.e. Delphi 7 won't allow the syntax as well)

http://www.freepascal.org/docs-html/ref/refsu47.html#x141-15100012.8.7

thanks,
Dmitry

P.S. By the way, if different versions of FPC are used (i.e. an interface
is loaded from a DLL) and then interface is typecasted to an object via
as. It might cause problems if TObject structures are different between
host application and the library. But using interfaces only prevents the
problem.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to cast a Interface to a Object in Lazaeus

2015-03-13 Thread Dmitry Boyarintsev
On Fri, Mar 13, 2015 at 5:49 AM, aradeonas aradeo...@operamail.com wrote:

 OK,So in the end how can I cast a Interface to a Object in Lazarus?


The syntax show here:
http://docwiki.embarcadero.com/RADStudio/XE7/en/Interface_References#Casting_Interface_References_to_Objects
works in FPC as well.

 var
   LIntfRef: IInterface;
   LObj: TInterfacedObject;
 begin
   { Create an interfaced object and extract an interface from it. }
   LIntfRef := TInterfacedObject.Create();

   { Cast the interface back to the original object. }
   LObj := LIntfRef as TInterfacedObject;
 end

BUT, it would only work, if you're using COM interfaces (wont work corba).
It works for COM interfaces only because FPC just checks that an interface
implements IObjectInstance (via COM queryinterface method).

IObjectInstance: TGuid = '{D91C9AF4-3C93-420F-A303-BF5BA82BFD23}';

All pascal objects implement it, thus you don't have to specify it
implicitly.

If you're not using COM interfaces, then you'll need to add getObject()
method to your interface.

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


Re: [Lazarus] QT5 progress?

2015-03-04 Thread Dmitry Boyarintsev
Hello Den,

Do you've to make libraries manually or is there an automated process to
generate them?

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


Re: [Lazarus] Game development walkthrough: A simple example using Bare Game

2015-02-09 Thread Dmitry Boyarintsev
The GL wrapper (bare.games in this case ) depends on the GL settings not to
be modified outside of it. The example does the exact hack.
The functionality can be achieved should be implemented using Cameras, then
the example should show it. Camer should be in minimal set for APIs

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


Re: [Lazarus] Game development walkthrough: A simple example using Bare Game

2015-02-09 Thread Dmitry Boyarintsev
Criticism: mixing low-level opengl functions with higher-level APIs is a
bad design.
Either higher-level apis needs to be updated to allow the desired
functionality(which is achieved by direct calling gl functions) or not used
at all.

thanks,
Dmitry

On Mon, Feb 9, 2015 at 5:58 AM, Anthony Walter sys...@gmail.com wrote:

 A walkthrough of the new draw example in Bare Game is here:

 http://www.getlazarus.org/videos/baregame/

 --
 ___
 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] Mac retina pain

2015-02-05 Thread Dmitry Boyarintsev
On Thu, Feb 5, 2015 at 4:33 PM, Mattias Gaertner nc-gaert...@netcologne.de
wrote:

 On Thu, 5 Feb 2015 21:53:31 +0100
 Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote:
 Or maybe just give up debugging in Mac OS X ... long
  live WriteLn!!!

 Go writeln, go!

The most annoying part is that Lazarus keeps bugging me on Start about
you'll have unpleasant experience, while no debugger is selected. Or was
it fixed, just to give the warning on the first start?

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


Re: [Lazarus] GUI design: fixed height panel at bottom

2015-01-07 Thread Dmitry Boyarintsev
The bottom panel should have alignment alBottom. The top panel shoud have
alClient

Thanks,
Dmitry

On Wednesday, January 7, 2015, Marc Santhoff m.santh...@web.de wrote:

 Hi,

 as the subject line says, I want to have a panel attached to the bottom
 and the sides of a form, which is pretty easy to to using the anchor
 editor.

 What I can't do is make this panel fixed height. Setting it's propety
 height in OnREsize of the form doesn't work, I think the other anchors
 reset the height according to their rules.

 The panel will hold some components visible in any case, while the rest
 of the for above (in another panel) will show a set of varying
 components depending on context.

 How can this be made?

 -
 |   |
 |   |
 |   |
 |height varying when form resized   |
 |   |
 |   |
 |   |
 |---|
 |   |
 |   height fixed|
 |   |
 -

 --
 Marc Santhoff m.santh...@web.de javascript:;


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org javascript:;
 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] GUI design: fixed height panel at bottom

2015-01-07 Thread Dmitry Boyarintsev
On Wed, Jan 7, 2015 at 11:45 PM, Marc Santhoff m.santh...@web.de wrote:

 In principle that approch is working, but seemingly using the align
 property and anchors together produces unexpected results - at least for
 me.


In this simple design you don't need to use anchors at all.
Alignment does it for you.
If you need a margin from the sides of the form you can use border property
of each panel.

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


  1   2   3   4   >