File: m_main.srm
Size: 85072
Date: Fri, 01 Feb 2019 03:02:08 +0100
$PBExportHeader$m_main.srm
$PBExportComments$Main window menu
forward
global type m_main from menu
end type
type m_file from menu within m_main
end type
type m_new from menu within m_file
end type
type m_open from menu within m_file
end type
type m_mostrecent from menu within m_file
end type
type m_save from menu within m_file
end type
type m_saveas from menu within m_file
end type
type m_file_dash1 from menu within m_file
end type
type m_printersetup from menu within m_file
end type
type m_print from menu within m_file
end type
type m_file_dash2 from menu within m_file
end type
type m_recentfiles from menu within m_file
end type
type m_file_dash3 from menu within m_file
end type
type m_exit from menu within m_file
end type
type m_file from menu within m_main
m_new m_new
m_open m_open
m_mostrecent m_mostrecent
m_save m_save
m_saveas m_saveas
m_file_dash1 m_file_dash1
m_printersetup m_printersetup
m_print m_print
m_file_dash2 m_file_dash2
m_recentfiles m_recentfiles
m_file_dash3 m_file_dash3
m_exit m_exit
end type
type m_edit from menu within m_main
end type
type m_undo from menu within m_edit
end type
type m_redo from menu within m_edit
end type
type m_-2 from menu within m_edit
end type
type m_cut from menu within m_edit
end type
type m_copy from menu within m_edit
end type
type m_paste from menu within m_edit
end type
type m_delete from menu within m_edit
end type
type m_-0 from menu within m_edit
end type
type m_find from menu within m_edit
end type
type m_findnext from menu within m_edit
end type
type m_replace from menu within m_edit
end type
type m_gotoline from menu within m_edit
end type
type m_-3 from menu within m_edit
end type
type m_selectall from menu within m_edit
end type
type m_edit from menu within m_main
m_undo m_undo
m_redo m_redo
m_-2 m_-2
m_cut m_cut
m_copy m_copy
m_paste m_paste
m_delete m_delete
m_-0 m_-0
m_find m_find
m_findnext m_findnext
m_replace m_replace
m_gotoline m_gotoline
m_-3 m_-3
m_selectall m_selectall
end type
type m_view from menu within m_main
end type
type m_bigtoolbarbuttons from menu within m_view
end type
type m_darktheme from menu within m_view
end type
type m_- from menu within m_view
end type
type m_showlinenumbers from menu within m_view
end type
type m_showindentguides from menu within m_view
end type
type m_showwhitespace from menu within m_view
end type
type m_showeolmarks from menu within m_view
end type
type m_-1 from menu within m_view
end type
type m_caretlineback from menu within m_view
end type
type m_wordwrap from menu within m_view
end type
type m_font from menu within m_view
end type
type m_tabwidth from menu within m_view
end type
type m_longlines from menu within m_view
end type
type m_view from menu within m_main
m_bigtoolbarbuttons m_bigtoolbarbuttons
m_darktheme m_darktheme
m_- m_-
m_showlinenumbers m_showlinenumbers
m_showindentguides m_showindentguides
m_showwhitespace m_showwhitespace
m_showeolmarks m_showeolmarks
m_-1 m_-1
m_caretlineback m_caretlineback
m_wordwrap m_wordwrap
m_font m_font
m_tabwidth m_tabwidth
m_longlines m_longlines
end type
type m_tools from menu within m_main
end type
type m_clearrecentfiles from menu within m_tools
end type
type m_-8 from menu within m_tools
end type
type m_commentselection from menu within m_tools
end type
type m_uncommentselection from menu within m_tools
end type
type m_-5 from menu within m_tools
end type
type m_lefttrimselection from menu within m_tools
end type
type m_righttrimselection from menu within m_tools
end type
type m_-6 from menu within m_tools
end type
type m_sortselectionascending from menu within m_tools
end type
type m_sortselectiondescending from menu within m_tools
end type
type m_-7 from menu within m_tools
end type
type m_clearread-only from menu within m_tools
end type
type m_changecase from menu within m_tools
end type
type m_lower from menu within m_changecase
end type
type m_upper from menu within m_changecase
end type
type m_wordcap from menu within m_changecase
end type
type m_changecase from menu within m_tools
m_lower m_lower
m_upper m_upper
m_wordcap m_wordcap
end type
type m_encoding from menu within m_tools
end type
type m_ansi from menu within m_encoding
end type
type m_utf8 from menu within m_encoding
end type
type m_utf16be from menu within m_encoding
end type
type m_utf16le from menu within m_encoding
end type
type m_encoding from menu within m_tools
m_ansi m_ansi
m_utf8 m_utf8
m_utf16be m_utf16be
m_utf16le m_utf16le
end type
type m_eolconversion from menu within m_tools
end type
type m_windowscrlf from menu within m_eolconversion
end type
type m_unixlf from menu within m_eolconversion
end type
type m_macintoshcr from menu within m_eolconversion
end type
type m_eolconversion from menu within m_tools
m_windowscrlf m_windowscrlf
m_unixlf m_unixlf
m_macintoshcr m_macintoshcr
end type
type m_markers from menu within m_tools
end type
type m_togglemarker from menu within m_markers
end type
type m_gotoprevmarker from menu within m_markers
end type
type m_gotonextmarker from menu within m_markers
end type
type m_removeallmarkers from menu within m_markers
end type
type m_deletemarkedlines from menu within m_markers
end type
type m_markers from menu within m_tools
m_togglemarker m_togglemarker
m_gotoprevmarker m_gotoprevmarker
m_gotonextmarker m_gotonextmarker
m_removeallmarkers m_removeallmarkers
m_deletemarkedlines m_deletemarkedlines
end type
type m_tools from menu within m_main
m_clearrecentfiles m_clearrecentfiles
m_-8 m_-8
m_commentselection m_commentselection
m_uncommentselection m_uncommentselection
m_-5 m_-5
m_lefttrimselection m_lefttrimselection
m_righttrimselection m_righttrimselection
m_-6 m_-6
m_sortselectionascending m_sortselectionascending
m_sortselectiondescending m_sortselectiondescending
m_-7 m_-7
m_clearread-only m_clearread-only
m_changecase m_changecase
m_encoding m_encoding
m_eolconversion m_eolconversion
m_markers m_markers
end type
type m_help from menu within m_main
end type
type m_helptopics from menu within m_help
end type
type m_-4 from menu within m_help
end type
type m_about from menu within m_help
end type
type m_help from menu within m_main
m_helptopics m_helptopics
m_-4 m_-4
m_about m_about
end type
global type m_main from menu
m_file m_file
m_edit m_edit
m_view m_view
m_tools m_tools
m_help m_help
end type
end forward

global type m_main from menu
m_file m_file
m_edit m_edit
m_view m_view
m_tools m_tools
m_help m_help
end type
global m_main m_main

forward prototypes
public subroutine mf_linenumbers (boolean ab_checked)
public subroutine mf_indentguides (boolean ab_checked)
public subroutine mf_whitespace (boolean ab_checked)
public subroutine mf_eolmarks (boolean ab_checked)
public subroutine mf_encoding (encoding aencoding)
public subroutine mf_wordwrap (boolean ab_checked)
public subroutine mf_bigtoolbarbuttons (boolean ab_checked)
public subroutine mf_editstatus (boolean ab_cancopy, boolean ab_canpaste, boolean ab_canredo, boolean ab_canundo, boolean ab_readonly, long al_textlen)
public subroutine mf_caretlineback (boolean ab_checked)
public subroutine mf_enablesave (boolean ab_enabled)
public subroutine mf_darktheme (boolean ab_checked)
end prototypes

public subroutine mf_linenumbers (boolean ab_checked);m_view.m_showlinenumbers.checked = ab_checked

end subroutine

public subroutine mf_indentguides (boolean ab_checked);m_view.m_showindentguides.checked = ab_checked

end subroutine

public subroutine mf_whitespace (boolean ab_checked);m_view.m_showwhitespace.checked = ab_checked

end subroutine

public subroutine mf_eolmarks (boolean ab_checked);m_view.m_showeolmarks.checked = ab_checked

end subroutine

public subroutine mf_encoding (encoding aencoding);// set Encoding checkmarks
m_tools.m_encoding.m_ansi.Checked      = (aEncoding = EncodingAnsi!)
m_tools.m_encoding.m_utf8.Checked      = (aEncoding = EncodingUTF8!)
m_tools.m_encoding.m_utf16be.Checked   = (aEncoding = EncodingUTF16BE!)
m_tools.m_encoding.m_utf16le.Checked   = (aEncoding = EncodingUTF16LE!)

end subroutine

public subroutine mf_wordwrap (boolean ab_checked);m_view.m_wordwrap.checked = ab_checked

end subroutine

public subroutine mf_bigtoolbarbuttons (boolean ab_checked);m_view.m_bigtoolbarbuttons.checked = ab_checked

end subroutine

public subroutine mf_editstatus (boolean ab_cancopy, boolean ab_canpaste, boolean ab_canredo, boolean ab_canundo, boolean ab_readonly, long al_textlen);// enable/disable options

Boolean lb_ContainsText

If al_textlen > 0 Then
   lb_ContainsText = True
End If

// Edit menu
m_edit.m_undo.enabled      = ab_canundo
m_edit.m_redo.enabled      = ab_canredo
m_edit.m_cut.enabled       = ab_cancopy
m_edit.m_copy.enabled      = ab_cancopy
m_edit.m_paste.enabled     = ab_canpaste
m_edit.m_delete.enabled    = ab_cancopy
m_edit.m_find.enabled      = lb_ContainsText
m_edit.m_findnext.enabled  = lb_ContainsText
m_edit.m_replace.enabled   = lb_ContainsText
m_edit.m_gotoline.enabled  = lb_ContainsText
m_edit.m_selectall.enabled = lb_ContainsText

// Tools menu
m_tools.m_commentselection.enabled        = ab_cancopy
m_tools.m_uncommentselection.enabled      = ab_cancopy
m_tools.m_lefttrimselection.enabled       = ab_cancopy
m_tools.m_righttrimselection.enabled      = ab_cancopy
m_tools.m_sortselectionascending.enabled  = ab_cancopy
m_tools.m_sortselectiondescending.enabled = ab_cancopy
m_tools.m_clearread-only.enabled          = ab_readonly
m_tools.m_changecase.enabled              = ab_cancopy
m_tools.m_changecase.m_upper.enabled      = ab_cancopy
m_tools.m_changecase.m_lower.enabled      = ab_cancopy
m_tools.m_changecase.m_wordcap.enabled    = ab_cancopy
m_tools.m_eolconversion.enabled                 = lb_ContainsText
m_tools.m_eolconversion.m_windowscrlf.enabled   = lb_ContainsText
m_tools.m_eolconversion.m_unixlf.enabled        = lb_ContainsText
m_tools.m_eolconversion.m_macintoshcr.enabled   = lb_ContainsText

end subroutine

public subroutine mf_caretlineback (boolean ab_checked);m_view.m_caretlineback.checked = ab_checked

end subroutine

public subroutine mf_enablesave (boolean ab_enabled);m_file.m_save.enabled = ab_enabled

end subroutine

public subroutine mf_darktheme (boolean ab_checked);m_view.m_darktheme.checked = ab_checked

end subroutine

on m_main.create
m_main=this
call super::create
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_file=create m_file
this.m_edit=create m_edit
this.m_view=create m_view
this.m_tools=create m_tools
this.m_help=create m_help
this.Item[UpperBound(this.Item)+1]=this.m_file
this.Item[UpperBound(this.Item)+1]=this.m_edit
this.Item[UpperBound(this.Item)+1]=this.m_view
this.Item[UpperBound(this.Item)+1]=this.m_tools
this.Item[UpperBound(this.Item)+1]=this.m_help
end on

on m_main.destroy
call super::destroy
destroy(this.m_file)
destroy(this.m_edit)
destroy(this.m_view)
destroy(this.m_tools)
destroy(this.m_help)
end on

type m_file from menu within m_main
m_new m_new
m_open m_open
m_mostrecent m_mostrecent
m_save m_save
m_saveas m_saveas
m_file_dash1 m_file_dash1
m_printersetup m_printersetup
m_print m_print
m_file_dash2 m_file_dash2
m_recentfiles m_recentfiles
m_file_dash3 m_file_dash3
m_exit m_exit
end type

on m_file.create
call super::create
this.text = "&File"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_new=create m_new
this.m_open=create m_open
this.m_mostrecent=create m_mostrecent
this.m_save=create m_save
this.m_saveas=create m_saveas
this.m_file_dash1=create m_file_dash1
this.m_printersetup=create m_printersetup
this.m_print=create m_print
this.m_file_dash2=create m_file_dash2
this.m_recentfiles=create m_recentfiles
this.m_file_dash3=create m_file_dash3
this.m_exit=create m_exit
this.Item[UpperBound(this.Item)+1]=this.m_new
this.Item[UpperBound(this.Item)+1]=this.m_open
this.Item[UpperBound(this.Item)+1]=this.m_mostrecent
this.Item[UpperBound(this.Item)+1]=this.m_save
this.Item[UpperBound(this.Item)+1]=this.m_saveas
this.Item[UpperBound(this.Item)+1]=this.m_file_dash1
this.Item[UpperBound(this.Item)+1]=this.m_printersetup
this.Item[UpperBound(this.Item)+1]=this.m_print
this.Item[UpperBound(this.Item)+1]=this.m_file_dash2
this.Item[UpperBound(this.Item)+1]=this.m_recentfiles
this.Item[UpperBound(this.Item)+1]=this.m_file_dash3
this.Item[UpperBound(this.Item)+1]=this.m_exit
end on

on m_file.destroy
call super::destroy
destroy(this.m_new)
destroy(this.m_open)
destroy(this.m_mostrecent)
destroy(this.m_save)
destroy(this.m_saveas)
destroy(this.m_file_dash1)
destroy(this.m_printersetup)
destroy(this.m_print)
destroy(this.m_file_dash2)
destroy(this.m_recentfiles)
destroy(this.m_file_dash3)
destroy(this.m_exit)
end on

type m_new from menu within m_file
end type

on m_new.create
call super::create
this.text = "&New~tCtrl+N"
this.shortcut = 334
this.microhelp = "Create a new file"
this.toolbaritemname = "new!"
this.toolbaritemtext = "New,Create a new file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_new.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_open from menu within m_file
end type

on m_open.create
call super::create
this.text = "&Open...~tCtrl+O"
this.shortcut = 335
this.microhelp = "Open a file"
this.toolbaritemname = "open!"
this.toolbaritemtext = "Open,Open a file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_open.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_mostrecent from menu within m_file
end type

event clicked;String ls_filename

ls_filename = gn_mru.of_MostRecentFile()

ParentWindow.Dynamic wf_OpenFile(ls_filename)

end event

on m_mostrecent.create
call super::create
this.text = "Most Recent"
this.microhelp = "Open the most recent file"
this.toolbaritemname = "redo!"
this.toolbaritemtext = "Most Recent,Open the most recent file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_mostrecent.destroy
call super::destroy
end on

type m_save from menu within m_file
end type

on m_save.create
call super::create
this.text = "&Save~tCtrl+S"
this.shortcut = 339
this.microhelp = "Save the file"
this.toolbaritemname = "save!"
this.toolbaritemtext = "Save,Save the file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_save.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_saveas from menu within m_file
end type

on m_saveas.create
call super::create
this.text = "Save &As..."
this.microhelp = "Save to a different file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_saveas.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_file_dash1 from menu within m_file
end type

on m_file_dash1.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_file_dash1.destroy
call super::destroy
end on

type m_printersetup from menu within m_file
end type

on m_printersetup.create
call super::create
this.text = "Printer Set&up..."
this.microhelp = "Set printer options"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;PrintSetup()

end event

on m_printersetup.destroy
call super::destroy
end on

type m_print from menu within m_file
end type

on m_print.create
call super::create
this.text = "&Print~tCtrl+P"
this.shortcut = 336
this.microhelp = "Print the file"
this.toolbaritemname = "print!"
this.toolbaritemtext = "Print,Print the file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_print.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_file_dash2 from menu within m_file
end type

on m_file_dash2.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_file_dash2.destroy
call super::destroy
end on

type m_recentfiles from menu within m_file
end type

on m_recentfiles.create
call super::create
this.text = "Recent Files"
this.microhelp = "Open a recent file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_recentfiles.destroy
call super::destroy
end on

type m_file_dash3 from menu within m_file
end type

on m_file_dash3.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_file_dash3.destroy
call super::destroy
end on

type m_exit from menu within m_file
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_exit.create
call super::create
this.text = "E&xit~tAlt+F4"
this.shortcut = 627
this.microhelp = "Exit the program"
this.toolbaritemname = "exit!"
this.toolbaritemtext = "Exit,Exit the program"
this.toolbaritemorder = 999
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_exit.destroy
call super::destroy
end on

type m_edit from menu within m_main
m_undo m_undo
m_redo m_redo
m_-2 m_-2
m_cut m_cut
m_copy m_copy
m_paste m_paste
m_delete m_delete
m_-0 m_-0
m_find m_find
m_findnext m_findnext
m_replace m_replace
m_gotoline m_gotoline
m_-3 m_-3
m_selectall m_selectall
end type

on m_edit.create
call super::create
this.text = "&Edit"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_undo=create m_undo
this.m_redo=create m_redo
this.m_-2=create m_-2
this.m_cut=create m_cut
this.m_copy=create m_copy
this.m_paste=create m_paste
this.m_delete=create m_delete
this.m_-0=create m_-0
this.m_find=create m_find
this.m_findnext=create m_findnext
this.m_replace=create m_replace
this.m_gotoline=create m_gotoline
this.m_-3=create m_-3
this.m_selectall=create m_selectall
this.Item[UpperBound(this.Item)+1]=this.m_undo
this.Item[UpperBound(this.Item)+1]=this.m_redo
this.Item[UpperBound(this.Item)+1]=this.m_-2
this.Item[UpperBound(this.Item)+1]=this.m_cut
this.Item[UpperBound(this.Item)+1]=this.m_copy
this.Item[UpperBound(this.Item)+1]=this.m_paste
this.Item[UpperBound(this.Item)+1]=this.m_delete
this.Item[UpperBound(this.Item)+1]=this.m_-0
this.Item[UpperBound(this.Item)+1]=this.m_find
this.Item[UpperBound(this.Item)+1]=this.m_findnext
this.Item[UpperBound(this.Item)+1]=this.m_replace
this.Item[UpperBound(this.Item)+1]=this.m_gotoline
this.Item[UpperBound(this.Item)+1]=this.m_-3
this.Item[UpperBound(this.Item)+1]=this.m_selectall
end on

on m_edit.destroy
call super::destroy
destroy(this.m_undo)
destroy(this.m_redo)
destroy(this.m_-2)
destroy(this.m_cut)
destroy(this.m_copy)
destroy(this.m_paste)
destroy(this.m_delete)
destroy(this.m_-0)
destroy(this.m_find)
destroy(this.m_findnext)
destroy(this.m_replace)
destroy(this.m_gotoline)
destroy(this.m_-3)
destroy(this.m_selectall)
end on

type m_undo from menu within m_edit
end type

on m_undo.create
call super::create
this.text = "&Undo~tCtrl+Z"
this.shortcut = 346
this.microhelp = "Undo last command"
this.toolbaritemname = "undo!"
this.toolbaritemtext = "Undo,Undo last command"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_undo.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_redo from menu within m_edit
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_redo.create
call super::create
this.text = "Red&o~tCtrl+R"
this.shortcut = 338
this.microhelp = "Redo the last undone command"
this.toolbaritemname = "redo!"
this.toolbaritemtext = "Redo,Redo the last undone command"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_redo.destroy
call super::destroy
end on

type m_-2 from menu within m_edit
end type

on m_-2.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-2.destroy
call super::destroy
end on

type m_cut from menu within m_edit
end type

on m_cut.create
call super::create
this.text = "Cu&t~tCtrl+X"
this.shortcut = 344
this.microhelp = "Cut selected to clipboard"
this.toolbaritemname = "cut!"
this.toolbaritemtext = "Cut,Cut selected to clipboard"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_cut.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_copy from menu within m_edit
end type

on m_copy.create
call super::create
this.text = "&Copy~tCtrl+C"
this.shortcut = 323
this.microhelp = "Copy selected to clipboard"
this.toolbaritemname = "copy!"
this.toolbaritemtext = "Copy,Copy selected to clipboard"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_copy.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_paste from menu within m_edit
end type

on m_paste.create
call super::create
this.text = "&Paste~tCtrl+V"
this.shortcut = 342
this.microhelp = "Paste from clipboard"
this.toolbaritemname = "paste!"
this.toolbaritemtext = "Paste,Paste from clipboard"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_paste.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_delete from menu within m_edit
end type

on m_delete.create
call super::create
this.text = "&Delete"
this.microhelp = "Delete selected"
this.toolbaritemname = "clear!"
this.toolbaritemtext = "Delete,Delete selected"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_delete.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-0 from menu within m_edit
end type

on m_-0.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-0.destroy
call super::destroy
end on

type m_find from menu within m_edit
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_find.create
call super::create
this.text = "&Find...~tCtrl+F"
this.shortcut = 326
this.microhelp = "Find text"
this.toolbaritemname = "find!"
this.toolbaritemtext = "Find,Find text"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_find.destroy
call super::destroy
end on

type m_findnext from menu within m_edit
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_findnext.create
call super::create
this.text = "Find &Next~tF3"
this.shortcut = 114
this.microhelp = "Find next occurrence of text"
this.toolbaritemname = "findnext!"
this.toolbaritemtext = "Find Next,Find next occurrence of text"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_findnext.destroy
call super::destroy
end on

type m_replace from menu within m_edit
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_replace.create
call super::create
this.text = "&Replace...~tCtrl+H"
this.shortcut = 328
this.microhelp = "Replace text"
this.toolbaritemname = "replace!"
this.toolbaritemtext = "Replace,Replace text"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_replace.destroy
call super::destroy
end on

type m_gotoline from menu within m_edit
event create ( )
event destroy ( )
end type

on m_gotoline.create
call super::create
this.text = "&Go To Line...~tCtrl+G"
this.shortcut = 327
this.microhelp = "Go to a specific line number"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_gotoline.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-3 from menu within m_edit
end type

on m_-3.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-3.destroy
call super::destroy
end on

type m_selectall from menu within m_edit
end type

on m_selectall.create
call super::create
this.text = "Select &All~tCtrl+A"
this.shortcut = 321
this.microhelp = "Select all"
this.toolbaritemname = "selectall!"
this.toolbaritemtext = "Select All,Select all"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_selectall.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_view from menu within m_main
m_bigtoolbarbuttons m_bigtoolbarbuttons
m_darktheme m_darktheme
m_- m_-
m_showlinenumbers m_showlinenumbers
m_showindentguides m_showindentguides
m_showwhitespace m_showwhitespace
m_showeolmarks m_showeolmarks
m_-1 m_-1
m_caretlineback m_caretlineback
m_wordwrap m_wordwrap
m_font m_font
m_tabwidth m_tabwidth
m_longlines m_longlines
end type

on m_view.create
call super::create
this.text = "&View"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_bigtoolbarbuttons=create m_bigtoolbarbuttons
this.m_darktheme=create m_darktheme
this.m_-=create m_-
this.m_showlinenumbers=create m_showlinenumbers
this.m_showindentguides=create m_showindentguides
this.m_showwhitespace=create m_showwhitespace
this.m_showeolmarks=create m_showeolmarks
this.m_-1=create m_-1
this.m_caretlineback=create m_caretlineback
this.m_wordwrap=create m_wordwrap
this.m_font=create m_font
this.m_tabwidth=create m_tabwidth
this.m_longlines=create m_longlines
this.Item[UpperBound(this.Item)+1]=this.m_bigtoolbarbuttons
this.Item[UpperBound(this.Item)+1]=this.m_darktheme
this.Item[UpperBound(this.Item)+1]=this.m_-
this.Item[UpperBound(this.Item)+1]=this.m_showlinenumbers
this.Item[UpperBound(this.Item)+1]=this.m_showindentguides
this.Item[UpperBound(this.Item)+1]=this.m_showwhitespace
this.Item[UpperBound(this.Item)+1]=this.m_showeolmarks
this.Item[UpperBound(this.Item)+1]=this.m_-1
this.Item[UpperBound(this.Item)+1]=this.m_caretlineback
this.Item[UpperBound(this.Item)+1]=this.m_wordwrap
this.Item[UpperBound(this.Item)+1]=this.m_font
this.Item[UpperBound(this.Item)+1]=this.m_tabwidth
this.Item[UpperBound(this.Item)+1]=this.m_longlines
end on

on m_view.destroy
call super::destroy
destroy(this.m_bigtoolbarbuttons)
destroy(this.m_darktheme)
destroy(this.m_-)
destroy(this.m_showlinenumbers)
destroy(this.m_showindentguides)
destroy(this.m_showwhitespace)
destroy(this.m_showeolmarks)
destroy(this.m_-1)
destroy(this.m_caretlineback)
destroy(this.m_wordwrap)
destroy(this.m_font)
destroy(this.m_tabwidth)
destroy(this.m_longlines)
end on

type m_bigtoolbarbuttons from menu within m_view
event create ( )
event destroy ( )
end type

on m_bigtoolbarbuttons.create
call super::create
this.text = "Big Toolbar &Buttons"
this.microhelp = "Toggle the toolbar button size"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_bigtoolbarbuttons.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_bigtoolbarbuttons(False)
   gn_app.of_SetReg("Window", "ToolbarText", "false")
Else
   mf_bigtoolbarbuttons(True)
   gn_app.of_SetReg("Window", "ToolbarText", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_darktheme from menu within m_view
end type

on m_darktheme.create
call super::create
this.text = "&Dark Theme"
this.microhelp = "Toggle the dark theme"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_darktheme.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_darktheme(False)
   gn_app.of_SetReg("Theme", "normal")
Else
   mf_darktheme(True)
   gn_app.of_SetReg("Theme", "dark")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_- from menu within m_view
end type

on m_-.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-.destroy
call super::destroy
end on

type m_showlinenumbers from menu within m_view
event create ( )
event destroy ( )
end type

on m_showlinenumbers.create
call super::create
this.text = "Show &Line Numbers"
this.microhelp = "Toggle Line Numbers"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_showlinenumbers.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_linenumbers(False)
   gn_app.of_SetReg("LineNumbers", "false")
Else
   mf_linenumbers(True)
   gn_app.of_SetReg("LineNumbers", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_showindentguides from menu within m_view
event create ( )
event destroy ( )
end type

on m_showindentguides.create
call super::create
this.text = "Show &Indent Guides"
this.microhelp = "Toggle Indent Guides"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_showindentguides.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_indentguides(False)
   gn_app.of_SetReg("IndentGuides", "false")
Else
   mf_indentguides(True)
   gn_app.of_SetReg("IndentGuides", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_showwhitespace from menu within m_view
event create ( )
event destroy ( )
end type

on m_showwhitespace.create
call super::create
this.text = "Show White &Space"
this.microhelp = "Toggle White Space"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_showwhitespace.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_whitespace(False)
   gn_app.of_SetReg("WhiteSpace", "false")
Else
   mf_whitespace(True)
   gn_app.of_SetReg("WhiteSpace", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_showeolmarks from menu within m_view
event create ( )
event destroy ( )
end type

on m_showeolmarks.create
call super::create
this.text = "Show &EOL Marks"
this.microhelp = "Toggle EOL Marks"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_showeolmarks.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_eolmarks(False)
   gn_app.of_SetReg("EOLMarks", "false")
Else
   mf_eolmarks(True)
   gn_app.of_SetReg("EOLMarks", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-1 from menu within m_view
end type

on m_-1.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-1.destroy
call super::destroy
end on

type m_caretlineback from menu within m_view
end type

event clicked;If this.Checked Then
   mf_caretlineback(False)
   gn_app.of_SetReg("caretlineback", "false")
Else
   mf_caretlineback(True)
   gn_app.of_SetReg("caretlineback", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_caretlineback.create
call super::create
this.text = "&Caret Background"
this.microhelp = "Toggle caret background"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_caretlineback.destroy
call super::destroy
end on

type m_wordwrap from menu within m_view
event create ( )
event destroy ( )
end type

on m_wordwrap.create
call super::create
this.text = "&Word Wrap"
this.microhelp = "Toggle Word Wrap"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_wordwrap.destroy
call super::destroy
end on

event clicked;If this.Checked Then
   mf_wordwrap(False)
   gn_app.of_SetReg("WordWrap", "false")
Else
   mf_wordwrap(True)
   gn_app.of_SetReg("WordWrap", "true")
End If

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_font from menu within m_view
event create ( )
event destroy ( )
end type

on m_font.create
call super::create
this.text = "&Font..."
this.microhelp = "Choose a font for the editor"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_font.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_tabwidth from menu within m_view
event create ( )
event destroy ( )
end type

on m_tabwidth.create
call super::create
this.text = "&Tab Width..."
this.microhelp = "Set Tab width"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_tabwidth.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_longlines from menu within m_view
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_longlines.create
call super::create
this.text = "Long Lines..."
this.microhelp = "Set Long Lines indicator"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_longlines.destroy
call super::destroy
end on

type m_tools from menu within m_main
m_clearrecentfiles m_clearrecentfiles
m_-8 m_-8
m_commentselection m_commentselection
m_uncommentselection m_uncommentselection
m_-5 m_-5
m_lefttrimselection m_lefttrimselection
m_righttrimselection m_righttrimselection
m_-6 m_-6
m_sortselectionascending m_sortselectionascending
m_sortselectiondescending m_sortselectiondescending
m_-7 m_-7
m_clearread-only m_clearread-only
m_changecase m_changecase
m_encoding m_encoding
m_eolconversion m_eolconversion
m_markers m_markers
end type

on m_tools.create
call super::create
this.text = "&Tools"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_clearrecentfiles=create m_clearrecentfiles
this.m_-8=create m_-8
this.m_commentselection=create m_commentselection
this.m_uncommentselection=create m_uncommentselection
this.m_-5=create m_-5
this.m_lefttrimselection=create m_lefttrimselection
this.m_righttrimselection=create m_righttrimselection
this.m_-6=create m_-6
this.m_sortselectionascending=create m_sortselectionascending
this.m_sortselectiondescending=create m_sortselectiondescending
this.m_-7=create m_-7
this.m_clearread-only=create m_clearread-only
this.m_changecase=create m_changecase
this.m_encoding=create m_encoding
this.m_eolconversion=create m_eolconversion
this.m_markers=create m_markers
this.Item[UpperBound(this.Item)+1]=this.m_clearrecentfiles
this.Item[UpperBound(this.Item)+1]=this.m_-8
this.Item[UpperBound(this.Item)+1]=this.m_commentselection
this.Item[UpperBound(this.Item)+1]=this.m_uncommentselection
this.Item[UpperBound(this.Item)+1]=this.m_-5
this.Item[UpperBound(this.Item)+1]=this.m_lefttrimselection
this.Item[UpperBound(this.Item)+1]=this.m_righttrimselection
this.Item[UpperBound(this.Item)+1]=this.m_-6
this.Item[UpperBound(this.Item)+1]=this.m_sortselectionascending
this.Item[UpperBound(this.Item)+1]=this.m_sortselectiondescending
this.Item[UpperBound(this.Item)+1]=this.m_-7
this.Item[UpperBound(this.Item)+1]=this.m_clearread-only
this.Item[UpperBound(this.Item)+1]=this.m_changecase
this.Item[UpperBound(this.Item)+1]=this.m_encoding
this.Item[UpperBound(this.Item)+1]=this.m_eolconversion
this.Item[UpperBound(this.Item)+1]=this.m_markers
end on

on m_tools.destroy
call super::destroy
destroy(this.m_clearrecentfiles)
destroy(this.m_-8)
destroy(this.m_commentselection)
destroy(this.m_uncommentselection)
destroy(this.m_-5)
destroy(this.m_lefttrimselection)
destroy(this.m_righttrimselection)
destroy(this.m_-6)
destroy(this.m_sortselectionascending)
destroy(this.m_sortselectiondescending)
destroy(this.m_-7)
destroy(this.m_clearread-only)
destroy(this.m_changecase)
destroy(this.m_encoding)
destroy(this.m_eolconversion)
destroy(this.m_markers)
end on

type m_clearrecentfiles from menu within m_tools
end type

event clicked;Integer li_rc

li_rc = MessageBox(this.Text, &
            "Do you really want to clear the Recent Files list?", &
            Question!, YesNo!)
If li_rc = 2 Then Return

gn_app.of_DelRegKey("MRUList")
gn_mru.Reset()
gw_frame.wf_RecentFiles()

end event

on m_clearrecentfiles.create
call super::create
this.text = "Clear Recent Files"
this.microhelp = "Clear the recent files list"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_clearrecentfiles.destroy
call super::destroy
end on

type m_-8 from menu within m_tools
end type

on m_-8.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-8.destroy
call super::destroy
end on

type m_commentselection from menu within m_tools
event create ( )
event destroy ( )
end type

on m_commentselection.create
call super::create
this.text = "&Comment Selection"
this.microhelp = "Comment the selected lines"
this.toolbaritemname = "comment!"
this.toolbaritemtext = "Comment,Comment the selected lines"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_commentselection.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_uncommentselection from menu within m_tools
event create ( )
event destroy ( )
end type

on m_uncommentselection.create
call super::create
this.text = "&Uncomment Selection"
this.microhelp = "Uncomment the selected lines"
this.toolbaritemname = "uncomment!"
this.toolbaritemtext = "Uncomment,Uncomment the selected lines"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_uncommentselection.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-5 from menu within m_tools
end type

on m_-5.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-5.destroy
call super::destroy
end on

type m_lefttrimselection from menu within m_tools
event create ( )
event destroy ( )
end type

on m_lefttrimselection.create
call super::create
this.text = "&Left Trim Selection"
this.microhelp = "Left Trim the selected lines"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_lefttrimselection.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_righttrimselection from menu within m_tools
event create ( )
event destroy ( )
end type

on m_righttrimselection.create
call super::create
this.text = "&Right Trim Selection"
this.microhelp = "Right Trim the selected lines"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_righttrimselection.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-6 from menu within m_tools
end type

on m_-6.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-6.destroy
call super::destroy
end on

type m_sortselectionascending from menu within m_tools
event create ( )
event destroy ( )
end type

on m_sortselectionascending.create
call super::create
this.text = "Sort Selection &Ascending"
this.microhelp = "Sort the selected lines in ascending order"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_sortselectionascending.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_sortselectiondescending from menu within m_tools
event create ( )
event destroy ( )
end type

on m_sortselectiondescending.create
call super::create
this.text = "Sort Selection &Descending"
this.microhelp = "Sort the selected lines in descending order"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_sortselectiondescending.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_-7 from menu within m_tools
end type

on m_-7.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-7.destroy
call super::destroy
end on

type m_clearread-only from menu within m_tools
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_clearread-only.create
call super::create
this.text = "Clear Read-&Only"
this.microhelp = "Clear the Read-Only flag on the file"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_clearread-only.destroy
call super::destroy
end on

type m_changecase from menu within m_tools
m_lower m_lower
m_upper m_upper
m_wordcap m_wordcap
event create ( )
event destroy ( )
end type

on m_changecase.create
call super::create
this.text = "Change Case"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_lower=create m_lower
this.m_upper=create m_upper
this.m_wordcap=create m_wordcap
this.Item[UpperBound(this.Item)+1]=this.m_lower
this.Item[UpperBound(this.Item)+1]=this.m_upper
this.Item[UpperBound(this.Item)+1]=this.m_wordcap
end on

on m_changecase.destroy
call super::destroy
destroy(this.m_lower)
destroy(this.m_upper)
destroy(this.m_wordcap)
end on

type m_lower from menu within m_changecase
event create ( )
event destroy ( )
end type

on m_lower.create
call super::create
this.text = "Lower~tCtrl+L"
this.shortcut = 332
this.microhelp = "Change the selected text to Lower case"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_lower.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_upper from menu within m_changecase
event create ( )
event destroy ( )
end type

on m_upper.create
call super::create
this.text = "Upper~tCtrl+U"
this.shortcut = 341
this.microhelp = "Change the selected text to Upper case"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_upper.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_wordcap from menu within m_changecase
event create ( )
event destroy ( )
end type

on m_wordcap.create
call super::create
this.text = "Wordcap~tCtrl+W"
this.shortcut = 343
this.microhelp = "Wordcap the selected text"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_wordcap.destroy
call super::destroy
end on

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

type m_encoding from menu within m_tools
m_ansi m_ansi
m_utf8 m_utf8
m_utf16be m_utf16be
m_utf16le m_utf16le
end type

on m_encoding.create
call super::create
this.text = "Encoding"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_ansi=create m_ansi
this.m_utf8=create m_utf8
this.m_utf16be=create m_utf16be
this.m_utf16le=create m_utf16le
this.Item[UpperBound(this.Item)+1]=this.m_ansi
this.Item[UpperBound(this.Item)+1]=this.m_utf8
this.Item[UpperBound(this.Item)+1]=this.m_utf16be
this.Item[UpperBound(this.Item)+1]=this.m_utf16le
end on

on m_encoding.destroy
call super::destroy
destroy(this.m_ansi)
destroy(this.m_utf8)
destroy(this.m_utf16be)
destroy(this.m_utf16le)
end on

type m_ansi from menu within m_encoding
end type

event clicked;// set check marks
mf_encoding(EncodingAnsi!)

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_ansi.create
call super::create
this.text = "Ansi"
this.microhelp = "Set the file encoding to Ansi"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_ansi.destroy
call super::destroy
end on

type m_utf8 from menu within m_encoding
end type

event clicked;// set check marks
mf_encoding(EncodingUTF8!)

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_utf8.create
call super::create
this.text = "UTF-8"
this.microhelp = "Set the file encoding to UTF-8"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_utf8.destroy
call super::destroy
end on

type m_utf16be from menu within m_encoding
end type

event clicked;// set check marks
mf_encoding(EncodingUTF16BE!)

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_utf16be.create
call super::create
this.text = "UTF-16BE"
this.microhelp = "Set the file encoding to UTF-16BE"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_utf16be.destroy
call super::destroy
end on

type m_utf16le from menu within m_encoding
end type

event clicked;// set check marks
mf_encoding(EncodingUTF16LE!)

// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_utf16le.create
call super::create
this.text = "Unicode"
this.microhelp = "Set the file encoding to UTF-16LE"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_utf16le.destroy
call super::destroy
end on

type m_eolconversion from menu within m_tools
m_windowscrlf m_windowscrlf
m_unixlf m_unixlf
m_macintoshcr m_macintoshcr
end type

on m_eolconversion.create
call super::create
this.text = "EOL Conversion"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_windowscrlf=create m_windowscrlf
this.m_unixlf=create m_unixlf
this.m_macintoshcr=create m_macintoshcr
this.Item[UpperBound(this.Item)+1]=this.m_windowscrlf
this.Item[UpperBound(this.Item)+1]=this.m_unixlf
this.Item[UpperBound(this.Item)+1]=this.m_macintoshcr
end on

on m_eolconversion.destroy
call super::destroy
destroy(this.m_windowscrlf)
destroy(this.m_unixlf)
destroy(this.m_macintoshcr)
end on

type m_windowscrlf from menu within m_eolconversion
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_windowscrlf.create
call super::create
this.text = "Windows (CRLF)"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_windowscrlf.destroy
call super::destroy
end on

type m_unixlf from menu within m_eolconversion
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_unixlf.create
call super::create
this.text = "Unix (LF)"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_unixlf.destroy
call super::destroy
end on

type m_macintoshcr from menu within m_eolconversion
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_macintoshcr.create
call super::create
this.text = "Macintosh (CR)"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_macintoshcr.destroy
call super::destroy
end on

type m_markers from menu within m_tools
m_togglemarker m_togglemarker
m_gotoprevmarker m_gotoprevmarker
m_gotonextmarker m_gotonextmarker
m_removeallmarkers m_removeallmarkers
m_deletemarkedlines m_deletemarkedlines
event create ( )
event destroy ( )
end type

on m_markers.create
call super::create
this.text = "Markers"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_togglemarker=create m_togglemarker
this.m_gotoprevmarker=create m_gotoprevmarker
this.m_gotonextmarker=create m_gotonextmarker
this.m_removeallmarkers=create m_removeallmarkers
this.m_deletemarkedlines=create m_deletemarkedlines
this.Item[UpperBound(this.Item)+1]=this.m_togglemarker
this.Item[UpperBound(this.Item)+1]=this.m_gotoprevmarker
this.Item[UpperBound(this.Item)+1]=this.m_gotonextmarker
this.Item[UpperBound(this.Item)+1]=this.m_removeallmarkers
this.Item[UpperBound(this.Item)+1]=this.m_deletemarkedlines
end on

on m_markers.destroy
call super::destroy
destroy(this.m_togglemarker)
destroy(this.m_gotoprevmarker)
destroy(this.m_gotonextmarker)
destroy(this.m_removeallmarkers)
destroy(this.m_deletemarkedlines)
end on

type m_togglemarker from menu within m_markers
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_togglemarker.create
call super::create
this.text = "Toggle Marker~tCtrl+F2"
this.shortcut = 369
this.microhelp = "Toggle Marker On/Off"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_togglemarker.destroy
call super::destroy
end on

type m_gotoprevmarker from menu within m_markers
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_gotoprevmarker.create
call super::create
this.text = "Goto Prev Marker~tShift+F2"
this.shortcut = 1137
this.microhelp = "Go to the previous marker line"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_gotoprevmarker.destroy
call super::destroy
end on

type m_gotonextmarker from menu within m_markers
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_gotonextmarker.create
call super::create
this.text = "Goto Next Marker~tF2"
this.shortcut = 113
this.microhelp = "Go to the next marker line"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_gotonextmarker.destroy
call super::destroy
end on

type m_removeallmarkers from menu within m_markers
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_removeallmarkers.create
call super::create
this.text = "Remove All Markers"
this.microhelp = "Remove markers from all lines"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_removeallmarkers.destroy
call super::destroy
end on

type m_deletemarkedlines from menu within m_markers
end type

event clicked;// call menu action function on window
ParentWindow.Dynamic Function wf_menu(this.ClassName())

end event

on m_deletemarkedlines.create
call super::create
this.text = "Delete Marked Lines"
this.microhelp = "Delete all lines that are marked"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_deletemarkedlines.destroy
call super::destroy
end on

type m_help from menu within m_main
m_helptopics m_helptopics
m_-4 m_-4
m_about m_about
end type

on m_help.create
call super::create
this.text = "&Help"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_helptopics=create m_helptopics
this.m_-4=create m_-4
this.m_about=create m_about
this.Item[UpperBound(this.Item)+1]=this.m_helptopics
this.Item[UpperBound(this.Item)+1]=this.m_-4
this.Item[UpperBound(this.Item)+1]=this.m_about
end on

on m_help.destroy
call super::destroy
destroy(this.m_helptopics)
destroy(this.m_-4)
destroy(this.m_about)
end on

type m_helptopics from menu within m_help
end type

on m_helptopics.create
call super::create
this.text = "Help Topics"
this.microhelp = "Display Program Help"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_helptopics.destroy
call super::destroy
end on

event clicked;MessageBox("ShowHelp", "No help file!")

end event

type m_-4 from menu within m_help
end type

on m_-4.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_-4.destroy
call super::destroy
end on

type m_about from menu within m_help
end type

on m_about.create
call super::create
this.text = "About PBEditor"
this.microhelp = "Display copyright notice"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;Open(w_about)

end event

on m_about.destroy
call super::destroy
end on