# call to tk window
w = root_window.tk.call



##remove manual
root_window.tk.call('pack','forget','.tabs_manual.spindlef.ccw')
root_window.tk.call('pack','forget','.tabs_manual.spindlef.cw')
root_window.tk.call('pack','forget','.tabs_manual.spindlef.stop')
root_window.tk.call('pack','forget','.tabs_manual.spindlef.spindleplus')
root_window.tk.call('pack','forget','.tabs_manual.spindlef.spindleminus')
root_window.tk.call('pack','forget','.tabs_manual.spindlef.brake')
root_window.tk.call('pack','forget','.tabs_manual.flood')
root_window.tk.call('pack','forget','.tabs_manual.mist')
##remove toolbar
root_window.tk.call('pack','forget','.toolbar.machine_power')
root_window.tk.call('pack','forget','.toolbar.machine_estop')
root_window.tk.call('pack','forget','.toolbar.file_open')
root_window.tk.call('pack','forget','.toolbar.reload')
root_window.tk.call('pack','forget','.toolbar.program_run')
root_window.tk.call('pack','forget','.toolbar.program_step')
root_window.tk.call('pack','forget','.toolbar.program_pause')
root_window.tk.call('pack','forget','.toolbar.program_stop')
root_window.tk.call('pack','forget','.toolbar.program_blockdelete')
root_window.tk.call('pack','forget','.toolbar.program_optpause')
root_window.tk.call('pack','forget','.toolbar.view_zoomin')
root_window.tk.call('pack','forget','.toolbar.view_zoomout')
root_window.tk.call('pack','forget','.toolbar.view_z')
root_window.tk.call('pack','forget','.toolbar.view_z2')
root_window.tk.call('pack','forget','.toolbar.view_x')
root_window.tk.call('pack','forget','.toolbar.view_y')
root_window.tk.call('pack','forget','.toolbar.view_p')
root_window.tk.call('pack','forget','.toolbar.rotate')
root_window.tk.call('pack','forget','.toolbar.clear_plot')
root_window.tk.call('grid','forget','.toolbar')


##bottom configure
root_window.tk.call('.pane','paneconfigure','.pane.bottom'
,"-stretch","always"
,"-height","200"
);


##top configure
root_window.tk.call('.pane','paneconfigure','.pane.top'
,"-stretch","never"
,"-minsize","300"
);

##vspace
#root_window.tk.call('grid','_tabs_mdi.vs2' 
#,'-height','6'
#);
root_window.tk.call('pack','forget','_tabs_mdi.vs1')
root_window.tk.call('pack','forget','_tabs_mdi.vs2')
root_window.tk.call('pack','forget','_tabs_mdi.vs3')

##gcode window lines
root_window.tk.call(pane_bottom+".t.text","configure"
,"-height","5"
);

#window resize
root_window.tk.call(".pane","configure"
,"-height","350"
);

#root_window.tk.call("wm","geometry",".","1024x768")
#root_window.attributes("-fullscreen",1)
# display z plane in preview
commands.set_view_z()
#window resize
root_window.tk.call("wm","geometry",".","700x440")
#root_window.tk.call('.pane','paneconfigure',".","800x480")


# change the font

font = 'mono 8'
fname,fsize = font.split()
root_window.tk.call('font','configure','TkDefaultFont','-family',fname,'-size',fsize)

# redo the text in tabs so they resize for the new default font

root_window.tk.call('.pane.top.tabs','itemconfigure','manual','-text',' Manual - F3 ')
root_window.tk.call('.pane.top.tabs','itemconfigure','mdi','-text',' MDI - F5 ')
root_window.tk.call('.pane.top.right','itemconfigure','preview','-text',' Preview ')
root_window.tk.call('.pane.top.right','itemconfigure','numbers','-text',' DRO ')



# disable the do you want to close dialog
root_window.tk.call("wm","protocol",".","WM_DELETE_WINDOW","destroy .")

# change dro screen
root_window.tk.call('.pane.top.right.fnumbers.text','configure','-foreground','limegreen','-background','black')


#modal text
root_window.tk.call('.pane.top.gcodes','configure'
,'-foreground','limegreen'
,"-font","mono 8 bold"
,'-background','black')


#gcode preview text
root_window.tk.call(pane_bottom+".t.text","configure"
,"-foreground","Limegreen"
,"-font","mono 8 bold"
,"-background","black")

