sourceafQuickFlux::FluxFrame.fan

using flux
using fwt::EventListeners

class FluxFrame {

    Frame frame
    
    new make() {
        frame = Frame#.method("make").call
    }
    
    Void loadState() {
        Frame#.method("loadState").callOn(frame, null)
    }

    Void saveState() {
        Frame#.method("saveState").callOn(frame, null)
    }

    SideBar? sideBar(Type t, Bool make := true) {
        frame.sideBar(t, make)
    }
    
    SideBar? hideNavBar() {
        frame.sideBar(Frame#.pod.type("NavBar")).hide
    }

    Void load(Uri uri, LoadMode mode := LoadMode()) {
        frame.load(uri, mode)
    }
    
    EventListeners onOpen() { 
        frame.onOpen
    }
    
    Obj? open() {
        frame.open
    }
}