├── .gitattributes
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── dxBin2h-screenshot.png
├── dxBin2h.project
├── main.c
├── noc_file_dialog.h
├── resources
├── dxBin2h.ico
├── dxBin2h.manifest
├── dxBin2h.png
├── dxBin2h.rc
├── images
│ ├── checked.png.h
│ ├── done.png.h
│ ├── error.png.h
│ ├── gear.png.h
│ └── unchecked.png.h
└── ttf-font.c
├── style.c
└── style.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | BUILD
2 | dxBin2h.mk
3 | dxBin2h.txt
4 | *.swp
5 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "nuklear_cross"]
2 | path = nuklear_cross
3 | url = https://github.com/DeXP/nuklear_cross
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
676 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | dxBin2h
2 | ===========
3 |
4 | dxBin2h is a small GUI utility to get C-style arrays from any file.
5 |
6 | 
7 |
8 |
9 | Building
10 | -----------
11 |
12 | You need [Codelite](https://codelite.org/) IDE to compile the project now. Makefiles will be added later.
13 |
14 |
15 | Nuklear+
16 | -----------
17 |
18 | dxBin2h use Nuklear+ as a GUI wrapper: https://github.com/DeXP/nuklear_cross
19 |
20 |
21 | License
22 | -----------
23 |
24 | Main file licensed under GPL3, other files are Public Domain.
25 |
--------------------------------------------------------------------------------
/dxBin2h-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DeXP/dxBin2h/fb1722731c972a5164eca761b1a00a62060938a5/dxBin2h-screenshot.png
--------------------------------------------------------------------------------
/dxBin2h.project:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | None
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 | None
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 | None
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 | None
238 |
239 |
240 |
241 |
242 | $(IntermediateDirectory)/dxBin2h.rc.o
243 | $(IntermediateDirectory)/dxBin2h.rc.o:
244 | $(MakeDirCommand) $(IntermediateDirectory) & i686-w64-mingw32-windres -i resources/dxBin2h.rc -o $(IntermediateDirectory)/dxBin2h.rc.o
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
--------------------------------------------------------------------------------
/main.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | #include "nuklear_cross/nuklear_cross.h"
6 | #include "style.h"
7 |
8 | #define NOC_FILE_DIALOG_IMPLEMENTATION
9 | #include "noc_file_dialog.h"
10 |
11 |
12 |
13 | #include "resources/ttf-font.c"
14 | #include "resources/images/gear.png.h"
15 |
16 | #include "resources/images/error.png.h"
17 | #include "resources/images/done.png.h"
18 |
19 | #include "resources/images/checked.png.h"
20 | #include "resources/images/unchecked.png.h"
21 |
22 |
23 | #define WINDOW_WIDTH 500
24 | #define WINDOW_HEIGHT 190
25 |
26 | #define ICON_WIDTH 48
27 |
28 | enum dxMessageboxIcon {
29 | DX_ICON_ERROR,
30 | DX_ICON_DONE,
31 |
32 | DX_ICON_COUNT
33 | };
34 |
35 | const void* icons_data[DX_ICON_COUNT] = {
36 | error_image,
37 | done_image
38 | };
39 |
40 | int icons_size[DX_ICON_COUNT] = {
41 | sizeof(error_image),
42 | sizeof(done_image)
43 | };
44 |
45 | typedef struct {
46 | int active;
47 | enum dxMessageboxIcon icon;
48 | char title[256];
49 | char text[4096];
50 | } dxPopup;
51 |
52 | int dxNkMessageBox(dxPopup* p, enum dxMessageboxIcon icon, const char* title, const char* text){
53 | p->icon = icon;
54 | strcpy(p->text, text);
55 | strcpy(p->title, title);
56 | p->active = nk_true;
57 | return 1;
58 | }
59 |
60 |
61 | int getObjNameByFilename(const char fn[], char* objName){
62 | int st, en, len;
63 | len = strlen(fn);
64 | st = len;
65 | while( (st>0) && (fn[st]!='\\') && (fn[st] != '/') ) st--;
66 | if( (fn[st]!='\\') || (fn[st] != '/') ) st++;
67 | en = st;
68 | while( (en<=len) && (fn[en]!='.') ) en++;
69 | strncpy(objName, fn+st, en-st);
70 | objName[en-st + 1] = 0;
71 | return en-st;
72 | }
73 |
74 | int main(void){
75 | struct nkc nkcx;
76 | dxPopup p;
77 | struct nk_context *ctx;
78 | struct nk_image nkgear;
79 | struct nk_image checked;
80 | struct nk_image unchecked;
81 |
82 | static char fileName[256];
83 | static int fileNameLen;
84 | static char objName[256];
85 | static int objNameLen;
86 | static char outName[256];
87 | static int outNameLen;
88 | float ratio_one[] = {0.2f, 0.8f};
89 | float ratio_two[] = {0.8f, 0.2f};
90 |
91 | static int remove_r = nk_true;
92 | static int terminate_a1 = nk_true;
93 | static int write_size = nk_false;
94 | static int is_static = nk_false;
95 | static int is_unsigned = nk_true;
96 |
97 | int ii;
98 | struct nk_image icons_images[DX_ICON_COUNT];
99 |
100 | int running = nk_true;
101 |
102 | p.active = nk_false;
103 |
104 | strcpy(fileName, "Choose file...");
105 | fileNameLen = strlen(fileName);
106 |
107 |
108 | ctx = nkc_init( &nkcx, "dxBin2h", WINDOW_WIDTH, WINDOW_HEIGHT, NKC_WIN_NORMAL);
109 | if(!ctx) nkc_rdie("Can't init Nuklear+ library\n");
110 | nkc_load_font_memory(&nkcx, TTFfont, sizeof(TTFfont), 16, 0);
111 | nkgear = nkc_load_image_memory(&nkcx, (void*)gear_png, sizeof(gear_png) );
112 | checked = nkc_load_image_memory(&nkcx, (void*)checked_image, sizeof(checked_image) );
113 | unchecked = nkc_load_image_memory(&nkcx, (void*)unchecked_image, sizeof(unchecked_image) );
114 |
115 | for(ii=0; iistyle.checkbox;
121 | toggle->border = -2; /* cursor must overlap original image */
122 | toggle->normal = nk_style_item_image(unchecked);
123 | toggle->hover = nk_style_item_image(unchecked);
124 | toggle->active = nk_style_item_image(unchecked);
125 | toggle->cursor_normal = nk_style_item_image(checked);
126 | toggle->cursor_hover = nk_style_item_image(checked);
127 | }
128 | ctx->style.window.padding = nk_vec2(5,12);
129 |
130 | while (running)
131 | {
132 | union nkc_event e = nkc_poll_events(&nkcx);
133 | if( (e.type == NKC_EWINDOW) && (e.window.param == NKC_EQUIT) ) running = nk_false;
134 |
135 | /* GUI */
136 | {
137 | if (nk_begin(ctx, "MainPanel", nk_rect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT),
138 | NK_WINDOW_NO_SCROLLBAR))
139 | {
140 | nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio_two);
141 | nk_edit_string(ctx, NK_EDIT_READ_ONLY, fileName, &fileNameLen, sizeof(fileName), nk_filter_default);
142 | if (nk_button_label(ctx, "Browse")){
143 | const char* s = noc_file_dialog_open(NOC_FILE_DIALOG_OPEN, NULL, NULL, NULL);
144 | if( s != NULL ){
145 | strcpy(fileName, s);
146 | fileNameLen = strlen( fileName );
147 |
148 | objNameLen = getObjNameByFilename(fileName, objName);
149 | strcpy(outName, fileName);
150 | strcat(outName, ".h");
151 | outNameLen = strlen(outName);
152 | }
153 | }
154 |
155 | nk_layout_row_dynamic(ctx, 30, 5);
156 | nk_checkbox_label(ctx, "Remove \\r", &remove_r);
157 | nk_checkbox_label(ctx, "0x1A Terminate", &terminate_a1);
158 | nk_checkbox_label(ctx, "Write size", &write_size);
159 | nk_checkbox_label(ctx, "Unsigned", &is_unsigned);
160 | nk_checkbox_label(ctx, "Static", &is_static);
161 |
162 | nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio_one);
163 | nk_label(ctx, "Object name:", NK_TEXT_RIGHT);
164 | nk_edit_string(ctx, NK_EDIT_SIMPLE, objName, &objNameLen, sizeof(objName), nk_filter_default);
165 |
166 | nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio_one);
167 | nk_label(ctx, "Output file:", NK_TEXT_RIGHT);
168 | nk_edit_string(ctx, NK_EDIT_SIMPLE, outName, &outNameLen, sizeof(outName), nk_filter_default);
169 |
170 | nk_layout_row_dynamic(ctx, 30, 3);
171 | nk_spacing(ctx, 2);
172 | /*if (nk_button_label(ctx, "Convert")){*/
173 | if (nk_button_image_label(ctx, nkgear, "Convert", NK_TEXT_CENTERED)){
174 | FILE* f;
175 | long size = 0;
176 | unsigned char c;
177 | f = fopen(fileName, "rb");
178 | if(f){
179 | FILE* o;
180 | while( !feof(f) ){
181 | fscanf(f, "%c", &c);
182 | if( terminate_a1 && (c == 0x1A) ) break;
183 | if( remove_r && (c == '\r') ) size--;
184 | size++;
185 | }
186 | fseek(f, 0, SEEK_SET);
187 | o = fopen(outName, "w+");
188 | if(o){
189 | if(write_size) fprintf(o, "unsigned long %sSize = %ld;\n", objName, size+1);
190 |
191 | if( is_static ) fprintf(o, "static ");
192 | fprintf(o, "const ");
193 | if( is_unsigned ) fprintf(o, "unsigned ");
194 | fprintf(o, "char %s[%ld] = {\n", objName, size+1);
195 | while( !feof(f) ){
196 | fscanf(f, "%c", &c);
197 | if( terminate_a1 && (c == 0x1A) ) break;
198 | if( !(remove_r && (c == '\r')) ) fprintf(o, "0x%.2X,", c);
199 | }
200 | fprintf(o, "\n0 };");
201 | if(o) fclose(o);
202 | dxNkMessageBox(&p, DX_ICON_DONE, "Success", "File written successfully");
203 | } else dxNkMessageBox(&p, DX_ICON_ERROR, "Writing error",
204 | "Can't open file for writing");
205 | } else dxNkMessageBox(&p, DX_ICON_ERROR, "Reading error",
206 | "Can't open input file. Does file exists?");
207 | if(f) fclose(f);
208 | }
209 |
210 | if (p.active)
211 | {
212 | static struct nk_rect s = {0, 10, WINDOW_WIDTH-10, WINDOW_HEIGHT-20};
213 | if (nk_popup_begin(ctx, NK_POPUP_STATIC, p.title, NK_WINDOW_TITLE, s))
214 | {
215 | nk_layout_row_begin(ctx, NK_STATIC, ICON_WIDTH, 3);
216 | {
217 | nk_layout_row_push(ctx, ICON_WIDTH);
218 | nk_image(ctx, icons_images[p.icon] );
219 | nk_layout_row_push(ctx, 5);
220 | nk_spacing(ctx, 1);
221 | nk_layout_row_push(ctx, WINDOW_WIDTH - ICON_WIDTH - 50);
222 | nk_label_wrap(ctx, p.text);
223 | }
224 | nk_layout_row_end(ctx);
225 |
226 | nk_layout_row_dynamic(ctx, 25, 3);
227 | nk_spacing(ctx, 1);
228 | if (nk_button_label(ctx, "OK")) {
229 | p.active = nk_false;
230 | nk_popup_close(ctx);
231 | }
232 | nk_popup_end(ctx);
233 | } else p.active = nk_false;
234 | }
235 | };
236 | nk_end(ctx);}
237 | if( nk_window_is_closed(ctx, "MainPanel") ) break;
238 |
239 | nkc_render(&nkcx, nk_rgb(30,30,30) );
240 | }
241 | nkc_shutdown(&nkcx);
242 | return 0;
243 | }
244 |
--------------------------------------------------------------------------------
/noc_file_dialog.h:
--------------------------------------------------------------------------------
1 | /* noc_file_dialog library
2 | *
3 | * Copyright (c) 2015 Guillaume Chereau
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to
7 | * deal in the Software without restriction, including without limitation the
8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | * sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in
13 | * all copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 | * IN THE SOFTWARE.
22 | */
23 |
24 | /* A portable library to create open and save dialogs on linux, osx and
25 | * windows.
26 | *
27 | * The library define a single function : noc_file_dialog_open.
28 | * With three different implementations.
29 | *
30 | * Usage:
31 | *
32 | * The library does not automatically select the implementation, you need to
33 | * define one of those macros before including this file:
34 | *
35 | * NOC_FILE_DIALOG_GTK
36 | * NOC_FILE_DIALOG_WIN32
37 | * NOC_FILE_DIALOG_OSX
38 | */
39 |
40 | enum {
41 | NOC_FILE_DIALOG_OPEN = 1 << 0, // Create an open file dialog.
42 | NOC_FILE_DIALOG_SAVE = 1 << 1, // Create a save file dialog.
43 | NOC_FILE_DIALOG_DIR = 1 << 2, // Open a directory.
44 | NOC_FILE_DIALOG_OVERWRITE_CONFIRMATION = 1 << 3,
45 | };
46 |
47 | // There is a single function defined.
48 |
49 | /* flags : union of the NOC_FILE_DIALOG_XXX masks.
50 | * filters : a list of strings separated by '\0' of the form:
51 | * "name1 reg1 name2 reg2 ..."
52 | * The last value is followed by two '\0'. For example,
53 | * to filter png and jpeg files, you can use:
54 | * "png\0*.png\0jpeg\0*.jpeg"
55 | * Set to NULL for no filter.
56 | * default_path : the default file to use or NULL.
57 | * default_name : the default file name to use or NULL.
58 | *
59 | * The function return a C string. There is no need to free it, as it is
60 | * managed by the library. The string is valid until the next call to
61 | * no_dialog_open. If the user canceled, the return value is NULL.
62 | */
63 | const char *noc_file_dialog_open(int flags,
64 | const char *filters,
65 | const char *default_path,
66 | const char *default_name);
67 |
68 | #ifdef NOC_FILE_DIALOG_IMPLEMENTATION
69 |
70 | #include
71 | #include
72 |
73 | static char *g_noc_file_dialog_ret = NULL;
74 |
75 | #ifdef NOC_FILE_DIALOG_GTK
76 |
77 | #include
78 |
79 | const char *noc_file_dialog_open(int flags,
80 | const char *filters,
81 | const char *default_path,
82 | const char *default_name)
83 | {
84 | GtkWidget *dialog;
85 | GtkFileFilter *filter;
86 | GtkFileChooser *chooser;
87 | GtkFileChooserAction action;
88 | gint res;
89 |
90 | action = flags & NOC_FILE_DIALOG_SAVE ? GTK_FILE_CHOOSER_ACTION_SAVE :
91 | GTK_FILE_CHOOSER_ACTION_OPEN;
92 | if (flags & NOC_FILE_DIALOG_DIR)
93 | action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
94 |
95 | gtk_init_check(NULL, NULL);
96 | dialog = gtk_file_chooser_dialog_new(
97 | flags & NOC_FILE_DIALOG_SAVE ? "Save File" : "Open File",
98 | NULL,
99 | action,
100 | "_Cancel", GTK_RESPONSE_CANCEL,
101 | "_Open", GTK_RESPONSE_ACCEPT,
102 | NULL );
103 | chooser = GTK_FILE_CHOOSER(dialog);
104 | if (flags & NOC_FILE_DIALOG_OVERWRITE_CONFIRMATION)
105 | gtk_file_chooser_set_do_overwrite_confirmation(chooser, TRUE);
106 |
107 | if (default_path)
108 | gtk_file_chooser_set_filename(chooser, default_path);
109 | if (default_name)
110 | gtk_file_chooser_set_current_name(chooser, default_name);
111 |
112 | while (filters && *filters) {
113 | filter = gtk_file_filter_new();
114 | gtk_file_filter_set_name(filter, filters);
115 | filters += strlen(filters) + 1;
116 | gtk_file_filter_add_pattern(filter, filters);
117 | gtk_file_chooser_add_filter(chooser, filter);
118 | filters += strlen(filters) + 1;
119 | }
120 |
121 | res = gtk_dialog_run(GTK_DIALOG(dialog));
122 |
123 | free(g_noc_file_dialog_ret);
124 | g_noc_file_dialog_ret = NULL;
125 |
126 | if (res == GTK_RESPONSE_ACCEPT)
127 | g_noc_file_dialog_ret = gtk_file_chooser_get_filename(chooser);
128 | gtk_widget_destroy(dialog);
129 | while (gtk_events_pending()) gtk_main_iteration();
130 | return g_noc_file_dialog_ret;
131 | }
132 |
133 | #endif
134 |
135 | #ifdef NOC_FILE_DIALOG_WIN32
136 |
137 | #include "commdlg.h"
138 |
139 | const char *noc_file_dialog_open(int flags,
140 | const char *filters,
141 | const char *default_path,
142 | const char *default_name)
143 | {
144 | OPENFILENAME ofn; // common dialog box structure
145 | char szFile[260]; // buffer for file name
146 | int ret;
147 |
148 | ZeroMemory(&ofn, sizeof(ofn));
149 | ofn.lStructSize = sizeof(ofn);
150 | ofn.lpstrFile = szFile;
151 | ofn.lpstrFile[0] = '\0';
152 | ofn.nMaxFile = sizeof(szFile);
153 | ofn.lpstrFilter = filters;
154 | ofn.nFilterIndex = 1;
155 | ofn.lpstrFileTitle = NULL;
156 | ofn.nMaxFileTitle = 0;
157 | ofn.lpstrInitialDir = NULL;
158 | ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
159 |
160 | if (flags & NOC_FILE_DIALOG_OPEN)
161 | ret = GetOpenFileName(&ofn);
162 | else
163 | ret = GetSaveFileName(&ofn);
164 |
165 | free(g_noc_file_dialog_ret);
166 | g_noc_file_dialog_ret = ret ? strdup(szFile) : NULL;
167 | return g_noc_file_dialog_ret;
168 | }
169 |
170 | #endif
171 |
172 | #ifdef NOC_FILE_DIALOG_OSX
173 |
174 | #include
175 |
176 | const char *noc_file_dialog_open(int flags,
177 | const char *filters,
178 | const char *default_path,
179 | const char *default_name)
180 | {
181 | NSURL *url;
182 | const char *utf8_path;
183 | NSSavePanel *panel;
184 | NSOpenPanel *open_panel;
185 | NSMutableArray *types_array;
186 | NSURL *default_url;
187 | // XXX: I don't know about memory management with cococa, need to check
188 | // if I leak memory here.
189 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
190 |
191 | if (flags & NOC_FILE_DIALOG_OPEN) {
192 | panel = open_panel = [NSOpenPanel openPanel];
193 | } else {
194 | panel = [NSSavePanel savePanel];
195 | }
196 |
197 | if (flags & NOC_FILE_DIALOG_DIR) {
198 | [open_panel setCanChooseDirectories:YES];
199 | [open_panel setCanChooseFiles:NO];
200 | }
201 |
202 | if (default_path) {
203 | default_url = [NSURL fileURLWithPath:
204 | [NSString stringWithUTF8String:default_path]];
205 | [panel setDirectoryURL:default_url];
206 | [panel setNameFieldStringValue:default_url.lastPathComponent];
207 | }
208 |
209 | if (filters) {
210 | types_array = [NSMutableArray array];
211 | while (*filters) {
212 | filters += strlen(filters) + 1; // skip the name
213 | assert(strncmp(filters, "*.", 2) == 0);
214 | filters += 2; // Skip the "*."
215 | [types_array addObject:[NSString stringWithUTF8String: filters]];
216 | filters += strlen(filters) + 1;
217 | }
218 | [panel setAllowedFileTypes:types_array];
219 | }
220 |
221 | free(g_noc_file_dialog_ret);
222 | g_noc_file_dialog_ret = NULL;
223 | if ( [panel runModal] == NSModalResponseOK ) {
224 | url = [panel URL];
225 | utf8_path = [[url path] UTF8String];
226 | g_noc_file_dialog_ret = strdup(utf8_path);
227 | }
228 |
229 | [pool release];
230 | return g_noc_file_dialog_ret;
231 | }
232 | #endif
233 |
234 |
235 | #endif
236 |
--------------------------------------------------------------------------------
/resources/dxBin2h.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DeXP/dxBin2h/fb1722731c972a5164eca761b1a00a62060938a5/resources/dxBin2h.ico
--------------------------------------------------------------------------------
/resources/dxBin2h.manifest:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/dxBin2h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DeXP/dxBin2h/fb1722731c972a5164eca761b1a00a62060938a5/resources/dxBin2h.png
--------------------------------------------------------------------------------
/resources/dxBin2h.rc:
--------------------------------------------------------------------------------
1 | 101 ICON "dxBin2h.ico"
2 | 1 24 "dxBin2h.manifest"
3 |
--------------------------------------------------------------------------------
/resources/images/checked.png.h:
--------------------------------------------------------------------------------
1 | const unsigned char checked_image[1815] = {
2 | 0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x14,0x08,0x06,0x00,0x00,0x00,0xC4,0x35,0xE8,0xEB,0x00,0x00,0x00,0x06,0x62,0x4B,0x47,0x44,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xA0,0xBD,0xA7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0D,0xD7,0x00,0x00,0x0D,0xD7,0x01,0x42,0x28,0x9B,0x78,0x00,0x00,0x00,0x07,0x74,0x49,0x4D,0x45,0x07,0xDF,0x0B,0x13,0x16,0x26,0x1C,0xD5,0xB4,0xCD,0x93,0x00,0x00,0x06,0xA2,0x49,0x44,0x41,0x54,0x78,0xDA,0xED,0xDD,0x41,0x72,0xE3,0x38,0x10,0x05,0x51,0x81,0xE1,0x0B,0xF2,0xA4,0x3C,0xA2,0x7B,0xEF,0x70,0xDB,0xA2,0x25,0x12,0xA8,0xFA,0x2F,0xB7,0x13,0x31,0x43,0x00,0x95,0x49,0x48,0x6E,0x4F,0x3F,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x32,0x56,0x7E,0xB8,0xE3,0x38,0x3E,0x1D,0x11,0x7E,0x63,0xDF,0xF7,0x61,0x17,0x0A,0x07,0x80,0xE8,0x10,0x86,0xB0,0x00,0x90,0x1E,0x82,0x10,0x16,0x00,0xD2,0x43,0x08,0x02,0x03,0x40,0x7C,0x08,0x41,0x60,0x00,0x88,0x0F,0x11,0x08,0x0C,0x00,0xF1,0x21,0x02,0x35,0xD8,0xC8,0x0F,0xB8,0x01,0x10,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B,0xAE,0x6B,0x23,0x3F,0x90,0x23,0xFF,0x94,0xEF,0x00,0x00,0xF2,0xAF,0xB9,0xC6,0xED,0xAA,0xC5,0x7A,0xFB,0x83,0xFC,0x6E,0x00,0x00,0xF9,0x17,0x5E,0xEF,0x25,0x01,0xF0,0xF6,0x07,0xF9,0xDD,0x00,0x00,0xF2,0x0B,0x00,0x40,0x7E,0x01,0x00,0xC8,0xDF,0x3F,0x00,0x3E,0xFF,0x83,0xFC,0x6E,0x00,0x00,0xF9,0x05,0x00,0x20,0xBF,0x00,0x00,0xE4,0x17,0x00,0x80,0xFC,0xEB,0xB0,0xEF,0xFB,0x10,0x00,0x90,0xDF,0x0D,0x00,0x20,0x7F,0xDA,0xDB,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x05,0x00,0xE4,0x0F,0x96,0x5F,0x00,0x40,0xFE,0x60,0xF9,0x1F,0x8F,0xC7,0xE3,0xC3,0xF6,0x7E,0x3F,0x80,0xFE,0x8E,0x43,0xF2,0x77,0x97,0x3F,0x3E,0x00,0x3F,0x0D,0xDD,0xD7,0x7F,0x26,0x08,0xE4,0xEF,0x26,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,0x04,0x3C,0x33,0xF9,0x83,0x02,0xE0,0x1B,0x74,0xCF,0x4A,0xFE,0xD0,0x00,0xF8,0x19,0xBA,0x67,0x24,0xBF,0x8F,0x00,0x3E,0x0E,0x78,0x36,0xF2,0x0B,0x80,0x08,0x78,0x26,0xF2,0xC7,0x04,0xC0,0x2F,0xD3,0x78,0x16,0xF2,0xBB,0x01,0xB8,0x09,0x90,0x9F,0xFC,0x02,0x20,0x02,0xE4,0x27,0xBF,0x00,0x88,0x00,0xF9,0xC9,0x2F,0x00,0x22,0x40,0x7E,0xF2,0x0B,0x80,0x08,0x90,0x9F,0xFC,0x02,0x20,0x02,0xE4,0x27,0x7F,0xBB,0x00,0x24,0x1C,0xC0,0x6C,0x51,0xC9,0x9F,0x3D,0x7B,0x6E,0x00,0xC1,0x11,0x20,0xBF,0x17,0xCF,0xE6,0x30,0x32,0x23,0x40,0x7E,0xF3,0xE6,0x06,0x10,0x1A,0x01,0xF2,0x93,0xBF,0x54,0x00,0xDC,0x02,0xDE,0x27,0x32,0xF9,0xCD,0x58,0xC9,0x1B,0x80,0x08,0xBC,0x2E,0x34,0xF9,0xCD,0x56,0xE9,0x8F,0x00,0x22,0xF0,0x77,0xB1,0xC9,0x6F,0xA6,0x5A,0x7C,0x07,0x20,0x02,0xE7,0x05,0x27,0xBF,0x59,0x6A,0x13,0x00,0x07,0x77,0x2E,0x02,0xE4,0x37,0x43,0xED,0x02,0xE0,0x00,0x9F,0x8B,0x00,0xF9,0xCD,0xCE,0x6F,0x8C,0x77,0x0F,0xC9,0xDD,0x9B,0x6B,0xC8,0x41,0xFE,0xC0,0x1B,0x80,0x03,0x85,0x59,0x11,0x00,0x07,0x0B,0x33,0x92,0x1E,0x00,0x07,0x0C,0xB3,0x11,0x1E,0x00,0x07,0x0D,0x33,0x11,0x1E,0x00,0x07,0x0E,0xB3,0x70,0x8E,0x8F,0xAE,0x07,0xEF,0xA7,0x03,0xB8,0x8B,0xEF,0x66,0xAD,0x4A,0x7C,0xCA,0xFF,0x18,0xF0,0xEC,0xC1,0xC0,0xDB,0xFF,0xCE,0xF9,0x5A,0x3D,0x04,0x9B,0x21,0x80,0x73,0xCF,0x7D,0xB9,0x6C,0x86,0x01,0xCE,0xFB,0x3A,0xF9,0x57,0x0F,0xC5,0x66,0x28,0xE0,0x9C,0x73,0x3F,0x56,0x6E,0x86,0x03,0xCE,0x37,0x53,0xFE,0xA8,0x00,0x88,0x80,0x73,0x25,0x7F,0x78,0x00,0x44,0xC0,0x79,0x92,0x3F,0x3C,0x00,0x22,0xE0,0x1C,0xC9,0x1F,0x1E,0x00,0x11,0x70,0x7E,0xE4,0x0F,0x0F,0x80,0x08,0x38,0xB7,0x74,0xF9,0xE3,0x03,0x20,0x02,0xCE,0x2B,0x1D,0x7F,0x31,0x88,0xA1,0x72,0x4E,0xA1,0x6F,0x7F,0x01,0x10,0x01,0xE7,0x13,0x2C,0xBF,0x00,0x88,0x80,0x73,0xF1,0x11,0x00,0x86,0xCD,0x79,0x08,0x00,0x0C,0x9D,0x73,0x10,0x00,0x18,0x3E,0xFB,0x2F,0x00,0x30,0x84,0xF6,0x5D,0x00,0x60,0x18,0xED,0xB7,0x00,0x18,0x4A,0x43,0x69,0x9F,0x05,0xC0,0x70,0xC2,0xFE,0x0A,0x80,0x21,0x85,0x7D,0x15,0x00,0xC3,0x0A,0xFB,0x29,0x00,0x86,0x16,0xF6,0x51,0x00,0x0C,0x2F,0xEC,0x9F,0x00,0x18,0x62,0xD8,0x37,0x01,0x30,0xCC,0xB0,0x5F,0x02,0x60,0xA8,0x61,0x9F,0x04,0xC0,0x70,0xC3,0xFE,0x08,0x80,0x21,0xB7,0x2F,0x10,0x00,0xC3,0x6E,0x3F,0x20,0x00,0x86,0xDE,0x3E,0x40,0x00,0x0C,0xBF,0xF5,0x43,0x00,0x48,0x60,0xDD,0x10,0x00,0x32,0x58,0x2F,0x04,0x80,0x14,0xD6,0x09,0x01,0x20,0x87,0xF5,0x41,0x00,0x48,0x62,0x5D,0x10,0x00,0xB2,0x58,0x0F,0x04,0x80,0x34,0xD6,0x01,0x01,0x20,0x8F,0xE7,0x87,0x00,0x88,0x80,0xE7,0x86,0x00,0x88,0x80,0xE7,0x85,0x00,0x88,0x80,0xE7,0x84,0x00,0x88,0x00,0xF9,0x21,0x00,0x22,0x40,0x7E,0x08,0x80,0x08,0x90,0x1F,0x02,0x20,0x02,0xE4,0x87,0x00,0x88,0x00,0xF9,0x21,0x00,0x22,0x40,0x7E,0x08,0x80,0x08,0x90,0x5F,0x00,0x20,0x02,0xE4,0x17,0x00,0x24,0x47,0x80,0xFC,0x02,0x80,0xD0,0x08,0x90,0x5F,0x00,0x10,0x1A,0x01,0xF2,0x0B,0x00,0x02,0x23,0xB0,0xEF,0xFB,0x20,0x3F,0x04,0x20,0x30,0x02,0xC4,0xC7,0x65,0x01,0x38,0x8E,0xE3,0xD3,0xB6,0xDE,0x17,0x81,0x33,0x32,0x7B,0xEB,0xE3,0x2B,0x1F,0xB6,0xC0,0x47,0x02,0xB8,0x01,0x00,0xF1,0x24,0xDE,0x5E,0x05,0x00,0x08,0xBE,0x9D,0x5D,0x12,0x00,0xDF,0x03,0x00,0x6E,0x00,0x80,0xEB,0xFF,0xEA,0x01,0xB8,0xEA,0x8A,0xE2,0x16,0x00,0xB8,0x01,0x00,0xDE,0xFE,0xA9,0x01,0x70,0x0B,0x40,0x32,0x15,0x7E,0x3C,0xEB,0x06,0x00,0x6F,0xFF,0xF4,0x8F,0x00,0x57,0x96,0xCA,0x2D,0x00,0xE4,0x0F,0xBF,0x01,0xD8,0x68,0xB8,0xFE,0x87,0x7F,0x04,0x10,0x01,0x78,0xFB,0x2F,0x1C,0x80,0x3B,0x8A,0x65,0xD3,0x41,0xFE,0xD0,0x1B,0x80,0xCD,0x47,0x8A,0xFC,0x95,0x7E,0x39,0x6B,0xCC,0x12,0xD4,0x6F,0xB0,0xA1,0xEB,0x8B,0xA7,0xD2,0x6C,0x6F,0x09,0x07,0x02,0xF2,0x93,0xFF,0xC9,0x1B,0xC0,0x0C,0x39,0xDD,0x06,0xD0,0xE5,0x25,0x23,0x00,0x42,0x80,0x40,0xF1,0xAB,0xCE,0xEF,0x58,0xF5,0x8A,0x2E,0x06,0xA8,0xF6,0x91,0x52,0x00,0x80,0x50,0xAA,0xBE,0xB0,0xC6,0xEA,0x55,0x05,0xC8,0x7F,0x1D,0x9B,0x6B,0x38,0x90,0xCB,0x53,0x82,0xBB,0x09,0x00,0x3D,0x5F,0x92,0x7E,0x1D,0x18,0x08,0x95,0xFF,0xE9,0x1B,0x80,0x5B,0x00,0xD0,0xF3,0xE3,0xF1,0xA9,0x45,0x88,0x00,0xD0,0xEB,0xBB,0xB1,0xD3,0x0B,0x11,0x01,0x90,0xBF,0x0F,0x7F,0x5A,0x8C,0x08,0x80,0xFC,0xC1,0x01,0x10,0x01,0x90,0x3F,0x3C,0x00,0x22,0x00,0xF2,0x87,0x07,0x40,0x04,0x40,0xFE,0xF0,0x00,0x08,0x01,0xC8,0x2F,0x00,0x22,0x00,0xE2,0xA7,0x07,0x40,0x08,0x40,0x7E,0x01,0x10,0x01,0x10,0x3F,0x3D,0x00,0x42,0x00,0xE2,0x0B,0x80,0x10,0x80,0xF8,0x02,0x20,0x06,0x20,0xBE,0x00,0x88,0x01,0x08,0x2F,0x00,0xA2,0x00,0xC2,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0xC4,0x3F,0x3A,0xE3,0x69,0xCD,0xD2,0x6D,0xEB,0x50,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,0x82,
3 | 0 };
--------------------------------------------------------------------------------
/resources/images/done.png.h:
--------------------------------------------------------------------------------
1 | const unsigned char done_image[1042] = {
2 | 0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x08,0x06,0x00,0x00,0x00,0x57,0x02,0xF9,0x87,0x00,0x00,0x00,0x06,0x62,0x4B,0x47,0x44,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xA0,0xBD,0xA7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0B,0x13,0x00,0x00,0x0B,0x13,0x01,0x00,0x9A,0x9C,0x18,0x00,0x00,0x03,0xB0,0x49,0x44,0x41,0x54,0x68,0xDE,0xD5,0x9A,0x4D,0x48,0x15,0x51,0x14,0xC7,0x7F,0x6F,0x20,0x21,0x4D,0x31,0x6C,0x22,0x21,0xDA,0x84,0xB9,0x9A,0x92,0xA2,0xAF,0xDB,0x17,0x6D,0xCA,0x76,0x85,0x20,0x44,0xBC,0x56,0x85,0xE6,0xAA,0x85,0xB9,0x69,0x13,0xB8,0x13,0x11,0xDA,0x44,0x52,0xAB,0x24,0x82,0x47,0x50,0x04,0x65,0xAD,0xDC,0xD4,0xF8,0x81,0x06,0x71,0x37,0xA9,0xB9,0x69,0x61,0xC1,0x45,0x4B,0x9F,0xCF,0x4D,0x98,0x2D,0xE6,0x3E,0x79,0x8D,0xEF,0x63,0xE6,0xCD,0xCC,0x73,0x3C,0xF0,0x76,0x97,0x79,0xBF,0xFF,0x3D,0xE7,0xDE,0x7B,0xCE,0xB9,0x37,0x41,0x08,0x66,0xD9,0x66,0x23,0x70,0x11,0x38,0x05,0x34,0x03,0x07,0x81,0xDD,0x40,0xAD,0x1E,0x92,0x06,0x7E,0x01,0x73,0xC0,0x57,0x60,0x0C,0x18,0x91,0x42,0xFD,0x0C,0xFA,0xDF,0x89,0x00,0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4,0x58,0x6F,0xA5,0x54,0x22,0x76,0x15,0x78,0xE6,0xA3,0xF4,0x0C,0x33,0xE6,0x93,0x85,0x66,0xDE,0xB3,0x00,0x2D,0xA2,0x09,0xE7,0xE2,0xA3,0xA5,0x82,0xBB,0x4D,0x7B,0xBE,0x98,0xF7,0x1C,0x42,0xAE,0x70,0x9A,0x05,0x4E,0xE0,0xB4,0xE0,0x33,0x11,0x82,0xAF,0xE0,0x5C,0xB2,0x9C,0xF4,0x02,0xEF,0xD9,0x03,0x2E,0x6F,0x34,0xE2,0xF4,0xE7,0x3B,0x08,0xEF,0x3E,0x21,0x03,0x3C,0x06,0xFA,0xFD,0x3E,0x00,0x09,0xF2,0xD8,0xA3,0x01,0xA7,0xC5,0x9D,0x04,0x8E,0x97,0xF1,0xAD,0x75,0x60,0x42,0x67,0x95,0x2F,0xB2,0xB9,0x8D,0x5F,0x4B,0x84,0x31,0x7D,0x96,0x6D,0xEE,0xE5,0xFF,0xE7,0x36,0x4D,0x40,0x3D,0x50,0x97,0xB3,0x20,0x7F,0x03,0xB3,0x38,0xD7,0x58,0xA3,0x38,0xCF,0x6D,0x54,0xD0,0xFF,0xFE,0x07,0x5F,0xC8,0x6E,0xB2,0x2B,0x78,0x7D,0xF4,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,0x82,
3 | 0 };
--------------------------------------------------------------------------------
/resources/images/error.png.h:
--------------------------------------------------------------------------------
1 | const unsigned char error_image[1041] = {
2 | 0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x08,0x06,0x00,0x00,0x00,0x57,0x02,0xF9,0x87,0x00,0x00,0x00,0x06,0x62,0x4B,0x47,0x44,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xA0,0xBD,0xA7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0B,0x13,0x00,0x00,0x0B,0x13,0x01,0x00,0x9A,0x9C,0x18,0x00,0x00,0x03,0xAF,0x49,0x44,0x41,0x54,0x68,0xDE,0xCD,0x9A,0x3D,0x68,0x14,0x41,0x14,0xC7,0x7F,0xB7,0xA0,0xA0,0x26,0xA2,0x38,0x23,0x0A,0x62,0x23,0xD1,0x4E,0x83,0xA2,0xF1,0xAB,0xB1,0x31,0xDA,0x29,0x82,0x20,0x72,0x56,0x4A,0xA2,0x95,0x45,0xD4,0xC2,0xD2,0x46,0x24,0x5A,0x8A,0xA2,0x95,0x41,0x84,0x20,0x28,0x36,0x49,0xAA,0x34,0x4A,0x24,0x46,0xC1,0x4E,0x0D,0x36,0x16,0x2A,0xBC,0xF5,0x03,0xEF,0xCE,0xC6,0x8F,0x58,0xEC,0x3B,0xB9,0x9C,0x77,0xD9,0xD9,0x8F,0x59,0xEF,0x0F,0x0B,0x57,0xEC,0xBD,0xFD,0xFF,0xE7,0xBD,0x99,0x79,0xEF,0xCD,0x94,0xC8,0x01,0xA1,0xB5,0x6B,0x81,0x7D,0xC0,0x4E,0x60,0x13,0xB0,0x01,0x58,0x09,0x74,0xEB,0x2B,0x15,0xE0,0x0B,0xF0,0x16,0x78,0x05,0x3C,0x05,0x26,0x8D,0xC8,0xC7,0xAC,0xDF,0x2E,0x65,0x20,0x6D,0x80,0xE3,0x40,0x19,0xD8,0x96,0xD2,0xCC,0x0C,0x30,0x02,0xDC,0x35,0x22,0x9F,0x0A,0x11,0x10,0x5A,0xBB,0x0E,0x38,0x0F,0x9C,0x04,0x96,0x90,0x0F,0xBE,0x03,0xB7,0x80,0x2B,0x46,0xE4,0xBD,0x17,0x01,0xA1,0xB5,0x8B,0x81,0x21,0xE0,0x22,0xB0,0x14,0x3F,0xA8,0x01,0x97,0x80,0x6B,0x46,0xE4,0x47,0x6E,0x02,0x42,0x6B,0x37,0x01,0xA3,0xC0,0x66,0x8A,0xC1,0x4B,0xE0,0xA8,0x11,0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7,0x80,0x1B,0xC0,0x70,0xD2,0x0B,0x20,0x59,0x2E,0x7B,0xAC,0x22,0x6A,0x71,0x97,0x81,0xED,0x29,0x6C,0xCD,0x01,0xD3,0x9A,0x55,0xDE,0xAB,0xE7,0x36,0x49,0x51,0xCA,0x63,0xF8,0x42,0x6B,0x57,0x33,0xFF,0xBA,0x4D,0x0F,0xB0,0x02,0x58,0xDE,0x30,0x21,0xBF,0x02,0xB3,0x44,0xC7,0x58,0x53,0x44,0xD7,0x6D,0x24,0xEB,0xB7,0xFF,0x00,0xCB,0x73,0xB5,0xA3,0x9D,0x8C,0xB3,0xAC,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,0x82,
3 | 0 };
--------------------------------------------------------------------------------
/resources/images/gear.png.h:
--------------------------------------------------------------------------------
1 | const unsigned char gear_png[1048] = {
2 | 0x89,0x50,0x4E,0x47,0xD,0xA,0x1A,0xA,0x0,0x0,0x0,0xD,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x1D,0x0,0x0,0x0,0x1D,0x8,0x3,0x0,0x0,0x0,0x61,0x4D,0x97,0x3D,0x0,0x0,0x1,0xA4,0x50,0x4C,0x54,0x45,0x0,0x0,0x0,0xBA,0xBA,0xD1,0xAA,0xAB,0xC6,0xE1,0xE1,0xEB,0xD9,0xD9,0xE5,0xC5,0xC6,0xD8,0xE6,0xE6,0xEF,0xD1,0xD2,0xE1,0xB2,0xB3,0xCC,0xF7,0xF7,0xFA,0xC0,0xC0,0xD6,0xE1,0xE1,0xEC,0xA2,0xA3,0xC2,0xBB,0xBC,0xD3,0xB1,0xB2,0xCC,0xA9,0xAA,0xC7,0xD5,0xD6,0xE4,0xA6,0xA6,0xC4,0xA3,0xA3,0xC3,0xC5,0xC5,0xD9,0xBD,0xBD,0xD4,0xA3,0xA4,0xC3,0xE1,0xE1,0xEB,0xA0,0xA1,0xC0,0xAE,0xAE,0xCA,0xC0,0xC1,0xD6,0xCE,0xCE,0xD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,0x75,0xBA,0x7A,0x38,0x93,0xB9,0x21,0x61,0x99,0x96,0x8C,0x2F,0x4,0x69,0x98,0xD6,0xD5,0xB6,0x91,0xBD,0xF7,0x6,0xE4,0x32,0x4D,0xFB,0x34,0xF7,0xF2,0xF9,0xFD,0x6E,0x74,0x98,0xA6,0xC1,0xF9,0x82,0x83,0x48,0x8D,0x46,0x43,0x46,0x9B,0xFF,0xE8,0x46,0xAF,0xA8,0x99,0x89,0x7C,0x75,0x0,0x0,0x0,0x0,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,0x82};
--------------------------------------------------------------------------------
/resources/images/unchecked.png.h:
--------------------------------------------------------------------------------
1 | const unsigned char unchecked_image[1046] = {
2 | 0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x08,0x06,0x00,0x00,0x00,0x5C,0x72,0xA8,0x66,0x00,0x00,0x00,0x06,0x62,0x4B,0x47,0x44,0x00,0x33,0x00,0x37,0x00,0x43,0xD1,0x33,0x9A,0x16,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0D,0xD7,0x00,0x00,0x0D,0xD7,0x01,0x42,0x28,0x9B,0x78,0x00,0x00,0x00,0x07,0x74,0x49,0x4D,0x45,0x07,0xE0,0x02,0x09,0x12,0x10,0x32,0x40,0xEF,0x99,0x07,0x00,0x00,0x03,0xA1,0x49,0x44,0x41,0x54,0x78,0xDA,0xED,0xDC,0xD1,0x55,0xC3,0x30,0x10,0x45,0x41,0x49,0x1D,0xBA,0x18,0xAA,0xA0,0x18,0x95,0x18,0xFE,0xF8,0xC5,0xE1,0xD8,0xB1,0x56,0x6F,0xA6,0x02,0xA2,0x78,0xAF,0xD7,0x3E,0x40,0x6B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x83,0xFA,0xCA,0x3F,0xDC,0x9C,0xF3,0xE5,0x2B,0xE2,0x2F,0xC7,0x71,0x74,0xA7,0x50,0x38,0x00,0x06,0x1D,0x61,0x08,0x0B,0x80,0xA1,0x47,0x10,0xC2,0x02,0x60,0xE8,0x11,0x82,0xC0,0x00,0x18,0x7C,0x84,0x20,0x30,0x00,0x06,0x1F,0x21,0x08,0x0C,0x80,0xC1,0x47,0x08,0x42,0x03,0x60,0xF8,0x11,0x81,0xC0,0x00,0x18,0x7C,0x84,0x20,0x34,0x00,0x86,0x1F,0x11,0x08,0x0D,0x80,0xE1,0x47,0x08,0x02,0x03,0x60,0xF0,0x11,0x81,0xD0,0x00,0x18,0x7E,0x44,0x20,0x34,0x00,0x86,0x1F,0x11,0x08,0x0D,0x80,0xE1,0x87,0xBD,0x22,0xD0,0x0D,0x3F,0xE4,0x46,0x60,0xF8,0x2A,0xE1,0x7D,0xBB,0xDC,0x10,0x7B,0xD2,0x87,0x05,0x9B,0xC0,0x9B,0x1B,0x80,0xE1,0x87,0x7D,0x0D,0xC3,0x0F,0x97,0x3E,0x0A,0x7C,0x79,0x07,0x00,0xB9,0x11,0xF8,0xDE,0xE2,0x1D,0xC0,0x0A,0x77,0x7F,0xFF,0xB0,0xC1,0x46,0xE6,0x7D,0xC0,0x03,0x01,0x78,0xF2,0x42,0x33,0xF4,0x54,0x0D,0xA4,0x00,0x18,0x7C,0xC2,0x63,0x50,0xED,0x3A,0xEE,0x4F,0x1F,0x9C,0xC1,0x67,0xA7,0x10,0x08,0x80,0xC1,0x27,0x3C,0x04,0x95,0xAE,0xED,0x61,0xF8,0x49,0xE0,0x9A,0x3B,0x11,0x00,0x5F,0x04,0x22,0x50,0xEF,0xB1,0xE3,0x92,0x00,0x7C,0xE2,0x87,0x36,0xFC,0xD8,0x04,0x42,0x37,0x00,0x07,0x4F,0x52,0x04,0xAA,0x6C,0x01,0xC3,0xF0,0x23,0x02,0xE1,0x1B,0x80,0xDF,0x30,0x43,0x04,0x3C,0x02,0x38,0x64,0x44,0x20,0xEC,0x31,0x60,0x18,0x7E,0xB0,0x01,0x80,0x2D,0x20,0x31,0x00,0x77,0xAD,0x29,0xEE,0xFE,0x60,0x03,0x80,0xE8,0x2D,0x60,0xF5,0xF7,0x00,0xA3,0xD2,0x61,0x02,0x36,0x00,0xF0,0x2E,0x40,0x00,0x00,0x01,0x00,0xD6,0x09,0x80,0xE7,0x7F,0xB0,0x01,0x80,0xF7,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00,0x02,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0xC0,0x05,0xE6,0x9C,0x2F,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x7E,0xCD,0x39,0x5F,0x8E,0x15,0x6C,0x00,0x80,0x00,0x40,0x0D,0x89,0xDB,0xAB,0x00,0x80,0x0D,0x40,0x49,0x41,0x00,0xC0,0xFA,0x9F,0x15,0x80,0xE3,0x38,0xBA,0x03,0x05,0x1B,0x00,0xB8,0xFB,0x5F,0xEC,0xAE,0x1B,0x6C,0x89,0x00,0xD8,0x02,0xC0,0x06,0x00,0x9E,0xFD,0x57,0x0E,0xC0,0x9D,0x6B,0x8A,0x2D,0x00,0xC3,0x1F,0xBE,0x01,0x38,0x68,0x12,0xAD,0xFE,0xFC,0xFF,0xD1,0x47,0x00,0x11,0xC0,0xDD,0x7F,0xE1,0x00,0x7C,0xA2,0x56,0x0E,0x1D,0xC3,0x1F,0xBA,0x01,0x38,0x7C,0x92,0x86,0xBF,0xC2,0xFA,0xDF,0x5A,0x6B,0xDD,0x01,0x61,0xF0,0x73,0xAF,0xEF,0x91,0xF2,0x85,0x60,0xF8,0x0D,0xFF,0x89,0x0D,0xC0,0x81,0x61,0xF0,0x05,0xC0,0xC1,0x61,0xF0,0x03,0xAE,0xE1,0xBE,0xEA,0x8A,0x2E,0x06,0x54,0x7C,0xA4,0x14,0x00,0x08,0x55,0xF1,0xA6,0xD5,0x2B,0x54,0x15,0x0C,0xFF,0x3D,0x86,0x35,0x1C,0x72,0x9D,0x1A,0x70,0x9B,0x00,0xEC,0x79,0xA3,0xF4,0xE7,0xC0,0x10,0x3A,0xFC,0xA7,0x37,0x00,0x5B,0x00,0xEC,0xF9,0x88,0x3C,0x92,0x3E,0x2C,0xF0,0xCF,0x0D,0xC0,0x26,0x00,0xFB,0xDD,0x10,0xFF,0xF5,0x21,0x44,0x00,0xC3,0x1F,0xBA,0x01,0x88,0x00,0x86,0x3F,0xF8,0x11,0x40,0x04,0x30,0xFC,0x02,0x20,0x02,0x18,0x7C,0x01,0x10,0x02,0x0C,0xBF,0x00,0x88,0x00,0x86,0x5F,0x00,0x84,0x00,0x83,0x2F,0x00,0x22,0x80,0xE1,0x4F,0x0F,0x80,0x10,0x60,0xF0,0x05,0x40,0x08,0x30,0xF8,0x02,0x20,0x06,0x18,0x7C,0x01,0x10,0x03,0x0C,0xBD,0x00,0x88,0x02,0x86,0x5E,0x00,0x10,0x46,0x83,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD0,0x7E,0x00,0xCA,0x84,0x5C,0xB1,0xC4,0x12,0xBF,0x68,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82,0x82,
3 | 0 };
--------------------------------------------------------------------------------
/style.c:
--------------------------------------------------------------------------------
1 | #include "style.h"
2 |
3 | void
4 | set_style(struct nk_context *ctx, enum guitheme theme)
5 | {
6 | struct nk_color table[NK_COLOR_COUNT];
7 | if (theme == THEME_WHITE) {
8 | table[NK_COLOR_TEXT] = nk_rgba(70, 70, 70, 255);
9 | table[NK_COLOR_WINDOW] = nk_rgba(175, 175, 175, 255);
10 | table[NK_COLOR_HEADER] = nk_rgba(175, 175, 175, 255);
11 | table[NK_COLOR_BORDER] = nk_rgba(0, 0, 0, 255);
12 | table[NK_COLOR_BUTTON] = nk_rgba(185, 185, 185, 255);
13 | table[NK_COLOR_BUTTON_HOVER] = nk_rgba(170, 170, 170, 255);
14 | table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(160, 160, 160, 255);
15 | table[NK_COLOR_TOGGLE] = nk_rgba(150, 150, 150, 255);
16 | table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(120, 120, 120, 255);
17 | table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(175, 175, 175, 255);
18 | table[NK_COLOR_SELECT] = nk_rgba(190, 190, 190, 255);
19 | table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(175, 175, 175, 255);
20 | table[NK_COLOR_SLIDER] = nk_rgba(190, 190, 190, 255);
21 | table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(80, 80, 80, 255);
22 | table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(70, 70, 70, 255);
23 | table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(60, 60, 60, 255);
24 | table[NK_COLOR_PROPERTY] = nk_rgba(175, 175, 175, 255);
25 | table[NK_COLOR_EDIT] = nk_rgba(150, 150, 150, 255);
26 | table[NK_COLOR_EDIT_CURSOR] = nk_rgba(0, 0, 0, 255);
27 | table[NK_COLOR_COMBO] = nk_rgba(175, 175, 175, 255);
28 | table[NK_COLOR_CHART] = nk_rgba(160, 160, 160, 255);
29 | table[NK_COLOR_CHART_COLOR] = nk_rgba(45, 45, 45, 255);
30 | table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
31 | table[NK_COLOR_SCROLLBAR] = nk_rgba(180, 180, 180, 255);
32 | table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(140, 140, 140, 255);
33 | table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(150, 150, 150, 255);
34 | table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(160, 160, 160, 255);
35 | table[NK_COLOR_TAB_HEADER] = nk_rgba(180, 180, 180, 255);
36 | nk_style_from_table(ctx, table);
37 | } else if (theme == THEME_RED) {
38 | table[NK_COLOR_TEXT] = nk_rgba(190, 190, 190, 255);
39 | table[NK_COLOR_WINDOW] = nk_rgba(30, 33, 40, 215);
40 | table[NK_COLOR_HEADER] = nk_rgba(181, 45, 69, 220);
41 | table[NK_COLOR_BORDER] = nk_rgba(51, 55, 67, 255);
42 | table[NK_COLOR_BUTTON] = nk_rgba(181, 45, 69, 255);
43 | table[NK_COLOR_BUTTON_HOVER] = nk_rgba(190, 50, 70, 255);
44 | table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(195, 55, 75, 255);
45 | table[NK_COLOR_TOGGLE] = nk_rgba(51, 55, 67, 255);
46 | table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 60, 60, 255);
47 | table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(181, 45, 69, 255);
48 | table[NK_COLOR_SELECT] = nk_rgba(51, 55, 67, 255);
49 | table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(181, 45, 69, 255);
50 | table[NK_COLOR_SLIDER] = nk_rgba(51, 55, 67, 255);
51 | table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(181, 45, 69, 255);
52 | table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(186, 50, 74, 255);
53 | table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(191, 55, 79, 255);
54 | table[NK_COLOR_PROPERTY] = nk_rgba(51, 55, 67, 255);
55 | table[NK_COLOR_EDIT] = nk_rgba(51, 55, 67, 225);
56 | table[NK_COLOR_EDIT_CURSOR] = nk_rgba(190, 190, 190, 255);
57 | table[NK_COLOR_COMBO] = nk_rgba(51, 55, 67, 255);
58 | table[NK_COLOR_CHART] = nk_rgba(51, 55, 67, 255);
59 | table[NK_COLOR_CHART_COLOR] = nk_rgba(170, 40, 60, 255);
60 | table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
61 | table[NK_COLOR_SCROLLBAR] = nk_rgba(30, 33, 40, 255);
62 | table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
63 | table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
64 | table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
65 | table[NK_COLOR_TAB_HEADER] = nk_rgba(181, 45, 69, 220);
66 | nk_style_from_table(ctx, table);
67 | } else if (theme == THEME_BLUE) {
68 | table[NK_COLOR_TEXT] = nk_rgba(20, 20, 20, 255);
69 | table[NK_COLOR_WINDOW] = nk_rgba(202, 212, 214, 215);
70 | table[NK_COLOR_HEADER] = nk_rgba(137, 182, 224, 220);
71 | table[NK_COLOR_BORDER] = nk_rgba(140, 159, 173, 255);
72 | table[NK_COLOR_BUTTON] = nk_rgba(137, 182, 224, 255);
73 | table[NK_COLOR_BUTTON_HOVER] = nk_rgba(142, 187, 229, 255);
74 | table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(147, 192, 234, 255);
75 | table[NK_COLOR_TOGGLE] = nk_rgba(177, 210, 210, 255);
76 | table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(182, 215, 215, 255);
77 | table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(137, 182, 224, 255);
78 | table[NK_COLOR_SELECT] = nk_rgba(177, 210, 210, 255);
79 | table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(137, 182, 224, 255);
80 | table[NK_COLOR_SLIDER] = nk_rgba(177, 210, 210, 255);
81 | table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(137, 182, 224, 245);
82 | table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(142, 188, 229, 255);
83 | table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(147, 193, 234, 255);
84 | table[NK_COLOR_PROPERTY] = nk_rgba(210, 210, 210, 255);
85 | table[NK_COLOR_EDIT] = nk_rgba(210, 210, 210, 225);
86 | table[NK_COLOR_EDIT_CURSOR] = nk_rgba(20, 20, 20, 255);
87 | table[NK_COLOR_COMBO] = nk_rgba(210, 210, 210, 255);
88 | table[NK_COLOR_CHART] = nk_rgba(210, 210, 210, 255);
89 | table[NK_COLOR_CHART_COLOR] = nk_rgba(137, 182, 224, 255);
90 | table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
91 | table[NK_COLOR_SCROLLBAR] = nk_rgba(190, 200, 200, 255);
92 | table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
93 | table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
94 | table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
95 | table[NK_COLOR_TAB_HEADER] = nk_rgba(156, 193, 220, 255);
96 | nk_style_from_table(ctx, table);
97 | } else if (theme == THEME_DARK) {
98 | table[NK_COLOR_TEXT] = nk_rgba(210, 210, 210, 255);
99 | table[NK_COLOR_WINDOW] = nk_rgba(57, 67, 71, 215);
100 | table[NK_COLOR_HEADER] = nk_rgba(51, 51, 56, 220);
101 | table[NK_COLOR_BORDER] = nk_rgba(46, 46, 46, 255);
102 | table[NK_COLOR_BUTTON] = nk_rgba(48, 83, 111, 255);
103 | table[NK_COLOR_BUTTON_HOVER] = nk_rgba(58, 93, 121, 255);
104 | table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(63, 98, 126, 255);
105 | table[NK_COLOR_TOGGLE] = nk_rgba(50, 58, 61, 255);
106 | table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 53, 56, 255);
107 | table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(48, 83, 111, 255);
108 | table[NK_COLOR_SELECT] = nk_rgba(57, 67, 61, 255);
109 | table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(48, 83, 111, 255);
110 | table[NK_COLOR_SLIDER] = nk_rgba(50, 58, 61, 255);
111 | table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(48, 83, 111, 245);
112 | table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
113 | table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
114 | table[NK_COLOR_PROPERTY] = nk_rgba(50, 58, 61, 255);
115 | table[NK_COLOR_EDIT] = nk_rgba(50, 58, 61, 225);
116 | table[NK_COLOR_EDIT_CURSOR] = nk_rgba(210, 210, 210, 255);
117 | table[NK_COLOR_COMBO] = nk_rgba(50, 58, 61, 255);
118 | table[NK_COLOR_CHART] = nk_rgba(50, 58, 61, 255);
119 | table[NK_COLOR_CHART_COLOR] = nk_rgba(48, 83, 111, 255);
120 | table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
121 | table[NK_COLOR_SCROLLBAR] = nk_rgba(50, 58, 61, 255);
122 | table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(48, 83, 111, 255);
123 | table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
124 | table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
125 | table[NK_COLOR_TAB_HEADER] = nk_rgba(48, 83, 111, 255);
126 | nk_style_from_table(ctx, table);
127 | } else {
128 | nk_style_default(ctx);
129 | }
130 | }
131 |
132 |
133 |
--------------------------------------------------------------------------------
/style.h:
--------------------------------------------------------------------------------
1 | #include "nuklear.h"
2 |
3 | enum guitheme {THEME_BLACK, THEME_WHITE, THEME_RED, THEME_BLUE, THEME_DARK};
4 |
5 | void set_style(struct nk_context *ctx, enum guitheme theme);
--------------------------------------------------------------------------------