It is currently Sun Mar 07, 2021 10:24 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Project Editors Factory...
PostPosted: Tue Sep 29, 2020 7:18 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1403
Location: Germany, Glienicke
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:
https://www.purebasic.fr/english/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.

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Tue Sep 29, 2020 7:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 625
Location: Hell
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Tue Sep 29, 2020 9:09 pm 
Offline
User
User

Joined: Tue Feb 14, 2017 12:07 pm
Posts: 94
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Tue Sep 29, 2020 11:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 625
Location: Hell
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Wed Sep 30, 2020 5:13 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3712
Location: Netherlands
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Wed Sep 30, 2020 10:34 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Sep 10, 2012 10:41 am
Posts: 161
Location: Savoie
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...


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Wed Sep 30, 2020 10:41 am 
Offline
User
User

Joined: Tue Feb 14, 2017 12:07 pm
Posts: 94
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Fri Dec 25, 2020 2:53 pm 
Whether this project is still under development?


Top
  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Fri Dec 25, 2020 9:24 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1403
Location: Germany, Glienicke
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.

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Fri Dec 25, 2020 11:11 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 842
Mby this helps (i only have Windows to test) :)

DLL:
Code:
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:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Sat Dec 26, 2020 2:12 am 
@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.


Top
  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Sat Jan 09, 2021 4:58 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1403
Location: Germany, Glienicke
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.

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Sat Jan 09, 2021 9:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jan 08, 2017 10:27 pm
Posts: 210
Location: France
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Mon Jan 11, 2021 6:43 pm 
Offline
User
User

Joined: Tue Feb 14, 2017 12:07 pm
Posts: 94
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!

Quote:
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Project Editors Factory...
PostPosted: Tue Jan 12, 2021 4:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Jan 04, 2011 6:21 pm
Posts: 131
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye