Repository: fltk-rs/fltk-rs (language: rust)

Issue:
draw::measure() cannot measure wrapped text
**Is your feature request related to a problem? Please describe.**
According to the FLTK documentation, passing a non-zero value as the width parameter to `fl_measure()` should return the width and height of the text as if it was wrapped to the specified width.

> If the incoming w is non-zero it will wrap to that width.

However, because `draw::measure()` does not accept a width parameter, this functionality is inaccessible -- and `draw::measure()` always calls `fl_measure()` with a zero-width.

**Describe the solution you'd like**
Ideally, `draw::measure()` should accept a width parameter to facilitate the measurement of wrapped text. But, since changing the signature of `draw::measure()` would be a breaking change, perhaps we could consider introducing a new function with the following implementation:
```rust
pub fn wrap_measure(txt: &str, width: i32, draw_symbols: bool) -> (i32, i32) {
    let txt = CString::safe_new(txt);
    let mut x = width;
    let mut y = 0;
    unsafe {
        Fl_measure(txt.as_ptr(), &mut x, &mut y, draw_symbols as i32);
    }
    (x, y)
}
```
Maybe until version 2.x.x

**Describe alternatives you've considered**
NA

**Additional context**
See the [documentation](https://www.fltk.org/doc-1.3/group__fl__drawings.html#gaccd92d0c0521b0aac30dcb856d438dcd) for `fl_measure()`
You can currently examine and test this function using my [AshfordN:temp](https://github.com/AshfordN/fltk-rs/tree/temp) branch

---
I decided to raise this as an issue rather than a PR because I wanted your input on possible, alternate solutions, as well as the function name that I'm proposing. If you're comfortable with what I'm suggesting then I can issue a PR to implement it.


Discussion / hints:

Fix patch:
diff --git a/fltk/src/draw.rs b/fltk/src/draw.rs
index addbfb4c..d74e189e 100644
--- a/fltk/src/draw.rs
+++ b/fltk/src/draw.rs
@@ -569,6 +569,18 @@ pub fn measure(txt: &str, draw_symbols: bool) -> (i32, i32) {
     (x, y)
 }
 
+/// Measure the width and height of a text
+/// If `width` is non-zero, it will wrap to that width
+pub fn wrap_measure(txt: &str, width: i32, draw_symbols: bool) -> (i32, i32) {
+    let txt = CString::safe_new(txt);
+    let mut x = width;
+    let mut y = 0;
+    unsafe {
+        Fl_measure(txt.as_ptr(), &mut x, &mut y, draw_symbols as i32);
+    }
+    (x, y)
+}
+
 /// Measure the coordinates and size of the text where a bounding box using the returned data would fit the text
 pub fn text_extents(txt: &str) -> (i32, i32, i32, i32) {
     let txt = CString::safe_new(txt);


Test patch: