
/* 
   X = Not meant for virtual, defined in wxMediaEdit/wxMediaPasteboard
       and overloaded there
   Y = Virtual, defined in wxMediaEdit/wxMediaPasteboard
   Z = Virtual, defined in wxMediaBuffer 
*/

@MACRO XrZERO = return 0;
@MACRO XrNULL = return NULL;

@ X "change-style" : void ChangeStyle(wxStyleDelta^); <> style-delta% without position or snip%
@ X "insert" : void Insert(wxSnip!); <> snip% without position

@ X "cut" :  void Cut(bool=FALSE,ExactLong=0); <> without position
@ X "copy" : void Copy(bool=FALSE,ExactLong=0); <> without position
@ X "paste" : void Paste(ExactLong=0); <> without position
@ X "paste-x-selection" : void PasteSelection(ExactLong=0); <> without position
@ X "kill" : void Kill(ExactLong=0); <> without position

@ Y "copy-self" : wxMediaBuffer! CopySelf(); : : : : XrZERO
@ Y "copy-self-to" : void CopySelfTo(wxMediaBuffer!);

@ Y "on-event" : void OnEvent(wxMouseEvent!);
@ Y "on-char" : void OnChar(wxKeyEvent!);
@ Y "adjust-cursor" : wxCursor^ AdjustCursor(wxMouseEvent!); : : : : XrNULL
@ Y "refresh" : void Refresh(double,double,nndouble,nndouble,SYM[caret],wxColour^);
@ Y "own-caret" : void OwnCaret(bool);
@ Y "blink-caret" : void BlinkCaret(); 

@ Y "get-extent" : void GetExtent(nndouble?,nndouble?);
@ Y "get-descent" : double GetDescent(); : : : : XrZERO
@ Y "get-space" : double GetSpace(); : : : : XrZERO

@ X "find-first-snip" : wxSnip^ FindFirstSnip();

@ Z "on-local-event" : void OnLocalEvent(wxMouseEvent!);
@ Z "on-local-char" : void OnLocalChar(wxKeyEvent!);
@ Y "on-default-event" : void OnDefaultEvent(wxMouseEvent!);
@ Y "on-default-char" : void OnDefaultChar(wxKeyEvent!);

@ Z "on-focus" : void OnFocus(bool);

@ Y "on-change" : void OnChange();

@ Z "on-display-size" : void OnDisplaySize();
@ Z "on-display-size-when-ready" : void OnDisplaySizeWhenReady();

@ Y "scroll-to" : bool ScrollTo(wxSnip!,double,double,nndouble,nndouble,bool,SYM[bias]=0); : : : : XrZERO
@ Y "set-caret-owner" : void SetCaretOwner(wxSnip^,SYM[focus]=wxFOCUS_IMMEDIATE);
@ Y "resized" : void Resized(wxSnip!,bool);
@ Y "needs-update" : void NeedsUpdate(wxSnip!,double,double,nndouble,nndouble);

@ Y "get-snip-data" : wxBufferData^ GetSnipData(wxSnip!); : : : : XrZERO
@ Y "set-snip-data" : void SetSnipData(wxSnip!, wxBufferData^);

@ Z "set-modified" : void SetModified(bool);
@ Z "on-snip-modified" : void OnSnipModified(wxSnip!,bool);

@ Y "release-snip" : bool ReleaseSnip(wxSnip!); : : : : XrZERO

@ Y "set-filename" : void SetFilename(nxpathname,bool=FALSE);

@ X "read-from-file" : bool ReadFromFile(wxMediaStreamIn!,bool=FALSE); <> without position
@ X "write-to-file" : bool WriteToFile(wxMediaStreamOut!); <> without position

@ Z "read-header-from-file" : bool ReadHeaderFromFile(wxMediaStreamIn!,string);
@ Z "read-footer-from-file" : bool ReadFooterFromFile(wxMediaStreamIn!,string);
@ Z "write-headers-to-file" : bool WriteHeadersToFile(wxMediaStreamOut!);
@ Z "write-footers-to-file" : bool WriteFootersToFile(wxMediaStreamOut!);

@ Z "on-paint" : void OnPaint(bool,wxDC!,double,double,double,double,double,double,SYM[caret]);  : : /CHECKDCOK[1.METHODNAME("editor<%>","on-paint")]
@ Y "invalidate-bitmap-cache" : void InvalidateBitmapCache(double=0.0,double=0.0,nnfs[end]=-1.0,nnfs[end]=-1.0);

@ Z "on-new-image-snip" : wxImageSnip! OnNewImageSnip(nxpathname,SYM[bitmapType],bool,bool);
@ Z "on-new-box" : wxSnip! OnNewBox(SYM[bufferType]);

@ Z "can-save-file?" : bool CanSaveFile(epathname,SYM[fileType]);
@ Z "on-save-file" : void OnSaveFile(epathname,SYM[fileType]);
@ Z "after-save-file" : void AfterSaveFile(bool);
@ Z "can-load-file?" : bool CanLoadFile(epathname,SYM[fileType]);
@ Z "on-load-file" : void OnLoadFile(epathname,SYM[fileType]);
@ Z "after-load-file" : void AfterLoadFile(bool);

@ Z "on-edit-sequence" : void OnEditSequence();
@ Z "after-edit-sequence" : void AfterEditSequence();

@ Z "get-file" : npathname GetFile(nepathname);
@ Z "put-file" : npathname PutFile(nepathname, nepathname);

@MACRO makeNoCopyFlatString[len] = WITH_VAR_STACK(scheme_make_sized_char_string(r, <len>, 0))

@ X "get-flattened-text" : mzstring/makeNoCopyFlatString[_x0] GetFlattenedText(-long*);

@ Z "default-style-name" : string GetDefaultStyleName()
