Welcome, Guest
Username: Password: Remember me
General Purpose Components and Libraries, discussions, problems and suggestions

TOPIC:

[LAB] Cindy components 13 years 10 months ago #2199

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31
Let's clear something once for all:

LM_DRAWITEM is replacement for WM_DRAWITEM, not for CN_DRAWITEM!

In Delphi CN_DRAWITEM is defined like:

CN_DRAWITEM = CN_BASE + WM_DRAWITEM;

In Lazarus CN_DRAWITEM is defined like:

CN_DRAWITEM = CN_BASE + LM_DRAWITEM;

Original procedure in cyBaseButton looks like this:

procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;

so it should be like

procedure CNDrawItem(var Message: TLMDrawItems); message CN_DRAWITEM;

in Lazarus.

Hope this will help. I do not have time to test, and do not have Windows machine with installed CT.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2200

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor
@Viking: probably a very good point. :cheer: But it did not help unfortunately :S The message LM_DRAWITEM is simply not generated.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2202

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

RockyLuck wrote: @Viking: probably a very good point. :cheer: But it did not help unfortunately :S The message LM_DRAWITEM is simply not generated.


Would you please make simple steps to reproduce and if possible images with result as it should be (from Delphi) as what you actually get (in Lazarus). That would probably help us all to understand what we get and what we trying to accomplish.

I will try to install CT in some Windows machine when I find some time and to see can I somehow help with this.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2203

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor
@Viking: your assumption that the message to catch was CN_DRAWITEM was understandable, probably this should have happened, but it was not correct. This is the code for handling the WM_DRAWITEM in function WIndowProc (file Win32callback.inc):

WM_DRAWITEM:
    begin
    .
    .
        end else
        begin
          with TLMDrawItems(LMessage) do
          begin
            Msg := LM_DRAWITEM;
            Ctl := 0;
            DrawItemStruct := PDrawItemStruct(LParam);
          end;

So, no translation to CN_DRAWITEM there.

Windows is responsible for generating the WM_DRAWITEM message. It does that if the control is "OwnerDrawn". That's what basically is wrong with the LCL implementation: the control is not set to owner drawn (Delphi does this correctly).

I inserted an override for CreateParams in cyBaseButton:

procedure CreateParams(var Params: TCreateParams); override;
    .
    .
procedure TcyBaseButton.CreateParams(var Params: TCreateParams);
begin
   inherited CreateParams(Params);
   with Params do Style := Style or BS_OWNERDRAW;
end;

That did something! Some buttons started to look more or less OK. Some would only show if clicked. I recompiled Lazarus with this change in the pl_Cindy package and strangely enough at design time the buttons now showed only their caption :S

What it does show is that Cindy will only run in a Windows environment with some of its controls. That is not what I'm looking for. :angry:

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2213

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

RockyLuck wrote: @Viking: your assumption that the message to catch was CN_DRAWITEM was understandable, probably this should have happened, but it was not correct. This is the code for handling the WM_DRAWITEM in function WIndowProc (file Win32callback.inc):


I just had another quick look at pl_Cindy package.

More CN* and CM* messages are incorrectly translated as LM* messages! Some inherited calls that are required are commented out. I would start from there.

I installed CT on Windows 7 x64 in VirtualBox so I can check some of the samples there.

Would you please compile some of the samples included in CodeOcean with Delphi and post some screenshots? I need to see how those components should look when work properly in order to try to fix them.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2214

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

viking wrote: More CN* and CM* messages are incorrectly translated as LM* messages!

They are only translated "incorrectly" because Lazarus does not correctly translate them into CN messages. That's no fault on behalf of the pl_Cindy package.

This is the image of the cyAdvButton demo when compiled with Delphi 7:



Hope this helps :unsure:

Please Log in or Create an account to join the conversation.

Last edit: by RockyLuck.

[LAB] Cindy components 13 years 10 months ago #2220

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

RockyLuck wrote:

viking wrote: More CN* and CM* messages are incorrectly translated as LM* messages!

They are only translated "incorrectly" because Lazarus does not correctly translate them into CN messages. That's no fault on behalf of the pl_Cindy package.


I was talking about wrong code conversions done by someone from CT team while converting Cindy to Lazarus.

I was talking about things like this:

For example in cyBaseSpeedButton.pas

there is
procedure CMMouseEnter(var Message: TLMessage); message LM_MOUSEENTER;
instead of
procedure CMMouseEnter(var Message: TLMessage); message CM_MOUSEENTER;

Also
procedure CMMouseLeave(var Message: TLMessage); message LM_MOUSELEAVE;
instead of
procedure CMMouseLeave(var Message: TLMessage); message CM_MOUSELEAVE;

In
procedure TcyBaseSpeedButton.CMMouseEnter(var Message: TLMessage);

Inherited; is commented, but it is needed there.

... and so on.

RockyLuck wrote: This is the image of the cyAdvButton demo when compiled with Delphi 7:



Hope this helps :unsure:


Thank you. That is what I was looking for.

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

[LAB] Cindy components 13 years 10 months ago #2223

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Thanks Sir
we will fix these problems
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2225

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

sternas wrote: Thanks Sir
we will fix these problems


I do no use those components, so I only write about things that I noticed while checking what is done. I also would suggest to convert latest version, since I also noticed that this is not the latest version.

I am not sure that those changes that I mentioned will make all components work like in Delphi, but I hope that at least some of them will start to work better (or even as they planed to work).

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2230

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
Cindy v5.03 released!

Added TcyBook component:
https://sourceforge.net/projects/tcycomponents/screenshots/328505
Virtual book with turn page effect (perfect for android devices), page rendering etc ...

Also added TcyBook and TcyDebug demo.

Mauricio

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2233

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Thanks Sir
We port ver 5.0.3 on windows
now we must solve some graphic problems (cyGraphics.pas)
more news later...




and large image
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

[LAB] Cindy components 13 years 10 months ago #2234

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Port of ver 5.0.3 on Wince finish
(CodeTyphon crossbuild Ability)
Emulator with Windows Mobile 6.5.3





and big image
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2235

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Port of ver 5.0.3 on Solaris/OpenIndiana 64 finish

CodeTyphon Studio Power...
tomorrow Linux and FreeBSD ports




and big image
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

[LAB] Cindy components 13 years 10 months ago #2236

  • felixsg
  • felixsg's Avatar
  • Visitor
  • Visitor
what are the ETA for 2.80?

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2237

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Sir
ETA for ver 2.80, 5-6 days
if all lab tests are OK
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2240

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

sternas wrote: Sir
ETA for ver 2.80, 5-6 days
if all lab tests are OK



1. What about the glyph problem for some buttons as reported in this thread?

2. Can you tell which Cindy components will only work on Windows systems?

Thanks :)

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2242

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4620
  • Thank you received: 1132
Sir
Our opinion is that, these are small problems.

Please don't forget that
CodeTyphon Studio is a free project
and it's not a company product, we don't have customers...

We have friends with the same passion: Pascal Programming
we have friends with the same vision:
to create a Pascal Programming Platform (CT),
which will be the most powerful Programming Studio on this planet
And we also believe it's NOT a dream anymore...

With this philosophy, some errors will exist.
and we can work together to solve these issues.

Have fun...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2243

  • felixsg
  • felixsg's Avatar
  • Visitor
  • Visitor
Thank's by all

If I remenber well I use Pascal the first time with delphi 2
I try to help you sometime in the future

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 10 months ago #2246

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

sternas wrote: Sir
Our opinion is that, these are small problems.

Please don't forget that
CodeTyphon Studio is a free project
and it's not a company product, we don't have customers...


I understand that. The questions were not meant as criticism. They were just questions ;)

The cyAdvButton problem is not a small problem, if you want to use the cyAdvButton in a project. It just does not work. Again: no criticism, just an observation.

The question to be able to plan my projects: is that problem solved in release 2.80?

Which brought me to the next question: which packages or which components are not portable? In the current state, the cyAdvButton is not portable, because the WM_DRAWITEM message is not provided by the Linux implementations of Lazarus. If I want to produce a completely portable program, which components should I avoid?

Maybe, in the Lazarus' components directory, in the next release, you could add a file to describe that. :unsure:


sternas wrote: With this philosophy, some errors will exist.
and we can work together to solve these issues.


I agree and I did: I already supported you guys by providing the missing skins for the Lava package.

It's just that the cyAdvButton problem is too complicated for me.

Regards ;-}
Dick

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 13 years 9 months ago #2255

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
Cindy V5.05 released!

Big improvments (speed up using windows gdi) made in TcyBook component!

Cindy components V5.05
15/07/2012 - cyBook.pas - We can see now page behind on the turn page effect!
14/07/2012 - cyBook.pas - Small bugs fixed + improvments
14/07/2012 - cyBook.pas - Despite it is not coherent in real book, we can set page with odd (1,3,5 etc ...) numbers to CurrentLeftPage property
13/07/2012 - cyBook.pas - Added TTurnPageAnimation.DoubleBuffered: Boolean property
13/07/2012 - cyBook.pas - Replaced use of BitmapResize() that is too low by DrawCanvas()
12/07/2012 - cyBook.pas - Removed prFitMediumQuality and prStretchMediumQuality to TPageRender
12/07/2012 - cyBook.pas - Modified BeforePreparePage event in order to able custom page rendering or/and use external page resizing engine.
12/07/2012 - cyBook.pas - Added OnLeftPageClick and OnRightPageClick events
12/07/2012 - cyProgressionPanel.pas - Added property State to public declaration
12/07/2012 - cyAdvProgressionPanel.pas - Small bug fixed on .Open procedure (avoid error if we call several times open();)
12/07/2012 - cyAdvProgressionPanel.pas - Added property State to public declaration
11/07/2012 - cyBook.pas - Some optimization and added read/write property access to TBookPageView (for exemple TBookPageView.Page: TBitmap)
11/07/2012 - cyBook.pas - Turn page with mouse if page dragged and not clicked
11/07/2012 - cyBook.pas - Added DblClick event
11/07/2012 - cyBook.pas - Added boFitSmallImages and boStretchSmallImages to Options

Regards,
Mauricio
Attachments:
The following user(s) said Thank You: Miquel Matas

Please Log in or Create an account to join the conversation.