fltk-rs / fl2rust

A fluid (fltk ui designer) file to Rust transpiler
MIT License
53 stars 3 forks source link

fix gen error when string has double quotes or multiple lines #29

Closed felixmaker closed 10 months ago

felixmaker commented 10 months ago

Consider this

# data file for the Fltk User Interface Designer (fluid)
version 1.0400
i18n_type 1
i18n_include {<libintl.h>}
i18n_conditional {}
i18n_function gettext
i18n_static_function gettext_noop
header_name {.h}
code_name {.cxx}
class UserInterface {open
} {
  Function {make_window()} {open
  } {
    Fl_Window {} {open
      xywh {429 319 415 328} type Double visible
    } {
      Fl_Button btn {
        label {Button "with"}
        xywh {10 25 155 25}
      }
      Fl_Menu_Button {} {
        label menu open
        xywh {20 75 68 20}
      } {
        MenuItem {} {
          label {"Hi"
          Hi jjas}
          xywh {0 0 30 20}
        }
      }
    }
  }
}
MoAlyousef commented 10 months ago

Thank you