From 1853cd1e7f9acbcfae3b59d3c94d25164d400bbc Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 11:42:09 +0900 Subject: [PATCH 01/12] fix --- Makefile.pl | 7 +++++-- src/dialog/filechooser.c | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile.pl b/Makefile.pl index 6eba069..1c761bc 100755 --- a/Makefile.pl +++ b/Makefile.pl @@ -171,8 +171,11 @@ print(OUT "\n"); print(OUT "all: lib examples\n"); print(OUT "\n"); print(OUT "install: lib\n"); -print(OUT " mkdir -p \$(DESTDIR)\$(PREFIX)/lib \$(DESTDIR)\$(PREFIX)/include\n"); -print(OUT " -cp src/${library_prefix}Mw${library_suffix} \$(DESTDIR)\$(PREFIX)/lib/\n"); +print(OUT + " mkdir -p \$(DESTDIR)\$(PREFIX)/lib \$(DESTDIR)\$(PREFIX)/include\n"); +print(OUT +" -cp src/${library_prefix}Mw${library_suffix} \$(DESTDIR)\$(PREFIX)/lib/\n" +); print(OUT " -cp src/libMw.a \$(DESTDIR)\$(PREFIX)/lib/\n"); print(OUT " cp -rf include \$(DESTDIR)\$(PREFIX)/\n"); print(OUT "\n"); diff --git a/src/dialog/filechooser.c b/src/dialog/filechooser.c index 7220ac5..cd23faa 100644 --- a/src/dialog/filechooser.c +++ b/src/dialog/filechooser.c @@ -125,7 +125,11 @@ static void okay_activate(MwWidget handle, void* user, void* call) { } else if(stat(p, &s) != 0) { MwWidget msgbox = MwMessageBox(handle->parent, "File does not exist!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); +#ifdef _S_IFDIR + } else if(fc->dir_only ? ((s.st_mode & _S_IFDIR) != _S_IFDIR) : 0) { +#else } else if(fc->dir_only ? !S_ISDIR(s.st_mode) : 0) { +#endif MwWidget msgbox = MwMessageBox(handle->parent, "File is not permitted here!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); } else { From 5003d2924605ea3a94ae9c5f5842f237aee5086d Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 12:26:15 +0900 Subject: [PATCH 02/12] wtf --- Makefile.pl | 2 +- examples/basic/checkbox.c | 6 +- examples/basic/combobox.c | 6 +- examples/basic/image.c | 20 +- examples/basic/listbox.c | 2 +- examples/basic/messagebox.c | 8 +- examples/basic/progressbar.c | 12 +- examples/basic/radiobox.c | 4 +- examples/basic/rotate.c | 6 +- examples/basic/scrollbar.c | 6 +- examples/basic/treeview.c | 14 +- examples/gldemos/tripaint.c | 10 +- examples/harvard.c | 1443 +++++++++++++++++----------------- 13 files changed, 769 insertions(+), 770 deletions(-) diff --git a/Makefile.pl b/Makefile.pl index 1c761bc..c00ca62 100755 --- a/Makefile.pl +++ b/Makefile.pl @@ -181,7 +181,7 @@ print(OUT " cp -rf include \$(DESTDIR)\$(PREFIX)/\n"); print(OUT "\n"); print(OUT "format:\n"); print(OUT -" clang-format --verbose -i `find src include -name \"*.c\" -or -name \"*.h\"`\n" +" clang-format --verbose -i `find src include examples -name \"*.c\" -or -name \"*.h\"`\n" ); print(OUT " perltidy -b -bext=\"/\" --paren-tightness=2 `find tools pl Makefile.pl -name \"*.pl\"`\n" diff --git a/examples/basic/checkbox.c b/examples/basic/checkbox.c index d7d4b59..c66f066 100644 --- a/examples/basic/checkbox.c +++ b/examples/basic/checkbox.c @@ -4,10 +4,10 @@ int main() { MwWidget window; MwLibraryInit(); - + window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8, - MwNtitle, "checkbox", - NULL); + MwNtitle, "checkbox", + NULL); MwVaCreateWidget(MwCheckBoxClass, "cb1", window, 8, 8, 16, 16, NULL); diff --git a/examples/basic/combobox.c b/examples/basic/combobox.c index 706b910..0816466 100644 --- a/examples/basic/combobox.c +++ b/examples/basic/combobox.c @@ -1,13 +1,13 @@ #include -int main(){ +int main() { MwWidget w, cb; MwLibraryInit(); w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 320 + 5, 5 + 24 + 5, - MwNtitle, "combobox", - NULL); + MwNtitle, "combobox", + NULL); cb = MwCreateWidget(MwComboBoxClass, "combobox", w, 5, 5, 320, 24); diff --git a/examples/basic/image.c b/examples/basic/image.c index cf1ffb3..7d7f55a 100644 --- a/examples/basic/image.c +++ b/examples/basic/image.c @@ -1,20 +1,20 @@ #include int main() { - MwWidget window, image, image2, image3; + MwWidget window, image, image2, image3; MwLLPixmap px, px2, px3; MwLibraryInit(); - window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500, - MwNtitle, "image image", - NULL); - image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400); - image2 = MwCreateWidget(MwImageClass, "image", window, 250, 50, 200, 200); - image3 = MwCreateWidget(MwImageClass, "image", window, 250, 250, 200, 200); - px = MwLoadImage(window, "examples/picture.png"); - px2 = MwLoadImage(window, "examples/picture.jpg"); - px3 = MwLoadImage(window, "resource/logo/logo.png"); + window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500, + MwNtitle, "image image", + NULL); + image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400); + image2 = MwCreateWidget(MwImageClass, "image", window, 250, 50, 200, 200); + image3 = MwCreateWidget(MwImageClass, "image", window, 250, 250, 200, 200); + px = MwLoadImage(window, "examples/picture.png"); + px2 = MwLoadImage(window, "examples/picture.jpg"); + px3 = MwLoadImage(window, "resource/logo/logo.png"); if(px == NULL) px = MwLoadImage(window, "../examples/picture.png"); if(px2 == NULL) px2 = MwLoadImage(window, "../examples/picture.jpg"); diff --git a/examples/basic/listbox.c b/examples/basic/listbox.c index 53d9451..92c7d21 100644 --- a/examples/basic/listbox.c +++ b/examples/basic/listbox.c @@ -28,7 +28,7 @@ int main() { int i; MwListBoxPacket* packet; int index; - MwLLPixmap px; + MwLLPixmap px; MwLibraryInit(); diff --git a/examples/basic/messagebox.c b/examples/basic/messagebox.c index 124718b..bb1c30d 100644 --- a/examples/basic/messagebox.c +++ b/examples/basic/messagebox.c @@ -41,10 +41,10 @@ int main() { MwLibraryInit(); - msg = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 300, 100, MwNtitle, "test", NULL); - btn = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8, 300 - 16, (100 - 16) / 2, MwNtext, "press me!", NULL); - btn2 = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); - btn3 = MwVaCreateWidget(MwButtonClass, "button", msg, 8 + (300 - 16) / 2, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); + msg = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 300, 100, MwNtitle, "test", NULL); + btn = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8, 300 - 16, (100 - 16) / 2, MwNtext, "press me!", NULL); + btn2 = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); + btn3 = MwVaCreateWidget(MwButtonClass, "button", msg, 8 + (300 - 16) / 2, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); MwAddUserHandler(btn, MwNactivateHandler, spawn, msg); MwAddUserHandler(btn2, MwNactivateHandler, spawn2, msg); diff --git a/examples/basic/progressbar.c b/examples/basic/progressbar.c index 4d4a16f..4048a6e 100644 --- a/examples/basic/progressbar.c +++ b/examples/basic/progressbar.c @@ -5,12 +5,12 @@ int main() { MwLibraryInit(); - w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 640 + 5, 5 + 32 + 5, - MwNtitle, "progress bar", - NULL); - p = MwVaCreateWidget(MwProgressBarClass, "progress", w, 5, 5, 640, 32, - MwNvalue, 25, - NULL); + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 640 + 5, 5 + 32 + 5, + MwNtitle, "progress bar", + NULL); + p = MwVaCreateWidget(MwProgressBarClass, "progress", w, 5, 5, 640, 32, + MwNvalue, 25, + NULL); (void)p; diff --git a/examples/basic/radiobox.c b/examples/basic/radiobox.c index 3ab8431..168f101 100644 --- a/examples/basic/radiobox.c +++ b/examples/basic/radiobox.c @@ -6,8 +6,8 @@ int main() { MwLibraryInit(); window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8, - MwNtitle, "radiobox", - NULL); + MwNtitle, "radiobox", + NULL); MwVaCreateWidget(MwRadioBoxClass, "cb1", window, 8, 8, 16, 16, NULL); diff --git a/examples/basic/rotate.c b/examples/basic/rotate.c index b933c26..574eb2d 100644 --- a/examples/basic/rotate.c +++ b/examples/basic/rotate.c @@ -55,13 +55,13 @@ void resize(MwWidget w, void* user, void* client) { int main() { MwWidget window; - int i; + int i; MwLibraryInit(); window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, (ww = 500), (wh = 500), - MwNtitle, "rotate", - NULL); + MwNtitle, "rotate", + NULL); for(i = 0; i < (int)(sizeof(buttons) / sizeof(buttons[0])); i++) { const char* color = ""; diff --git a/examples/basic/scrollbar.c b/examples/basic/scrollbar.c index 8a9509a..594cd98 100644 --- a/examples/basic/scrollbar.c +++ b/examples/basic/scrollbar.c @@ -3,13 +3,13 @@ int main() { MwWidget window; - int i; + int i; MwLibraryInit(); window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500, - MwNtitle, "main", - NULL); + MwNtitle, "main", + NULL); for(i = 0; i < 500 / 16; i++) { MwVaCreateWidget(MwScrollBarClass, "scroll", window, 16 * i, 0, 16, 500, diff --git a/examples/basic/treeview.c b/examples/basic/treeview.c index 0597e0d..3837cb4 100644 --- a/examples/basic/treeview.c +++ b/examples/basic/treeview.c @@ -20,16 +20,16 @@ void activate(MwWidget handle, void* user, void* call) { MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, destroy, msgbox); } -int main(){ - MwWidget tv; +int main() { + MwWidget tv; MwLLPixmap px; - int i; - void* p = NULL, *r; + int i; + void * p = NULL, *r; MwLibraryInit(); - + wmain = MwCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 640 + 5, 5 + 480 + 5); - tv = MwCreateWidget(MwTreeViewClass, "tree", wmain, 5, 5, 640, 480); + tv = MwCreateWidget(MwTreeViewClass, "tree", wmain, 5, 5, 640, 480); px = MwLoadIcon(tv, MwIconInfo); @@ -37,7 +37,7 @@ int main(){ MwAddUserHandler(tv, MwNactivateHandler, activate, NULL); - for(i = 0; i < 10; i++){ + for(i = 0; i < 10; i++) { void* old = p; MwTreeViewAdd(tv, old, px, "World"); diff --git a/examples/gldemos/tripaint.c b/examples/gldemos/tripaint.c index e1d7ccf..2cc7aa8 100644 --- a/examples/gldemos/tripaint.c +++ b/examples/gldemos/tripaint.c @@ -108,14 +108,14 @@ static void mouse_move(MwWidget handle, void* user, void* call) { int main() { MwSizeHints hints; - MwWidget window, viewport; + MwWidget window, viewport; MwLibraryInit(); - window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, - MwNtitle, "tripaint", - NULL); - viewport = MwCreateWidget(MwViewportClass, "viewport", window, 5, 5, 630, 470 - 16 - 5); + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, + MwNtitle, "tripaint", + NULL); + viewport = MwCreateWidget(MwViewportClass, "viewport", window, 5, 5, 630, 470 - 16 - 5); hints.min_width = hints.max_width = 640; hints.min_height = hints.max_height = 480; diff --git a/examples/harvard.c b/examples/harvard.c index 9947d9a..af5da28 100644 --- a/examples/harvard.c +++ b/examples/harvard.c @@ -1,723 +1,722 @@ const char* harvard[] = { - "The birch canoe slid on the smooth planks. ", - "Glue the sheet to the dark blue background.", - "It's easy to tell the depth of a well. ", - "These days a chicken leg is a rare dish. ", - "Rice is often served in round bowls.", - "The juice of lemons makes fine punch. ", - "The box was thrown beside the parked truck. ", - "The hogs were fed chopped corn and garbage. ", - "Four hours of steady work faced us. ", - "A large size in stockings is hard to sell. ", - "The boy was there when the sun rose.", - "A rod is used to catch pink salmon. ", - "The source of the huge river is the clear spring. ", - "Kick the ball straight and follow through.", - "Help the woman get back to her feet. ", - "A pot of tea helps to pass the evening. ", - "Smoky fires lack flame and heat. ", - "The soft cushion broke the man's fall. ", - "The salt breeze came across from the sea. ", - "The girl at the booth sold fifty bonds. ", - "The small pup gnawed a hole in the sock. ", - "The fish twisted and turned on the bent hook. ", - "Press the pants and sew a button on the vest. ", - "The swan dive was far short of perfect. ", - "The beauty of the view stunned the young boy. ", - "Two blue fish swam in the tank. ", - "Her purse was full of useless trash. ", - "The colt reared and threw the tall rider. ", - "It snowed, rained, and hailed the same morning. ", - "Read verse out loud for pleasure.", - "Hoist the load to your left shoulder. ", - "Take the winding path to reach the lake. ", - "Note closely the size of the gas tank. ", - "Wipe the grease off his dirty face. ", - "Mend the coat before you go out. ", - "The wrist was badly strained and hung limp. ", - "The stray cat gave birth to kittens. ", - "The young girl gave no clear response. ", - "The meal was cooked before the bell rang.", - "What joy there is in living. ", - "A king ruled the state in the early days. ", - "The ship was torn apart on the sharp reef. ", - "Sickness kept him home the third week. ", - "The wide road shimmered in the hot sun. ", - "The lazy cow lay in the cool grass. ", - "Lift the square stone over the fence. ", - "The rope will bind the seven books at once. ", - "Hop over the fence and plunge in. ", - "The friendly gang left the drug store. ", - "Mesh wire keeps chicks inside. ", - "The frosty air passed through the coat. ", - "The crooked maze failed to fool the mouse. ", - "Adding fast leads to wrong sums. ", - "The show was a flop from the very start. ", - "A saw is a tool used for making boards.", - "The wagon moved on well oiled wheels.", - "March the soldiers past the next hill. ", - "A cup of sugar makes sweet fudge. ", - "Place a rosebush near the porch steps. ", - "Both lost their lives in the raging storm. ", - "We talked of the side show in the circus.", - "Use a pencil to write the first draft.", - "He ran half way to the hardware store. ", - "The clock struck to mark the third period.", - "A small creek cut across the field.", - "Cars and busses stalled in snow drifts.", - "The set of china hit the floor with a crash. ", - "This is a grand season for hikes on the road.", - "The dune rose from the edge of the water. ", - "Those words were the cue for the actor to leave.", - "A yacht slid around the point into the bay.", - "The two met while playing on the sand.", - "The ink stain dried on the finished page.", - "The walled town was seized without a fight. ", - "The lease ran out in sixteen weeks. ", - "A tame squirrel makes a nice pet. ", - "The horn of the car woke the sleeping cop. ", - "The heart beat strongly and with firm strokes. ", - "The pearl was worn in a thin silver ring. ", - "The fruit peel was cut in thick slices.", - "The Navy attacked the big task force.", - "See the cat glaring at the scared mouse. ", - "There are more than two factors here.", - "The hat brim was wide and too droopy.", - "The lawyer tried to lose his case.", - "The grass curled around the fence post.", - "Cut the pie into large parts.", - "Men strive but seldom get rich. ", - "Always close the barn door tight.", - "He lay prone and hardly moved a limb.", - "The slush lay deep along the street. ", - "A wisp of cloud hung in the blue air. ", - "A pound of sugar costs more than eggs.", - "The fin was sharp and cut the clear water.", - "The play seems dull and quite stupid.", - "Bail the boat to stop it from sinking.", - "The term ended in late june that year.", - "A Tusk is used to make costly gifts.", - "Ten pins were set in order.", - "The bill was paid every third week.", - "Oak is strong and also gives shade.", - "Cats and Dogs each hate the other.", - "The pipe began to rust while new.", - "Open the crate but don't break the glass.", - "Add the sum to the product of these three.", - "Thieves who rob friends deserve jail.", - "The ripe taste of cheese improves with age.", - "Act on these orders with great speed.", - "The hog crawled under the high fence.", - "Move the vat over the hot fire.", - "The bark of the pine tree was shiny and dark.", - "Leaves turn brown and yellow in the fall. ", - "The pennant waved when the wind blew.", - "Split the log with a quick, sharp blow.", - "Burn peat after the logs give out.", - "He ordered peach pie with ice cream.", - "Weave the carpet on the right hand side.", - "Hemp is a weed found in parts of the tropics.", - "A lame back kept his score low.", - "We find joy in the simplest things.", - "Type out three lists of orders.", - "The harder he tried the less he got done.", - "The boss ran the show with a watchful eye.", - "The cup cracked and spilled its contents.", - "Paste can cleanse the most dirty brass.", - "The slang word for raw whiskey is booze.", - "It caught its hind paw in a rusty trap.", - "The wharf could be seen at the farther shore.", - "Feel the heat of the weak dying flame.", - "The tiny girl took off her hat.", - "A cramp is no small danger on a swim.", - "He said the same phrase thirty times.", - "Pluck the bright rose without leaves.", - "Two plus seven is less than ten.", - "The glow deepened in the eyes of the sweet girl.", - "Bring your problems to the wise chief.", - "Write a fond note to the friend you cherish.", - "Clothes and lodging are free to new men.", - "We frown when events take a bad turn.", - "Port is a strong wine with a smoky taste.", - "The young kid jumped the rusty gate.", - "Guess the result from the first scores. ", - "A salt pickle tastes fine with ham.", - "The just claim got the right verdict.", - "Those thistles bend in a high wind.", - "Pure bred poodles have curls.", - "The tree top waved in a graceful way. ", - "The spot on the blotter was made by green ink. ", - "Mud was spattered on the front of his white shirt.", - "The cigar burned a hole in the desk top. ", - "The empty flask stood on the tin tray.", - "A speedy man can beat this track mark. ", - "He broke a new shoelace that day.", - "The coffee stand is too high for the couch. ", - "The urge to write short stories is rare. ", - "The pencils have all been used.", - "The pirates seized the crew of the lost ship.", - "We tried to replace the coin but failed. ", - "She sewed the torn coat quite neatly. ", - "The sofa cushion is red and of light weight.", - "The jacket hung on the back of the wide chair.", - "At that high level the air is pure.", - "Drop the two when you add the figures.", - "A filing case is now hard to buy.", - "An abrupt start does not win the prize. ", - "Wood is best for making toys and blocks.", - "The office paint was a dull, sad tan.", - "He knew the skill of the great young actress.", - "A rag will soak up spilled water.", - "A shower of dirt fell from the hot pipes.", - "Steam hissed from the broken valve. ", - "The child almost hurt the small dog.", - "There was a sound of dry leaves outside.", - "The sky that morning was clear and bright blue.", - "Torn scraps littered the stone floor.", - "Sunday is the best part of the week. ", - "The doctor cured him with these pills.", - "The new girl was fired today at noon.", - "They felt gay when the ship arrived in port.", - "Add the store's account to the last cent.", - "Acid burns holes in wool cloth.", - "Fairy tales should be fun to write.", - "Eight miles of woodland burned to waste.", - "The third act was dull and tired the players.", - "A young child should not suffer fright.", - "Add the column and put the sum here.", - "We admire and love a good cook.", - "There the flood mark is ten inches.", - "He carved a head from the round block of marble.", - "She has a smart way of wearing clothes.", - "The fruit of a fig tree is apple shaped.", - "Corn cobs can be used to kindle a fire. ", - "Where were they when the noise started.", - "The paper box is full of thumb tacks.", - "Sell your gift to a buyer at a good gain.", - "The tongs lay beside the ice pail.", - "The petals fall with the next puff of wind.", - "Bring your best compass to the third class.", - "They could laugh although they were sad.", - "Farmers came in to thresh the oat crop.", - "The brown house was on fire to the attic.", - "The lure is used to catch trout and flounder.", - "Float the soap on top of the bath water.", - "A blue crane is a tall wading bird.", - "A fresh start will work such wonders.", - "The club rented the rink for the fifth night.", - "After the dance, they went straight home.", - "The hostess taught the new maid to serve.", - "He wrote his last novel there at the inn.", - "Even the worst will beat his low score.", - "The cement had dried when he moved it.", - "The loss of the second ship was hard to take.", - "The fly made its way along the wall.", - "Do that with a wooden stick.", - "Live wires should be kept covered.", - "The large house had hot water taps.", - "It is hard to erase blue or red ink.", - "Write at once or you may forget it.", - "The doorknob was made of bright clean brass.", - "The wreck occurred by the bank on Main Street.", - "A pencil with black lead writes best.", - "Coax a young calf to drink from a bucket.", - "Schools for ladies teach charm and grace.", - "The lamp shone with a steady green flame.", - "They took the axe and the saw to the forest.", - "The ancient coin was quite dull and worn.", - "The shaky barn fell with a loud crash. ", - "Jazz and swing fans like fast music.", - "Rake the rubbish up and then burn it.", - "Slash the gold cloth into fine ribbons.", - "Try to have the court decide the case.", - "They are pushed back each time they attack.", - "He broke his ties with groups of former friends.", - "They floated on the raft to sun their white backs.", - "The map had an X that meant nothing.", - "Whitings are small fish caught in nets.", - "Some ads serve to cheat buyers.", - "Jerk the rope and the bell rings weakly.", - "A waxed floor makes us lose balance.", - "Madam, this is the best brand of corn.", - "On the islands the sea breeze is soft and mild.", - "The play began as soon as we sat down.", - "This will lead the world to more sound and fury.", - "Add salt before you fry the egg.", - "The rush for funds reached its peak Tuesday.", - "The birch looked stark white and lonesome.", - "The box is held by a bright red snapper.", - "To make pure ice, you freeze water.", - "The first worm gets snapped early.", - "Jump the fence and hurry up the bank.", - "Yell and clap as the curtain slides back.", - "They are men who walk the middle of the road.", - "Both brothers wear the same size.", - "In some form or other we need fun.", - "The prince ordered his head chopped off.", - "The houses are built of red clay bricks.", - "Ducks fly north but lack a compass.", - "Fruit flavors are used in fizz drinks.", - "These pills do less good than others.", - "Canned pears lack full flavor.", - "The dark pot hung in the front closet.", - "Carry the pail to the wall and spill it there.", - "The train brought our hero to the big town.", - "We are sure that one war is enough.", - "Gray paint stretched for miles around.", - "The rude laugh filled the empty room.", - "High seats are best for football fans.", - "Tea served from the brown jug is tasty.", - "A dash of pepper spoils beef stew.", - "A zestful food is the hot-cross bun.", - "The horse trotted around the field at a brisk pace.", - "Find the twin who stole the pearl necklace.", - "Cut the cord that binds the box tightly.", - "The red tape bound the smuggled food.", - "Look in the corner to find the tan shirt.", - "The cold drizzle will halt the bond drive.", - "Nine men were hired to dig the ruins.", - "The junk yard had a mouldy smell.", - "The flint sputtered and lit a pine torch.", - "Soak the cloth and drown the sharp odor.", - "The shelves were bare of both jam or crackers.", - "A joy to every child is the swan boat.", - "All sat frozen and watched the screen.", - "A cloud of dust stung his tender eyes.", - "To reach the end he needs much courage.", - "Shape the clay gently into block form.", - "A ridge on a smooth surface is a bump or flaw.", - "Hedge apples may stain your hands green.", - "Quench your thirst, then eat the crackers.", - "Tight curls get limp on rainy days.", - "The mute muffled the high tones of the horn.", - "The gold ring fits only a pierced ear.", - "The old pan was covered with hard fudge.", - "Watch the log float in the wide river.", - "The node on the stalk of wheat grew daily.", - "The heap of fallen leaves was set on fire.", - "Write fast if you want to finish early.", - "His shirt was clean but one button was gone.", - "The barrel of beer was a brew of malt and hops.", - "Tin cans are absent from store shelves.", - "Slide the box into that empty space.", - "The plant grew large and green in the window.", - "The beam dropped down on the workman's head.", - "Pink clouds floated with the breeze.", - "She danced like a swan, tall and graceful.", - "The tube was blown and the tire flat and useless.", - "It is late morning on the old wall clock.", - "Let's all join as we sing the last chorus.", - "The last switch cannot be turned off.", - "The fight will end in just six minutes.", - "The store walls were lined with colored frocks.", - "The peace league met to discuss their plans. ", - "The rise to fame of a person takes luck.", - "Paper is scarce, so write with much care.", - "The quick fox jumped on the sleeping cat.", - "The nozzle of the fire hose was bright brass.", - "Screw the round cap on as tight as needed.", - "Time brings us many changes.", - "The purple tie was ten years old.", - "Men think and plan and sometimes act.", - "Fill the ink jar with sticky glue.", - "He smoke a big pipe with strong contents.", - "We need grain to keep our mules healthy.", - "Pack the records in a neat thin case.", - "The crunch of feet in the snow was the only sound.", - "The copper bowl shone in the sun's rays.", - "Boards will warp unless kept dry. ", - "The plush chair leaned against the wall. ", - "Glass will clink when struck by metal.", - "Bathe and relax in the cool green grass.", - "Nine rows of soldiers stood in a line.", - "The beach is dry and shallow at low tide.", - "The idea is to sew both edges straight.", - "The kitten chased the dog down the street.", - "Pages bound in cloth make a book.", - "Try to trace the fine lines of the painting.", - "Women form less than half of the group. ", - "The zones merge in the central part of town.", - "A gem in the rough needs work to polish.", - "Code is used when secrets are sent.", - "Most of the news is easy for us to hear.", - "He used the lathe to make brass objects.", - "The vane on top of the pole revolved in the wind.", - "Mince pie is a dish served to children.", - "The clan gathered on each dull night.", - "Let it burn, it gives us warmth and comfort.", - "A castle built from sand fails to endure.", - "A child's wit saved the day for us.", - "Tack the strip of carpet to the worn floor.", - "Next Tuesday we must vote.", - "Pour the stew from the pot into the plate.", - "Each penny shone like new.", - "The man went to the woods to gather sticks.", - "The dirt piles were lines along the road.", - "The logs fell and tumbled into the clear stream.", - "Just hoist it up and take it away.", - "A ripe plum is fit for a king's palate.", - "Our plans right now are hazy. ", - "Brass rings are sold by these natives.", - "It takes a good trap to capture a bear.", - "Feed the white mouse some flower seeds.", - "The thaw came early and freed the stream.", - "He took the lead and kept it the whole distance.", - "The key you designed will fit the lock.", - "Plead to the council to free the poor thief.", - "Better hash is made of rare beef.", - "This plank was made for walking on .", - "The lake sparkled in the red hot sun.", - "He crawled with care along the ledge.", - "Tend the sheep while the dog wanders.", - "It takes a lot of help to finish these.", - "Mark the spot with a sign painted red.", - "Take two shares as a fair profit. ", - "The fur of cats goes by many names.", - "North winds bring colds and fevers.", - "He asks no person to vouch for him.", - "Go now and come here later.", - "A sash of gold silk will trim her dress.", - "Soap can wash most dirt away.", - "That move means the game is over.", - "He wrote down a long list of items.", - "A siege will crack the strong defense.", - "Grape juice and water mix well.", - "Roads are paved with sticky tar.", - "Fake stones shine but cost little.", - "The drip of the rain made a pleasant sound. ", - "Smoke poured out of every crack. ", - "Serve the hot rum to the tired heroes.", - "Much of the story makes good sense. ", - "The sun came up to light the eastern sky.", - "Heave the line over the port side.", - "A lathe cuts and trims any wood.", - "It's a dense crowd in two distinct ways.", - "His hip struck the knee of the next player.", - "The stale smell of old beer lingers.", - "The desk was firm on the shaky floor.", - "It takes heat to bring out the odor.", - "Beef is scarcer than some lamb.", - "Raise the sail and steer the ship northward.", - "A cone costs five cents on Mondays.", - "A pod is what peas always grow in.", - "Jerk that dart from the cork target.", - "No cement will hold hard wood.", - "We now have a new base for shipping.", - "A list of names is carved around the base.", - "The sheep were led home by a dog.", - "Three for a dime, the young peddler cried.", - "The sense of smell is better than that of touch.", - "No hardship seemed to make him sad.", - "Grace makes up for lack of beauty.", - "Nudge gently but wake her now.", - "The news struck doubt into restless minds.", - "Once we stood beside the shore.", - "A chink in the wall allowed a draft to blow.", - "Fasten two pins on each side.", - "A cold dip restores health and zest.", - "He takes the oath of office each March.", - "The sand drifts over the sills of the old house.", - "The point of the steel pen was bent and twisted.", - "There is a lag between thought and act.", - "Seed is needed to plant the spring corn.", - "Draw the chart with heavy black lines.", - "The boy owed his pal thirty cents.", - "The chap slipped into the crowd and was lost.", - "Hats are worn to tea and not to dinner.", - "The ramp led up to the wide highway.", - "Beat the dust from the rug onto the lawn.", - "Say it slowly but make it ring clear.", - "The straw nest housed five robins.", - "Screen the porch with woven straw mats.", - "This horse will nose his way to the finish.", - "The dry wax protects the deep scratch.", - "He picked up the dice for a second roll.", - "These coins will be needed to pay his debt.", - "The nag pulled the frail cart along.", - "Twist the valve and release hot steam.", - "The vamp of the shoe had a gold buckle.", - "The smell of burned rags itches my nose.", - "New pants lack cuffs and pockets.", - "The marsh will freeze when cold enough.", - "They slice the sausage thin with a knife.", - "The bloom of the rose lasts a few days.", - "A gray mare walked before the colt.", - "Breakfast buns are fine with a hot drink.", - "Bottles hold four kinds of rum.", - "The man wore a feather in his felt hat.", - "He wheeled the bike past the winding road.", - "Drop the ashes on the worn old rug.", - "The desk and both chairs were painted tan.", - "Throw out the used paper cup and plate.", - "A clean neck means a neat collar.", - "The couch cover and hall drapes were blue.", - "The stems of the tall glasses cracked and broke.", - "The wall phone rang loud and often.", - "The clothes dried on a thin wooden rack.", - "Turn out the lantern which gives us light.", - "The cleat sank deeply into the soft turf.", - "The bills were mailed promptly on the tenth of the month.", - "To have is better than to wait and hope.", - "The price is fair for a good antique clock.", - "The music played on while they talked.", - "Dispense with a vest on a day like this.", - "The bunch of grapes was pressed into wine.", - "He sent the figs, but kept the ripe cherries.", - "The hinge on the door creaked with old age.", - "The screen before the fire kept in the sparks.", - "Fly by night and you waste little time.", - "Thick glasses helped him read the print.", - "Birth and death marks the limits of life.", - "The chair looked strong but had no bottom.", - "The kite flew wildly in the high wind.", - "A fur muff is stylish once more.", - "The tin box held priceless stones.", - "We need an end of all such matter.", - "The case was puzzling to the old and wise.", - "The bright lanterns were gay on the dark lawn.", - "We don't get much money but we have fun.", - "The youth drove with zest, but little skill.", - "Five years he lived with a shaggy dog.", - "A fence cuts through the corner lot.", - "The way to save money is not to spend much.", - "Shut the hatch before the waves push it in.", - "The odor of spring makes young hearts jump.", - "Crack the walnut with your sharp side teeth.", - "He offered proof in the form of a large chart.", - "Send the stuff in a thick paper bag.", - "A quart of milk is water for the most part.", - "They told wild tales to frighten him.", - "The three story house was built of stone.", - "In the rear of the ground floor was a large passage.", - "A man in a blue sweater sat at the desk.", - "Oats are a food eaten by horse and man.", - "Their eyelids droop for want of sleep.", - "A sip of tea revives his tired friend.", - "There are many ways to do these things.", - "Tuck the sheet under the edge of the mat.", - "A force equal to that would move the earth.", - "We like to see clear weather.", - "The work of the tailor is seen on each side.", - "Take a chance and win a china doll.", - "Shake the dust from your shoes, stranger.", - "She was kind to sick old people.", - "The square wooden crate was packed to be shipped.", - "The dusty bench stood by the stone wall.", - "We dress to suit the weather of most days.", - "Smile when you say nasty words.", - "A bowl of rice is free with chicken stew.", - "The water in this well is a source of good health.", - "Take shelter in this tent, but keep still.", - "That guy is the writer of a few banned books.", - "The little tales they tell are false.", - "The door was barred, locked, and bolted as well.", - "Ripe pears are fit for a queen's table.", - "A big wet stain was on the round carpet.", - "The kite dipped and swayed, but stayed aloft.", - "The pleasant hours fly by much too soon.", - "The room was crowded with a wild mob.", - "This strong arm shall shield your honor.", - "She blushed when he gave her a white orchid.", - "The beetle droned in the hot June sun.", - "Press the pedal with your left foot.", - "Neat plans fail without luck.", - "The black trunk fell from the landing.", - "The bank pressed for payment of the debt.", - "The theft of the pearl pin was kept secret.", - "Shake hands with this friendly child.", - "The vast space stretched into the far distance.", - "A rich farm is rare in this sandy waste.", - "His wide grin earned many friends.", - "Flax makes a fine brand of paper.", - "Hurdle the pit with the aid of a long pole.", - "A strong bid may scare your partner stiff.", - "Even a just cause needs power to win.", - "Peep under the tent and see the clowns.", - "The leaf drifts along with a slow spin.", - "Cheap clothes are flashy but don't last.", - "A thing of small note can cause despair.", - "Flood the mails with requests for this book.", - "A thick coat of black paint covered all.", - "The pencil was cut to be sharp at both ends.", - "Those last words were a strong statement.", - "He wrote his name boldly at the top of the sheet.", - "Dill pickles are sour but taste fine.", - "Down that road is the way to the grain farmer.", - "Either mud or dust are found at all times.", - "The best method is to fix it in place with clips.", - "If you mumble your speech will be lost.", - "At night the alarm roused him from a deep sleep.", - "Read just what the meter says.", - "Fill your pack with bright trinkets for the poor.", - "The small red neon lamp went out.", - "Clams are small, round, soft, and tasty.", - "The fan whirled its round blades softly.", - "The line where the edges join was clean.", - "Breathe deep and smell the piny air.", - "It matters not if he reads these words or those.", - "A brown leather bag hung from its strap.", - "A toad and a frog are hard to tell apart.", - "A white silk jacket goes with any shoes.", - "A break in the dam almost caused a flood.", - "Paint the sockets in the wall dull green.", - "The child crawled into the dense grass.", - "Bribes fail where honest men work.", - "Trample the spark, else the flames will spread.", - "The hilt of the sword was carved with fine designs.", - "A round hole was drilled through the thin board.", - "Footprints showed the path he took up the beach.", - "She was waiting at my front lawn.", - "A vent near the edge brought in fresh air.", - "Prod the old mule with a crooked stick.", - "It is a band of steel three inches wide.", - "The pipe ran almost the length of the ditch.", - "It was hidden from sight by a mass of leaves and shrubs.", - "The weight of the package was seen on the high scale.", - "Wake and rise, and step into the green outdoors.", - "The green light in the brown box flickered.", - "The brass tube circled the high wall.", - "The lobes of her ears were pierced to hold rings.", - "Hold the hammer near the end to drive the nail.", - "Next Sunday is the twelfth of the month.", - "Every word and phrase he speaks is true.", - "He put his last cartridge into the gun and fired.", - "They took their kids from the public school.", - "Drive the screw straight into the wood.", - "Keep the hatch tight and the watch constant.", - "Sever the twine with a quick snip of the knife.", - "Paper will dry out when wet.", - "Slide the catch back and open the desk.", - "Help the weak to preserve their strength.", - "A sullen smile gets few friends.", - "Stop whistling and watch the boys march.", - "Jerk the cord, and out tumbles the gold.", - "Slide the tray across the glass top.", - "The cloud moved in a stately way and was gone.", - "Light maple makes for a swell room.", - "Set the piece here and say nothing.", - "Dull stories make her laugh.", - "A stiff cord will do to fasten your shoe.", - "Get the trust fund to the bank early.", - "Choose between the high road and the low.", - "A plea for funds seems to come again.", - "He lent his coat to the tall gaunt stranger.", - "There is a strong chance it will happen once more.", - "The duke left the park in a silver coach.", - "Greet the new guests and leave quickly.", - "When the frost has come it is time for turkey.", - "Sweet words work better than fierce.", - "A thin stripe runs down the middle.", - "A six comes up more often than a ten.", - "Lush ferns grow on the lofty rocks.", - "The ram scared the school children off.", - "The team with the best timing looks good.", - "The farmer swapped his horse for a brown ox.", - "Sit on the perch and tell the others what to do.", - "A steep trail is painful for our feet.", - "The early phase of life moves fast.", - "Green moss grows on the northern side.", - "Tea in thin china has a sweet taste.", - "Pitch the straw through the door of the stable.", - "The latch on the back gate needed a nail.", - "The goose was brought straight from the old market.", - "The sink is the thing in which we pile dishes.", - "A whiff of it will cure the most stubborn cold.", - "The facts don't always show who is right.", - "She flaps her cape as she parades the street.", - "The loss of the cruiser was a blow to the fleet.", - "Loop the braid to the left and then over.", - "Plead with the lawyer to drop the lost cause.", - "Calves thrive on tender spring grass.", - "Post no bills on this office wall.", - "Tear a thin sheet from the yellow pad.", - "A cruise in warm waters in a sleek yacht is fun.", - "A streak of color ran down the left edge.", - "It was done before the boy could see it.", - "Crouch before you jump or miss the mark.", - "Pack the kits and don't forget the salt.", - "The square peg will settle in the round hole.", - "Fine soap saves tender skin.", - "Poached eggs and tea must suffice.", - "Bad nerves are jangled by a door slam.", - "Ship maps are different from those for planes.", - "Dimes showered down from all sides.", - "They sang the same tunes at each party.", - "The sky in the west is tinged with orange red.", - "The pods of peas ferment in bare fields.", - "The horse balked and threw the tall rider.", - "The hitch between the horse and cart broke.", - "Pile the coal high in the shed corner.", - "A gold vase is both rare and costly.", - "The knife was hung inside its bright sheath.", - "The rarest spice comes from the far East.", - "The roof should be tilted at a sharp slant.", - "A smatter of French is worse than none.", - "The mule trod the treadmill day and night.", - "The aim of the contest is to raise a great fund.", - "To send it now in large amounts is bad.", - "There is a fine hard tang in salty air.", - "Cod is the main business of the north shore.", - "The slab was hewn from heavy blocks of slate.", - "Dunk the stale biscuits into strong drink.", - "Hang tinsel from both branches.", - "Cap the jar with a tight brass cover.", - "The poor boy missed the boat again.", - "Be sure to set that lamp firmly in the hole.", - "Pick a card and slip it under the pack.", - "A round mat will cover the dull spot.", - "The first part of the plan needs changing.", - "A good book informs of what we ought to know.", - "The mail comes in three batches per day.", - "You cannot brew tea in a cold pot.", - "Dots of light betrayed the black cat.", - "Put the chart on the mantel and tack it down.", - "The night shift men rate extra pay.", - "The red paper brightened the dim stage.", - "See the player scoot to third base.", - "Slide the bill between the two leaves.", - "Many hands help get the job done.", - "We don't like to admit our small faults.", - "No doubt about the way the wind blows.", - "Dig deep in the earth for pirate's gold.", - "The steady drip is worse than a drenching rain.", - "A flat pack takes less luggage space.", - "Green ice frosted the punch bowl.", - "A stuffed chair slipped from the moving van.", - "The stitch will serve but needs to be shortened.", - "A thin book fits in the side pocket.", - "The gloss on top made it unfit to read.", - "The hail pattered on the burnt brown grass.", - "Seven seals were stamped on great sheets.", - "Our troops are set to strike heavy blows.", - "The store was jammed before the sale could start.", - "It was a bad error on the part of the new judge.", - "One step more and the board will collapse.", - "Take the match and strike it against your shoe.", - "The pot boiled but the contents failed to jell.", - "The baby puts his right foot in his mouth.", - "The bombs left most of the town in ruins.", - "Stop and stare at the hard working man.", - "The streets are narrow and full of sharp turns.", - "The pup jerked the leash as he saw a feline shape.", - "Open your book to the first page.", - "Fish evade the net and swim off.", - "Dip the pail once and let it settle.", - "Will you please answer that phone.", - "The big red apple fell to the ground.", - "The curtain rose and the show was on.", - "The young prince became heir to the throne.", - "He sent the boy on a short errand.", - "Leave now and you will arrive on time.", - "The corner store was robbed last night.", - "A gold ring will please most any girl.", - "The long journey home took a year.", - "She saw a cat in the neighbor's house.", - "A pink shell was found on the sandy beach.", - "Small children came to see him.", - "The grass and bushes were wet with dew.", - "The blind man counted his old coins.", - "A severe storm tore down the barn.", - "She called his name many times.", - "When you hear the bell, come quickly.", - NULL -}; + "The birch canoe slid on the smooth planks. ", + "Glue the sheet to the dark blue background.", + "It's easy to tell the depth of a well. ", + "These days a chicken leg is a rare dish. ", + "Rice is often served in round bowls.", + "The juice of lemons makes fine punch. ", + "The box was thrown beside the parked truck. ", + "The hogs were fed chopped corn and garbage. ", + "Four hours of steady work faced us. ", + "A large size in stockings is hard to sell. ", + "The boy was there when the sun rose.", + "A rod is used to catch pink salmon. ", + "The source of the huge river is the clear spring. ", + "Kick the ball straight and follow through.", + "Help the woman get back to her feet. ", + "A pot of tea helps to pass the evening. ", + "Smoky fires lack flame and heat. ", + "The soft cushion broke the man's fall. ", + "The salt breeze came across from the sea. ", + "The girl at the booth sold fifty bonds. ", + "The small pup gnawed a hole in the sock. ", + "The fish twisted and turned on the bent hook. ", + "Press the pants and sew a button on the vest. ", + "The swan dive was far short of perfect. ", + "The beauty of the view stunned the young boy. ", + "Two blue fish swam in the tank. ", + "Her purse was full of useless trash. ", + "The colt reared and threw the tall rider. ", + "It snowed, rained, and hailed the same morning. ", + "Read verse out loud for pleasure.", + "Hoist the load to your left shoulder. ", + "Take the winding path to reach the lake. ", + "Note closely the size of the gas tank. ", + "Wipe the grease off his dirty face. ", + "Mend the coat before you go out. ", + "The wrist was badly strained and hung limp. ", + "The stray cat gave birth to kittens. ", + "The young girl gave no clear response. ", + "The meal was cooked before the bell rang.", + "What joy there is in living. ", + "A king ruled the state in the early days. ", + "The ship was torn apart on the sharp reef. ", + "Sickness kept him home the third week. ", + "The wide road shimmered in the hot sun. ", + "The lazy cow lay in the cool grass. ", + "Lift the square stone over the fence. ", + "The rope will bind the seven books at once. ", + "Hop over the fence and plunge in. ", + "The friendly gang left the drug store. ", + "Mesh wire keeps chicks inside. ", + "The frosty air passed through the coat. ", + "The crooked maze failed to fool the mouse. ", + "Adding fast leads to wrong sums. ", + "The show was a flop from the very start. ", + "A saw is a tool used for making boards.", + "The wagon moved on well oiled wheels.", + "March the soldiers past the next hill. ", + "A cup of sugar makes sweet fudge. ", + "Place a rosebush near the porch steps. ", + "Both lost their lives in the raging storm. ", + "We talked of the side show in the circus.", + "Use a pencil to write the first draft.", + "He ran half way to the hardware store. ", + "The clock struck to mark the third period.", + "A small creek cut across the field.", + "Cars and busses stalled in snow drifts.", + "The set of china hit the floor with a crash. ", + "This is a grand season for hikes on the road.", + "The dune rose from the edge of the water. ", + "Those words were the cue for the actor to leave.", + "A yacht slid around the point into the bay.", + "The two met while playing on the sand.", + "The ink stain dried on the finished page.", + "The walled town was seized without a fight. ", + "The lease ran out in sixteen weeks. ", + "A tame squirrel makes a nice pet. ", + "The horn of the car woke the sleeping cop. ", + "The heart beat strongly and with firm strokes. ", + "The pearl was worn in a thin silver ring. ", + "The fruit peel was cut in thick slices.", + "The Navy attacked the big task force.", + "See the cat glaring at the scared mouse. ", + "There are more than two factors here.", + "The hat brim was wide and too droopy.", + "The lawyer tried to lose his case.", + "The grass curled around the fence post.", + "Cut the pie into large parts.", + "Men strive but seldom get rich. ", + "Always close the barn door tight.", + "He lay prone and hardly moved a limb.", + "The slush lay deep along the street. ", + "A wisp of cloud hung in the blue air. ", + "A pound of sugar costs more than eggs.", + "The fin was sharp and cut the clear water.", + "The play seems dull and quite stupid.", + "Bail the boat to stop it from sinking.", + "The term ended in late june that year.", + "A Tusk is used to make costly gifts.", + "Ten pins were set in order.", + "The bill was paid every third week.", + "Oak is strong and also gives shade.", + "Cats and Dogs each hate the other.", + "The pipe began to rust while new.", + "Open the crate but don't break the glass.", + "Add the sum to the product of these three.", + "Thieves who rob friends deserve jail.", + "The ripe taste of cheese improves with age.", + "Act on these orders with great speed.", + "The hog crawled under the high fence.", + "Move the vat over the hot fire.", + "The bark of the pine tree was shiny and dark.", + "Leaves turn brown and yellow in the fall. ", + "The pennant waved when the wind blew.", + "Split the log with a quick, sharp blow.", + "Burn peat after the logs give out.", + "He ordered peach pie with ice cream.", + "Weave the carpet on the right hand side.", + "Hemp is a weed found in parts of the tropics.", + "A lame back kept his score low.", + "We find joy in the simplest things.", + "Type out three lists of orders.", + "The harder he tried the less he got done.", + "The boss ran the show with a watchful eye.", + "The cup cracked and spilled its contents.", + "Paste can cleanse the most dirty brass.", + "The slang word for raw whiskey is booze.", + "It caught its hind paw in a rusty trap.", + "The wharf could be seen at the farther shore.", + "Feel the heat of the weak dying flame.", + "The tiny girl took off her hat.", + "A cramp is no small danger on a swim.", + "He said the same phrase thirty times.", + "Pluck the bright rose without leaves.", + "Two plus seven is less than ten.", + "The glow deepened in the eyes of the sweet girl.", + "Bring your problems to the wise chief.", + "Write a fond note to the friend you cherish.", + "Clothes and lodging are free to new men.", + "We frown when events take a bad turn.", + "Port is a strong wine with a smoky taste.", + "The young kid jumped the rusty gate.", + "Guess the result from the first scores. ", + "A salt pickle tastes fine with ham.", + "The just claim got the right verdict.", + "Those thistles bend in a high wind.", + "Pure bred poodles have curls.", + "The tree top waved in a graceful way. ", + "The spot on the blotter was made by green ink. ", + "Mud was spattered on the front of his white shirt.", + "The cigar burned a hole in the desk top. ", + "The empty flask stood on the tin tray.", + "A speedy man can beat this track mark. ", + "He broke a new shoelace that day.", + "The coffee stand is too high for the couch. ", + "The urge to write short stories is rare. ", + "The pencils have all been used.", + "The pirates seized the crew of the lost ship.", + "We tried to replace the coin but failed. ", + "She sewed the torn coat quite neatly. ", + "The sofa cushion is red and of light weight.", + "The jacket hung on the back of the wide chair.", + "At that high level the air is pure.", + "Drop the two when you add the figures.", + "A filing case is now hard to buy.", + "An abrupt start does not win the prize. ", + "Wood is best for making toys and blocks.", + "The office paint was a dull, sad tan.", + "He knew the skill of the great young actress.", + "A rag will soak up spilled water.", + "A shower of dirt fell from the hot pipes.", + "Steam hissed from the broken valve. ", + "The child almost hurt the small dog.", + "There was a sound of dry leaves outside.", + "The sky that morning was clear and bright blue.", + "Torn scraps littered the stone floor.", + "Sunday is the best part of the week. ", + "The doctor cured him with these pills.", + "The new girl was fired today at noon.", + "They felt gay when the ship arrived in port.", + "Add the store's account to the last cent.", + "Acid burns holes in wool cloth.", + "Fairy tales should be fun to write.", + "Eight miles of woodland burned to waste.", + "The third act was dull and tired the players.", + "A young child should not suffer fright.", + "Add the column and put the sum here.", + "We admire and love a good cook.", + "There the flood mark is ten inches.", + "He carved a head from the round block of marble.", + "She has a smart way of wearing clothes.", + "The fruit of a fig tree is apple shaped.", + "Corn cobs can be used to kindle a fire. ", + "Where were they when the noise started.", + "The paper box is full of thumb tacks.", + "Sell your gift to a buyer at a good gain.", + "The tongs lay beside the ice pail.", + "The petals fall with the next puff of wind.", + "Bring your best compass to the third class.", + "They could laugh although they were sad.", + "Farmers came in to thresh the oat crop.", + "The brown house was on fire to the attic.", + "The lure is used to catch trout and flounder.", + "Float the soap on top of the bath water.", + "A blue crane is a tall wading bird.", + "A fresh start will work such wonders.", + "The club rented the rink for the fifth night.", + "After the dance, they went straight home.", + "The hostess taught the new maid to serve.", + "He wrote his last novel there at the inn.", + "Even the worst will beat his low score.", + "The cement had dried when he moved it.", + "The loss of the second ship was hard to take.", + "The fly made its way along the wall.", + "Do that with a wooden stick.", + "Live wires should be kept covered.", + "The large house had hot water taps.", + "It is hard to erase blue or red ink.", + "Write at once or you may forget it.", + "The doorknob was made of bright clean brass.", + "The wreck occurred by the bank on Main Street.", + "A pencil with black lead writes best.", + "Coax a young calf to drink from a bucket.", + "Schools for ladies teach charm and grace.", + "The lamp shone with a steady green flame.", + "They took the axe and the saw to the forest.", + "The ancient coin was quite dull and worn.", + "The shaky barn fell with a loud crash. ", + "Jazz and swing fans like fast music.", + "Rake the rubbish up and then burn it.", + "Slash the gold cloth into fine ribbons.", + "Try to have the court decide the case.", + "They are pushed back each time they attack.", + "He broke his ties with groups of former friends.", + "They floated on the raft to sun their white backs.", + "The map had an X that meant nothing.", + "Whitings are small fish caught in nets.", + "Some ads serve to cheat buyers.", + "Jerk the rope and the bell rings weakly.", + "A waxed floor makes us lose balance.", + "Madam, this is the best brand of corn.", + "On the islands the sea breeze is soft and mild.", + "The play began as soon as we sat down.", + "This will lead the world to more sound and fury.", + "Add salt before you fry the egg.", + "The rush for funds reached its peak Tuesday.", + "The birch looked stark white and lonesome.", + "The box is held by a bright red snapper.", + "To make pure ice, you freeze water.", + "The first worm gets snapped early.", + "Jump the fence and hurry up the bank.", + "Yell and clap as the curtain slides back.", + "They are men who walk the middle of the road.", + "Both brothers wear the same size.", + "In some form or other we need fun.", + "The prince ordered his head chopped off.", + "The houses are built of red clay bricks.", + "Ducks fly north but lack a compass.", + "Fruit flavors are used in fizz drinks.", + "These pills do less good than others.", + "Canned pears lack full flavor.", + "The dark pot hung in the front closet.", + "Carry the pail to the wall and spill it there.", + "The train brought our hero to the big town.", + "We are sure that one war is enough.", + "Gray paint stretched for miles around.", + "The rude laugh filled the empty room.", + "High seats are best for football fans.", + "Tea served from the brown jug is tasty.", + "A dash of pepper spoils beef stew.", + "A zestful food is the hot-cross bun.", + "The horse trotted around the field at a brisk pace.", + "Find the twin who stole the pearl necklace.", + "Cut the cord that binds the box tightly.", + "The red tape bound the smuggled food.", + "Look in the corner to find the tan shirt.", + "The cold drizzle will halt the bond drive.", + "Nine men were hired to dig the ruins.", + "The junk yard had a mouldy smell.", + "The flint sputtered and lit a pine torch.", + "Soak the cloth and drown the sharp odor.", + "The shelves were bare of both jam or crackers.", + "A joy to every child is the swan boat.", + "All sat frozen and watched the screen.", + "A cloud of dust stung his tender eyes.", + "To reach the end he needs much courage.", + "Shape the clay gently into block form.", + "A ridge on a smooth surface is a bump or flaw.", + "Hedge apples may stain your hands green.", + "Quench your thirst, then eat the crackers.", + "Tight curls get limp on rainy days.", + "The mute muffled the high tones of the horn.", + "The gold ring fits only a pierced ear.", + "The old pan was covered with hard fudge.", + "Watch the log float in the wide river.", + "The node on the stalk of wheat grew daily.", + "The heap of fallen leaves was set on fire.", + "Write fast if you want to finish early.", + "His shirt was clean but one button was gone.", + "The barrel of beer was a brew of malt and hops.", + "Tin cans are absent from store shelves.", + "Slide the box into that empty space.", + "The plant grew large and green in the window.", + "The beam dropped down on the workman's head.", + "Pink clouds floated with the breeze.", + "She danced like a swan, tall and graceful.", + "The tube was blown and the tire flat and useless.", + "It is late morning on the old wall clock.", + "Let's all join as we sing the last chorus.", + "The last switch cannot be turned off.", + "The fight will end in just six minutes.", + "The store walls were lined with colored frocks.", + "The peace league met to discuss their plans. ", + "The rise to fame of a person takes luck.", + "Paper is scarce, so write with much care.", + "The quick fox jumped on the sleeping cat.", + "The nozzle of the fire hose was bright brass.", + "Screw the round cap on as tight as needed.", + "Time brings us many changes.", + "The purple tie was ten years old.", + "Men think and plan and sometimes act.", + "Fill the ink jar with sticky glue.", + "He smoke a big pipe with strong contents.", + "We need grain to keep our mules healthy.", + "Pack the records in a neat thin case.", + "The crunch of feet in the snow was the only sound.", + "The copper bowl shone in the sun's rays.", + "Boards will warp unless kept dry. ", + "The plush chair leaned against the wall. ", + "Glass will clink when struck by metal.", + "Bathe and relax in the cool green grass.", + "Nine rows of soldiers stood in a line.", + "The beach is dry and shallow at low tide.", + "The idea is to sew both edges straight.", + "The kitten chased the dog down the street.", + "Pages bound in cloth make a book.", + "Try to trace the fine lines of the painting.", + "Women form less than half of the group. ", + "The zones merge in the central part of town.", + "A gem in the rough needs work to polish.", + "Code is used when secrets are sent.", + "Most of the news is easy for us to hear.", + "He used the lathe to make brass objects.", + "The vane on top of the pole revolved in the wind.", + "Mince pie is a dish served to children.", + "The clan gathered on each dull night.", + "Let it burn, it gives us warmth and comfort.", + "A castle built from sand fails to endure.", + "A child's wit saved the day for us.", + "Tack the strip of carpet to the worn floor.", + "Next Tuesday we must vote.", + "Pour the stew from the pot into the plate.", + "Each penny shone like new.", + "The man went to the woods to gather sticks.", + "The dirt piles were lines along the road.", + "The logs fell and tumbled into the clear stream.", + "Just hoist it up and take it away.", + "A ripe plum is fit for a king's palate.", + "Our plans right now are hazy. ", + "Brass rings are sold by these natives.", + "It takes a good trap to capture a bear.", + "Feed the white mouse some flower seeds.", + "The thaw came early and freed the stream.", + "He took the lead and kept it the whole distance.", + "The key you designed will fit the lock.", + "Plead to the council to free the poor thief.", + "Better hash is made of rare beef.", + "This plank was made for walking on .", + "The lake sparkled in the red hot sun.", + "He crawled with care along the ledge.", + "Tend the sheep while the dog wanders.", + "It takes a lot of help to finish these.", + "Mark the spot with a sign painted red.", + "Take two shares as a fair profit. ", + "The fur of cats goes by many names.", + "North winds bring colds and fevers.", + "He asks no person to vouch for him.", + "Go now and come here later.", + "A sash of gold silk will trim her dress.", + "Soap can wash most dirt away.", + "That move means the game is over.", + "He wrote down a long list of items.", + "A siege will crack the strong defense.", + "Grape juice and water mix well.", + "Roads are paved with sticky tar.", + "Fake stones shine but cost little.", + "The drip of the rain made a pleasant sound. ", + "Smoke poured out of every crack. ", + "Serve the hot rum to the tired heroes.", + "Much of the story makes good sense. ", + "The sun came up to light the eastern sky.", + "Heave the line over the port side.", + "A lathe cuts and trims any wood.", + "It's a dense crowd in two distinct ways.", + "His hip struck the knee of the next player.", + "The stale smell of old beer lingers.", + "The desk was firm on the shaky floor.", + "It takes heat to bring out the odor.", + "Beef is scarcer than some lamb.", + "Raise the sail and steer the ship northward.", + "A cone costs five cents on Mondays.", + "A pod is what peas always grow in.", + "Jerk that dart from the cork target.", + "No cement will hold hard wood.", + "We now have a new base for shipping.", + "A list of names is carved around the base.", + "The sheep were led home by a dog.", + "Three for a dime, the young peddler cried.", + "The sense of smell is better than that of touch.", + "No hardship seemed to make him sad.", + "Grace makes up for lack of beauty.", + "Nudge gently but wake her now.", + "The news struck doubt into restless minds.", + "Once we stood beside the shore.", + "A chink in the wall allowed a draft to blow.", + "Fasten two pins on each side.", + "A cold dip restores health and zest.", + "He takes the oath of office each March.", + "The sand drifts over the sills of the old house.", + "The point of the steel pen was bent and twisted.", + "There is a lag between thought and act.", + "Seed is needed to plant the spring corn.", + "Draw the chart with heavy black lines.", + "The boy owed his pal thirty cents.", + "The chap slipped into the crowd and was lost.", + "Hats are worn to tea and not to dinner.", + "The ramp led up to the wide highway.", + "Beat the dust from the rug onto the lawn.", + "Say it slowly but make it ring clear.", + "The straw nest housed five robins.", + "Screen the porch with woven straw mats.", + "This horse will nose his way to the finish.", + "The dry wax protects the deep scratch.", + "He picked up the dice for a second roll.", + "These coins will be needed to pay his debt.", + "The nag pulled the frail cart along.", + "Twist the valve and release hot steam.", + "The vamp of the shoe had a gold buckle.", + "The smell of burned rags itches my nose.", + "New pants lack cuffs and pockets.", + "The marsh will freeze when cold enough.", + "They slice the sausage thin with a knife.", + "The bloom of the rose lasts a few days.", + "A gray mare walked before the colt.", + "Breakfast buns are fine with a hot drink.", + "Bottles hold four kinds of rum.", + "The man wore a feather in his felt hat.", + "He wheeled the bike past the winding road.", + "Drop the ashes on the worn old rug.", + "The desk and both chairs were painted tan.", + "Throw out the used paper cup and plate.", + "A clean neck means a neat collar.", + "The couch cover and hall drapes were blue.", + "The stems of the tall glasses cracked and broke.", + "The wall phone rang loud and often.", + "The clothes dried on a thin wooden rack.", + "Turn out the lantern which gives us light.", + "The cleat sank deeply into the soft turf.", + "The bills were mailed promptly on the tenth of the month.", + "To have is better than to wait and hope.", + "The price is fair for a good antique clock.", + "The music played on while they talked.", + "Dispense with a vest on a day like this.", + "The bunch of grapes was pressed into wine.", + "He sent the figs, but kept the ripe cherries.", + "The hinge on the door creaked with old age.", + "The screen before the fire kept in the sparks.", + "Fly by night and you waste little time.", + "Thick glasses helped him read the print.", + "Birth and death marks the limits of life.", + "The chair looked strong but had no bottom.", + "The kite flew wildly in the high wind.", + "A fur muff is stylish once more.", + "The tin box held priceless stones.", + "We need an end of all such matter.", + "The case was puzzling to the old and wise.", + "The bright lanterns were gay on the dark lawn.", + "We don't get much money but we have fun.", + "The youth drove with zest, but little skill.", + "Five years he lived with a shaggy dog.", + "A fence cuts through the corner lot.", + "The way to save money is not to spend much.", + "Shut the hatch before the waves push it in.", + "The odor of spring makes young hearts jump.", + "Crack the walnut with your sharp side teeth.", + "He offered proof in the form of a large chart.", + "Send the stuff in a thick paper bag.", + "A quart of milk is water for the most part.", + "They told wild tales to frighten him.", + "The three story house was built of stone.", + "In the rear of the ground floor was a large passage.", + "A man in a blue sweater sat at the desk.", + "Oats are a food eaten by horse and man.", + "Their eyelids droop for want of sleep.", + "A sip of tea revives his tired friend.", + "There are many ways to do these things.", + "Tuck the sheet under the edge of the mat.", + "A force equal to that would move the earth.", + "We like to see clear weather.", + "The work of the tailor is seen on each side.", + "Take a chance and win a china doll.", + "Shake the dust from your shoes, stranger.", + "She was kind to sick old people.", + "The square wooden crate was packed to be shipped.", + "The dusty bench stood by the stone wall.", + "We dress to suit the weather of most days.", + "Smile when you say nasty words.", + "A bowl of rice is free with chicken stew.", + "The water in this well is a source of good health.", + "Take shelter in this tent, but keep still.", + "That guy is the writer of a few banned books.", + "The little tales they tell are false.", + "The door was barred, locked, and bolted as well.", + "Ripe pears are fit for a queen's table.", + "A big wet stain was on the round carpet.", + "The kite dipped and swayed, but stayed aloft.", + "The pleasant hours fly by much too soon.", + "The room was crowded with a wild mob.", + "This strong arm shall shield your honor.", + "She blushed when he gave her a white orchid.", + "The beetle droned in the hot June sun.", + "Press the pedal with your left foot.", + "Neat plans fail without luck.", + "The black trunk fell from the landing.", + "The bank pressed for payment of the debt.", + "The theft of the pearl pin was kept secret.", + "Shake hands with this friendly child.", + "The vast space stretched into the far distance.", + "A rich farm is rare in this sandy waste.", + "His wide grin earned many friends.", + "Flax makes a fine brand of paper.", + "Hurdle the pit with the aid of a long pole.", + "A strong bid may scare your partner stiff.", + "Even a just cause needs power to win.", + "Peep under the tent and see the clowns.", + "The leaf drifts along with a slow spin.", + "Cheap clothes are flashy but don't last.", + "A thing of small note can cause despair.", + "Flood the mails with requests for this book.", + "A thick coat of black paint covered all.", + "The pencil was cut to be sharp at both ends.", + "Those last words were a strong statement.", + "He wrote his name boldly at the top of the sheet.", + "Dill pickles are sour but taste fine.", + "Down that road is the way to the grain farmer.", + "Either mud or dust are found at all times.", + "The best method is to fix it in place with clips.", + "If you mumble your speech will be lost.", + "At night the alarm roused him from a deep sleep.", + "Read just what the meter says.", + "Fill your pack with bright trinkets for the poor.", + "The small red neon lamp went out.", + "Clams are small, round, soft, and tasty.", + "The fan whirled its round blades softly.", + "The line where the edges join was clean.", + "Breathe deep and smell the piny air.", + "It matters not if he reads these words or those.", + "A brown leather bag hung from its strap.", + "A toad and a frog are hard to tell apart.", + "A white silk jacket goes with any shoes.", + "A break in the dam almost caused a flood.", + "Paint the sockets in the wall dull green.", + "The child crawled into the dense grass.", + "Bribes fail where honest men work.", + "Trample the spark, else the flames will spread.", + "The hilt of the sword was carved with fine designs.", + "A round hole was drilled through the thin board.", + "Footprints showed the path he took up the beach.", + "She was waiting at my front lawn.", + "A vent near the edge brought in fresh air.", + "Prod the old mule with a crooked stick.", + "It is a band of steel three inches wide.", + "The pipe ran almost the length of the ditch.", + "It was hidden from sight by a mass of leaves and shrubs.", + "The weight of the package was seen on the high scale.", + "Wake and rise, and step into the green outdoors.", + "The green light in the brown box flickered.", + "The brass tube circled the high wall.", + "The lobes of her ears were pierced to hold rings.", + "Hold the hammer near the end to drive the nail.", + "Next Sunday is the twelfth of the month.", + "Every word and phrase he speaks is true.", + "He put his last cartridge into the gun and fired.", + "They took their kids from the public school.", + "Drive the screw straight into the wood.", + "Keep the hatch tight and the watch constant.", + "Sever the twine with a quick snip of the knife.", + "Paper will dry out when wet.", + "Slide the catch back and open the desk.", + "Help the weak to preserve their strength.", + "A sullen smile gets few friends.", + "Stop whistling and watch the boys march.", + "Jerk the cord, and out tumbles the gold.", + "Slide the tray across the glass top.", + "The cloud moved in a stately way and was gone.", + "Light maple makes for a swell room.", + "Set the piece here and say nothing.", + "Dull stories make her laugh.", + "A stiff cord will do to fasten your shoe.", + "Get the trust fund to the bank early.", + "Choose between the high road and the low.", + "A plea for funds seems to come again.", + "He lent his coat to the tall gaunt stranger.", + "There is a strong chance it will happen once more.", + "The duke left the park in a silver coach.", + "Greet the new guests and leave quickly.", + "When the frost has come it is time for turkey.", + "Sweet words work better than fierce.", + "A thin stripe runs down the middle.", + "A six comes up more often than a ten.", + "Lush ferns grow on the lofty rocks.", + "The ram scared the school children off.", + "The team with the best timing looks good.", + "The farmer swapped his horse for a brown ox.", + "Sit on the perch and tell the others what to do.", + "A steep trail is painful for our feet.", + "The early phase of life moves fast.", + "Green moss grows on the northern side.", + "Tea in thin china has a sweet taste.", + "Pitch the straw through the door of the stable.", + "The latch on the back gate needed a nail.", + "The goose was brought straight from the old market.", + "The sink is the thing in which we pile dishes.", + "A whiff of it will cure the most stubborn cold.", + "The facts don't always show who is right.", + "She flaps her cape as she parades the street.", + "The loss of the cruiser was a blow to the fleet.", + "Loop the braid to the left and then over.", + "Plead with the lawyer to drop the lost cause.", + "Calves thrive on tender spring grass.", + "Post no bills on this office wall.", + "Tear a thin sheet from the yellow pad.", + "A cruise in warm waters in a sleek yacht is fun.", + "A streak of color ran down the left edge.", + "It was done before the boy could see it.", + "Crouch before you jump or miss the mark.", + "Pack the kits and don't forget the salt.", + "The square peg will settle in the round hole.", + "Fine soap saves tender skin.", + "Poached eggs and tea must suffice.", + "Bad nerves are jangled by a door slam.", + "Ship maps are different from those for planes.", + "Dimes showered down from all sides.", + "They sang the same tunes at each party.", + "The sky in the west is tinged with orange red.", + "The pods of peas ferment in bare fields.", + "The horse balked and threw the tall rider.", + "The hitch between the horse and cart broke.", + "Pile the coal high in the shed corner.", + "A gold vase is both rare and costly.", + "The knife was hung inside its bright sheath.", + "The rarest spice comes from the far East.", + "The roof should be tilted at a sharp slant.", + "A smatter of French is worse than none.", + "The mule trod the treadmill day and night.", + "The aim of the contest is to raise a great fund.", + "To send it now in large amounts is bad.", + "There is a fine hard tang in salty air.", + "Cod is the main business of the north shore.", + "The slab was hewn from heavy blocks of slate.", + "Dunk the stale biscuits into strong drink.", + "Hang tinsel from both branches.", + "Cap the jar with a tight brass cover.", + "The poor boy missed the boat again.", + "Be sure to set that lamp firmly in the hole.", + "Pick a card and slip it under the pack.", + "A round mat will cover the dull spot.", + "The first part of the plan needs changing.", + "A good book informs of what we ought to know.", + "The mail comes in three batches per day.", + "You cannot brew tea in a cold pot.", + "Dots of light betrayed the black cat.", + "Put the chart on the mantel and tack it down.", + "The night shift men rate extra pay.", + "The red paper brightened the dim stage.", + "See the player scoot to third base.", + "Slide the bill between the two leaves.", + "Many hands help get the job done.", + "We don't like to admit our small faults.", + "No doubt about the way the wind blows.", + "Dig deep in the earth for pirate's gold.", + "The steady drip is worse than a drenching rain.", + "A flat pack takes less luggage space.", + "Green ice frosted the punch bowl.", + "A stuffed chair slipped from the moving van.", + "The stitch will serve but needs to be shortened.", + "A thin book fits in the side pocket.", + "The gloss on top made it unfit to read.", + "The hail pattered on the burnt brown grass.", + "Seven seals were stamped on great sheets.", + "Our troops are set to strike heavy blows.", + "The store was jammed before the sale could start.", + "It was a bad error on the part of the new judge.", + "One step more and the board will collapse.", + "Take the match and strike it against your shoe.", + "The pot boiled but the contents failed to jell.", + "The baby puts his right foot in his mouth.", + "The bombs left most of the town in ruins.", + "Stop and stare at the hard working man.", + "The streets are narrow and full of sharp turns.", + "The pup jerked the leash as he saw a feline shape.", + "Open your book to the first page.", + "Fish evade the net and swim off.", + "Dip the pail once and let it settle.", + "Will you please answer that phone.", + "The big red apple fell to the ground.", + "The curtain rose and the show was on.", + "The young prince became heir to the throne.", + "He sent the boy on a short errand.", + "Leave now and you will arrive on time.", + "The corner store was robbed last night.", + "A gold ring will please most any girl.", + "The long journey home took a year.", + "She saw a cat in the neighbor's house.", + "A pink shell was found on the sandy beach.", + "Small children came to see him.", + "The grass and bushes were wet with dew.", + "The blind man counted his old coins.", + "A severe storm tore down the barn.", + "She called his name many times.", + "When you hear the bell, come quickly.", + NULL}; From 50f11b1c69dc5fdeb441d001adfc69963447a390 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 14:09:30 +0900 Subject: [PATCH 03/12] introduce box widget --- examples/basic/box.c | 63 ++++++++++++++++++++++++ include/Mw/Core.h | 11 +++++ include/Mw/Milsko.h | 1 + include/Mw/StringDefs.h | 1 + include/Mw/TypeDefs.h | 39 ++++++++------- include/Mw/Widget/Box.h | 24 ++++++++++ milsko.xml | 8 ++++ pl/rules.pl | 2 + src/core.c | 22 +++++++-- src/widget/box.c | 100 +++++++++++++++++++++++++++++++++++++++ src/widget/button.c | 5 ++ src/widget/checkbox.c | 5 ++ src/widget/combobox.c | 5 ++ src/widget/entry.c | 5 ++ src/widget/frame.c | 5 ++ src/widget/image.c | 5 ++ src/widget/label.c | 5 ++ src/widget/listbox.c | 5 ++ src/widget/menu.c | 5 ++ src/widget/numberentry.c | 5 ++ src/widget/opengl.c | 5 ++ src/widget/progressbar.c | 5 ++ src/widget/radiobox.c | 5 ++ src/widget/scrollbar.c | 5 ++ src/widget/separator.c | 5 ++ src/widget/submenu.c | 5 ++ src/widget/treeview.c | 5 ++ src/widget/viewport.c | 5 ++ src/widget/vulkan.c | 5 ++ src/widget/window.c | 5 ++ tools/watcom-pack.sh | 1 + 31 files changed, 353 insertions(+), 19 deletions(-) create mode 100644 examples/basic/box.c create mode 100644 include/Mw/Widget/Box.h create mode 100644 src/widget/box.c diff --git a/examples/basic/box.c b/examples/basic/box.c new file mode 100644 index 0000000..517a540 --- /dev/null +++ b/examples/basic/box.c @@ -0,0 +1,63 @@ +#include + +MwWidget window, box; + +void resize(MwWidget handle, void* user, void* client) { + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + + (void)user; + (void)client; + + MwVaApply(box, + MwNwidth, ww, + MwNheight, wh, + NULL); +} + +int main() { + MwWidget box2, box3; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 200, 200, + MwNtitle, "box", + NULL); + + box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0, + MwNpadding, 10, + NULL); + + box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0, + MwNpadding, 10, + MwNorientation, MwVERTICAL, + NULL); + + box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0, + MwNpadding, 10, + MwNorientation, MwVERTICAL, + NULL); + + MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0, + MwNbackground, "#a00", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0, + MwNbackground, "#0a0", + MwNboxRatio, 2, + NULL); + + MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0, + MwNbackground, "#00a", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0, + MwNbackground, "#00a", + NULL); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + + resize(window, NULL, NULL); + + MwLoop(window); +} diff --git a/include/Mw/Core.h b/include/Mw/Core.h index e873b41..e714a32 100644 --- a/include/Mw/Core.h +++ b/include/Mw/Core.h @@ -37,6 +37,17 @@ #define MwDispatch3(x, y, z) \ if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z) +/*! + * @warning Used internally + * @brief Dispatches the handler of widget class + * @param x Widget + * @param y Handler name + * @param z Argument + * @param w Argument + */ +#define MwDispatch4(x, y, z, w) \ + if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z, w) + #define MwWaitMS 30 #define MwDoubleClickTimeout 250 diff --git a/include/Mw/Milsko.h b/include/Mw/Milsko.h index 5e14588..4bd157a 100644 --- a/include/Mw/Milsko.h +++ b/include/Mw/Milsko.h @@ -50,5 +50,6 @@ #include #include #include +#include #endif diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index de8b8bb..238c0ba 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -32,6 +32,7 @@ #define MwNpadding "Ipadding" #define MwNborderWidth "IborderWidth" #define MwNfillArea "IfillArea" +#define MwNboxRatio "IboxRatio" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/include/Mw/TypeDefs.h b/include/Mw/TypeDefs.h index 3c58e95..0d2eeca 100644 --- a/include/Mw/TypeDefs.h +++ b/include/Mw/TypeDefs.h @@ -32,11 +32,13 @@ typedef void* MwWidget; typedef void (*MwHandler)(MwWidget handle); typedef int (*MwHandlerWithStatus)(MwWidget handle); typedef void (*MwHandlerProp)(MwWidget handle, const char* key); +typedef void (*MwHandlerChildrenProp)(MwWidget handle, MwWidget child, const char* key); typedef void (*MwHandlerKey)(MwWidget handle, int key); typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr); +typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args); + typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data); typedef void (*MwErrorHandler)(int code, const char* message, void* user_data); -typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args); struct _MwTextKeyValue { char* key; @@ -175,21 +177,26 @@ struct _MwListBoxPacket { }; struct _MwClass { - MwHandlerWithStatus create; - MwHandler destroy; - MwHandler draw; - MwHandler click; - MwHandler parent_resize; - MwHandlerProp prop_change; - MwHandler mouse_move; - MwHandlerMouse mouse_up; - MwHandlerMouse mouse_down; - MwHandlerKey key; - MwHandlerExecute execute; - MwHandler tick; - void* reserved3; - void* reserved4; - void* reserved5; + MwHandlerWithStatus create; + MwHandler destroy; + MwHandler draw; + MwHandler click; + MwHandler parent_resize; + MwHandlerProp prop_change; + MwHandler mouse_move; + MwHandlerMouse mouse_up; + MwHandlerMouse mouse_down; + MwHandlerKey key; + MwHandlerExecute execute; + MwHandler tick; + MwHandler resize; + MwHandler children_update; + MwHandlerChildrenProp children_prop_change; + void* reserved1; + void* reserved2; + void* reserved3; + void* reserved4; + void* reserved5; }; #endif diff --git a/include/Mw/Widget/Box.h b/include/Mw/Widget/Box.h new file mode 100644 index 0000000..172e5f6 --- /dev/null +++ b/include/Mw/Widget/Box.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Box.h + * @brief Box widget + */ +#ifndef __MW_WIDGET_BOX_H__ +#define __MW_WIDGET_BOX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Box widget class + */ +MWDECL MwClass MwBoxClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/milsko.xml b/milsko.xml index 5e74580..faf0405 100644 --- a/milsko.xml +++ b/milsko.xml @@ -49,6 +49,7 @@ - MwNheight - MwNborderWidth - MwNbackgroundPixmap + - MwNboxRatio Integer properties must be prefixed with I. String properties must be prefixed with S. @@ -82,6 +83,7 @@ + @@ -483,6 +485,12 @@ + + + + + + diff --git a/pl/rules.pl b/pl/rules.pl index ab5521b..f8aec46 100644 --- a/pl/rules.pl +++ b/pl/rules.pl @@ -71,6 +71,7 @@ new_object("src/icon/*.c"); new_object("src/font/*.c"); new_object("src/cursor/*.c"); +new_object("src/widget/box.c"); new_object("src/widget/button.c"); new_object("src/widget/checkbox.c"); new_object("src/widget/combobox.c"); @@ -116,6 +117,7 @@ new_example("examples/basic/progressbar"); new_example("examples/basic/colorpicker"); new_example("examples/basic/combobox"); new_example("examples/basic/treeview"); +new_example("examples/basic/box"); if (param_get("opengl")) { new_example("examples/gldemos/boing", $gl_libs); diff --git a/src/core.c b/src/core.c index ec7cb7d..4afafb7 100644 --- a/src/core.c +++ b/src/core.c @@ -50,6 +50,7 @@ static void llresizehandler(MwLL handle, void* data) { for(i = 0; i < arrlen(h->children); i++) { MwDispatch(h->children[i], parent_resize); } + MwDispatch(h, resize); } static void llclosehandler(MwLL handle, void* data) { @@ -176,6 +177,8 @@ MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, MwAddTickList(h); } + if(h->parent != NULL) MwDispatch(h->parent, children_update); + return h; } @@ -378,7 +381,10 @@ void MwSetInteger(MwWidget handle, const char* key, int n) { } else { shput(handle->integer, key, n); } - if(handle->prop_event) MwDispatch3(handle, prop_change, key); + if(handle->prop_event) { + MwDispatch3(handle, prop_change, key); + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } } void MwSetText(MwWidget handle, const char* key, const char* value) { @@ -395,7 +401,10 @@ void MwSetText(MwWidget handle, const char* key, const char* value) { shdel(handle->text, key); } } - if(handle->prop_event) MwDispatch3(handle, prop_change, key); + if(handle->prop_event) { + MwDispatch3(handle, prop_change, key); + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } if(strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0) { MwForceRender(handle); } @@ -413,7 +422,10 @@ void MwSetVoid(MwWidget handle, const char* key, void* value) { } else { shput(handle->data, key, value); } - if(handle->prop_event) MwDispatch3(handle, prop_change, key); + if(handle->prop_event) { + MwDispatch3(handle, prop_change, key); + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } } int MwGetInteger(MwWidget handle, const char* key) { @@ -732,10 +744,14 @@ void MwReparent(MwWidget handle, MwWidget new_parent) { break; } } + + MwDispatch(handle->parent, children_update); } handle->parent = new_parent; arrput(new_parent->children, handle); + + MwDispatch(handle->parent, children_update); } MwClass MwGetClass(MwWidget handle) { diff --git a/src/widget/box.c b/src/widget/box.c new file mode 100644 index 0000000..31b0a07 --- /dev/null +++ b/src/widget/box.c @@ -0,0 +1,100 @@ +#include + +#include "../../external/stb_ds.h" + +static int create(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNorientation, MwHORIZONTAL); + MwSetInteger(handle, MwNpadding, 0); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, base); + + MwLLFreeColor(base); +} + +static void layout(MwWidget handle) { + int i; + int sum = 0; + int horiz = MwGetInteger(handle, MwNorientation) == MwHORIZONTAL ? 1 : 0; + int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNpadding); + int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNpadding) * 2; + int sk = 0; + if(arrlen(handle->children) == 0) return; + + for(i = 0; i < arrlen(handle->children); i++) { + int n = MwGetInteger(handle->children[i], MwNboxRatio); + if(n == MwDEFAULT) n = 1; + + sum += n; + } + + for(i = 0; i < arrlen(handle->children); i++) { + int n = MwGetInteger(handle->children[i], MwNboxRatio); + int wsz; + if(n == MwDEFAULT) n = 1; + + wsz = sz * n / sum - MwGetInteger(handle, MwNpadding); + + sk += MwGetInteger(handle, MwNpadding); + MwVaApply(handle->children[i], + horiz ? MwNx : MwNy, sk, /* this is what gets changed */ + horiz ? MwNy : MwNx, MwGetInteger(handle, MwNpadding), /* fixed between widgets */ + horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ + horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ + NULL); + sk += wsz; + } +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNorientation) == 0) layout(handle); +} + +static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { + (void)child; + + if(strcmp(key, MwNboxRatio) == 0) layout(handle); +} + +static void resize(MwWidget handle) { + layout(handle); +} + +static void children_update(MwWidget handle) { + layout(handle); +} + +MwClassRec MwBoxClassRec = { + create, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + resize, /* resize */ + children_update, /* children_update */ + children_prop_change, /* children_prop_change */ + NULL, + NULL, + NULL, + NULL, + NULL}; +MwClass MwBoxClass = &MwBoxClassRec; diff --git a/src/widget/button.c b/src/widget/button.c index a484eea..dfff6d5 100644 --- a/src/widget/button.c +++ b/src/widget/button.c @@ -101,6 +101,11 @@ MwClassRec MwButtonClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/checkbox.c b/src/widget/checkbox.c index 0a117a4..8a42b89 100644 --- a/src/widget/checkbox.c +++ b/src/widget/checkbox.c @@ -50,6 +50,11 @@ MwClassRec MwCheckBoxClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/combobox.c b/src/widget/combobox.c index 9de2ac0..156242e 100644 --- a/src/widget/combobox.c +++ b/src/widget/combobox.c @@ -201,6 +201,11 @@ MwClassRec MwComboBoxClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/entry.c b/src/widget/entry.c index b5ac1e0..85f9a86 100644 --- a/src/widget/entry.c +++ b/src/widget/entry.c @@ -170,6 +170,11 @@ MwClassRec MwEntryClassRec = { key, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/frame.c b/src/widget/frame.c index 38ff990..36085a6 100644 --- a/src/widget/frame.c +++ b/src/widget/frame.c @@ -59,6 +59,11 @@ MwClassRec MwFrameClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/image.c b/src/widget/image.c index 8d2e1c7..487521d 100644 --- a/src/widget/image.c +++ b/src/widget/image.c @@ -46,6 +46,11 @@ MwClassRec MwImageClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/label.c b/src/widget/label.c index f26edd0..2cf6a8d 100644 --- a/src/widget/label.c +++ b/src/widget/label.c @@ -59,6 +59,11 @@ MwClassRec MwLabelClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/listbox.c b/src/widget/listbox.c index 784594b..4141f48 100644 --- a/src/widget/listbox.c +++ b/src/widget/listbox.c @@ -606,6 +606,11 @@ MwClassRec MwListBoxClassRec = { NULL, /* key */ func_handler, /* execute */ tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/menu.c b/src/widget/menu.c index 0538812..ffb8bb6 100644 --- a/src/widget/menu.c +++ b/src/widget/menu.c @@ -201,6 +201,11 @@ MwClassRec MwMenuClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/numberentry.c b/src/widget/numberentry.c index edfbe9e..ccbdf14 100644 --- a/src/widget/numberentry.c +++ b/src/widget/numberentry.c @@ -140,6 +140,11 @@ MwClassRec MwNumberEntryClassRec = { key, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/opengl.c b/src/widget/opengl.c index f6cc369..9481c49 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -249,6 +249,11 @@ MwClassRec MwOpenGLClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/progressbar.c b/src/widget/progressbar.c index f3f99eb..bd036dd 100644 --- a/src/widget/progressbar.c +++ b/src/widget/progressbar.c @@ -58,6 +58,11 @@ MwClassRec MwProgressBarClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/radiobox.c b/src/widget/radiobox.c index 85c7871..a6f78f9 100644 --- a/src/widget/radiobox.c +++ b/src/widget/radiobox.c @@ -59,6 +59,11 @@ MwClassRec MwRadioBoxClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/scrollbar.c b/src/widget/scrollbar.c index e00d0b5..254e05b 100644 --- a/src/widget/scrollbar.c +++ b/src/widget/scrollbar.c @@ -275,6 +275,11 @@ MwClassRec MwScrollBarClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/separator.c b/src/widget/separator.c index 009c42b..5800ba3 100644 --- a/src/widget/separator.c +++ b/src/widget/separator.c @@ -47,6 +47,11 @@ MwClassRec MwSeparatorClassRec = { NULL, /* key */ NULL, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/submenu.c b/src/widget/submenu.c index 3e7eaaa..09a0274 100644 --- a/src/widget/submenu.c +++ b/src/widget/submenu.c @@ -212,6 +212,11 @@ MwClassRec MwSubMenuClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/treeview.c b/src/widget/treeview.c index 2379937..27607ce 100644 --- a/src/widget/treeview.c +++ b/src/widget/treeview.c @@ -493,6 +493,11 @@ MwClassRec MwTreeViewClassRec = { NULL, /* key */ func_handler, /* execute */ tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/viewport.c b/src/widget/viewport.c index 1cd3ee9..9bdf860 100644 --- a/src/widget/viewport.c +++ b/src/widget/viewport.c @@ -188,6 +188,11 @@ MwClassRec MwViewportClassRec = { NULL, /* key */ func_handler, /* execute */ tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/vulkan.c b/src/widget/vulkan.c index 29a2fab..bda24bf 100644 --- a/src/widget/vulkan.c +++ b/src/widget/vulkan.c @@ -521,6 +521,11 @@ MwClassRec MwVulkanClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/src/widget/window.c b/src/widget/window.c index f8e8394..98a128f 100644 --- a/src/widget/window.c +++ b/src/widget/window.c @@ -56,6 +56,11 @@ MwClassRec MwWindowClassRec = { NULL, /* key */ func_handler, /* execute */ NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, + NULL, NULL, NULL, NULL}; diff --git a/tools/watcom-pack.sh b/tools/watcom-pack.sh index 1c465e3..81626db 100755 --- a/tools/watcom-pack.sh +++ b/tools/watcom-pack.sh @@ -18,5 +18,6 @@ for i in *.c; do done cd ../.. rm -f milsko-examples.zip +cp resource/logo/logo.png examples/picture.jpg examples/picture.png milsko-examples/ zip -rv milsko-examples.zip milsko-examples rm -rf milsko-examples From 1a95ddce94ab62163e68104695012de727fa30df Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 14:13:55 +0900 Subject: [PATCH 04/12] oops --- BorMakefile | 5 +++-- NTMakefile | 5 +++-- WatMakefile | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/BorMakefile b/BorMakefile index 4b286a1..59551b5 100644 --- a/BorMakefile +++ b/BorMakefile @@ -51,6 +51,7 @@ clean: del /f /q src\string.obj del /f /q src\text.obj del /f /q src\unicode.obj + del /f /q src\widget\box.obj del /f /q src\widget\button.obj del /f /q src\widget\checkbox.obj del /f /q src\widget\combobox.obj @@ -73,8 +74,8 @@ clean: del /f /q src\Mw.dll del /f /q src\Mw.lib -src\Mw.dll: external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj - $(LD) $(LDFLAGS) -e$@ external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj -lopengl32.lib -lgdi32.lib -luser32.lib +src\Mw.dll: external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj + $(LD) $(LDFLAGS) -e$@ external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj -lopengl32.lib -lgdi32.lib -luser32.lib implib src\Mw.lib src\Mw.dll .c.obj: diff --git a/NTMakefile b/NTMakefile index abde825..265418a 100644 --- a/NTMakefile +++ b/NTMakefile @@ -51,6 +51,7 @@ clean: del /f /q src\string.obj del /f /q src\text.obj del /f /q src\unicode.obj + del /f /q src\widget\box.obj del /f /q src\widget\button.obj del /f /q src\widget\checkbox.obj del /f /q src\widget\combobox.obj @@ -73,8 +74,8 @@ clean: del /f /q src\Mw.dll del /f /q src\Mw.lib -src\Mw.dll: external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj - $(LD) $(LDFLAGS) /OUT:$@ external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj opengl32.lib gdi32.lib user32.lib +src\Mw.dll: external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj + $(LD) $(LDFLAGS) /OUT:$@ external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\error.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj opengl32.lib gdi32.lib user32.lib .c.obj: diff --git a/WatMakefile b/WatMakefile index 8b7e965..dc7b121 100644 --- a/WatMakefile +++ b/WatMakefile @@ -50,6 +50,7 @@ clean: .SYMBOLIC %erase src/string.obj %erase src/text.obj %erase src/unicode.obj + %erase src/widget/box.obj %erase src/widget/button.obj %erase src/widget/checkbox.obj %erase src/widget/combobox.obj @@ -72,8 +73,8 @@ clean: .SYMBOLIC %erase src/Mw.dll %erase src/Mw.lib -src/Mw.dll: external/stb_ds.obj external/stb_image.obj external/stb_truetype.obj src/abstract/directory.obj src/abstract/dynamic.obj src/abstract/time.obj src/backend/gdi.obj src/color.obj src/core.obj src/cursor/arrow.obj src/cursor/cross.obj src/cursor/default.obj src/cursor/hidden.obj src/cursor/text.obj src/default.obj src/dialog/colorpicker.obj src/dialog/directorychooser.obj src/dialog/filechooser.obj src/dialog/messagebox.obj src/draw.obj src/error.obj src/font/boldfont.obj src/font/boldttf.obj src/font/font.obj src/font/ttf.obj src/icon/back.obj src/icon/clock.obj src/icon/computer.obj src/icon/directory.obj src/icon/down.obj src/icon/error.obj src/icon/file.obj src/icon/forward.obj src/icon/info.obj src/icon/left.obj src/icon/news.obj src/icon/note.obj src/icon/right.obj src/icon/search.obj src/icon/up.obj src/icon/warning.obj src/lowlevel.obj src/string.obj src/text.obj src/unicode.obj src/widget/button.obj src/widget/checkbox.obj src/widget/combobox.obj src/widget/entry.obj src/widget/frame.obj src/widget/image.obj src/widget/label.obj src/widget/listbox.obj src/widget/menu.obj src/widget/numberentry.obj src/widget/opengl.obj src/widget/progressbar.obj src/widget/radiobox.obj src/widget/scrollbar.obj src/widget/separator.obj src/widget/submenu.obj src/widget/treeview.obj src/widget/viewport.obj src/widget/window.obj - $(LD) $(LDFLAGS) option implib=src/Mw.lib name $@ file external/stb_ds.obj file external/stb_image.obj file external/stb_truetype.obj file src/abstract/directory.obj file src/abstract/dynamic.obj file src/abstract/time.obj file src/backend/gdi.obj file src/color.obj file src/core.obj file src/cursor/arrow.obj file src/cursor/cross.obj file src/cursor/default.obj file src/cursor/hidden.obj file src/cursor/text.obj file src/default.obj file src/dialog/colorpicker.obj file src/dialog/directorychooser.obj file src/dialog/filechooser.obj file src/dialog/messagebox.obj file src/draw.obj file src/error.obj file src/font/boldfont.obj file src/font/boldttf.obj file src/font/font.obj file src/font/ttf.obj file src/icon/back.obj file src/icon/clock.obj file src/icon/computer.obj file src/icon/directory.obj file src/icon/down.obj file src/icon/error.obj file src/icon/file.obj file src/icon/forward.obj file src/icon/info.obj file src/icon/left.obj file src/icon/news.obj file src/icon/note.obj file src/icon/right.obj file src/icon/search.obj file src/icon/up.obj file src/icon/warning.obj file src/lowlevel.obj file src/string.obj file src/text.obj file src/unicode.obj file src/widget/button.obj file src/widget/checkbox.obj file src/widget/combobox.obj file src/widget/entry.obj file src/widget/frame.obj file src/widget/image.obj file src/widget/label.obj file src/widget/listbox.obj file src/widget/menu.obj file src/widget/numberentry.obj file src/widget/opengl.obj file src/widget/progressbar.obj file src/widget/radiobox.obj file src/widget/scrollbar.obj file src/widget/separator.obj file src/widget/submenu.obj file src/widget/treeview.obj file src/widget/viewport.obj file src/widget/window.obj library clib3r.lib library opengl32.lib library gdi32.lib library user32.lib +src/Mw.dll: external/stb_ds.obj external/stb_image.obj external/stb_truetype.obj src/abstract/directory.obj src/abstract/dynamic.obj src/abstract/time.obj src/backend/gdi.obj src/color.obj src/core.obj src/cursor/arrow.obj src/cursor/cross.obj src/cursor/default.obj src/cursor/hidden.obj src/cursor/text.obj src/default.obj src/dialog/colorpicker.obj src/dialog/directorychooser.obj src/dialog/filechooser.obj src/dialog/messagebox.obj src/draw.obj src/error.obj src/font/boldfont.obj src/font/boldttf.obj src/font/font.obj src/font/ttf.obj src/icon/back.obj src/icon/clock.obj src/icon/computer.obj src/icon/directory.obj src/icon/down.obj src/icon/error.obj src/icon/file.obj src/icon/forward.obj src/icon/info.obj src/icon/left.obj src/icon/news.obj src/icon/note.obj src/icon/right.obj src/icon/search.obj src/icon/up.obj src/icon/warning.obj src/lowlevel.obj src/string.obj src/text.obj src/unicode.obj src/widget/box.obj src/widget/button.obj src/widget/checkbox.obj src/widget/combobox.obj src/widget/entry.obj src/widget/frame.obj src/widget/image.obj src/widget/label.obj src/widget/listbox.obj src/widget/menu.obj src/widget/numberentry.obj src/widget/opengl.obj src/widget/progressbar.obj src/widget/radiobox.obj src/widget/scrollbar.obj src/widget/separator.obj src/widget/submenu.obj src/widget/treeview.obj src/widget/viewport.obj src/widget/window.obj + $(LD) $(LDFLAGS) option implib=src/Mw.lib name $@ file external/stb_ds.obj file external/stb_image.obj file external/stb_truetype.obj file src/abstract/directory.obj file src/abstract/dynamic.obj file src/abstract/time.obj file src/backend/gdi.obj file src/color.obj file src/core.obj file src/cursor/arrow.obj file src/cursor/cross.obj file src/cursor/default.obj file src/cursor/hidden.obj file src/cursor/text.obj file src/default.obj file src/dialog/colorpicker.obj file src/dialog/directorychooser.obj file src/dialog/filechooser.obj file src/dialog/messagebox.obj file src/draw.obj file src/error.obj file src/font/boldfont.obj file src/font/boldttf.obj file src/font/font.obj file src/font/ttf.obj file src/icon/back.obj file src/icon/clock.obj file src/icon/computer.obj file src/icon/directory.obj file src/icon/down.obj file src/icon/error.obj file src/icon/file.obj file src/icon/forward.obj file src/icon/info.obj file src/icon/left.obj file src/icon/news.obj file src/icon/note.obj file src/icon/right.obj file src/icon/search.obj file src/icon/up.obj file src/icon/warning.obj file src/lowlevel.obj file src/string.obj file src/text.obj file src/unicode.obj file src/widget/box.obj file src/widget/button.obj file src/widget/checkbox.obj file src/widget/combobox.obj file src/widget/entry.obj file src/widget/frame.obj file src/widget/image.obj file src/widget/label.obj file src/widget/listbox.obj file src/widget/menu.obj file src/widget/numberentry.obj file src/widget/opengl.obj file src/widget/progressbar.obj file src/widget/radiobox.obj file src/widget/scrollbar.obj file src/widget/separator.obj file src/widget/submenu.obj file src/widget/treeview.obj file src/widget/viewport.obj file src/widget/window.obj library clib3r.lib library opengl32.lib library gdi32.lib library user32.lib @@ -167,6 +168,8 @@ src/text.obj: src/text.c $(CC) $(CFLAGS) -fo=$@ $< src/unicode.obj: src/unicode.c $(CC) $(CFLAGS) -fo=$@ $< +src/widget/box.obj: src/widget/box.c + $(CC) $(CFLAGS) -fo=$@ $< src/widget/button.obj: src/widget/button.c $(CC) $(CFLAGS) -fo=$@ $< src/widget/checkbox.obj: src/widget/checkbox.c From a1ce1b56e41813f4c46a80618225e3d9728ca5ff Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 14:30:59 +0900 Subject: [PATCH 05/12] fix prop and add MwNfixedSize --- examples/basic/box.c | 18 ++++++++++++++---- include/Mw/StringDefs.h | 3 ++- milsko.xml | 6 ++++-- src/widget/box.c | 21 +++++++++++++++------ 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/examples/basic/box.c b/examples/basic/box.c index 517a540..0c138a0 100644 --- a/examples/basic/box.c +++ b/examples/basic/box.c @@ -16,11 +16,11 @@ void resize(MwWidget handle, void* user, void* client) { } int main() { - MwWidget box2, box3; + MwWidget box2, box3, box4; MwLibraryInit(); - window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 200, 200, + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 600, 200, MwNtitle, "box", NULL); @@ -38,13 +38,19 @@ int main() { MwNorientation, MwVERTICAL, NULL); + box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0, + MwNpadding, 10, + MwNorientation, MwVERTICAL, + MwNfixedSize, 40, + NULL); + MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0, MwNbackground, "#a00", NULL); MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0, MwNbackground, "#0a0", - MwNboxRatio, 2, + MwNratio, 2, NULL); MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0, @@ -52,7 +58,11 @@ int main() { NULL); MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0, - MwNbackground, "#00a", + MwNbackground, "#a0a", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn5", box4, 0, 0, 0, 0, + MwNbackground, "#0aa", NULL); MwAddUserHandler(window, MwNresizeHandler, resize, NULL); diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index 238c0ba..a4e999d 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -32,7 +32,8 @@ #define MwNpadding "Ipadding" #define MwNborderWidth "IborderWidth" #define MwNfillArea "IfillArea" -#define MwNboxRatio "IboxRatio" +#define MwNratio "Iratio" +#define MwNfixedSize "IfixedSize" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/milsko.xml b/milsko.xml index faf0405..83ef0e3 100644 --- a/milsko.xml +++ b/milsko.xml @@ -49,7 +49,8 @@ - MwNheight - MwNborderWidth - MwNbackgroundPixmap - - MwNboxRatio + - MwNratio + - MwNfixedSize Integer properties must be prefixed with I. String properties must be prefixed with S. @@ -83,7 +84,8 @@ - + + diff --git a/src/widget/box.c b/src/widget/box.c index 31b0a07..777c32e 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -31,21 +31,30 @@ static void layout(MwWidget handle) { int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNpadding); int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNpadding) * 2; int sk = 0; - if(arrlen(handle->children) == 0) return; for(i = 0; i < arrlen(handle->children); i++) { - int n = MwGetInteger(handle->children[i], MwNboxRatio); + int n = MwGetInteger(handle->children[i], MwNratio); + int s = MwGetInteger(handle->children[i], MwNfixedSize); if(n == MwDEFAULT) n = 1; - sum += n; + if(s != MwDEFAULT) { + sz -= s + MwGetInteger(handle, MwNpadding); + } else { + sum += n; + } } for(i = 0; i < arrlen(handle->children); i++) { - int n = MwGetInteger(handle->children[i], MwNboxRatio); + int n = MwGetInteger(handle->children[i], MwNratio); + int s = MwGetInteger(handle->children[i], MwNfixedSize); int wsz; if(n == MwDEFAULT) n = 1; - wsz = sz * n / sum - MwGetInteger(handle, MwNpadding); + if(s != MwDEFAULT) { + wsz = s; + } else { + wsz = sz * n / sum - MwGetInteger(handle, MwNpadding); + } sk += MwGetInteger(handle, MwNpadding); MwVaApply(handle->children[i], @@ -65,7 +74,7 @@ static void prop_change(MwWidget handle, const char* key) { static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { (void)child; - if(strcmp(key, MwNboxRatio) == 0) layout(handle); + if(strcmp(key, MwNratio) == 0) layout(handle); } static void resize(MwWidget handle) { From a5cd1974e45ee06feb796aff0aa27fa402b649f0 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 15:05:36 +0900 Subject: [PATCH 06/12] add MwNouterPadding --- include/Mw/StringDefs.h | 1 + milsko.xml | 2 ++ src/widget/box.c | 23 ++++++++++++----------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index a4e999d..8ed73f6 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -34,6 +34,7 @@ #define MwNfillArea "IfillArea" #define MwNratio "Iratio" #define MwNfixedSize "IfixedSize" +#define MwNouterPadding "IouterPadding" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/milsko.xml b/milsko.xml index 83ef0e3..28a8134 100644 --- a/milsko.xml +++ b/milsko.xml @@ -86,6 +86,7 @@ + @@ -491,6 +492,7 @@ + diff --git a/src/widget/box.c b/src/widget/box.c index 777c32e..0789a1b 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -7,6 +7,7 @@ static int create(MwWidget handle) { MwSetInteger(handle, MwNorientation, MwHORIZONTAL); MwSetInteger(handle, MwNpadding, 0); + MwSetInteger(handle, MwNouterPadding, 0); return 0; } @@ -28,9 +29,9 @@ static void layout(MwWidget handle) { int i; int sum = 0; int horiz = MwGetInteger(handle, MwNorientation) == MwHORIZONTAL ? 1 : 0; - int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNpadding); - int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNpadding) * 2; - int sk = 0; + int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNouterPadding) * 2; + int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNouterPadding) * 2; + int sk = MwGetInteger(handle, MwNouterPadding); for(i = 0; i < arrlen(handle->children); i++) { int n = MwGetInteger(handle->children[i], MwNratio); @@ -38,7 +39,7 @@ static void layout(MwWidget handle) { if(n == MwDEFAULT) n = 1; if(s != MwDEFAULT) { - sz -= s + MwGetInteger(handle, MwNpadding); + sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); } else { sum += n; } @@ -53,17 +54,17 @@ static void layout(MwWidget handle) { if(s != MwDEFAULT) { wsz = s; } else { - wsz = sz * n / sum - MwGetInteger(handle, MwNpadding); + wsz = sz * n / sum; } + wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); - sk += MwGetInteger(handle, MwNpadding); MwVaApply(handle->children[i], - horiz ? MwNx : MwNy, sk, /* this is what gets changed */ - horiz ? MwNy : MwNx, MwGetInteger(handle, MwNpadding), /* fixed between widgets */ - horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ - horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ + horiz ? MwNx : MwNy, sk, /* this is what gets changed */ + horiz ? MwNy : MwNx, MwGetInteger(handle, MwNouterPadding), /* fixed between widgets */ + horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ + horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ NULL); - sk += wsz; + sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); } } From 02c21233aee1fe245b73818d8d59440edb381957 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 15:27:04 +0900 Subject: [PATCH 07/12] use more proper term --- examples/basic/box.c | 7 ++++--- include/Mw/StringDefs.h | 2 +- milsko.xml | 4 ++-- src/widget/box.c | 22 +++++++++++----------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/examples/basic/box.c b/examples/basic/box.c index 0c138a0..adbba79 100644 --- a/examples/basic/box.c +++ b/examples/basic/box.c @@ -26,20 +26,21 @@ int main() { box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0, MwNpadding, 10, + MwNspacing, 10, NULL); box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0, - MwNpadding, 10, + MwNspacing, 10, MwNorientation, MwVERTICAL, NULL); box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0, - MwNpadding, 10, + MwNspacing, 10, MwNorientation, MwVERTICAL, NULL); box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0, - MwNpadding, 10, + MwNspacing, 10, MwNorientation, MwVERTICAL, MwNfixedSize, 40, NULL); diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index 8ed73f6..d4e96a7 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -34,7 +34,7 @@ #define MwNfillArea "IfillArea" #define MwNratio "Iratio" #define MwNfixedSize "IfixedSize" -#define MwNouterPadding "IouterPadding" +#define MwNspacing "Ispacing" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/milsko.xml b/milsko.xml index 28a8134..6b92938 100644 --- a/milsko.xml +++ b/milsko.xml @@ -86,7 +86,7 @@ - + @@ -491,8 +491,8 @@ + - diff --git a/src/widget/box.c b/src/widget/box.c index 0789a1b..4526d7e 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -6,8 +6,8 @@ static int create(MwWidget handle) { MwSetDefault(handle); MwSetInteger(handle, MwNorientation, MwHORIZONTAL); + MwSetInteger(handle, MwNspacing, 0); MwSetInteger(handle, MwNpadding, 0); - MwSetInteger(handle, MwNouterPadding, 0); return 0; } @@ -29,9 +29,9 @@ static void layout(MwWidget handle) { int i; int sum = 0; int horiz = MwGetInteger(handle, MwNorientation) == MwHORIZONTAL ? 1 : 0; - int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNouterPadding) * 2; - int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNouterPadding) * 2; - int sk = MwGetInteger(handle, MwNouterPadding); + int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNpadding) * 2; + int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNpadding) * 2; + int sk = MwGetInteger(handle, MwNpadding); for(i = 0; i < arrlen(handle->children); i++) { int n = MwGetInteger(handle->children[i], MwNratio); @@ -39,7 +39,7 @@ static void layout(MwWidget handle) { if(n == MwDEFAULT) n = 1; if(s != MwDEFAULT) { - sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); + sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); } else { sum += n; } @@ -56,15 +56,15 @@ static void layout(MwWidget handle) { } else { wsz = sz * n / sum; } - wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); + wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); MwVaApply(handle->children[i], - horiz ? MwNx : MwNy, sk, /* this is what gets changed */ - horiz ? MwNy : MwNx, MwGetInteger(handle, MwNouterPadding), /* fixed between widgets */ - horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ - horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ + horiz ? MwNx : MwNy, sk, /* this is what gets changed */ + horiz ? MwNy : MwNx, MwGetInteger(handle, MwNpadding), /* fixed between widgets */ + horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ + horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ NULL); - sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNpadding) : 0); + sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); } } From 3e4001e4f1f02507f5df57476177698d61500cfe Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 15:41:19 +0900 Subject: [PATCH 08/12] more proper term --- examples/basic/box.c | 8 ++++---- include/Mw/StringDefs.h | 2 +- milsko.xml | 4 ++-- src/widget/box.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/basic/box.c b/examples/basic/box.c index adbba79..1b37168 100644 --- a/examples/basic/box.c +++ b/examples/basic/box.c @@ -26,21 +26,21 @@ int main() { box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0, MwNpadding, 10, - MwNspacing, 10, + MwNmargin, 10, NULL); box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, NULL); box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, NULL); box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0, - MwNspacing, 10, + MwNmargin, 10, MwNorientation, MwVERTICAL, MwNfixedSize, 40, NULL); diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index d4e96a7..0711373 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -34,7 +34,7 @@ #define MwNfillArea "IfillArea" #define MwNratio "Iratio" #define MwNfixedSize "IfixedSize" -#define MwNspacing "Ispacing" +#define MwNmargin "Imargin" #define MwNtitle "Stitle" #define MwNtext "Stext" diff --git a/milsko.xml b/milsko.xml index 6b92938..f7f5bae 100644 --- a/milsko.xml +++ b/milsko.xml @@ -86,7 +86,7 @@ - + @@ -491,7 +491,7 @@ - + diff --git a/src/widget/box.c b/src/widget/box.c index 4526d7e..2c47137 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -6,7 +6,7 @@ static int create(MwWidget handle) { MwSetDefault(handle); MwSetInteger(handle, MwNorientation, MwHORIZONTAL); - MwSetInteger(handle, MwNspacing, 0); + MwSetInteger(handle, MwNmargin, 0); MwSetInteger(handle, MwNpadding, 0); return 0; @@ -39,7 +39,7 @@ static void layout(MwWidget handle) { if(n == MwDEFAULT) n = 1; if(s != MwDEFAULT) { - sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); } else { sum += n; } @@ -56,7 +56,7 @@ static void layout(MwWidget handle) { } else { wsz = sz * n / sum; } - wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); MwVaApply(handle->children[i], horiz ? MwNx : MwNy, sk, /* this is what gets changed */ @@ -64,7 +64,7 @@ static void layout(MwWidget handle) { horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ NULL); - sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNspacing) : 0); + sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); } } From 00b542428d4073cf7de8875f90dd261d33e646bb Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 15:45:53 +0900 Subject: [PATCH 09/12] make it macro --- src/widget/box.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/widget/box.c b/src/widget/box.c index 2c47137..17e2230 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -25,6 +25,8 @@ static void draw(MwWidget handle) { MwLLFreeColor(base); } +#define Margin ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0) + static void layout(MwWidget handle) { int i; int sum = 0; @@ -39,7 +41,7 @@ static void layout(MwWidget handle) { if(n == MwDEFAULT) n = 1; if(s != MwDEFAULT) { - sz -= s + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); + sz -= s + Margin; } else { sum += n; } @@ -56,7 +58,7 @@ static void layout(MwWidget handle) { } else { wsz = sz * n / sum; } - wsz -= ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); + wsz -= Margin; MwVaApply(handle->children[i], horiz ? MwNx : MwNy, sk, /* this is what gets changed */ @@ -64,7 +66,7 @@ static void layout(MwWidget handle) { horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ NULL); - sk += wsz + ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0); + sk += wsz + Margin; } } From 8bb1cbdc09878bb34b520e8e49e3f333b4baa2d5 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 15:55:59 +0900 Subject: [PATCH 10/12] tiny fix --- src/color.c | 1564 ++++++++++++++++++++++++------------------------ tools/color.pl | 2 +- 2 files changed, 783 insertions(+), 783 deletions(-) diff --git a/src/color.c b/src/color.c index 40003a4..49c06d6 100644 --- a/src/color.c +++ b/src/color.c @@ -10,4693 +10,4693 @@ void MwParseColorNameNoAllocate(const char* color, MwRGB* rgb) { if(strcmp(color, "snow") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "ghost white") == 0) { rgb->red = 248; rgb->green = 248; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "GhostWhite") == 0) { rgb->red = 248; rgb->green = 248; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "white smoke") == 0) { rgb->red = 245; rgb->green = 245; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "WhiteSmoke") == 0) { rgb->red = 245; rgb->green = 245; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "gainsboro") == 0) { rgb->red = 220; rgb->green = 220; - rgb->green = 220; + rgb->blue = 220; return; } if(strcmp(color, "floral white") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "FloralWhite") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "old lace") == 0) { rgb->red = 253; rgb->green = 245; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "OldLace") == 0) { rgb->red = 253; rgb->green = 245; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "linen") == 0) { rgb->red = 250; rgb->green = 240; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "antique white") == 0) { rgb->red = 250; rgb->green = 235; - rgb->green = 215; + rgb->blue = 215; return; } if(strcmp(color, "AntiqueWhite") == 0) { rgb->red = 250; rgb->green = 235; - rgb->green = 215; + rgb->blue = 215; return; } if(strcmp(color, "papaya whip") == 0) { rgb->red = 255; rgb->green = 239; - rgb->green = 213; + rgb->blue = 213; return; } if(strcmp(color, "PapayaWhip") == 0) { rgb->red = 255; rgb->green = 239; - rgb->green = 213; + rgb->blue = 213; return; } if(strcmp(color, "blanched almond") == 0) { rgb->red = 255; rgb->green = 235; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "BlanchedAlmond") == 0) { rgb->red = 255; rgb->green = 235; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "bisque") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 196; + rgb->blue = 196; return; } if(strcmp(color, "peach puff") == 0) { rgb->red = 255; rgb->green = 218; - rgb->green = 185; + rgb->blue = 185; return; } if(strcmp(color, "PeachPuff") == 0) { rgb->red = 255; rgb->green = 218; - rgb->green = 185; + rgb->blue = 185; return; } if(strcmp(color, "navajo white") == 0) { rgb->red = 255; rgb->green = 222; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "NavajoWhite") == 0) { rgb->red = 255; rgb->green = 222; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "moccasin") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 181; + rgb->blue = 181; return; } if(strcmp(color, "cornsilk") == 0) { rgb->red = 255; rgb->green = 248; - rgb->green = 220; + rgb->blue = 220; return; } if(strcmp(color, "ivory") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "lemon chiffon") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LemonChiffon") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "seashell") == 0) { rgb->red = 255; rgb->green = 245; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "honeydew") == 0) { rgb->red = 240; rgb->green = 255; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "mint cream") == 0) { rgb->red = 245; rgb->green = 255; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "MintCream") == 0) { rgb->red = 245; rgb->green = 255; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "azure") == 0) { rgb->red = 240; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "alice blue") == 0) { rgb->red = 240; rgb->green = 248; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "AliceBlue") == 0) { rgb->red = 240; rgb->green = 248; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "lavender") == 0) { rgb->red = 230; rgb->green = 230; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "lavender blush") == 0) { rgb->red = 255; rgb->green = 240; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "LavenderBlush") == 0) { rgb->red = 255; rgb->green = 240; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "misty rose") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 225; + rgb->blue = 225; return; } if(strcmp(color, "MistyRose") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 225; + rgb->blue = 225; return; } if(strcmp(color, "white") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "black") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "dark slate gray") == 0) { rgb->red = 47; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "DarkSlateGray") == 0) { rgb->red = 47; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "dark slate grey") == 0) { rgb->red = 47; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "DarkSlateGrey") == 0) { rgb->red = 47; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "dim gray") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "DimGray") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "dim grey") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "DimGrey") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "slate gray") == 0) { rgb->red = 112; rgb->green = 128; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "SlateGray") == 0) { rgb->red = 112; rgb->green = 128; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "slate grey") == 0) { rgb->red = 112; rgb->green = 128; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "SlateGrey") == 0) { rgb->red = 112; rgb->green = 128; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "light slate gray") == 0) { rgb->red = 119; rgb->green = 136; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "LightSlateGray") == 0) { rgb->red = 119; rgb->green = 136; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "light slate grey") == 0) { rgb->red = 119; rgb->green = 136; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "LightSlateGrey") == 0) { rgb->red = 119; rgb->green = 136; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "gray") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "grey") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "x11 gray") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "X11Gray") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "x11 grey") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "X11Grey") == 0) { rgb->red = 190; rgb->green = 190; - rgb->green = 190; + rgb->blue = 190; return; } if(strcmp(color, "web gray") == 0) { rgb->red = 128; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "WebGray") == 0) { rgb->red = 128; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "web grey") == 0) { rgb->red = 128; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "WebGrey") == 0) { rgb->red = 128; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "light grey") == 0) { rgb->red = 211; rgb->green = 211; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "LightGrey") == 0) { rgb->red = 211; rgb->green = 211; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "light gray") == 0) { rgb->red = 211; rgb->green = 211; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "LightGray") == 0) { rgb->red = 211; rgb->green = 211; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "midnight blue") == 0) { rgb->red = 25; rgb->green = 25; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "MidnightBlue") == 0) { rgb->red = 25; rgb->green = 25; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "navy") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "navy blue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "NavyBlue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "cornflower blue") == 0) { rgb->red = 100; rgb->green = 149; - rgb->green = 237; + rgb->blue = 237; return; } if(strcmp(color, "CornflowerBlue") == 0) { rgb->red = 100; rgb->green = 149; - rgb->green = 237; + rgb->blue = 237; return; } if(strcmp(color, "dark slate blue") == 0) { rgb->red = 72; rgb->green = 61; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkSlateBlue") == 0) { rgb->red = 72; rgb->green = 61; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "slate blue") == 0) { rgb->red = 106; rgb->green = 90; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "SlateBlue") == 0) { rgb->red = 106; rgb->green = 90; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "medium slate blue") == 0) { rgb->red = 123; rgb->green = 104; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "MediumSlateBlue") == 0) { rgb->red = 123; rgb->green = 104; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "light slate blue") == 0) { rgb->red = 132; rgb->green = 112; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightSlateBlue") == 0) { rgb->red = 132; rgb->green = 112; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "medium blue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "MediumBlue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "royal blue") == 0) { rgb->red = 65; rgb->green = 105; - rgb->green = 225; + rgb->blue = 225; return; } if(strcmp(color, "RoyalBlue") == 0) { rgb->red = 65; rgb->green = 105; - rgb->green = 225; + rgb->blue = 225; return; } if(strcmp(color, "blue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "dodger blue") == 0) { rgb->red = 30; rgb->green = 144; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DodgerBlue") == 0) { rgb->red = 30; rgb->green = 144; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "deep sky blue") == 0) { rgb->red = 0; rgb->green = 191; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DeepSkyBlue") == 0) { rgb->red = 0; rgb->green = 191; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "sky blue") == 0) { rgb->red = 135; rgb->green = 206; - rgb->green = 235; + rgb->blue = 235; return; } if(strcmp(color, "SkyBlue") == 0) { rgb->red = 135; rgb->green = 206; - rgb->green = 235; + rgb->blue = 235; return; } if(strcmp(color, "light sky blue") == 0) { rgb->red = 135; rgb->green = 206; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "LightSkyBlue") == 0) { rgb->red = 135; rgb->green = 206; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "steel blue") == 0) { rgb->red = 70; rgb->green = 130; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "SteelBlue") == 0) { rgb->red = 70; rgb->green = 130; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "light steel blue") == 0) { rgb->red = 176; rgb->green = 196; - rgb->green = 222; + rgb->blue = 222; return; } if(strcmp(color, "LightSteelBlue") == 0) { rgb->red = 176; rgb->green = 196; - rgb->green = 222; + rgb->blue = 222; return; } if(strcmp(color, "light blue") == 0) { rgb->red = 173; rgb->green = 216; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "LightBlue") == 0) { rgb->red = 173; rgb->green = 216; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "powder blue") == 0) { rgb->red = 176; rgb->green = 224; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "PowderBlue") == 0) { rgb->red = 176; rgb->green = 224; - rgb->green = 230; + rgb->blue = 230; return; } if(strcmp(color, "pale turquoise") == 0) { rgb->red = 175; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "PaleTurquoise") == 0) { rgb->red = 175; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "dark turquoise") == 0) { rgb->red = 0; rgb->green = 206; - rgb->green = 209; + rgb->blue = 209; return; } if(strcmp(color, "DarkTurquoise") == 0) { rgb->red = 0; rgb->green = 206; - rgb->green = 209; + rgb->blue = 209; return; } if(strcmp(color, "medium turquoise") == 0) { rgb->red = 72; rgb->green = 209; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "MediumTurquoise") == 0) { rgb->red = 72; rgb->green = 209; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "turquoise") == 0) { rgb->red = 64; rgb->green = 224; - rgb->green = 208; + rgb->blue = 208; return; } if(strcmp(color, "cyan") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "aqua") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "light cyan") == 0) { rgb->red = 224; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightCyan") == 0) { rgb->red = 224; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "cadet blue") == 0) { rgb->red = 95; rgb->green = 158; - rgb->green = 160; + rgb->blue = 160; return; } if(strcmp(color, "CadetBlue") == 0) { rgb->red = 95; rgb->green = 158; - rgb->green = 160; + rgb->blue = 160; return; } if(strcmp(color, "medium aquamarine") == 0) { rgb->red = 102; rgb->green = 205; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "MediumAquamarine") == 0) { rgb->red = 102; rgb->green = 205; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "aquamarine") == 0) { rgb->red = 127; rgb->green = 255; - rgb->green = 212; + rgb->blue = 212; return; } if(strcmp(color, "dark green") == 0) { rgb->red = 0; rgb->green = 100; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkGreen") == 0) { rgb->red = 0; rgb->green = 100; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "dark olive green") == 0) { rgb->red = 85; rgb->green = 107; - rgb->green = 47; + rgb->blue = 47; return; } if(strcmp(color, "DarkOliveGreen") == 0) { rgb->red = 85; rgb->green = 107; - rgb->green = 47; + rgb->blue = 47; return; } if(strcmp(color, "dark sea green") == 0) { rgb->red = 143; rgb->green = 188; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "DarkSeaGreen") == 0) { rgb->red = 143; rgb->green = 188; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "sea green") == 0) { rgb->red = 46; rgb->green = 139; - rgb->green = 87; + rgb->blue = 87; return; } if(strcmp(color, "SeaGreen") == 0) { rgb->red = 46; rgb->green = 139; - rgb->green = 87; + rgb->blue = 87; return; } if(strcmp(color, "medium sea green") == 0) { rgb->red = 60; rgb->green = 179; - rgb->green = 113; + rgb->blue = 113; return; } if(strcmp(color, "MediumSeaGreen") == 0) { rgb->red = 60; rgb->green = 179; - rgb->green = 113; + rgb->blue = 113; return; } if(strcmp(color, "light sea green") == 0) { rgb->red = 32; rgb->green = 178; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "LightSeaGreen") == 0) { rgb->red = 32; rgb->green = 178; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "pale green") == 0) { rgb->red = 152; rgb->green = 251; - rgb->green = 152; + rgb->blue = 152; return; } if(strcmp(color, "PaleGreen") == 0) { rgb->red = 152; rgb->green = 251; - rgb->green = 152; + rgb->blue = 152; return; } if(strcmp(color, "spring green") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 127; + rgb->blue = 127; return; } if(strcmp(color, "SpringGreen") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 127; + rgb->blue = 127; return; } if(strcmp(color, "lawn green") == 0) { rgb->red = 124; rgb->green = 252; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "LawnGreen") == 0) { rgb->red = 124; rgb->green = 252; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "green") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "lime") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "x11 green") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "X11Green") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "web green") == 0) { rgb->red = 0; rgb->green = 128; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "WebGreen") == 0) { rgb->red = 0; rgb->green = 128; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "chartreuse") == 0) { rgb->red = 127; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "medium spring green") == 0) { rgb->red = 0; rgb->green = 250; - rgb->green = 154; + rgb->blue = 154; return; } if(strcmp(color, "MediumSpringGreen") == 0) { rgb->red = 0; rgb->green = 250; - rgb->green = 154; + rgb->blue = 154; return; } if(strcmp(color, "green yellow") == 0) { rgb->red = 173; rgb->green = 255; - rgb->green = 47; + rgb->blue = 47; return; } if(strcmp(color, "GreenYellow") == 0) { rgb->red = 173; rgb->green = 255; - rgb->green = 47; + rgb->blue = 47; return; } if(strcmp(color, "lime green") == 0) { rgb->red = 50; rgb->green = 205; - rgb->green = 50; + rgb->blue = 50; return; } if(strcmp(color, "LimeGreen") == 0) { rgb->red = 50; rgb->green = 205; - rgb->green = 50; + rgb->blue = 50; return; } if(strcmp(color, "yellow green") == 0) { rgb->red = 154; rgb->green = 205; - rgb->green = 50; + rgb->blue = 50; return; } if(strcmp(color, "YellowGreen") == 0) { rgb->red = 154; rgb->green = 205; - rgb->green = 50; + rgb->blue = 50; return; } if(strcmp(color, "forest green") == 0) { rgb->red = 34; rgb->green = 139; - rgb->green = 34; + rgb->blue = 34; return; } if(strcmp(color, "ForestGreen") == 0) { rgb->red = 34; rgb->green = 139; - rgb->green = 34; + rgb->blue = 34; return; } if(strcmp(color, "olive drab") == 0) { rgb->red = 107; rgb->green = 142; - rgb->green = 35; + rgb->blue = 35; return; } if(strcmp(color, "OliveDrab") == 0) { rgb->red = 107; rgb->green = 142; - rgb->green = 35; + rgb->blue = 35; return; } if(strcmp(color, "dark khaki") == 0) { rgb->red = 189; rgb->green = 183; - rgb->green = 107; + rgb->blue = 107; return; } if(strcmp(color, "DarkKhaki") == 0) { rgb->red = 189; rgb->green = 183; - rgb->green = 107; + rgb->blue = 107; return; } if(strcmp(color, "khaki") == 0) { rgb->red = 240; rgb->green = 230; - rgb->green = 140; + rgb->blue = 140; return; } if(strcmp(color, "pale goldenrod") == 0) { rgb->red = 238; rgb->green = 232; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "PaleGoldenrod") == 0) { rgb->red = 238; rgb->green = 232; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "light goldenrod yellow") == 0) { rgb->red = 250; rgb->green = 250; - rgb->green = 210; + rgb->blue = 210; return; } if(strcmp(color, "LightGoldenrodYellow") == 0) { rgb->red = 250; rgb->green = 250; - rgb->green = 210; + rgb->blue = 210; return; } if(strcmp(color, "light yellow") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "LightYellow") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "yellow") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gold") == 0) { rgb->red = 255; rgb->green = 215; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "light goldenrod") == 0) { rgb->red = 238; rgb->green = 221; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "LightGoldenrod") == 0) { rgb->red = 238; rgb->green = 221; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "goldenrod") == 0) { rgb->red = 218; rgb->green = 165; - rgb->green = 32; + rgb->blue = 32; return; } if(strcmp(color, "dark goldenrod") == 0) { rgb->red = 184; rgb->green = 134; - rgb->green = 11; + rgb->blue = 11; return; } if(strcmp(color, "DarkGoldenrod") == 0) { rgb->red = 184; rgb->green = 134; - rgb->green = 11; + rgb->blue = 11; return; } if(strcmp(color, "rosy brown") == 0) { rgb->red = 188; rgb->green = 143; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "RosyBrown") == 0) { rgb->red = 188; rgb->green = 143; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "indian red") == 0) { rgb->red = 205; rgb->green = 92; - rgb->green = 92; + rgb->blue = 92; return; } if(strcmp(color, "IndianRed") == 0) { rgb->red = 205; rgb->green = 92; - rgb->green = 92; + rgb->blue = 92; return; } if(strcmp(color, "saddle brown") == 0) { rgb->red = 139; rgb->green = 69; - rgb->green = 19; + rgb->blue = 19; return; } if(strcmp(color, "SaddleBrown") == 0) { rgb->red = 139; rgb->green = 69; - rgb->green = 19; + rgb->blue = 19; return; } if(strcmp(color, "sienna") == 0) { rgb->red = 160; rgb->green = 82; - rgb->green = 45; + rgb->blue = 45; return; } if(strcmp(color, "peru") == 0) { rgb->red = 205; rgb->green = 133; - rgb->green = 63; + rgb->blue = 63; return; } if(strcmp(color, "burlywood") == 0) { rgb->red = 222; rgb->green = 184; - rgb->green = 135; + rgb->blue = 135; return; } if(strcmp(color, "beige") == 0) { rgb->red = 245; rgb->green = 245; - rgb->green = 220; + rgb->blue = 220; return; } if(strcmp(color, "wheat") == 0) { rgb->red = 245; rgb->green = 222; - rgb->green = 179; + rgb->blue = 179; return; } if(strcmp(color, "sandy brown") == 0) { rgb->red = 244; rgb->green = 164; - rgb->green = 96; + rgb->blue = 96; return; } if(strcmp(color, "SandyBrown") == 0) { rgb->red = 244; rgb->green = 164; - rgb->green = 96; + rgb->blue = 96; return; } if(strcmp(color, "tan") == 0) { rgb->red = 210; rgb->green = 180; - rgb->green = 140; + rgb->blue = 140; return; } if(strcmp(color, "chocolate") == 0) { rgb->red = 210; rgb->green = 105; - rgb->green = 30; + rgb->blue = 30; return; } if(strcmp(color, "firebrick") == 0) { rgb->red = 178; rgb->green = 34; - rgb->green = 34; + rgb->blue = 34; return; } if(strcmp(color, "brown") == 0) { rgb->red = 165; rgb->green = 42; - rgb->green = 42; + rgb->blue = 42; return; } if(strcmp(color, "dark salmon") == 0) { rgb->red = 233; rgb->green = 150; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "DarkSalmon") == 0) { rgb->red = 233; rgb->green = 150; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "salmon") == 0) { rgb->red = 250; rgb->green = 128; - rgb->green = 114; + rgb->blue = 114; return; } if(strcmp(color, "light salmon") == 0) { rgb->red = 255; rgb->green = 160; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "LightSalmon") == 0) { rgb->red = 255; rgb->green = 160; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "orange") == 0) { rgb->red = 255; rgb->green = 165; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "dark orange") == 0) { rgb->red = 255; rgb->green = 140; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkOrange") == 0) { rgb->red = 255; rgb->green = 140; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "coral") == 0) { rgb->red = 255; rgb->green = 127; - rgb->green = 80; + rgb->blue = 80; return; } if(strcmp(color, "light coral") == 0) { rgb->red = 240; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "LightCoral") == 0) { rgb->red = 240; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "tomato") == 0) { rgb->red = 255; rgb->green = 99; - rgb->green = 71; + rgb->blue = 71; return; } if(strcmp(color, "orange red") == 0) { rgb->red = 255; rgb->green = 69; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "OrangeRed") == 0) { rgb->red = 255; rgb->green = 69; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "red") == 0) { rgb->red = 255; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "hot pink") == 0) { rgb->red = 255; rgb->green = 105; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "HotPink") == 0) { rgb->red = 255; rgb->green = 105; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "deep pink") == 0) { rgb->red = 255; rgb->green = 20; - rgb->green = 147; + rgb->blue = 147; return; } if(strcmp(color, "DeepPink") == 0) { rgb->red = 255; rgb->green = 20; - rgb->green = 147; + rgb->blue = 147; return; } if(strcmp(color, "pink") == 0) { rgb->red = 255; rgb->green = 192; - rgb->green = 203; + rgb->blue = 203; return; } if(strcmp(color, "light pink") == 0) { rgb->red = 255; rgb->green = 182; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "LightPink") == 0) { rgb->red = 255; rgb->green = 182; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "pale violet red") == 0) { rgb->red = 219; rgb->green = 112; - rgb->green = 147; + rgb->blue = 147; return; } if(strcmp(color, "PaleVioletRed") == 0) { rgb->red = 219; rgb->green = 112; - rgb->green = 147; + rgb->blue = 147; return; } if(strcmp(color, "maroon") == 0) { rgb->red = 176; rgb->green = 48; - rgb->green = 96; + rgb->blue = 96; return; } if(strcmp(color, "x11 maroon") == 0) { rgb->red = 176; rgb->green = 48; - rgb->green = 96; + rgb->blue = 96; return; } if(strcmp(color, "X11Maroon") == 0) { rgb->red = 176; rgb->green = 48; - rgb->green = 96; + rgb->blue = 96; return; } if(strcmp(color, "web maroon") == 0) { rgb->red = 128; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "WebMaroon") == 0) { rgb->red = 128; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "medium violet red") == 0) { rgb->red = 199; rgb->green = 21; - rgb->green = 133; + rgb->blue = 133; return; } if(strcmp(color, "MediumVioletRed") == 0) { rgb->red = 199; rgb->green = 21; - rgb->green = 133; + rgb->blue = 133; return; } if(strcmp(color, "violet red") == 0) { rgb->red = 208; rgb->green = 32; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "VioletRed") == 0) { rgb->red = 208; rgb->green = 32; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "magenta") == 0) { rgb->red = 255; rgb->green = 0; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "fuchsia") == 0) { rgb->red = 255; rgb->green = 0; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "violet") == 0) { rgb->red = 238; rgb->green = 130; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "plum") == 0) { rgb->red = 221; rgb->green = 160; - rgb->green = 221; + rgb->blue = 221; return; } if(strcmp(color, "orchid") == 0) { rgb->red = 218; rgb->green = 112; - rgb->green = 214; + rgb->blue = 214; return; } if(strcmp(color, "medium orchid") == 0) { rgb->red = 186; rgb->green = 85; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "MediumOrchid") == 0) { rgb->red = 186; rgb->green = 85; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "dark orchid") == 0) { rgb->red = 153; rgb->green = 50; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "DarkOrchid") == 0) { rgb->red = 153; rgb->green = 50; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "dark violet") == 0) { rgb->red = 148; rgb->green = 0; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "DarkViolet") == 0) { rgb->red = 148; rgb->green = 0; - rgb->green = 211; + rgb->blue = 211; return; } if(strcmp(color, "blue violet") == 0) { rgb->red = 138; rgb->green = 43; - rgb->green = 226; + rgb->blue = 226; return; } if(strcmp(color, "BlueViolet") == 0) { rgb->red = 138; rgb->green = 43; - rgb->green = 226; + rgb->blue = 226; return; } if(strcmp(color, "purple") == 0) { rgb->red = 160; rgb->green = 32; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "x11 purple") == 0) { rgb->red = 160; rgb->green = 32; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "X11Purple") == 0) { rgb->red = 160; rgb->green = 32; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "web purple") == 0) { rgb->red = 128; rgb->green = 0; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "WebPurple") == 0) { rgb->red = 128; rgb->green = 0; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "medium purple") == 0) { rgb->red = 147; rgb->green = 112; - rgb->green = 219; + rgb->blue = 219; return; } if(strcmp(color, "MediumPurple") == 0) { rgb->red = 147; rgb->green = 112; - rgb->green = 219; + rgb->blue = 219; return; } if(strcmp(color, "thistle") == 0) { rgb->red = 216; rgb->green = 191; - rgb->green = 216; + rgb->blue = 216; return; } if(strcmp(color, "snow1") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "snow2") == 0) { rgb->red = 238; rgb->green = 233; - rgb->green = 233; + rgb->blue = 233; return; } if(strcmp(color, "snow3") == 0) { rgb->red = 205; rgb->green = 201; - rgb->green = 201; + rgb->blue = 201; return; } if(strcmp(color, "snow4") == 0) { rgb->red = 139; rgb->green = 137; - rgb->green = 137; + rgb->blue = 137; return; } if(strcmp(color, "seashell1") == 0) { rgb->red = 255; rgb->green = 245; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "seashell2") == 0) { rgb->red = 238; rgb->green = 229; - rgb->green = 222; + rgb->blue = 222; return; } if(strcmp(color, "seashell3") == 0) { rgb->red = 205; rgb->green = 197; - rgb->green = 191; + rgb->blue = 191; return; } if(strcmp(color, "seashell4") == 0) { rgb->red = 139; rgb->green = 134; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "AntiqueWhite1") == 0) { rgb->red = 255; rgb->green = 239; - rgb->green = 219; + rgb->blue = 219; return; } if(strcmp(color, "AntiqueWhite2") == 0) { rgb->red = 238; rgb->green = 223; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "AntiqueWhite3") == 0) { rgb->red = 205; rgb->green = 192; - rgb->green = 176; + rgb->blue = 176; return; } if(strcmp(color, "AntiqueWhite4") == 0) { rgb->red = 139; rgb->green = 131; - rgb->green = 120; + rgb->blue = 120; return; } if(strcmp(color, "bisque1") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 196; + rgb->blue = 196; return; } if(strcmp(color, "bisque2") == 0) { rgb->red = 238; rgb->green = 213; - rgb->green = 183; + rgb->blue = 183; return; } if(strcmp(color, "bisque3") == 0) { rgb->red = 205; rgb->green = 183; - rgb->green = 158; + rgb->blue = 158; return; } if(strcmp(color, "bisque4") == 0) { rgb->red = 139; rgb->green = 125; - rgb->green = 107; + rgb->blue = 107; return; } if(strcmp(color, "PeachPuff1") == 0) { rgb->red = 255; rgb->green = 218; - rgb->green = 185; + rgb->blue = 185; return; } if(strcmp(color, "PeachPuff2") == 0) { rgb->red = 238; rgb->green = 203; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "PeachPuff3") == 0) { rgb->red = 205; rgb->green = 175; - rgb->green = 149; + rgb->blue = 149; return; } if(strcmp(color, "PeachPuff4") == 0) { rgb->red = 139; rgb->green = 119; - rgb->green = 101; + rgb->blue = 101; return; } if(strcmp(color, "NavajoWhite1") == 0) { rgb->red = 255; rgb->green = 222; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "NavajoWhite2") == 0) { rgb->red = 238; rgb->green = 207; - rgb->green = 161; + rgb->blue = 161; return; } if(strcmp(color, "NavajoWhite3") == 0) { rgb->red = 205; rgb->green = 179; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "NavajoWhite4") == 0) { rgb->red = 139; rgb->green = 121; - rgb->green = 94; + rgb->blue = 94; return; } if(strcmp(color, "LemonChiffon1") == 0) { rgb->red = 255; rgb->green = 250; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LemonChiffon2") == 0) { rgb->red = 238; rgb->green = 233; - rgb->green = 191; + rgb->blue = 191; return; } if(strcmp(color, "LemonChiffon3") == 0) { rgb->red = 205; rgb->green = 201; - rgb->green = 165; + rgb->blue = 165; return; } if(strcmp(color, "LemonChiffon4") == 0) { rgb->red = 139; rgb->green = 137; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "cornsilk1") == 0) { rgb->red = 255; rgb->green = 248; - rgb->green = 220; + rgb->blue = 220; return; } if(strcmp(color, "cornsilk2") == 0) { rgb->red = 238; rgb->green = 232; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "cornsilk3") == 0) { rgb->red = 205; rgb->green = 200; - rgb->green = 177; + rgb->blue = 177; return; } if(strcmp(color, "cornsilk4") == 0) { rgb->red = 139; rgb->green = 136; - rgb->green = 120; + rgb->blue = 120; return; } if(strcmp(color, "ivory1") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "ivory2") == 0) { rgb->red = 238; rgb->green = 238; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "ivory3") == 0) { rgb->red = 205; rgb->green = 205; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "ivory4") == 0) { rgb->red = 139; rgb->green = 139; - rgb->green = 131; + rgb->blue = 131; return; } if(strcmp(color, "honeydew1") == 0) { rgb->red = 240; rgb->green = 255; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "honeydew2") == 0) { rgb->red = 224; rgb->green = 238; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "honeydew3") == 0) { rgb->red = 193; rgb->green = 205; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "honeydew4") == 0) { rgb->red = 131; rgb->green = 139; - rgb->green = 131; + rgb->blue = 131; return; } if(strcmp(color, "LavenderBlush1") == 0) { rgb->red = 255; rgb->green = 240; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "LavenderBlush2") == 0) { rgb->red = 238; rgb->green = 224; - rgb->green = 229; + rgb->blue = 229; return; } if(strcmp(color, "LavenderBlush3") == 0) { rgb->red = 205; rgb->green = 193; - rgb->green = 197; + rgb->blue = 197; return; } if(strcmp(color, "LavenderBlush4") == 0) { rgb->red = 139; rgb->green = 131; - rgb->green = 134; + rgb->blue = 134; return; } if(strcmp(color, "MistyRose1") == 0) { rgb->red = 255; rgb->green = 228; - rgb->green = 225; + rgb->blue = 225; return; } if(strcmp(color, "MistyRose2") == 0) { rgb->red = 238; rgb->green = 213; - rgb->green = 210; + rgb->blue = 210; return; } if(strcmp(color, "MistyRose3") == 0) { rgb->red = 205; rgb->green = 183; - rgb->green = 181; + rgb->blue = 181; return; } if(strcmp(color, "MistyRose4") == 0) { rgb->red = 139; rgb->green = 125; - rgb->green = 123; + rgb->blue = 123; return; } if(strcmp(color, "azure1") == 0) { rgb->red = 240; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "azure2") == 0) { rgb->red = 224; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "azure3") == 0) { rgb->red = 193; rgb->green = 205; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "azure4") == 0) { rgb->red = 131; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "SlateBlue1") == 0) { rgb->red = 131; rgb->green = 111; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "SlateBlue2") == 0) { rgb->red = 122; rgb->green = 103; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "SlateBlue3") == 0) { rgb->red = 105; rgb->green = 89; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "SlateBlue4") == 0) { rgb->red = 71; rgb->green = 60; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "RoyalBlue1") == 0) { rgb->red = 72; rgb->green = 118; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "RoyalBlue2") == 0) { rgb->red = 67; rgb->green = 110; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "RoyalBlue3") == 0) { rgb->red = 58; rgb->green = 95; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "RoyalBlue4") == 0) { rgb->red = 39; rgb->green = 64; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "blue1") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "blue2") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "blue3") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "blue4") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DodgerBlue1") == 0) { rgb->red = 30; rgb->green = 144; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DodgerBlue2") == 0) { rgb->red = 28; rgb->green = 134; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "DodgerBlue3") == 0) { rgb->red = 24; rgb->green = 116; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "DodgerBlue4") == 0) { rgb->red = 16; rgb->green = 78; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "SteelBlue1") == 0) { rgb->red = 99; rgb->green = 184; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "SteelBlue2") == 0) { rgb->red = 92; rgb->green = 172; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "SteelBlue3") == 0) { rgb->red = 79; rgb->green = 148; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "SteelBlue4") == 0) { rgb->red = 54; rgb->green = 100; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DeepSkyBlue1") == 0) { rgb->red = 0; rgb->green = 191; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DeepSkyBlue2") == 0) { rgb->red = 0; rgb->green = 178; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "DeepSkyBlue3") == 0) { rgb->red = 0; rgb->green = 154; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "DeepSkyBlue4") == 0) { rgb->red = 0; rgb->green = 104; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "SkyBlue1") == 0) { rgb->red = 135; rgb->green = 206; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "SkyBlue2") == 0) { rgb->red = 126; rgb->green = 192; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "SkyBlue3") == 0) { rgb->red = 108; rgb->green = 166; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "SkyBlue4") == 0) { rgb->red = 74; rgb->green = 112; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "LightSkyBlue1") == 0) { rgb->red = 176; rgb->green = 226; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightSkyBlue2") == 0) { rgb->red = 164; rgb->green = 211; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "LightSkyBlue3") == 0) { rgb->red = 141; rgb->green = 182; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LightSkyBlue4") == 0) { rgb->red = 96; rgb->green = 123; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "SlateGray1") == 0) { rgb->red = 198; rgb->green = 226; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "SlateGray2") == 0) { rgb->red = 185; rgb->green = 211; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "SlateGray3") == 0) { rgb->red = 159; rgb->green = 182; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "SlateGray4") == 0) { rgb->red = 108; rgb->green = 123; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "LightSteelBlue1") == 0) { rgb->red = 202; rgb->green = 225; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightSteelBlue2") == 0) { rgb->red = 188; rgb->green = 210; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "LightSteelBlue3") == 0) { rgb->red = 162; rgb->green = 181; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LightSteelBlue4") == 0) { rgb->red = 110; rgb->green = 123; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "LightBlue1") == 0) { rgb->red = 191; rgb->green = 239; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightBlue2") == 0) { rgb->red = 178; rgb->green = 223; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "LightBlue3") == 0) { rgb->red = 154; rgb->green = 192; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LightBlue4") == 0) { rgb->red = 104; rgb->green = 131; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "LightCyan1") == 0) { rgb->red = 224; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "LightCyan2") == 0) { rgb->red = 209; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "LightCyan3") == 0) { rgb->red = 180; rgb->green = 205; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "LightCyan4") == 0) { rgb->red = 122; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "PaleTurquoise1") == 0) { rgb->red = 187; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "PaleTurquoise2") == 0) { rgb->red = 174; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "PaleTurquoise3") == 0) { rgb->red = 150; rgb->green = 205; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "PaleTurquoise4") == 0) { rgb->red = 102; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "CadetBlue1") == 0) { rgb->red = 152; rgb->green = 245; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "CadetBlue2") == 0) { rgb->red = 142; rgb->green = 229; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "CadetBlue3") == 0) { rgb->red = 122; rgb->green = 197; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "CadetBlue4") == 0) { rgb->red = 83; rgb->green = 134; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "turquoise1") == 0) { rgb->red = 0; rgb->green = 245; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "turquoise2") == 0) { rgb->red = 0; rgb->green = 229; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "turquoise3") == 0) { rgb->red = 0; rgb->green = 197; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "turquoise4") == 0) { rgb->red = 0; rgb->green = 134; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "cyan1") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "cyan2") == 0) { rgb->red = 0; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "cyan3") == 0) { rgb->red = 0; rgb->green = 205; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "cyan4") == 0) { rgb->red = 0; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkSlateGray1") == 0) { rgb->red = 151; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DarkSlateGray2") == 0) { rgb->red = 141; rgb->green = 238; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "DarkSlateGray3") == 0) { rgb->red = 121; rgb->green = 205; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "DarkSlateGray4") == 0) { rgb->red = 82; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "aquamarine1") == 0) { rgb->red = 127; rgb->green = 255; - rgb->green = 212; + rgb->blue = 212; return; } if(strcmp(color, "aquamarine2") == 0) { rgb->red = 118; rgb->green = 238; - rgb->green = 198; + rgb->blue = 198; return; } if(strcmp(color, "aquamarine3") == 0) { rgb->red = 102; rgb->green = 205; - rgb->green = 170; + rgb->blue = 170; return; } if(strcmp(color, "aquamarine4") == 0) { rgb->red = 69; rgb->green = 139; - rgb->green = 116; + rgb->blue = 116; return; } if(strcmp(color, "DarkSeaGreen1") == 0) { rgb->red = 193; rgb->green = 255; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "DarkSeaGreen2") == 0) { rgb->red = 180; rgb->green = 238; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "DarkSeaGreen3") == 0) { rgb->red = 155; rgb->green = 205; - rgb->green = 155; + rgb->blue = 155; return; } if(strcmp(color, "DarkSeaGreen4") == 0) { rgb->red = 105; rgb->green = 139; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "SeaGreen1") == 0) { rgb->red = 84; rgb->green = 255; - rgb->green = 159; + rgb->blue = 159; return; } if(strcmp(color, "SeaGreen2") == 0) { rgb->red = 78; rgb->green = 238; - rgb->green = 148; + rgb->blue = 148; return; } if(strcmp(color, "SeaGreen3") == 0) { rgb->red = 67; rgb->green = 205; - rgb->green = 128; + rgb->blue = 128; return; } if(strcmp(color, "SeaGreen4") == 0) { rgb->red = 46; rgb->green = 139; - rgb->green = 87; + rgb->blue = 87; return; } if(strcmp(color, "PaleGreen1") == 0) { rgb->red = 154; rgb->green = 255; - rgb->green = 154; + rgb->blue = 154; return; } if(strcmp(color, "PaleGreen2") == 0) { rgb->red = 144; rgb->green = 238; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "PaleGreen3") == 0) { rgb->red = 124; rgb->green = 205; - rgb->green = 124; + rgb->blue = 124; return; } if(strcmp(color, "PaleGreen4") == 0) { rgb->red = 84; rgb->green = 139; - rgb->green = 84; + rgb->blue = 84; return; } if(strcmp(color, "SpringGreen1") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 127; + rgb->blue = 127; return; } if(strcmp(color, "SpringGreen2") == 0) { rgb->red = 0; rgb->green = 238; - rgb->green = 118; + rgb->blue = 118; return; } if(strcmp(color, "SpringGreen3") == 0) { rgb->red = 0; rgb->green = 205; - rgb->green = 102; + rgb->blue = 102; return; } if(strcmp(color, "SpringGreen4") == 0) { rgb->red = 0; rgb->green = 139; - rgb->green = 69; + rgb->blue = 69; return; } if(strcmp(color, "green1") == 0) { rgb->red = 0; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "green2") == 0) { rgb->red = 0; rgb->green = 238; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "green3") == 0) { rgb->red = 0; rgb->green = 205; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "green4") == 0) { rgb->red = 0; rgb->green = 139; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "chartreuse1") == 0) { rgb->red = 127; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "chartreuse2") == 0) { rgb->red = 118; rgb->green = 238; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "chartreuse3") == 0) { rgb->red = 102; rgb->green = 205; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "chartreuse4") == 0) { rgb->red = 69; rgb->green = 139; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "OliveDrab1") == 0) { rgb->red = 192; rgb->green = 255; - rgb->green = 62; + rgb->blue = 62; return; } if(strcmp(color, "OliveDrab2") == 0) { rgb->red = 179; rgb->green = 238; - rgb->green = 58; + rgb->blue = 58; return; } if(strcmp(color, "OliveDrab3") == 0) { rgb->red = 154; rgb->green = 205; - rgb->green = 50; + rgb->blue = 50; return; } if(strcmp(color, "OliveDrab4") == 0) { rgb->red = 105; rgb->green = 139; - rgb->green = 34; + rgb->blue = 34; return; } if(strcmp(color, "DarkOliveGreen1") == 0) { rgb->red = 202; rgb->green = 255; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "DarkOliveGreen2") == 0) { rgb->red = 188; rgb->green = 238; - rgb->green = 104; + rgb->blue = 104; return; } if(strcmp(color, "DarkOliveGreen3") == 0) { rgb->red = 162; rgb->green = 205; - rgb->green = 90; + rgb->blue = 90; return; } if(strcmp(color, "DarkOliveGreen4") == 0) { rgb->red = 110; rgb->green = 139; - rgb->green = 61; + rgb->blue = 61; return; } if(strcmp(color, "khaki1") == 0) { rgb->red = 255; rgb->green = 246; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "khaki2") == 0) { rgb->red = 238; rgb->green = 230; - rgb->green = 133; + rgb->blue = 133; return; } if(strcmp(color, "khaki3") == 0) { rgb->red = 205; rgb->green = 198; - rgb->green = 115; + rgb->blue = 115; return; } if(strcmp(color, "khaki4") == 0) { rgb->red = 139; rgb->green = 134; - rgb->green = 78; + rgb->blue = 78; return; } if(strcmp(color, "LightGoldenrod1") == 0) { rgb->red = 255; rgb->green = 236; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "LightGoldenrod2") == 0) { rgb->red = 238; rgb->green = 220; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "LightGoldenrod3") == 0) { rgb->red = 205; rgb->green = 190; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "LightGoldenrod4") == 0) { rgb->red = 139; rgb->green = 129; - rgb->green = 76; + rgb->blue = 76; return; } if(strcmp(color, "LightYellow1") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "LightYellow2") == 0) { rgb->red = 238; rgb->green = 238; - rgb->green = 209; + rgb->blue = 209; return; } if(strcmp(color, "LightYellow3") == 0) { rgb->red = 205; rgb->green = 205; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "LightYellow4") == 0) { rgb->red = 139; rgb->green = 139; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "yellow1") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "yellow2") == 0) { rgb->red = 238; rgb->green = 238; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "yellow3") == 0) { rgb->red = 205; rgb->green = 205; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "yellow4") == 0) { rgb->red = 139; rgb->green = 139; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gold1") == 0) { rgb->red = 255; rgb->green = 215; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gold2") == 0) { rgb->red = 238; rgb->green = 201; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gold3") == 0) { rgb->red = 205; rgb->green = 173; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gold4") == 0) { rgb->red = 139; rgb->green = 117; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "goldenrod1") == 0) { rgb->red = 255; rgb->green = 193; - rgb->green = 37; + rgb->blue = 37; return; } if(strcmp(color, "goldenrod2") == 0) { rgb->red = 238; rgb->green = 180; - rgb->green = 34; + rgb->blue = 34; return; } if(strcmp(color, "goldenrod3") == 0) { rgb->red = 205; rgb->green = 155; - rgb->green = 29; + rgb->blue = 29; return; } if(strcmp(color, "goldenrod4") == 0) { rgb->red = 139; rgb->green = 105; - rgb->green = 20; + rgb->blue = 20; return; } if(strcmp(color, "DarkGoldenrod1") == 0) { rgb->red = 255; rgb->green = 185; - rgb->green = 15; + rgb->blue = 15; return; } if(strcmp(color, "DarkGoldenrod2") == 0) { rgb->red = 238; rgb->green = 173; - rgb->green = 14; + rgb->blue = 14; return; } if(strcmp(color, "DarkGoldenrod3") == 0) { rgb->red = 205; rgb->green = 149; - rgb->green = 12; + rgb->blue = 12; return; } if(strcmp(color, "DarkGoldenrod4") == 0) { rgb->red = 139; rgb->green = 101; - rgb->green = 8; + rgb->blue = 8; return; } if(strcmp(color, "RosyBrown1") == 0) { rgb->red = 255; rgb->green = 193; - rgb->green = 193; + rgb->blue = 193; return; } if(strcmp(color, "RosyBrown2") == 0) { rgb->red = 238; rgb->green = 180; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "RosyBrown3") == 0) { rgb->red = 205; rgb->green = 155; - rgb->green = 155; + rgb->blue = 155; return; } if(strcmp(color, "RosyBrown4") == 0) { rgb->red = 139; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "IndianRed1") == 0) { rgb->red = 255; rgb->green = 106; - rgb->green = 106; + rgb->blue = 106; return; } if(strcmp(color, "IndianRed2") == 0) { rgb->red = 238; rgb->green = 99; - rgb->green = 99; + rgb->blue = 99; return; } if(strcmp(color, "IndianRed3") == 0) { rgb->red = 205; rgb->green = 85; - rgb->green = 85; + rgb->blue = 85; return; } if(strcmp(color, "IndianRed4") == 0) { rgb->red = 139; rgb->green = 58; - rgb->green = 58; + rgb->blue = 58; return; } if(strcmp(color, "sienna1") == 0) { rgb->red = 255; rgb->green = 130; - rgb->green = 71; + rgb->blue = 71; return; } if(strcmp(color, "sienna2") == 0) { rgb->red = 238; rgb->green = 121; - rgb->green = 66; + rgb->blue = 66; return; } if(strcmp(color, "sienna3") == 0) { rgb->red = 205; rgb->green = 104; - rgb->green = 57; + rgb->blue = 57; return; } if(strcmp(color, "sienna4") == 0) { rgb->red = 139; rgb->green = 71; - rgb->green = 38; + rgb->blue = 38; return; } if(strcmp(color, "burlywood1") == 0) { rgb->red = 255; rgb->green = 211; - rgb->green = 155; + rgb->blue = 155; return; } if(strcmp(color, "burlywood2") == 0) { rgb->red = 238; rgb->green = 197; - rgb->green = 145; + rgb->blue = 145; return; } if(strcmp(color, "burlywood3") == 0) { rgb->red = 205; rgb->green = 170; - rgb->green = 125; + rgb->blue = 125; return; } if(strcmp(color, "burlywood4") == 0) { rgb->red = 139; rgb->green = 115; - rgb->green = 85; + rgb->blue = 85; return; } if(strcmp(color, "wheat1") == 0) { rgb->red = 255; rgb->green = 231; - rgb->green = 186; + rgb->blue = 186; return; } if(strcmp(color, "wheat2") == 0) { rgb->red = 238; rgb->green = 216; - rgb->green = 174; + rgb->blue = 174; return; } if(strcmp(color, "wheat3") == 0) { rgb->red = 205; rgb->green = 186; - rgb->green = 150; + rgb->blue = 150; return; } if(strcmp(color, "wheat4") == 0) { rgb->red = 139; rgb->green = 126; - rgb->green = 102; + rgb->blue = 102; return; } if(strcmp(color, "tan1") == 0) { rgb->red = 255; rgb->green = 165; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "tan2") == 0) { rgb->red = 238; rgb->green = 154; - rgb->green = 73; + rgb->blue = 73; return; } if(strcmp(color, "tan3") == 0) { rgb->red = 205; rgb->green = 133; - rgb->green = 63; + rgb->blue = 63; return; } if(strcmp(color, "tan4") == 0) { rgb->red = 139; rgb->green = 90; - rgb->green = 43; + rgb->blue = 43; return; } if(strcmp(color, "chocolate1") == 0) { rgb->red = 255; rgb->green = 127; - rgb->green = 36; + rgb->blue = 36; return; } if(strcmp(color, "chocolate2") == 0) { rgb->red = 238; rgb->green = 118; - rgb->green = 33; + rgb->blue = 33; return; } if(strcmp(color, "chocolate3") == 0) { rgb->red = 205; rgb->green = 102; - rgb->green = 29; + rgb->blue = 29; return; } if(strcmp(color, "chocolate4") == 0) { rgb->red = 139; rgb->green = 69; - rgb->green = 19; + rgb->blue = 19; return; } if(strcmp(color, "firebrick1") == 0) { rgb->red = 255; rgb->green = 48; - rgb->green = 48; + rgb->blue = 48; return; } if(strcmp(color, "firebrick2") == 0) { rgb->red = 238; rgb->green = 44; - rgb->green = 44; + rgb->blue = 44; return; } if(strcmp(color, "firebrick3") == 0) { rgb->red = 205; rgb->green = 38; - rgb->green = 38; + rgb->blue = 38; return; } if(strcmp(color, "firebrick4") == 0) { rgb->red = 139; rgb->green = 26; - rgb->green = 26; + rgb->blue = 26; return; } if(strcmp(color, "brown1") == 0) { rgb->red = 255; rgb->green = 64; - rgb->green = 64; + rgb->blue = 64; return; } if(strcmp(color, "brown2") == 0) { rgb->red = 238; rgb->green = 59; - rgb->green = 59; + rgb->blue = 59; return; } if(strcmp(color, "brown3") == 0) { rgb->red = 205; rgb->green = 51; - rgb->green = 51; + rgb->blue = 51; return; } if(strcmp(color, "brown4") == 0) { rgb->red = 139; rgb->green = 35; - rgb->green = 35; + rgb->blue = 35; return; } if(strcmp(color, "salmon1") == 0) { rgb->red = 255; rgb->green = 140; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "salmon2") == 0) { rgb->red = 238; rgb->green = 130; - rgb->green = 98; + rgb->blue = 98; return; } if(strcmp(color, "salmon3") == 0) { rgb->red = 205; rgb->green = 112; - rgb->green = 84; + rgb->blue = 84; return; } if(strcmp(color, "salmon4") == 0) { rgb->red = 139; rgb->green = 76; - rgb->green = 57; + rgb->blue = 57; return; } if(strcmp(color, "LightSalmon1") == 0) { rgb->red = 255; rgb->green = 160; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "LightSalmon2") == 0) { rgb->red = 238; rgb->green = 149; - rgb->green = 114; + rgb->blue = 114; return; } if(strcmp(color, "LightSalmon3") == 0) { rgb->red = 205; rgb->green = 129; - rgb->green = 98; + rgb->blue = 98; return; } if(strcmp(color, "LightSalmon4") == 0) { rgb->red = 139; rgb->green = 87; - rgb->green = 66; + rgb->blue = 66; return; } if(strcmp(color, "orange1") == 0) { rgb->red = 255; rgb->green = 165; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "orange2") == 0) { rgb->red = 238; rgb->green = 154; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "orange3") == 0) { rgb->red = 205; rgb->green = 133; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "orange4") == 0) { rgb->red = 139; rgb->green = 90; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkOrange1") == 0) { rgb->red = 255; rgb->green = 127; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkOrange2") == 0) { rgb->red = 238; rgb->green = 118; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkOrange3") == 0) { rgb->red = 205; rgb->green = 102; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkOrange4") == 0) { rgb->red = 139; rgb->green = 69; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "coral1") == 0) { rgb->red = 255; rgb->green = 114; - rgb->green = 86; + rgb->blue = 86; return; } if(strcmp(color, "coral2") == 0) { rgb->red = 238; rgb->green = 106; - rgb->green = 80; + rgb->blue = 80; return; } if(strcmp(color, "coral3") == 0) { rgb->red = 205; rgb->green = 91; - rgb->green = 69; + rgb->blue = 69; return; } if(strcmp(color, "coral4") == 0) { rgb->red = 139; rgb->green = 62; - rgb->green = 47; + rgb->blue = 47; return; } if(strcmp(color, "tomato1") == 0) { rgb->red = 255; rgb->green = 99; - rgb->green = 71; + rgb->blue = 71; return; } if(strcmp(color, "tomato2") == 0) { rgb->red = 238; rgb->green = 92; - rgb->green = 66; + rgb->blue = 66; return; } if(strcmp(color, "tomato3") == 0) { rgb->red = 205; rgb->green = 79; - rgb->green = 57; + rgb->blue = 57; return; } if(strcmp(color, "tomato4") == 0) { rgb->red = 139; rgb->green = 54; - rgb->green = 38; + rgb->blue = 38; return; } if(strcmp(color, "OrangeRed1") == 0) { rgb->red = 255; rgb->green = 69; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "OrangeRed2") == 0) { rgb->red = 238; rgb->green = 64; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "OrangeRed3") == 0) { rgb->red = 205; rgb->green = 55; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "OrangeRed4") == 0) { rgb->red = 139; rgb->green = 37; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "red1") == 0) { rgb->red = 255; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "red2") == 0) { rgb->red = 238; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "red3") == 0) { rgb->red = 205; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "red4") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DeepPink1") == 0) { rgb->red = 255; rgb->green = 20; - rgb->green = 147; + rgb->blue = 147; return; } if(strcmp(color, "DeepPink2") == 0) { rgb->red = 238; rgb->green = 18; - rgb->green = 137; + rgb->blue = 137; return; } if(strcmp(color, "DeepPink3") == 0) { rgb->red = 205; rgb->green = 16; - rgb->green = 118; + rgb->blue = 118; return; } if(strcmp(color, "DeepPink4") == 0) { rgb->red = 139; rgb->green = 10; - rgb->green = 80; + rgb->blue = 80; return; } if(strcmp(color, "HotPink1") == 0) { rgb->red = 255; rgb->green = 110; - rgb->green = 180; + rgb->blue = 180; return; } if(strcmp(color, "HotPink2") == 0) { rgb->red = 238; rgb->green = 106; - rgb->green = 167; + rgb->blue = 167; return; } if(strcmp(color, "HotPink3") == 0) { rgb->red = 205; rgb->green = 96; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "HotPink4") == 0) { rgb->red = 139; rgb->green = 58; - rgb->green = 98; + rgb->blue = 98; return; } if(strcmp(color, "pink1") == 0) { rgb->red = 255; rgb->green = 181; - rgb->green = 197; + rgb->blue = 197; return; } if(strcmp(color, "pink2") == 0) { rgb->red = 238; rgb->green = 169; - rgb->green = 184; + rgb->blue = 184; return; } if(strcmp(color, "pink3") == 0) { rgb->red = 205; rgb->green = 145; - rgb->green = 158; + rgb->blue = 158; return; } if(strcmp(color, "pink4") == 0) { rgb->red = 139; rgb->green = 99; - rgb->green = 108; + rgb->blue = 108; return; } if(strcmp(color, "LightPink1") == 0) { rgb->red = 255; rgb->green = 174; - rgb->green = 185; + rgb->blue = 185; return; } if(strcmp(color, "LightPink2") == 0) { rgb->red = 238; rgb->green = 162; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "LightPink3") == 0) { rgb->red = 205; rgb->green = 140; - rgb->green = 149; + rgb->blue = 149; return; } if(strcmp(color, "LightPink4") == 0) { rgb->red = 139; rgb->green = 95; - rgb->green = 101; + rgb->blue = 101; return; } if(strcmp(color, "PaleVioletRed1") == 0) { rgb->red = 255; rgb->green = 130; - rgb->green = 171; + rgb->blue = 171; return; } if(strcmp(color, "PaleVioletRed2") == 0) { rgb->red = 238; rgb->green = 121; - rgb->green = 159; + rgb->blue = 159; return; } if(strcmp(color, "PaleVioletRed3") == 0) { rgb->red = 205; rgb->green = 104; - rgb->green = 137; + rgb->blue = 137; return; } if(strcmp(color, "PaleVioletRed4") == 0) { rgb->red = 139; rgb->green = 71; - rgb->green = 93; + rgb->blue = 93; return; } if(strcmp(color, "maroon1") == 0) { rgb->red = 255; rgb->green = 52; - rgb->green = 179; + rgb->blue = 179; return; } if(strcmp(color, "maroon2") == 0) { rgb->red = 238; rgb->green = 48; - rgb->green = 167; + rgb->blue = 167; return; } if(strcmp(color, "maroon3") == 0) { rgb->red = 205; rgb->green = 41; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "maroon4") == 0) { rgb->red = 139; rgb->green = 28; - rgb->green = 98; + rgb->blue = 98; return; } if(strcmp(color, "VioletRed1") == 0) { rgb->red = 255; rgb->green = 62; - rgb->green = 150; + rgb->blue = 150; return; } if(strcmp(color, "VioletRed2") == 0) { rgb->red = 238; rgb->green = 58; - rgb->green = 140; + rgb->blue = 140; return; } if(strcmp(color, "VioletRed3") == 0) { rgb->red = 205; rgb->green = 50; - rgb->green = 120; + rgb->blue = 120; return; } if(strcmp(color, "VioletRed4") == 0) { rgb->red = 139; rgb->green = 34; - rgb->green = 82; + rgb->blue = 82; return; } if(strcmp(color, "magenta1") == 0) { rgb->red = 255; rgb->green = 0; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "magenta2") == 0) { rgb->red = 238; rgb->green = 0; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "magenta3") == 0) { rgb->red = 205; rgb->green = 0; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "magenta4") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "orchid1") == 0) { rgb->red = 255; rgb->green = 131; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "orchid2") == 0) { rgb->red = 238; rgb->green = 122; - rgb->green = 233; + rgb->blue = 233; return; } if(strcmp(color, "orchid3") == 0) { rgb->red = 205; rgb->green = 105; - rgb->green = 201; + rgb->blue = 201; return; } if(strcmp(color, "orchid4") == 0) { rgb->red = 139; rgb->green = 71; - rgb->green = 137; + rgb->blue = 137; return; } if(strcmp(color, "plum1") == 0) { rgb->red = 255; rgb->green = 187; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "plum2") == 0) { rgb->red = 238; rgb->green = 174; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "plum3") == 0) { rgb->red = 205; rgb->green = 150; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "plum4") == 0) { rgb->red = 139; rgb->green = 102; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "MediumOrchid1") == 0) { rgb->red = 224; rgb->green = 102; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "MediumOrchid2") == 0) { rgb->red = 209; rgb->green = 95; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "MediumOrchid3") == 0) { rgb->red = 180; rgb->green = 82; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "MediumOrchid4") == 0) { rgb->red = 122; rgb->green = 55; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkOrchid1") == 0) { rgb->red = 191; rgb->green = 62; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "DarkOrchid2") == 0) { rgb->red = 178; rgb->green = 58; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "DarkOrchid3") == 0) { rgb->red = 154; rgb->green = 50; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "DarkOrchid4") == 0) { rgb->red = 104; rgb->green = 34; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "purple1") == 0) { rgb->red = 155; rgb->green = 48; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "purple2") == 0) { rgb->red = 145; rgb->green = 44; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "purple3") == 0) { rgb->red = 125; rgb->green = 38; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "purple4") == 0) { rgb->red = 85; rgb->green = 26; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "MediumPurple1") == 0) { rgb->red = 171; rgb->green = 130; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "MediumPurple2") == 0) { rgb->red = 159; rgb->green = 121; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "MediumPurple3") == 0) { rgb->red = 137; rgb->green = 104; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "MediumPurple4") == 0) { rgb->red = 93; rgb->green = 71; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "thistle1") == 0) { rgb->red = 255; rgb->green = 225; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "thistle2") == 0) { rgb->red = 238; rgb->green = 210; - rgb->green = 238; + rgb->blue = 238; return; } if(strcmp(color, "thistle3") == 0) { rgb->red = 205; rgb->green = 181; - rgb->green = 205; + rgb->blue = 205; return; } if(strcmp(color, "thistle4") == 0) { rgb->red = 139; rgb->green = 123; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "gray0") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "grey0") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "gray1") == 0) { rgb->red = 3; rgb->green = 3; - rgb->green = 3; + rgb->blue = 3; return; } if(strcmp(color, "grey1") == 0) { rgb->red = 3; rgb->green = 3; - rgb->green = 3; + rgb->blue = 3; return; } if(strcmp(color, "gray2") == 0) { rgb->red = 5; rgb->green = 5; - rgb->green = 5; + rgb->blue = 5; return; } if(strcmp(color, "grey2") == 0) { rgb->red = 5; rgb->green = 5; - rgb->green = 5; + rgb->blue = 5; return; } if(strcmp(color, "gray3") == 0) { rgb->red = 8; rgb->green = 8; - rgb->green = 8; + rgb->blue = 8; return; } if(strcmp(color, "grey3") == 0) { rgb->red = 8; rgb->green = 8; - rgb->green = 8; + rgb->blue = 8; return; } if(strcmp(color, "gray4") == 0) { rgb->red = 10; rgb->green = 10; - rgb->green = 10; + rgb->blue = 10; return; } if(strcmp(color, "grey4") == 0) { rgb->red = 10; rgb->green = 10; - rgb->green = 10; + rgb->blue = 10; return; } if(strcmp(color, "gray5") == 0) { rgb->red = 13; rgb->green = 13; - rgb->green = 13; + rgb->blue = 13; return; } if(strcmp(color, "grey5") == 0) { rgb->red = 13; rgb->green = 13; - rgb->green = 13; + rgb->blue = 13; return; } if(strcmp(color, "gray6") == 0) { rgb->red = 15; rgb->green = 15; - rgb->green = 15; + rgb->blue = 15; return; } if(strcmp(color, "grey6") == 0) { rgb->red = 15; rgb->green = 15; - rgb->green = 15; + rgb->blue = 15; return; } if(strcmp(color, "gray7") == 0) { rgb->red = 18; rgb->green = 18; - rgb->green = 18; + rgb->blue = 18; return; } if(strcmp(color, "grey7") == 0) { rgb->red = 18; rgb->green = 18; - rgb->green = 18; + rgb->blue = 18; return; } if(strcmp(color, "gray8") == 0) { rgb->red = 20; rgb->green = 20; - rgb->green = 20; + rgb->blue = 20; return; } if(strcmp(color, "grey8") == 0) { rgb->red = 20; rgb->green = 20; - rgb->green = 20; + rgb->blue = 20; return; } if(strcmp(color, "gray9") == 0) { rgb->red = 23; rgb->green = 23; - rgb->green = 23; + rgb->blue = 23; return; } if(strcmp(color, "grey9") == 0) { rgb->red = 23; rgb->green = 23; - rgb->green = 23; + rgb->blue = 23; return; } if(strcmp(color, "gray10") == 0) { rgb->red = 26; rgb->green = 26; - rgb->green = 26; + rgb->blue = 26; return; } if(strcmp(color, "grey10") == 0) { rgb->red = 26; rgb->green = 26; - rgb->green = 26; + rgb->blue = 26; return; } if(strcmp(color, "gray11") == 0) { rgb->red = 28; rgb->green = 28; - rgb->green = 28; + rgb->blue = 28; return; } if(strcmp(color, "grey11") == 0) { rgb->red = 28; rgb->green = 28; - rgb->green = 28; + rgb->blue = 28; return; } if(strcmp(color, "gray12") == 0) { rgb->red = 31; rgb->green = 31; - rgb->green = 31; + rgb->blue = 31; return; } if(strcmp(color, "grey12") == 0) { rgb->red = 31; rgb->green = 31; - rgb->green = 31; + rgb->blue = 31; return; } if(strcmp(color, "gray13") == 0) { rgb->red = 33; rgb->green = 33; - rgb->green = 33; + rgb->blue = 33; return; } if(strcmp(color, "grey13") == 0) { rgb->red = 33; rgb->green = 33; - rgb->green = 33; + rgb->blue = 33; return; } if(strcmp(color, "gray14") == 0) { rgb->red = 36; rgb->green = 36; - rgb->green = 36; + rgb->blue = 36; return; } if(strcmp(color, "grey14") == 0) { rgb->red = 36; rgb->green = 36; - rgb->green = 36; + rgb->blue = 36; return; } if(strcmp(color, "gray15") == 0) { rgb->red = 38; rgb->green = 38; - rgb->green = 38; + rgb->blue = 38; return; } if(strcmp(color, "grey15") == 0) { rgb->red = 38; rgb->green = 38; - rgb->green = 38; + rgb->blue = 38; return; } if(strcmp(color, "gray16") == 0) { rgb->red = 41; rgb->green = 41; - rgb->green = 41; + rgb->blue = 41; return; } if(strcmp(color, "grey16") == 0) { rgb->red = 41; rgb->green = 41; - rgb->green = 41; + rgb->blue = 41; return; } if(strcmp(color, "gray17") == 0) { rgb->red = 43; rgb->green = 43; - rgb->green = 43; + rgb->blue = 43; return; } if(strcmp(color, "grey17") == 0) { rgb->red = 43; rgb->green = 43; - rgb->green = 43; + rgb->blue = 43; return; } if(strcmp(color, "gray18") == 0) { rgb->red = 46; rgb->green = 46; - rgb->green = 46; + rgb->blue = 46; return; } if(strcmp(color, "grey18") == 0) { rgb->red = 46; rgb->green = 46; - rgb->green = 46; + rgb->blue = 46; return; } if(strcmp(color, "gray19") == 0) { rgb->red = 48; rgb->green = 48; - rgb->green = 48; + rgb->blue = 48; return; } if(strcmp(color, "grey19") == 0) { rgb->red = 48; rgb->green = 48; - rgb->green = 48; + rgb->blue = 48; return; } if(strcmp(color, "gray20") == 0) { rgb->red = 51; rgb->green = 51; - rgb->green = 51; + rgb->blue = 51; return; } if(strcmp(color, "grey20") == 0) { rgb->red = 51; rgb->green = 51; - rgb->green = 51; + rgb->blue = 51; return; } if(strcmp(color, "gray21") == 0) { rgb->red = 54; rgb->green = 54; - rgb->green = 54; + rgb->blue = 54; return; } if(strcmp(color, "grey21") == 0) { rgb->red = 54; rgb->green = 54; - rgb->green = 54; + rgb->blue = 54; return; } if(strcmp(color, "gray22") == 0) { rgb->red = 56; rgb->green = 56; - rgb->green = 56; + rgb->blue = 56; return; } if(strcmp(color, "grey22") == 0) { rgb->red = 56; rgb->green = 56; - rgb->green = 56; + rgb->blue = 56; return; } if(strcmp(color, "gray23") == 0) { rgb->red = 59; rgb->green = 59; - rgb->green = 59; + rgb->blue = 59; return; } if(strcmp(color, "grey23") == 0) { rgb->red = 59; rgb->green = 59; - rgb->green = 59; + rgb->blue = 59; return; } if(strcmp(color, "gray24") == 0) { rgb->red = 61; rgb->green = 61; - rgb->green = 61; + rgb->blue = 61; return; } if(strcmp(color, "grey24") == 0) { rgb->red = 61; rgb->green = 61; - rgb->green = 61; + rgb->blue = 61; return; } if(strcmp(color, "gray25") == 0) { rgb->red = 64; rgb->green = 64; - rgb->green = 64; + rgb->blue = 64; return; } if(strcmp(color, "grey25") == 0) { rgb->red = 64; rgb->green = 64; - rgb->green = 64; + rgb->blue = 64; return; } if(strcmp(color, "gray26") == 0) { rgb->red = 66; rgb->green = 66; - rgb->green = 66; + rgb->blue = 66; return; } if(strcmp(color, "grey26") == 0) { rgb->red = 66; rgb->green = 66; - rgb->green = 66; + rgb->blue = 66; return; } if(strcmp(color, "gray27") == 0) { rgb->red = 69; rgb->green = 69; - rgb->green = 69; + rgb->blue = 69; return; } if(strcmp(color, "grey27") == 0) { rgb->red = 69; rgb->green = 69; - rgb->green = 69; + rgb->blue = 69; return; } if(strcmp(color, "gray28") == 0) { rgb->red = 71; rgb->green = 71; - rgb->green = 71; + rgb->blue = 71; return; } if(strcmp(color, "grey28") == 0) { rgb->red = 71; rgb->green = 71; - rgb->green = 71; + rgb->blue = 71; return; } if(strcmp(color, "gray29") == 0) { rgb->red = 74; rgb->green = 74; - rgb->green = 74; + rgb->blue = 74; return; } if(strcmp(color, "grey29") == 0) { rgb->red = 74; rgb->green = 74; - rgb->green = 74; + rgb->blue = 74; return; } if(strcmp(color, "gray30") == 0) { rgb->red = 77; rgb->green = 77; - rgb->green = 77; + rgb->blue = 77; return; } if(strcmp(color, "grey30") == 0) { rgb->red = 77; rgb->green = 77; - rgb->green = 77; + rgb->blue = 77; return; } if(strcmp(color, "gray31") == 0) { rgb->red = 79; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "grey31") == 0) { rgb->red = 79; rgb->green = 79; - rgb->green = 79; + rgb->blue = 79; return; } if(strcmp(color, "gray32") == 0) { rgb->red = 82; rgb->green = 82; - rgb->green = 82; + rgb->blue = 82; return; } if(strcmp(color, "grey32") == 0) { rgb->red = 82; rgb->green = 82; - rgb->green = 82; + rgb->blue = 82; return; } if(strcmp(color, "gray33") == 0) { rgb->red = 84; rgb->green = 84; - rgb->green = 84; + rgb->blue = 84; return; } if(strcmp(color, "grey33") == 0) { rgb->red = 84; rgb->green = 84; - rgb->green = 84; + rgb->blue = 84; return; } if(strcmp(color, "gray34") == 0) { rgb->red = 87; rgb->green = 87; - rgb->green = 87; + rgb->blue = 87; return; } if(strcmp(color, "grey34") == 0) { rgb->red = 87; rgb->green = 87; - rgb->green = 87; + rgb->blue = 87; return; } if(strcmp(color, "gray35") == 0) { rgb->red = 89; rgb->green = 89; - rgb->green = 89; + rgb->blue = 89; return; } if(strcmp(color, "grey35") == 0) { rgb->red = 89; rgb->green = 89; - rgb->green = 89; + rgb->blue = 89; return; } if(strcmp(color, "gray36") == 0) { rgb->red = 92; rgb->green = 92; - rgb->green = 92; + rgb->blue = 92; return; } if(strcmp(color, "grey36") == 0) { rgb->red = 92; rgb->green = 92; - rgb->green = 92; + rgb->blue = 92; return; } if(strcmp(color, "gray37") == 0) { rgb->red = 94; rgb->green = 94; - rgb->green = 94; + rgb->blue = 94; return; } if(strcmp(color, "grey37") == 0) { rgb->red = 94; rgb->green = 94; - rgb->green = 94; + rgb->blue = 94; return; } if(strcmp(color, "gray38") == 0) { rgb->red = 97; rgb->green = 97; - rgb->green = 97; + rgb->blue = 97; return; } if(strcmp(color, "grey38") == 0) { rgb->red = 97; rgb->green = 97; - rgb->green = 97; + rgb->blue = 97; return; } if(strcmp(color, "gray39") == 0) { rgb->red = 99; rgb->green = 99; - rgb->green = 99; + rgb->blue = 99; return; } if(strcmp(color, "grey39") == 0) { rgb->red = 99; rgb->green = 99; - rgb->green = 99; + rgb->blue = 99; return; } if(strcmp(color, "gray40") == 0) { rgb->red = 102; rgb->green = 102; - rgb->green = 102; + rgb->blue = 102; return; } if(strcmp(color, "grey40") == 0) { rgb->red = 102; rgb->green = 102; - rgb->green = 102; + rgb->blue = 102; return; } if(strcmp(color, "gray41") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "grey41") == 0) { rgb->red = 105; rgb->green = 105; - rgb->green = 105; + rgb->blue = 105; return; } if(strcmp(color, "gray42") == 0) { rgb->red = 107; rgb->green = 107; - rgb->green = 107; + rgb->blue = 107; return; } if(strcmp(color, "grey42") == 0) { rgb->red = 107; rgb->green = 107; - rgb->green = 107; + rgb->blue = 107; return; } if(strcmp(color, "gray43") == 0) { rgb->red = 110; rgb->green = 110; - rgb->green = 110; + rgb->blue = 110; return; } if(strcmp(color, "grey43") == 0) { rgb->red = 110; rgb->green = 110; - rgb->green = 110; + rgb->blue = 110; return; } if(strcmp(color, "gray44") == 0) { rgb->red = 112; rgb->green = 112; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "grey44") == 0) { rgb->red = 112; rgb->green = 112; - rgb->green = 112; + rgb->blue = 112; return; } if(strcmp(color, "gray45") == 0) { rgb->red = 115; rgb->green = 115; - rgb->green = 115; + rgb->blue = 115; return; } if(strcmp(color, "grey45") == 0) { rgb->red = 115; rgb->green = 115; - rgb->green = 115; + rgb->blue = 115; return; } if(strcmp(color, "gray46") == 0) { rgb->red = 117; rgb->green = 117; - rgb->green = 117; + rgb->blue = 117; return; } if(strcmp(color, "grey46") == 0) { rgb->red = 117; rgb->green = 117; - rgb->green = 117; + rgb->blue = 117; return; } if(strcmp(color, "gray47") == 0) { rgb->red = 120; rgb->green = 120; - rgb->green = 120; + rgb->blue = 120; return; } if(strcmp(color, "grey47") == 0) { rgb->red = 120; rgb->green = 120; - rgb->green = 120; + rgb->blue = 120; return; } if(strcmp(color, "gray48") == 0) { rgb->red = 122; rgb->green = 122; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "grey48") == 0) { rgb->red = 122; rgb->green = 122; - rgb->green = 122; + rgb->blue = 122; return; } if(strcmp(color, "gray49") == 0) { rgb->red = 125; rgb->green = 125; - rgb->green = 125; + rgb->blue = 125; return; } if(strcmp(color, "grey49") == 0) { rgb->red = 125; rgb->green = 125; - rgb->green = 125; + rgb->blue = 125; return; } if(strcmp(color, "gray50") == 0) { rgb->red = 127; rgb->green = 127; - rgb->green = 127; + rgb->blue = 127; return; } if(strcmp(color, "grey50") == 0) { rgb->red = 127; rgb->green = 127; - rgb->green = 127; + rgb->blue = 127; return; } if(strcmp(color, "gray51") == 0) { rgb->red = 130; rgb->green = 130; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "grey51") == 0) { rgb->red = 130; rgb->green = 130; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "gray52") == 0) { rgb->red = 133; rgb->green = 133; - rgb->green = 133; + rgb->blue = 133; return; } if(strcmp(color, "grey52") == 0) { rgb->red = 133; rgb->green = 133; - rgb->green = 133; + rgb->blue = 133; return; } if(strcmp(color, "gray53") == 0) { rgb->red = 135; rgb->green = 135; - rgb->green = 135; + rgb->blue = 135; return; } if(strcmp(color, "grey53") == 0) { rgb->red = 135; rgb->green = 135; - rgb->green = 135; + rgb->blue = 135; return; } if(strcmp(color, "gray54") == 0) { rgb->red = 138; rgb->green = 138; - rgb->green = 138; + rgb->blue = 138; return; } if(strcmp(color, "grey54") == 0) { rgb->red = 138; rgb->green = 138; - rgb->green = 138; + rgb->blue = 138; return; } if(strcmp(color, "gray55") == 0) { rgb->red = 140; rgb->green = 140; - rgb->green = 140; + rgb->blue = 140; return; } if(strcmp(color, "grey55") == 0) { rgb->red = 140; rgb->green = 140; - rgb->green = 140; + rgb->blue = 140; return; } if(strcmp(color, "gray56") == 0) { rgb->red = 143; rgb->green = 143; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "grey56") == 0) { rgb->red = 143; rgb->green = 143; - rgb->green = 143; + rgb->blue = 143; return; } if(strcmp(color, "gray57") == 0) { rgb->red = 145; rgb->green = 145; - rgb->green = 145; + rgb->blue = 145; return; } if(strcmp(color, "grey57") == 0) { rgb->red = 145; rgb->green = 145; - rgb->green = 145; + rgb->blue = 145; return; } if(strcmp(color, "gray58") == 0) { rgb->red = 148; rgb->green = 148; - rgb->green = 148; + rgb->blue = 148; return; } if(strcmp(color, "grey58") == 0) { rgb->red = 148; rgb->green = 148; - rgb->green = 148; + rgb->blue = 148; return; } if(strcmp(color, "gray59") == 0) { rgb->red = 150; rgb->green = 150; - rgb->green = 150; + rgb->blue = 150; return; } if(strcmp(color, "grey59") == 0) { rgb->red = 150; rgb->green = 150; - rgb->green = 150; + rgb->blue = 150; return; } if(strcmp(color, "gray60") == 0) { rgb->red = 153; rgb->green = 153; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "grey60") == 0) { rgb->red = 153; rgb->green = 153; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "gray61") == 0) { rgb->red = 156; rgb->green = 156; - rgb->green = 156; + rgb->blue = 156; return; } if(strcmp(color, "grey61") == 0) { rgb->red = 156; rgb->green = 156; - rgb->green = 156; + rgb->blue = 156; return; } if(strcmp(color, "gray62") == 0) { rgb->red = 158; rgb->green = 158; - rgb->green = 158; + rgb->blue = 158; return; } if(strcmp(color, "grey62") == 0) { rgb->red = 158; rgb->green = 158; - rgb->green = 158; + rgb->blue = 158; return; } if(strcmp(color, "gray63") == 0) { rgb->red = 161; rgb->green = 161; - rgb->green = 161; + rgb->blue = 161; return; } if(strcmp(color, "grey63") == 0) { rgb->red = 161; rgb->green = 161; - rgb->green = 161; + rgb->blue = 161; return; } if(strcmp(color, "gray64") == 0) { rgb->red = 163; rgb->green = 163; - rgb->green = 163; + rgb->blue = 163; return; } if(strcmp(color, "grey64") == 0) { rgb->red = 163; rgb->green = 163; - rgb->green = 163; + rgb->blue = 163; return; } if(strcmp(color, "gray65") == 0) { rgb->red = 166; rgb->green = 166; - rgb->green = 166; + rgb->blue = 166; return; } if(strcmp(color, "grey65") == 0) { rgb->red = 166; rgb->green = 166; - rgb->green = 166; + rgb->blue = 166; return; } if(strcmp(color, "gray66") == 0) { rgb->red = 168; rgb->green = 168; - rgb->green = 168; + rgb->blue = 168; return; } if(strcmp(color, "grey66") == 0) { rgb->red = 168; rgb->green = 168; - rgb->green = 168; + rgb->blue = 168; return; } if(strcmp(color, "gray67") == 0) { rgb->red = 171; rgb->green = 171; - rgb->green = 171; + rgb->blue = 171; return; } if(strcmp(color, "grey67") == 0) { rgb->red = 171; rgb->green = 171; - rgb->green = 171; + rgb->blue = 171; return; } if(strcmp(color, "gray68") == 0) { rgb->red = 173; rgb->green = 173; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "grey68") == 0) { rgb->red = 173; rgb->green = 173; - rgb->green = 173; + rgb->blue = 173; return; } if(strcmp(color, "gray69") == 0) { rgb->red = 176; rgb->green = 176; - rgb->green = 176; + rgb->blue = 176; return; } if(strcmp(color, "grey69") == 0) { rgb->red = 176; rgb->green = 176; - rgb->green = 176; + rgb->blue = 176; return; } if(strcmp(color, "gray70") == 0) { rgb->red = 179; rgb->green = 179; - rgb->green = 179; + rgb->blue = 179; return; } if(strcmp(color, "grey70") == 0) { rgb->red = 179; rgb->green = 179; - rgb->green = 179; + rgb->blue = 179; return; } if(strcmp(color, "gray71") == 0) { rgb->red = 181; rgb->green = 181; - rgb->green = 181; + rgb->blue = 181; return; } if(strcmp(color, "grey71") == 0) { rgb->red = 181; rgb->green = 181; - rgb->green = 181; + rgb->blue = 181; return; } if(strcmp(color, "gray72") == 0) { rgb->red = 184; rgb->green = 184; - rgb->green = 184; + rgb->blue = 184; return; } if(strcmp(color, "grey72") == 0) { rgb->red = 184; rgb->green = 184; - rgb->green = 184; + rgb->blue = 184; return; } if(strcmp(color, "gray73") == 0) { rgb->red = 186; rgb->green = 186; - rgb->green = 186; + rgb->blue = 186; return; } if(strcmp(color, "grey73") == 0) { rgb->red = 186; rgb->green = 186; - rgb->green = 186; + rgb->blue = 186; return; } if(strcmp(color, "gray74") == 0) { rgb->red = 189; rgb->green = 189; - rgb->green = 189; + rgb->blue = 189; return; } if(strcmp(color, "grey74") == 0) { rgb->red = 189; rgb->green = 189; - rgb->green = 189; + rgb->blue = 189; return; } if(strcmp(color, "gray75") == 0) { rgb->red = 191; rgb->green = 191; - rgb->green = 191; + rgb->blue = 191; return; } if(strcmp(color, "grey75") == 0) { rgb->red = 191; rgb->green = 191; - rgb->green = 191; + rgb->blue = 191; return; } if(strcmp(color, "gray76") == 0) { rgb->red = 194; rgb->green = 194; - rgb->green = 194; + rgb->blue = 194; return; } if(strcmp(color, "grey76") == 0) { rgb->red = 194; rgb->green = 194; - rgb->green = 194; + rgb->blue = 194; return; } if(strcmp(color, "gray77") == 0) { rgb->red = 196; rgb->green = 196; - rgb->green = 196; + rgb->blue = 196; return; } if(strcmp(color, "grey77") == 0) { rgb->red = 196; rgb->green = 196; - rgb->green = 196; + rgb->blue = 196; return; } if(strcmp(color, "gray78") == 0) { rgb->red = 199; rgb->green = 199; - rgb->green = 199; + rgb->blue = 199; return; } if(strcmp(color, "grey78") == 0) { rgb->red = 199; rgb->green = 199; - rgb->green = 199; + rgb->blue = 199; return; } if(strcmp(color, "gray79") == 0) { rgb->red = 201; rgb->green = 201; - rgb->green = 201; + rgb->blue = 201; return; } if(strcmp(color, "grey79") == 0) { rgb->red = 201; rgb->green = 201; - rgb->green = 201; + rgb->blue = 201; return; } if(strcmp(color, "gray80") == 0) { rgb->red = 204; rgb->green = 204; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "grey80") == 0) { rgb->red = 204; rgb->green = 204; - rgb->green = 204; + rgb->blue = 204; return; } if(strcmp(color, "gray81") == 0) { rgb->red = 207; rgb->green = 207; - rgb->green = 207; + rgb->blue = 207; return; } if(strcmp(color, "grey81") == 0) { rgb->red = 207; rgb->green = 207; - rgb->green = 207; + rgb->blue = 207; return; } if(strcmp(color, "gray82") == 0) { rgb->red = 209; rgb->green = 209; - rgb->green = 209; + rgb->blue = 209; return; } if(strcmp(color, "grey82") == 0) { rgb->red = 209; rgb->green = 209; - rgb->green = 209; + rgb->blue = 209; return; } if(strcmp(color, "gray83") == 0) { rgb->red = 212; rgb->green = 212; - rgb->green = 212; + rgb->blue = 212; return; } if(strcmp(color, "grey83") == 0) { rgb->red = 212; rgb->green = 212; - rgb->green = 212; + rgb->blue = 212; return; } if(strcmp(color, "gray84") == 0) { rgb->red = 214; rgb->green = 214; - rgb->green = 214; + rgb->blue = 214; return; } if(strcmp(color, "grey84") == 0) { rgb->red = 214; rgb->green = 214; - rgb->green = 214; + rgb->blue = 214; return; } if(strcmp(color, "gray85") == 0) { rgb->red = 217; rgb->green = 217; - rgb->green = 217; + rgb->blue = 217; return; } if(strcmp(color, "grey85") == 0) { rgb->red = 217; rgb->green = 217; - rgb->green = 217; + rgb->blue = 217; return; } if(strcmp(color, "gray86") == 0) { rgb->red = 219; rgb->green = 219; - rgb->green = 219; + rgb->blue = 219; return; } if(strcmp(color, "grey86") == 0) { rgb->red = 219; rgb->green = 219; - rgb->green = 219; + rgb->blue = 219; return; } if(strcmp(color, "gray87") == 0) { rgb->red = 222; rgb->green = 222; - rgb->green = 222; + rgb->blue = 222; return; } if(strcmp(color, "grey87") == 0) { rgb->red = 222; rgb->green = 222; - rgb->green = 222; + rgb->blue = 222; return; } if(strcmp(color, "gray88") == 0) { rgb->red = 224; rgb->green = 224; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "grey88") == 0) { rgb->red = 224; rgb->green = 224; - rgb->green = 224; + rgb->blue = 224; return; } if(strcmp(color, "gray89") == 0) { rgb->red = 227; rgb->green = 227; - rgb->green = 227; + rgb->blue = 227; return; } if(strcmp(color, "grey89") == 0) { rgb->red = 227; rgb->green = 227; - rgb->green = 227; + rgb->blue = 227; return; } if(strcmp(color, "gray90") == 0) { rgb->red = 229; rgb->green = 229; - rgb->green = 229; + rgb->blue = 229; return; } if(strcmp(color, "grey90") == 0) { rgb->red = 229; rgb->green = 229; - rgb->green = 229; + rgb->blue = 229; return; } if(strcmp(color, "gray91") == 0) { rgb->red = 232; rgb->green = 232; - rgb->green = 232; + rgb->blue = 232; return; } if(strcmp(color, "grey91") == 0) { rgb->red = 232; rgb->green = 232; - rgb->green = 232; + rgb->blue = 232; return; } if(strcmp(color, "gray92") == 0) { rgb->red = 235; rgb->green = 235; - rgb->green = 235; + rgb->blue = 235; return; } if(strcmp(color, "grey92") == 0) { rgb->red = 235; rgb->green = 235; - rgb->green = 235; + rgb->blue = 235; return; } if(strcmp(color, "gray93") == 0) { rgb->red = 237; rgb->green = 237; - rgb->green = 237; + rgb->blue = 237; return; } if(strcmp(color, "grey93") == 0) { rgb->red = 237; rgb->green = 237; - rgb->green = 237; + rgb->blue = 237; return; } if(strcmp(color, "gray94") == 0) { rgb->red = 240; rgb->green = 240; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "grey94") == 0) { rgb->red = 240; rgb->green = 240; - rgb->green = 240; + rgb->blue = 240; return; } if(strcmp(color, "gray95") == 0) { rgb->red = 242; rgb->green = 242; - rgb->green = 242; + rgb->blue = 242; return; } if(strcmp(color, "grey95") == 0) { rgb->red = 242; rgb->green = 242; - rgb->green = 242; + rgb->blue = 242; return; } if(strcmp(color, "gray96") == 0) { rgb->red = 245; rgb->green = 245; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "grey96") == 0) { rgb->red = 245; rgb->green = 245; - rgb->green = 245; + rgb->blue = 245; return; } if(strcmp(color, "gray97") == 0) { rgb->red = 247; rgb->green = 247; - rgb->green = 247; + rgb->blue = 247; return; } if(strcmp(color, "grey97") == 0) { rgb->red = 247; rgb->green = 247; - rgb->green = 247; + rgb->blue = 247; return; } if(strcmp(color, "gray98") == 0) { rgb->red = 250; rgb->green = 250; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "grey98") == 0) { rgb->red = 250; rgb->green = 250; - rgb->green = 250; + rgb->blue = 250; return; } if(strcmp(color, "gray99") == 0) { rgb->red = 252; rgb->green = 252; - rgb->green = 252; + rgb->blue = 252; return; } if(strcmp(color, "grey99") == 0) { rgb->red = 252; rgb->green = 252; - rgb->green = 252; + rgb->blue = 252; return; } if(strcmp(color, "gray100") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "grey100") == 0) { rgb->red = 255; rgb->green = 255; - rgb->green = 255; + rgb->blue = 255; return; } if(strcmp(color, "dark grey") == 0) { rgb->red = 169; rgb->green = 169; - rgb->green = 169; + rgb->blue = 169; return; } if(strcmp(color, "DarkGrey") == 0) { rgb->red = 169; rgb->green = 169; - rgb->green = 169; + rgb->blue = 169; return; } if(strcmp(color, "dark gray") == 0) { rgb->red = 169; rgb->green = 169; - rgb->green = 169; + rgb->blue = 169; return; } if(strcmp(color, "DarkGray") == 0) { rgb->red = 169; rgb->green = 169; - rgb->green = 169; + rgb->blue = 169; return; } if(strcmp(color, "dark blue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkBlue") == 0) { rgb->red = 0; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "dark cyan") == 0) { rgb->red = 0; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkCyan") == 0) { rgb->red = 0; rgb->green = 139; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "dark magenta") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "DarkMagenta") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 139; + rgb->blue = 139; return; } if(strcmp(color, "dark red") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "DarkRed") == 0) { rgb->red = 139; rgb->green = 0; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "light green") == 0) { rgb->red = 144; rgb->green = 238; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "LightGreen") == 0) { rgb->red = 144; rgb->green = 238; - rgb->green = 144; + rgb->blue = 144; return; } if(strcmp(color, "crimson") == 0) { rgb->red = 220; rgb->green = 20; - rgb->green = 60; + rgb->blue = 60; return; } if(strcmp(color, "indigo") == 0) { rgb->red = 75; rgb->green = 0; - rgb->green = 130; + rgb->blue = 130; return; } if(strcmp(color, "olive") == 0) { rgb->red = 128; rgb->green = 128; - rgb->green = 0; + rgb->blue = 0; return; } if(strcmp(color, "rebecca purple") == 0) { rgb->red = 102; rgb->green = 51; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "RebeccaPurple") == 0) { rgb->red = 102; rgb->green = 51; - rgb->green = 153; + rgb->blue = 153; return; } if(strcmp(color, "silver") == 0) { rgb->red = 192; rgb->green = 192; - rgb->green = 192; + rgb->blue = 192; return; } if(strcmp(color, "teal") == 0) { rgb->red = 0; rgb->green = 128; - rgb->green = 128; + rgb->blue = 128; return; } rgb->red = 0; diff --git a/tools/color.pl b/tools/color.pl index 623e972..e872ead 100755 --- a/tools/color.pl +++ b/tools/color.pl @@ -20,7 +20,7 @@ while (my $l = ) { print(OUT " if(strcmp(color, \"$4\") == 0){\n"); print(OUT " rgb->red = $1;\n"); print(OUT " rgb->green = $2;\n"); - print(OUT " rgb->green = $3;\n"); + print(OUT " rgb->blue = $3;\n"); print(OUT " return;\n"); print(OUT " }\n"); } From 224fc48ecd4b8fcb933be49cedc9c478cc4e91d6 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Wed, 17 Dec 2025 21:37:01 +0900 Subject: [PATCH 11/12] yes --- src/widget/box.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/box.c b/src/widget/box.c index 17e2230..e2808c4 100644 --- a/src/widget/box.c +++ b/src/widget/box.c @@ -77,7 +77,7 @@ static void prop_change(MwWidget handle, const char* key) { static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { (void)child; - if(strcmp(key, MwNratio) == 0) layout(handle); + if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0) layout(handle); } static void resize(MwWidget handle) { From 1907dd5d494bf0d7f8faf490c1f3814c80591929 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Thu, 18 Dec 2025 10:57:10 +0900 Subject: [PATCH 12/12] optimization --- src/draw.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/draw.c b/src/draw.c index 636dc78..714a20e 100644 --- a/src/draw.c +++ b/src/draw.c @@ -104,28 +104,25 @@ void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color) { void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color) { MwLLPixmap pixmap; int y; - int x; double darken = 0.; int ColorDiff = get_color_diff(handle); - double darkenStep = (ColorDiff / 2.) / rect->height; - unsigned long sz = rect->width * rect->height * 4; + double darkenStep = (ColorDiff / 2. / 2) / rect->height; + unsigned long sz = 1 * rect->height * 4; unsigned char* data = malloc(sz); memset(data, 0, sz); for(y = 0; y < rect->height; y++) { MwLLColor col = MwLightenColor(handle, color, -darken, -darken, -darken); - for(x = 0; x < rect->width; x++) { - int idx = ((y * rect->width) + x) * 4; - data[idx] = col->common.red; - data[idx + 1] = col->common.green; - data[idx + 2] = col->common.blue; - data[idx + 3] = 255; - } + int idx = y * 4; + data[idx] = col->common.red; + data[idx + 1] = col->common.green; + data[idx + 2] = col->common.blue; + data[idx + 3] = 255; MwLLFreeColor(col); darken += darkenStep; } - pixmap = MwLLCreatePixmap(handle->lowlevel, data, rect->width / 4, rect->height); + pixmap = MwLLCreatePixmap(handle->lowlevel, data, 1, rect->height); MwLLDrawPixmap(handle->lowlevel, rect, pixmap); MwLLDestroyPixmap(pixmap);