Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Aros/Developer/Zune/Examples/Texteditor

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

A short example program using TextEditor Zune (=MUI) Custom Class. It will present a ready to use Texteditor in a window. Sourcecode #include <proto/exec.h> #include <proto/intuition.h> #include <proto/muimaster.h> #include <libraries/mui.h> #include <mui/TextEditor_mcc.h> int main (int argc, char **argv) { struct Library *MUIMasterBase = NULL; Object *mui_app = NULL; Object *mui_win = NULL; if (MUIMasterBase = (struct Library *) OpenLibrary("muimaster.library", 0)) { mui_app = ApplicationObject, SubWindow, mui_win = WindowObject, MUIA_Window_Title, "texteditor", WindowContents, TextEditorObject, End, End, End; if (mui_app) { // open window: SetAttrs(mui_win, MUIA_Window_Open, TRUE, TAG_DONE); IPTR open; GetAttr(MUIA_Window_Open, mui_win, &open); if (open) { // *** INSERT LOOP CODE ASKING FOR WINDOW CLOSE EVENT HERE *** // ... and close again: SetAttrs(mui_win, MUIA_Window_Open, FALSE, TAG_DONE); } DisposeObject(mui_app); } CloseLibrary(MUIMasterBase); } return 1; } AROS native compiler command line gcc [sourcefile] -lmui Screenshot AROS version