--
--				   TclHaskell
--
--    A Haskell interface to Tcl,
--  
--    originally based on the TkGofer 1.0 prelude by Thilo Schwinn & Ton
--    Vullinghs (tschwinn@hydra.informatik.uni-ulm.de,
--    ton@bach.informatik.uni-ulm.de), 
--  
--    first version by Chris Dornan (cdornan@cs.ucc.ie).
--    by Meurig Sage

module Tcl (

   -- module TclWidgets
   start,getTclTime,quit,tcl_callback,tcl_debug,mkChildOf,mkSibling,
   destroy,addFinaliserW,wpath,wtag,Coord(..),
   focus,tcl_eventUntil,liftIO,
   packAdd, packForget, gridAdd,gridForget,
   PackInfo(..),Pad(..),PackMode(..),Fill(..),PlacePos(..),
   mkDialog,
   fillX,fillY,fillXY,expand,packPadX,packPadY,inFrame,inWindow,
   packH,packV,packPos,packAnchor,

   GridInfo(..),
   widthX,heightY,gpadX,gpadY,gpadIX,gpadIY,ganchor,gfillX,gfillY,gfillXY,
   ginFrame,ginWindow,

   raise,lower,
   bindArgs,bind,bindxy,bindXY,bindCommand,
   Remover(..),
   rgb,
   trapDeleteWindow,
   after,
   
   getOpenFileName, getSaveFileName,

   Window,Win,Geometry(..),rootWin,window',window,title,geometry,
   showWindow,hideWindow,iconifyWindow,

   Message,Messg,message,message',
   Menu,Men,menu,menu',popup,tearoff,menuSize,
   Menubutton,MB,Cascade,CB,menubutton,menubutton',cascade,cascade',
   MButton,MBut,mbutton,mbutton',
   MCheckbutton,MChe,mcheckbutton,mcheckbutton',
   getMCheck,setMCheck,varMCheck,
   Separator,Sep,separator,separator',
   MRadiobutton,MRB,mradiobutton,mradiobutton',moveMItem,

   Radio,radio,mradio,appendRadio,removeRadio,setRadio,getRadio,
   setRadio',getRadio',appendMRadio,removeMRadio,

   Radiobutton,RB,radiobutton,radiobutton',
   Checkbutton,Che,checkbutton,checkbutton',getCheck,
   setCheck,getCheck,varCheck,
   Button,But,button,button',

   Frame,Fra,frame,frame',
   Label,Lab,label,label',
   Scale,Sca,vscale,hscale,vscale',hscale',getScale,setScale,
   ScrollableX,ScrollableY,xview,xMoveTo,xScroll,
   yview,yMoveTo,yScroll,
   Scrollbar,Scr,scrollbar,hscroll',vscroll',hscroll,vscroll,

   Scan(..),scanMark,scanDrag,

   Listbox,Lis,listbox,listbox',LIndex(..),
   getListboxSelection,getListboxEntries,getListboxSize,
   listboxMoveToSee,insertListbox,resetListbox,deleteListbox,
   addListboxSelection,clearListboxSelection,setListboxSelectionAnchor,

   Canvas,Can,canvas,canvas',citem_canvas,
   moveObject,removeObject,scaleObject,lowerObject,raiseObject,
   bboxObjects,getCoords,setCoords,

   COval,COva,coval,coval',CLine,CLin,cline,cline',
   CRectangle,CRec,crectangle,crectangle',CArc,CAr,carc,carc',
   CPoly,CPol,cpoly,cpoly',CText,CTex,ctext,ctext',
   CBitmap,CBit,cbitmap,cbitmap',CWindow,CWin,cwindow,cwindow',
   cimage,cimage',CImage,CIm,
 
   Entry,Ent,entry,entry',getEntry,setEntry,insertEntry,deleteEntry,
   setICursor,clearEntrySelection,setEntrySelectionAnchor,isEntrySelected, 
   setEntrySelection,adjustEntrySelection,setToEntrySelection,EIndex(..),
   
   Edit,Edi,edit,edit',getEdit,getFromTo,saveEdit,loadEdit,
   resetEdit,insertEdit,insertEditTagged,
   TIndex(..),ModMove(..),eqTIndex,ltTIndex,gtTIndex,cmpTIndex,lineAreaEdit,
   fromTIndex,searchEdit,editMoveTo,
   clearSelEdit,cutClipboard,copyClipboard,pasteClipboard,
   Mark,markId,markEdit,mark',mark,getMarkPos,setMark,removeMark,
   setMarkGravity,getMarkGravity,getAllMarks,getMark,Gravity(..),
   previousMark,nextMark,insertionMark,currentMark,

   Embedded,Ew,stretch,align,Align(..),embedded',embedded,getAllEmbedded,

   Tag,Tg,TagId,tag,tag',setWithTags,tagEdit,lowerTag,raiseTag,
   getAllTags,getTagsAt,tagRemove,tagRanges,tagNextRange,tagPrevRange,
   selectionTag,putPosTag,tagText,tagId,tagEditWPath,

   -- TclPrimExports
  

   Widget,WWidget,WClass,MWidget,MClass,CWidget,CClass,TWidget,TClass,
   PWidget,PClass,EWidget,EClass,
   WPath(..),WTag(..),
   tcl_append,tcl_string,parentWPath,
   Config,

   -- TclConf
   Conf,cset,cget,bindArgs,(%%),(%#),
   Anchor(..),SelectMode(..),Relief(..),Justify(..),Relief(..),
   Wrap(..),ActiveState(..),Rect(..),
   Has_activebackground(..),Has_activeforeground(..),Has_anchor(..),
   Has_aspect(..),
   Has_background(..),Has_bitmap(..),Has_borderwidth(..),
   Has_command(..),Has_cursor(..),Has_disabledforeground(..),
   Has_ent_show(..),Has_exportselection(..),Has_selectmode(..),
   Has_fill(..),Has_font(..),Has_foreground(..),Has_height(..),
   Has_highlightbackground(..),Has_highlightcolor(..),Has_image(..),
   Has_highlightthickness(..),Has_hor_orient(..),Has_indicatoron(..),
   Has_justify(..),Has_active_state(..),Has_outline(..),Has_padx(..),Has_pady(..),
   Has_postcommand(..),Has_relief(..),Has_scrollregion(..),
   Has_selectbackground(..),Has_selectborderwidth(..),Has_selectcolor(..),
   Has_selectforeground(..),Has_sca_from(..),Has_sca_length(..),Has_sca_to(..),
   Has_setgrid(..),Has_sliderlength(..),Has_tags(..),Has_takefocus(..),
   Has_text(..), Has_tickinterval(..),Has_troughcolor(..),
   Has_underline(..),Has_use_menu(..),Has_wgt_label(..),
   Has_width(..),Has_wrap(..),Has_wraplength(..),

   -- GUIMonad

   GUIRef,newState,readState,writeState,modState,
   GUIArray,newGUIArray,readGUIArray,writeGUIArray,modGUIArray,
   tcl,tcl_,GUI,
   proc,catchGUI,failGUI,tryGUI,tcl_newWgtName,tcl_newName,
   tcl_debug,
   parseInt,

   module TclHandle
   ) where

import TclHandle
import TclWidgets
import GUIMonad
import TclPrimExports

