{"id":13597633,"url":"https://github.com/PhonicUK/CLRCLI","last_synced_at":"2025-04-10T05:33:01.255Z","repository":{"id":11601364,"uuid":"14093693","full_name":"PhonicUK/CLRCLI","owner":"PhonicUK","description":"CLRCLI is an event-driven library for building line-art user interfaces in C#/.Net command-line applications.","archived":false,"fork":false,"pushed_at":"2018-06-28T23:39:10.000Z","size":670,"stargazers_count":137,"open_issues_count":4,"forks_count":17,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-05T00:09:24.991Z","etag":null,"topics":["c-sharp","cli","command-line","console","gui","tui","widget"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhonicUK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-03T21:13:37.000Z","updated_at":"2025-03-09T07:22:14.000Z","dependencies_parsed_at":"2022-09-19T11:21:47.591Z","dependency_job_id":null,"html_url":"https://github.com/PhonicUK/CLRCLI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhonicUK%2FCLRCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhonicUK%2FCLRCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhonicUK%2FCLRCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhonicUK%2FCLRCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhonicUK","download_url":"https://codeload.github.com/PhonicUK/CLRCLI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163307,"owners_count":21057907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","cli","command-line","console","gui","tui","widget"],"created_at":"2024-08-01T17:00:37.519Z","updated_at":"2025-04-10T05:33:00.021Z","avatar_url":"https://github.com/PhonicUK.png","language":"C#","funding_links":[],"categories":["C# #"],"sub_categories":[],"readme":"CLRCLI README\r\n===============\r\n\r\nAbout\r\n-----\r\nCLRCLI (Common-Language-Runtime Command-Line-Interface) is an event-driven\r\nwindowing system using a line-art interface for use by command-line\r\napplications.\r\n\r\n![example screenshot](https://i.imgur.com/yJjTSdD.png)\r\n\r\nGetting Started\r\n---------------\r\nYour starting point is the RootWindow. You only have one instance per \r\napplication. You can add widgets directly to the root window, or to other\r\nwidgets.\r\n\r\nOnce the UI has been built (either in code, or by loading it from an XML\r\nsource) - the Run() method of the RootWindow is used to begin taking user input\r\nand handling events. You will not be able to recieve any keyboard input via\r\nConsole.ReadLine() or similar while it is active.\r\n\r\nRootWindow.Detach() is used to release control of the RootWindow so you can use\r\nthe console as normal. Note that this can only be done in response to an event\r\nraised by a control or it may not terminate properly.\r\n\r\nSee the TestHarness app for a short 'Hello World' example.\r\n\r\nSupported Widgets\r\n-----------------\r\n\r\nCurrently the following widgets are implemented:\r\n\r\n* Root Window\r\n* Dialog\r\n* Button\r\n* Label\r\n* Checkbox\r\n* Radiobox (Automatically toggles sibling radioboxes)\r\n* Slider (Stylized Checkbox)\r\n* Horizontal Progress Bar\r\n* Listbox (with scrolling)\r\n* Single-line textbox (with horizontal scroll, and password field support)\r\n* Horizontal and vertical lines\r\n* Borders with optional titles\r\n* Simple horizontal bar graph\r\n* Spinners (3x3 and 1x1 styles)\r\n\r\nWriting new widgets\r\n-------------------\r\n\r\nNew widgets are required to implement two constructors, one public - which\r\ntakes a parent widget as a parameter (which is passed to base()), and one\r\ninternal which must not take any arguments. Both are required to do any setup\r\nneeded to make the widget function. The internal constructor is used when the\r\nwidget is created by loading its details from an XML file, the public one is\r\nused when creating the widget at runtime in code.\r\n\r\nIn addition any new widgets must be added to the list of XmlElements in the\r\nWidget base class for the Children property. This allows it to be saved/loaded\r\nwith its proper name rather than just appearing as a widget with a type.\r\n\r\nWidgets implement a Render() method. You must not use any Console methods\r\ndirectly from the widget, but rather use the methods exposed by ConsoleHelper.\r\nRender() needs to take into account whether or not a shadow is to be drawn by\r\nchecking the DrawShadow property, and whether the widget currently has focus.\r\n\r\nThe Widget base class exposes a DrawBorderMethod() which uses the appropriate\r\nborder method for the BorderType chosen for the widget.\r\n\r\nWidgets that can be clicked need to implement IFocusable. There's no actual\r\nimplementation involved, and the RootWindow handles firing the clicked event.\r\n\r\nWidgets that need to handle keyboard input (such as textboxes) need to\r\nimplement IAcceptInput. They will be passed every keypress via Keypress method.\r\nIf the input will be 'swallowed' (i.e. the widget is using the input itself) \r\nit should return False. Otherwise it should return True to allow the input to\r\nbe processed as normal.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhonicUK%2FCLRCLI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPhonicUK%2FCLRCLI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhonicUK%2FCLRCLI/lists"}