Comments (8)
Thanks for the heads-up.
This is true, however it would need an API change which we try to avoid as much as possible.
One possible solution: deprecate Fl_Input_::position()
and add a new method, for instance Fl_Input::insert_position()
to replace it (all three overloaded methods). Then we could remove Fl_Input_::position()
in a later FLTK version, presumably 1.5 (or higher).
from fltk.
Oh, I thought that 1.4 is not considered stable, so API changes are still possible.
But I understand, that API is already stabilised.
from fltk.
Thanks for your feedback. To explain: we try to keep the API (Application Programming Interface) across all versions so developers don't need to change their program code from one FLTK version to another. You could still compile most of FLTK 1.1 code with 1.3 (with a few minor exceptions) and so you will with 1.4.
The ABI (Application Binary Interface) however is not yet final for 1.4, it can still be modified until 1.4.0 gets released, but must be constant during 1.4.x releases.
from fltk.
FTR: I noticed that Fl_Text_Display
and Fl_Text_Editor
(by inheritance) already have an insert_position()
method. This needs to be checked and can be either
- good, if arguments and semantics are the same (compatible)
- bad, if not. Then we'd need another name.
This is just a reminder - code not yet checked.
from fltk.
Note: we have more than only the methods mentioned above shadowing Fl_Widget::position(). This is what I found (may not be complete):
int Fl_Browser_::position() const { return position_; }
void Fl_Browser_::position(int pos);
void Fl_Help_Dialog::position(int xx, int yy);
int Fl_Input_::position() const {return position_;}
int Fl_Input_::position(int p, int m);
int Fl_Input_::position(int p) {return position(p, p);}
int Fl_Text_Selection::position(int *startpos, int *endpos) const;
void Fl_Tile::position(int oldx, int oldy, int newx, int newy);
void Fl_Widget::position(int X, int Y) {resize(X, Y, w_, h_);}
I wonder if it's worth the effort to change any of these methods, particularly since we need to keep the API for backwards compatibility anyway, at least for some (indefinite) time and you can always use Fl_Widget::position(X, Y) explicitly.
Just thinking aloud: maybe we could add another method like Fl_Widget::set_position(int X, int Y) so users can use this instead (w/o a name conflict).
from fltk.
PR is in #666
- Fl_Browser_::position -> Fl_Browser_::vposition (mirrors Fl_Browser_::hposition)
- Fl_Input_::position -> Fl_Input_::insert_position (mirrors Fl_Text_Input)
- Fl_Text_Selection::position -> Fl_Text_Selection:: selected()
- Fl_Help_Dialog::position is ok, as it repositions the window
- Fl_Tile::position -> Fl_Tile:: move_intersection (was: adjust)
- update all includes tests
from fltk.
Fl_Tile::position -> Fl_Tile::adjust
Just for the record: isn't this Fl_Tile::move_intersection()
in #666 ?
from fltk.
Yep, I changed my mind when implementing it. Fixed.
from fltk.
Related Issues (20)
- Cannot build project with CMake (add_library cannot create ALIAS target "fltk" because target "fltk::fltk" is imported but not globally visible) HOT 7
- Fl_Tree handler might refer to a null root causing a crash HOT 4
- Fl_Tree doesn't use system colors HOT 6
- Wayland: subwindow redraw issues from timeouts with NVidia driver HOT 26
- needing the set of C++ root or top classes of FLTK 1.4 HOT 4
- fltk.org is down HOT 4
- Bug in callbacks generated by fluid on macOS using system menu bar inside C++ Classes HOT 22
- Discrepant behaviour between Fl_Choice and Fl_Input_Choice HOT 18
- fltk 1.4.x: Fl_Browser unexpected display of empty lines ("@." vs "") HOT 3
- Adding /Xcode to .gitignore in FLTK HOT 2
- Fl_Window::get_size_range() HOT 1
- CMake's INCLUDES adds CMAKE_PREFIX_PATH before staging area leading to problems between .H and .cxx files on API changes HOT 6
- Wayland sends wrong events after an FL_DRAG of a top window. HOT 17
- Problems when using PNG images compiling on a Mac with STANDARD ARCHITECTURE (Apple Silicon + Intel) HOT 12
- Zero-sized borderless window causes high cpu usage on windows HOT 4
- Fl::screen_work_area under Wayland does not take into account the title bar or dockbar when at the bottom HOT 1
- Child Windows under Wayland are clipped on resizing or on showing when placed partially outside the main window HOT 45
- A widget's Drag and Drop does not work when dragging an url from Chrome on Linux HOT 14
- Changing FLTK's default color pallete effects how widgets and opengl child drawings are composited on Wayland HOT 7
- Wayland Memory Leak: one leak (16 bytes) per key press HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fltk.