Project Editors Factory...

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
STARGÅTE
Addict
Addict
Posts: 1436
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Project Editors Factory...

Post by STARGÅTE »

HeX0R wrote:I guess the problem is, that a DLL has no direct access to any objects, like Gadgets, Windows, created in the main program.
You would have to move the whole Gadget handling into the DLL (via BindEvents) and keep the main loop outside in the main.
Maybe add another few wrapping procedures to the dll, so main will still be able to access gadgets.

But this is all nothing but theory, I have no idea which problems there really are.
You are right.
We already discussed this problem, and mk-soft has shown some code:
viewtopic.php?f=12&t=75840
It works with all gadget functions, but not with the StartVectorDrawing inside the DLL and in the main code.
But when I have to start the drawing new for each object, the drawing will become very slow. So I stopped my investigation into this direction.
PB 5.73 ― Win 10, 20H2 ― Ryzen 9 3900X ― Radeon RX 5600 XT ITX ― Vivaldi 3.6 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
HeX0R
Enthusiast
Enthusiast
Posts: 632
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Project Editors Factory...

Post by HeX0R »

O.k., so objects (like Gadgets) are created by users in the main scope, and your ... library, dll, so, whatever needs to do some action on them, best without any API.
That's tricky, agreed.
Although I like the solution from mk-soft, I don't think this is very practicable.
You would need to create dlls for each PB version then, right?
Same would be true for user libraries, they will break at some PB update and all are left with empty hands (as happened too often already).

I still think providing the code is the best solution, no need to provide it for free, though.
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.
ShadowStorm
User
User
Posts: 99
Joined: Tue Feb 14, 2017 12:07 pm

Re: Project Editors Factory...

Post by ShadowStorm »

Hi, Yes the easiest way would be to provide the code but I don't want it now, probably later :)

Stargate also want to give the code, I don't agree, it's a very big project and we are two on it !

Stargate code, I do all the rest !
It is on the other hand obvious that I prefer to give the code than to see it abandoned, but I don't want that we take advantage of our work to get rich or to grant ourselves the rights...

So we're stuck on the creation of DLL or user library...
So how can we do otherwise?
I am French, I do not speak English.
My apologies for the mistakes.
User avatar
HeX0R
Enthusiast
Enthusiast
Posts: 632
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Project Editors Factory...

Post by HeX0R »

I can only speak for myself:
I never would use a dll which depends on the PB version and also never would use any user lib, no matter how fancy that product is.

You are using PB objects of any kind intensively, from my point of view the one and only easy and future proof solution, without increasing complexity too much, is to offer the source.
You should also take into account:
Although this project looks really cool, in the end it is something which not many people will make use of it. It is just too special to be a high runner.

Anyway, I don't want to frustrate anyone, those are just my personal thoughts, and I think I'm out of that discussion now.
I don't want to be the responsible guy, who made that project die ;)
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3715
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Project Editors Factory...

Post by wilbert »

ShadowStorm wrote:So we're stuck on the creation of DLL or user library...
So how can we do otherwise?
In the past there was the TailBite project
viewforum.php?f=26
I never used it but if it could be updated to work with the current PureBasic version, it might do what you want.
Another option might be to redo your project in C since it's easier to create a user library from a C source.
macOS 10.15 Catalina, Windows 10
Mindphazer
Enthusiast
Enthusiast
Posts: 163
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Project Editors Factory...

Post by Mindphazer »

HeX0R wrote:I can only speak for myself:
I never would use a dll which depends on the PB version and also never would use any user lib, no matter how fancy that product is.
Furthermore, one of the biggest PB's advantage is that it's DLL free and i'd never use any user lib either (i did it in the past, and it brought too many problems)
MacBook Pro 13" Retina - 16 Gb - OSX 10.15 - Iphone X - iPad at home
...and unfortunately... Windows at work...
ShadowStorm
User
User
Posts: 99
Joined: Tue Feb 14, 2017 12:07 pm

Re: Project Editors Factory...

Post by ShadowStorm »

Hello HeX0R,

Don't worry, I thank you for your frankness, I like it, when you say it nicely it passes :)

I never said that the project would remain secret all the time...
I can also change my mind !

For the moment it stays like that but afterwards we'll see if we can make it public, what scares me is that some people exploit our code for commercial or personal purposes (they make the code for themselves).
And I really think this project is fantastic ;)

@wilbert, thank you, but I don't know how to code in C and anyway no matter the lange, I wouldn't know how to do !
@Mindphazer, thank you, I take note of this too !
I am French, I do not speak English.
My apologies for the mistakes.
FlatEarth

Re: Project Editors Factory...

Post by FlatEarth »

Whether this project is still under development?
User avatar
STARGÅTE
Addict
Addict
Posts: 1436
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Project Editors Factory...

Post by STARGÅTE »

From the coding aspect, I'm working currently on an attachment system (to make objects to child of other objects), where I make a good progress. Further I try to include the rotation of objects, where I make nearly no progress. When I have started this project, no rotation was planned. That means it is now i little bit tricky to implement in all coordinate transformations for display and events.

From the publication aspect, it is up to ShadowStorm what happens next.
PB 5.73 ― Win 10, 20H2 ― Ryzen 9 3900X ― Radeon RX 5600 XT ITX ― Vivaldi 3.6 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
Mijikai
Addict
Addict
Posts: 873
Joined: Sun Sep 11, 2016 2:17 pm

Re: Project Editors Factory...

Post by Mijikai »

Mby this helps (i only have Windows to test) :)

DLL:

Code: Select all

EnableExplicit

Global hwnd.i
Global canvas.i

Procedure.i Callback()
  UseGadgetList(hwnd)
  Select EventType()
    Case #PB_EventType_MouseMove       
      MessageRequester("","")
  EndSelect
EndProcedure

ProcedureDLL.i ext_canvas(hwnd.i,x.i,y.i,w.i,h.i,flags.i)
  UseGadgetList(hwnd);get the 'scope'
  canvas = CanvasGadget(#PB_Any,x,y,w,h,flags)
  If canvas
    BindEvent(#PB_Event_Gadget,@Callback())
  EndIf
  ProcedureReturn canvas
EndProcedure

ProcedureDLL.i ext_canvas_draw(hwnd.i)
  Protected res.i
  UseGadgetList(hwnd)
  If StartDrawing(CanvasOutput(canvas))
    res = #True
    Box(10,10,50,50,#Red)
    StopDrawing()
  EndIf
  ProcedureReturn res
EndProcedure
Prog:

Code: Select all

EnableExplicit

Import "test_dll.lib"
  ext_canvas.i(hwnd,x.i,y.i,w.i,h.i,flags.i)
  ext_canvas_draw.i(hwnd.i)
EndImport

Procedure.i Main()
  Protected ext.i
  If OpenWindow(0,0,0,320,200,#Null$,#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
    ext = ext_canvas(WindowID(0),10,10,200,100,0)
    Debug ext
    Debug ext_canvas_draw(WindowID(0))
    Repeat
      Select WaitWindowEvent() 
        Case #PB_Event_CloseWindow
          Break
      EndSelect
    ForEver
    CloseWindow(0)  
  EndIf  
  ProcedureReturn #Null
EndProcedure

Main()

End
FlatEarth

Re: Project Editors Factory...

Post by FlatEarth »

@STARGÅTE: thanks.
Does this module perform copy and paste operations for container controls correctly?
in pb designer, after pasting the container control, all its children are transferred to the main window.
User avatar
STARGÅTE
Addict
Addict
Posts: 1436
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Project Editors Factory...

Post by STARGÅTE »

After some discussions with ShadowStorm we have decided to publish the code next weekend under certain conditions!
The include/module itself has a small documentation about all functions and constants, but we also want to give you some examples, hot to use the module.

@FlatEarth:
Currently the module has no function like CopyObject or PastObject. But I think I can write a procedure like DuplicateObject() with an option: with or with out childs. After this duplication you can move the duplicant to the "paste" position.

@Mijikai:
Thanks for the code, but we have stopped the idea to create a DLL out of the code.
PB 5.73 ― Win 10, 20H2 ― Ryzen 9 3900X ― Radeon RX 5600 XT ITX ― Vivaldi 3.6 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
ChrisR
Enthusiast
Enthusiast
Posts: 246
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Project Editors Factory...

Post by ChrisR »

It's a good news, thanks to both of you for the future publication 8)
The démo is really interesting. I'd be happy to test it, if I meet the license conditions!
ShadowStorm
User
User
Posts: 99
Joined: Tue Feb 14, 2017 12:07 pm

Re: Project Editors Factory...

Post by ShadowStorm »

Hello to all.

The project is NOT ABANDONED, I reassure you!
And there is still a lot to add and with your opinions and criticisms, even more :)

In a few days, the code will be online, but there are still things to do!

I know that you are very impatient to see the possibilities of the program!

I made all the examples myself, but there is still a lot missing to really see the power of the code!

So buckle up, because it's going to be a blast!
Hello to all,

You waited so long for it, even though some of you didn't believe in it and even made fun of it!
He had opinions, criticisms etc., it appeared that this project had about 0.2% to see the light of day according to some.
But other more constructive criticisms too, such as the wish to make the code public!

We tried to create a DLL of the project, but also a library, it was simply a resounding failure!
No way to know how to protect the code, I didn't want to give it to the base because I was afraid of abuse and appropriation!

As time went by, the project was put aside a little bit but we have a little
go ahead anyway (well, when I say "we", it's mostly "Stargate") :)

After some time of reflection and taking into account certain opinions, and especially the fact that some people I don't know
came to ask Stargate where the project is at and that they started to press the cork....

I conclude like him that this project is interesting in the end, and you won't be disappointed.
but I think I misspoke as I often do, alas!

This module is not going to create your editor the fingers in the nose eh, it's up to you to do it!
It's a bit like a game creation software where you have to code to make your game!

Here it's the same thing but for Object editors!
Everything has been thought to make it very easy to use, but it is possible to make it even simpler!

Your editors, your Objects, it's up to you to do the rest!
The particularity of this module is to be able to customize and manipulate objects as you wish.

It is not enough to create an Object, you must also give it an appearance and behaviors with simplistic functions!

Create an Object wherever you want on the editor
Give an image to this object (Appearance)
Then, why not give it a standard or customized cursor when the mouse passes over it?
And while we're at it, let's give standard or custom handles to our Objects, to move or resize them with the mouse, in the desired directions.
And why not restrict our Objects, minimum and maximum X and Y position on the canvas, minimum and maximum size on the canvas, resize them or move them by "steps".
And why not create "Container" type Objects, in the form of a hierarchy of parents and children.

Find all the information of the Objects, their position, their size, etc...
And many other things (not exhaustive) !
And many other even crazier things, which will come later!

With this very powerful tool under development, you will be able to create your own editor!
Why not a drawing editor, a vector editor, etc...
Or even a game editor, let's be crazy!
Or even crazier, a visual editor!

This tool will allow you to create your own editors, but it won't do the job for you!
Don't wait for things to happen to you, you have to provoke them! (Quote from the movie: The Chess Champion on YT)

We found a suitable license for the module.
If I am not mistaken: https://creativecommons.org/licenses/by-nc/4.0/

But we will see how to implement it.

Editors Factory is coming directly to your place next weekend if all goes well.
So drool a lot and prepare the popcorn because it's going to blow your mind!
I am French, I do not speak English.
My apologies for the mistakes.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 131
Joined: Tue Jan 04, 2011 6:21 pm

Re: Project Editors Factory...

Post by SPH »

ShadowStorm wrote:Stargate code, I do all the rest !
:lol:
http://HexaScrabble.com/
!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 5.73LTS - 32 bits
Post Reply