Web Analytics

AppCUI-rs

⭐ 376 stars Assamese by gdt050579

🌐 ভাষা

AppCUI-rs

`` ⯈ 𝗔𝗽𝗽𝗖𝗨𝗜-𝗿𝘀 🖳


Windows Build Status
Linux Build Status
macOS Build Status
Code Coverage
License
Crates.io
Docs.rs
Gallery

AppCUI-rs এটা দ্ৰুত, বহুমুখী প্লেটফর্মত চলা ৰাষ্ট লাইব্রেৰী, যি আধুনিক, টেক্সট-ভিত্তিক ইউজাৰ ইণ্টাৰফেছ (TUI) বনাবলৈ ব্যৱহাৰ হয়; ইয়াত উন্নত উইজেট, থিম, আৰু সম্পূৰ্ণ ইউনিক'ড সমৰ্থন আছে—এইটো ncurses আৰু আন টাৰ্মিনেল UI ফ্ৰেমৱৰ্কসমূহৰ বিকল্প।

✨ বৈশিষ্ট্যসমূহ

  • [x] বহুবিধ নিৰ্মিত কন্ট্ৰ'ল (বুটন, লেবেল, টেক্সট বক্স, চেক বক্স, ৰেডিঅ' বুটন, লিস্ট ভিউ, ট্ৰী ভিউ, কম্ব' বক্স, তাৰিখ/সময় নিৰ্বাচক, ৰঙ নিৰ্বাচক, টেব, একৰ্ডিয়ন আদি)। সম্পূৰ্ণ কন্ট্ৰ'লৰ তালিকা ইয়াত পাব
  • [x] শক্তিশালী লেআউট ছিষ্টেম, যাৰ সহায়ত আপুনি কন্ট্ৰ'লসমূহক একেবাৰে স্থানাংক, আত্মীয় স্থানাংক, ডকিং, এলাইনমেণ্ট, এংকাৰ বা পিভট পজিশনিং ব্যৱহাৰ কৰি স্থান নিৰ্ধাৰণ কৰিব পাৰে (বিস্তারিত)
  • [x] মেনু আৰু টুলবাৰ
  • [x] বহু-প্লেটফর্ম সমৰ্থন (Windows API আৰু virtual terminal, Linux ত ncurses, macOS ত termios)
  • [x] পৃষ্ঠভূমিত টাস্ক চলাবলৈ মাল্টি-থ্ৰেডিং সমৰ্থন
  • [x] টাইমাৰ
  • [x] মাউচ সমৰ্থন
  • [x] ক্লিপব'ৰ্ড সমৰ্থন
  • [x] ৰং থিম
  • [x] ইউনিক'ড অক্ষৰৰ সমৰ্থন
  • [x] নিৰ্ধাৰিত সংলাপ (মেছেজ বক্স, ইনপুট বক্স, ৰঙ নিৰ্বাচক, সংৰক্ষণ আৰু মুকলি সংলাপ, ফ'ল্ডাৰ নেভিগেটৰ আদি)
  • [x] সত্যিকাৰ ৰং সমৰ্থন (২৪ বিট প্ৰতি পিক্সেল) যি টাৰ্মিনেলসমূহত সমৰ্থিত

📸 স্ক্ৰীনচটসমূহ

👉 সমস্ত কন্ট্ৰ'লৰ সম্পূৰ্ণ ডেম' চাবলৈ গেলাৰী চাওক!

🖥️ ব্যাকএণ্ডসমূহ

AppCUI-এ অপাৰেটিং চিষ্টেমৰ ওপৰত নিৰ্ভৰ কৰি বিভিন্ন ব্যাকএণ্ড সমৰ্থন কৰে:

  • Windows Console - Win32 নিম্ন-স্তৰৰ API-ৰ আধাৰত, পৰম্পৰাগত Windows কনচ'লৰ বাবে ডিজাইন কৰা হৈছে
  • Windows VT - ANSI অনুক্ৰমৰ আধাৰত, আধুনিক Windows ভাৰ্চুৱেল টাৰ্মিনেলৰ বাবে ডিজাইন কৰা হৈছে
  • NCurses - Linux পৰিৱেশৰ বাবে NCurses API-ৰ আধাৰত
  • Termios - ANSI অনুক্ৰম আৰু macOS-ৰ নিম্ন-স্তৰৰ API-ৰ আধাৰত
  • Web Terminal - ৱেবত ব্যৱহাৰৰ বাবে ডিজাইন কৰা (WebGL-ৰ ওপৰত আধাৰিত)
  • CrossTerm - crossterm ক্রেটৰ ওপৰত আধাৰিত, এটা ফিচাৰ ফ্লেগৰ জৰিয়তে সক্ৰিয় কৰা হয়
সমৰ্থিত বেকএণ্ডসমূহৰ বিষয়ে অধিক জানিবলৈ ইয়াত চাওক

🚀 তৎক্ষণাত আৰম্ভ কৰক

আপোনাৰ Cargo.toml-ত তলত দিয়া সংযোজন কৰক:

toml [dependencies] appcui = "*"
তাৰ পিছত এটা নতুন Rust প্ৰকল্প সৃষ্টি কৰক আৰু তলত দিয়া ক'ডটো যোগ কৰক:

rust use appcui::prelude::*;

fn main() -> Result<(), appcui::system::Error> { let mut app = App::new().build()?; let mut win = Window::new( "Test", LayoutBuilder::new().alignment(Alignment::Center).width(30).height(9).build(), window::Flags::Sizeable, ); win.add(Label::new( "Hello World !", LayoutBuilder::new().alignment(Alignment::Center).width(13).height(1).build(), )); app.add_window(win); app.run(); Ok(()) }

অথবা proc-macros ব্যৱহাৰ কৰি এটা অধিক সঙ্কুচিত সংস্কৰণ:

rs use appcui::prelude::*;

fn main() -> Result<(), appcui::system::Error> { let mut app = App::new().build()?; let mut win = window!("Test,a:c,w:30,h:9"); win.add(label!("'Hello World !',a:c,w:13,h:1")); app.add_window(win); app.run(); Ok(()) }

তাৰপিছত cargo run ব্যৱহাৰ কৰি প্ৰকল্পটো চলাওক। আপুনি Test শিৰোনামৰ এখন উইণ্ডো আৰু মাজত Hello World ! শব্দ দেখা পাব।

🧪 উদাহৰণসমূহ

AppCUI-rs এ আপোনাক আৰম্ভ কৰাত সহায় কৰিবলৈ কিছুমান উদাহৰণৰ সৈতে আহে। আপুনি সেইবোৰ examples ফোল্ডাৰত পাব, যেনে:

🛠️ এটা অধিক জটিল উদাহৰণ

এটা উদাহৰণ যি এটা উইণ্ডো সৃষ্টি কৰে আৰু তাত এখন বুটাম থাকে, যি থিচিলে এটা কাউণ্টাৰ বৃদ্ধি পায়।

rust use appcui::prelude::*;

// Create a window that handles button events and has a counter #[Window(events = ButtonEvents)] struct CounterWindow { counter: i32 }

impl CounterWindow { fn new() -> Self { let mut w = Self { // set up the window title and position base: window!("'Counter window',a:c,w:30,h:5"), // initial counter is 1 counter: 1 }; // add a single button with the caption "1" (like the counter) w.add(button!("'1',d:b,w:20")); w } } impl ButtonEvents for CounterWindow { // When the button is pressed, this function will be called // with the handle of the button that was pressed // Since we only have one button, we don't need to store its handle // in the struct, as we will receive the handle via the on_pressed method fn on_pressed(&mut self, handle: Handle