# ~/.tk/edittkmodes/note-mode.tcl - mode for short yellow-sticky-style notes
######################################################################

proc mode:note:init { t } {
  global JEDIT_MODEPREFS
  
  j:read_prefs -array JEDIT_MODEPREFS -prefix note \
    -directory ~/.tk/jeditmodes -file note-defaults {
    {textfont -*-lucida-medium-r-*-*-10-*-*-*-*-*-*-*}
    {textwidth 40}
    {textheight 24}
    {textwrap word}
    {sabbrev 0}
    {dabbrev 0}
    {autobreak 0}
    {autoindent 1}
    {savestate 1}
    {buttonbar 1}
    {menu,editor 1}
    {menu,file 1}
    {menu,edit 1}
    {menu,prefs 0}
    {menu,abbrev 1}
    {menu,filter 1}
    {menu,format 1}
    {menu,display 1}
    {menu,mode1 0}
    {menu,mode2 0}
    {menu,user 1}
  }
}

######################################################################
# define the button bar:

proc mode:note:mkbuttons { w t } {
  j:buttonbar $w -pady 2 -buttons [format {
    {done Done {jedit:cmd:done %s}}
    {quit Quit {jedit:cmd:quit %s}}
  } $t $t]
  return $w
}
