Files
RedBear-OS/local/recipes/kde/kf6-syntaxhighlighting/source/autotests/folding/highlight.prg.fold
T

72 lines
1.9 KiB
Plaintext

// Test file to test kate's clipper highlighting
// kate: hl Clipper;
<beginfold id='1'>//BEGIN INCLUDES</beginfold id='1'>
#include <clip-ui.ch>
#include "logo.ch"
#define PRGVERSION "0.0.1"
<endfold id='1'>//END</endfold id='1'>
<beginfold id='1'>//BEGIN CODE</beginfold id='1'>
static ws, win
static driver := getDriver()
<beginfold id='2'>/*</beginfold id='2'> a multiline
comment
<endfold id='2'>*/</endfold id='2'>
<beginfold id='3'>function</beginfold id='3'> main( formName )
local form
local fileName
<beginfold id='4'>if</beginfold id='4'> empty(formName)
?? "Usage: ./form_ui <form.xfl>&\n"
CANCEL
<endfold id='4'></endfold id='4'><beginfold id='4'>else</beginfold id='4'>
fileName := formName
<endfold id='4'>endif</endfold id='4'>
ws := UIWorkSpace()
form := UIForm( fileName )
win := form:parseFile()
// ?? valtype(win),chr(10)
<beginfold id='4'>if</beginfold id='4'> win == NIL
CANCEL
<endfold id='4'>endif</endfold id='4'>
win:show()
ws:run()
ws:quit()
<endfold id='3'>return</endfold id='3'> 0
<beginfold id='2'>/*</beginfold id='2'> Setting dialog <endfold id='2'>*/</endfold id='2'>
<beginfold id='3'>function</beginfold id='3'> settingsDialog()
?? "TODO: Settings dialog&\n"
<endfold id='3'>return</endfold id='3'>
<beginfold id='2'>/*</beginfold id='2'> About dialog <endfold id='2'>*/</endfold id='2'>
<beginfold id='3'>function</beginfold id='3'> aboutDialog()
local dlg := UIWindow("About", win, "aboutDlg", .F.)
local hl, lside, t, bb, bD
hl := UIHBox(,4,8)
lside := UIVBox()
lside:add(UIImage(eas_logo_mini,.T.))
hl:add(lside,.F.,.F.)
dlg:userSpace:add(hl,.T.,.T.)
t := UIVBox()
hl:add(t,.T.,.T.)
t:add(UILabel("License: GPL version 2 or later"))
bb := UIButtonBar()
t:add(bb)
bD := UIButton(win, "&Close", {|o,e| dlg:close() } )
bb:add( bD )
dlg:setFocus(bD)
dlg:setDefault(bD)
dlg:setPlacement( .T. )
dlg:show()
<endfold id='3'>return</endfold id='3'>
<endfold id='1'>//END</endfold id='1'>