libglui / glui

GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, using GLUT or FreeGLUT.
Other
194 stars 82 forks source link

Adds copy & paste to EditText control (ONLY) for review, and fixes so… #64

Closed m-7761 closed 5 years ago

m-7761 commented 7 years ago

This relates to https://github.com/libglui/glui/issues/62

IMPORTANT: I have not added changes to CMakeLists.txt. It requires find_package(X11) in some capacity. I've heavily edited my copy so I can do things with it.

I've never done this (pull request) before. There's some quality stuff here, but it's not really complete or anything. It's just the end of this line of work for myself.

Before I proceed I must reformat all of the code so I can read it (it's really written crazily--not uncommon--and it shows in places that the programmers could not follow their own code as written. I certainly can't.)

I didn't implement copy & paste wherever there is text because I'm of the mind that that would be a pointless exercise since the textbox logic requires unification and I need to reformat the code and make room in my schedule for that. (The TextBox control doesn't really work with regard to selection, so it will be more work to correct that before it can copy/paste.)

I've already become very sidetracked preparing this. And setting up project space for GLUI. I need to return to COLLADA-DOM for a little while.

There's a Win32 demo here ( http://www.swordofmoonlight.net/holy/ColladaDOM_3_Reference_Viewer.zip ) that uses a GLUI location bar and downloads a COLLADA file if a URL/file isn't provided by the command-line.

m-7761 commented 7 years ago

P.S. I would like to have "write access" per the notification I'm seeing on this page:

Only those with write access to this repository can merge pull requests.

I am just interested in further development happening at an accelerated pace. I'm fully available for discussion at all times and always cheerful and pleasant :)

m-7761 commented 7 years ago

The members I renamed with a __removed__ or __removing__ prefix can be removed. I was thinking about keeping the "ABI" intact, but I just remembered changing the char_widths member from an extravagant kilobyte to a senseless 128Bs (extended Latin codes could overflow that buffer if GLUT is not ASCII.)

m-7761 commented 7 years ago

I added two comments just now that may not appear here. I don't know if it's any help, but as long as the GLUquadric typedef cannot be avoided it should be "class" instead of "struct" (woops.)

And second point of order set_glutMotionFunc(Int2_CB f) and set_glutPassiveMotionFunc(Int2_CB f) should be added to GLUI_Master_Object. EDITED: I also neglected to put "GLUI_Master_Object::" in front of these after I moved them to glui.cpp. I guess I neglected to build it :(

It needs to be possible to write wrappers around these. But I think better (eventually) would be to do something like #define glutMotionFunc gluiMotionFunc so that A) it's very hard to mess up, and B) so users not using GLUT (if that Unicode back-end is completed) don't interface with it.

nigels-com commented 7 years ago

I rebased this branch and resolved some minor conflicts here: https://github.com/nigels-com/glui/tree/mick

m-7761 commented 7 years ago

I made a second commit to fix the build conflicts. (I found a new one in GLUI_clipboard.cpp where including glui.h and so defining GLUI_GLX needed to be moved before the X11 include.)

I'm surprised that the second commit is automatically in this pull-request. I guess that's an easy way to update the PR! I tried to make the PR specific to the one commit, but no value I entered in the Edit box would be accepted.

(I found Github's Branch and Release links, For some reason separated from the rest of the top menu. I feel better knowing it has these features.)

I'm having a fun time right now porting a bunch of "template meta-programming" stuff from Visual Studio to GCC/C++ strictures.

EDITED: It occurred to me that I should've tried to integrate the ensuing commits before committing. I will try to remember to do that and try again at some point. I can see that as one way to resolve the Resolve conflicts item below.

m-7761 commented 7 years ago

I rebased this branch and resolved some minor conflicts here: https://github.com/nigels-com/glui/tree/mick

@nigels-com I appreciate this, but I don't understand it in the least. I cannot keep so many details in my head. It seems like the workflow here would require multiple checkouts and would not be reasonable without a very sophisticated Git-based IDE framework. (I can't understand how each checkout isn't a full copy of all of the project's files. I guess Git must have a desktop system for this that I don't yet know about.)

nigels-com commented 5 years ago

Unlikely to be merged without significant rework. Closing for now.