Hello /g/,
As I am look forward to the summer break I wonder about a project I want to make. I want to build a GUI based code editor for webdevelpment. I want it very much like visual studio(you can drag and drop items and resize them and style them etc in the main application , but you can also change it in the code).
I don't realy have a clear idea on how i can do that though.. i get stuck at the dragging and dropping part. How would one code that?
If(drag)
If(preop) then drop
Else if(postop) then OP
<endcode>
Real time display plus content editable
>>54577963
>winforms
ewwwwww
>>54577963
>webdevelpment
>you can drag and drop items and resize them
Here is the problem for you, HTML/CSS is not designed for some kind of absolute positioning relative to a fixed size field, but rather items taking up space based on their content or allowed a minimum/maximum relative the users' viewport.
You'll need some kind of universally compatible mapping from drag-dropped items to how they appear in any browser to implement the drag/drop thing of visual studio.onMouseDown{drag = True; p0 = (0,0) }
onMouseUp{ drag = False; item.pos = p - p0 }
onMouseMove{ if drag { p = p + increment }
>>54578573
The code block and explanation above it are not related btw
>>54577963
Use opengl to draw the gui elements and freetype or whatever windows uses to draw text.