This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use fltk::{prelude::*, *}; | |
| static COFACTOR: utils::oncelock::Lazy<i32> = utils::oncelock::Lazy::new(|| (app::font_size() as f64 * 2.0) as i32); | |
| fn prep_tree(t: &mut tree::Tree) { | |
| if let Some(root) = t.next(&t.first().unwrap()) { | |
| if root.is_open() { | |
| let elems = root.children(); | |
| t.resize(t.x(), t.y(), t.w(), (elems + 1) * *COFACTOR); | |
| } else { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #![feature(concat_idents)] | |
| use fltk_sys::{fl::*, frame::*, window::*, group::*, button::{self, *}}; | |
| use std::os::raw::*; | |
| macro_rules! fstr { | |
| ($s:literal) => { | |
| concat!($s, "\0").as_ptr() as _ | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use fltk::{ | |
| app, button, | |
| enums::{Color, Font, FrameType}, | |
| frame, group, input, | |
| prelude::*, | |
| window, | |
| }; | |
| fn style_button(btn: &mut button::Button) { | |
| btn.set_color(Color::Cyan); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <FL/Enumerations.H> | |
| #include <FL/Fl.H> | |
| #include <FL/Fl_Box.H> | |
| #include <FL/Fl_Button.H> | |
| #include <FL/Fl_Window.H> | |
| #include <FL/fl_draw.H> | |
| #include <cstdio> | |
| #include <functional> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #![allow(unused_variables)] | |
| use fltk::{ | |
| app::App, | |
| button::Button, | |
| enums::Event, | |
| group::Group, | |
| prelude::{GroupExt, WidgetBase, WidgetExt, WindowExt}, | |
| window::Window, | |
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use fltk::{enums::*, prelude::*, *}; | |
| use std::ops::{Deref, DerefMut}; | |
| pub struct RtlInput { | |
| inp: input::Input, | |
| } | |
| impl RtlInput { | |
| pub fn new(x: i32, y: i32, w: i32, h: i32, label: &'static str) -> Self { | |
| let mut inp = input::Input::new(x, y, w, h, label).with_align(Align::Right); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use fltk::{prelude::*, *}; | |
| fn main() { | |
| let mut choice = menu::Choice::default(); | |
| choice.add_choice("File/New"); | |
| choice.add_choice(&format!("{}\t", "Edit/Cut")); | |
| choice.add_choice("File/Open"); | |
| choice.add_choice(&format!("Edit/{}", "Copy")); | |
| choice.add_choice("Other|Option"); |