diff options
author | Norbert Preining <norbert@preining.info> | 2020-09-20 03:03:26 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-09-20 03:03:26 +0000 |
commit | 1f457376b478257b88d4a857f5ec1b6155442dd7 (patch) | |
tree | 2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/dkct-gui.ctr | |
parent | ac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff) |
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/dkct-gui.ctr')
-rw-r--r-- | support/dktools/dkct-gui.ctr | 602 |
1 files changed, 490 insertions, 112 deletions
diff --git a/support/dktools/dkct-gui.ctr b/support/dktools/dkct-gui.ctr index bcf1a8ba6c..4436cb73cf 100644 --- a/support/dktools/dkct-gui.ctr +++ b/support/dktools/dkct-gui.ctr @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2011-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause %% header @@ -592,12 +592,18 @@ dkct_gui_write_constructor(DKCT_SRC *psrc); %% module +#include "dk4conf.h" + #if DK3_USE_WX #include "dkwxtrace.h" #else #include "dkct.h" #endif +#include "dk3unused.h" + + + $!trace-include @@ -647,6 +653,12 @@ static char const * const dkct_gui_class_names[] = { /* 39 */ "wxStatusBar", /* 40 */ "wxToolBarToolBase", /* Not a wxWidgets class! */ /* 41 */ "wxGrid", +/* 42 */ "wxChoicebook", +/* 43 */ "wxListbook", +/* 44 */ "wxSimplebook", +/* 45 */ "wxToolbook", +/* 46 */ "wxTreebook", +/* 47 */ "wxScrolled<wxPanel>", NULL }; @@ -1171,6 +1183,15 @@ char const * const dkct_gui_out_kw[] = { /* 217 */ "->SetColLabelSize(wxGRID_AUTOSIZE", /* 218 */ "if(", /* 219 */ ") { ", +/* 220 */ "->AddPage(", +/* 221 */ "wxCHB_TOP", +/* 222 */ "wxLB_TOP", +/* 223 */ "wxCHB_LEFT", +/* 224 */ "wxLB_LEFT", +/* 225 */ "wxCHB_RIGHT", +/* 226 */ "wxLB_RIGHT", +/* 227 */ "wxCHB_BOTTOM", +/* 228 */ "wxLB_BOTTOM", NULL }; @@ -1187,6 +1208,87 @@ NULL +/** IDs for stock buttons and menu items. +*/ +static char const * const dkct_gui_stock_item_names[] = { +$!string-table +wxID_ABOUT +wxID_ADD +wxID_APPLY +wxID_BACKWARD +wxID_BOLD +wxID_BOTTOM +wxID_CANCEL +wxID_CDROM +wxID_CLEAR +wxID_CLOSE +wxID_CONVERT +wxID_COPY +wxID_CUT +wxID_DELETE +wxID_DOWN +wxID_EDIT +wxID_EXECUTE +wxID_EXIT +wxID_FILE +wxID_FIND +wxID_FIRST +wxID_FLOPPY +wxID_FORWARD +wxID_HARDDISK +wxID_HELP +wxID_HOME +wxID_INDENT +wxID_INDEX +wxID_INFO +wxID_ITALIC +wxID_JUMP_TO +wxID_JUSTIFY_CENTER +wxID_JUSTIFY_FILL +wxID_JUSTIFY_LEFT +wxID_JUSTIFY_RIGHT +wxID_LAST +wxID_NETWORK +wxID_NEW +wxID_NO +wxID_OK +wxID_OPEN +wxID_PASTE +wxID_PREFERENCES +wxID_PREVIEW +wxID_PRINT +wxID_PROPERTIES +wxID_REDO +wxID_REFRESH +wxID_REMOVE +wxID_REPLACE +wxID_REVERT_TO_SAVED +wxID_SAVE +wxID_SAVEAS +wxID_SELECTALL +wxID_SELECT_COLOR +wxID_SELECT_FONT +wxID_SORT_ASCENDING +wxID_SORT_DESCENDING +wxID_SPELL_CHECK +wxID_STOP +wxID_STRIKETHROUGH +wxID_TOP +wxID_UNDELETE +wxID_UNDERLINE +wxID_UNDO +wxID_UNINDENT +wxID_UP +wxID_YES +wxID_ZOOM_100 +wxID_ZOOM_FIT +wxID_ZOOM_IN +wxID_ZOOM_OUT +$!end +}; + + + /** Delete grid header data. @param gh Header data to delete. */ @@ -1263,12 +1365,13 @@ dkct_grid_cell_new(char const *txt, int r, int c, DKCT_SRC *psrc) static int -dkct_grid_cell_compare(const void *l, const void *r, int cr) +dkct_grid_cell_compare(const void *l, const void *r, int DK3_ARG_UNUSED(cr) ) { DKCT_CELL_DATA *pl; DKCT_CELL_DATA *pr; int back = 0; + DK3_UNUSED_ARG(cr) if (l) { if (r) { pl = (DKCT_CELL_DATA *)l; @@ -1304,11 +1407,13 @@ dkct_grid_cell_compare(const void *l, const void *r, int cr) */ static int -dkct_grid_head_compare(void const *l, void const *r, int cr) +dkct_grid_head_compare(void const *l, void const *r, int DK3_ARG_UNUSED(cr) ) { int back = 0; DKCT_GRID_HEAD const *pl; DKCT_GRID_HEAD const *pr; + + DK3_UNUSED_ARG(cr) if(l) { if(r) { pl = (DKCT_GRID_HEAD const *)l; pr = (DKCT_GRID_HEAD const *)r; @@ -1818,7 +1923,7 @@ void dkct_gui_initialize_object_for_class(DKCT_GUI_ELEMENT *el) { switch(el->cln) { - case 13: { + case 13: case 47: { el->direction = DKCT_GUI_DIRECTION_BOTH; } break; } @@ -2351,6 +2456,7 @@ dkct_gui_set_text(DKCT_GUI *gui, char *il) case 3: case 4: case 9: + case 11: case 15: case 16: case 19: @@ -2361,12 +2467,14 @@ dkct_gui_set_text(DKCT_GUI *gui, char *il) case 28: case 29: case 31: + case 34: case 36: case 37: case 40: { } break; - default: { $? "! not applicable" + default: { + $? "! not applicable" /* Warning: Attribute not applicable for class! */ dkct_to_log_1(gui->psrc, 1, DK3_LL_WARNING, 56); } break; @@ -2429,10 +2537,16 @@ dkct_gui_set_tip_text(DKCT_GUI *gui, char *il) case 28: case 29: case 30: + case 31: case 36: case 37: /* wxMenuItem */ case 39: case 40: + case 42: + case 43: + case 44: + case 45: + case 46: { } break; default: { $? "! not applicable" @@ -2743,15 +2857,22 @@ dkct_gui_add_contents(DKCT_GUI *gui, char *il) case 12: /* wxNotebook */ case 13: /* wxScrolledWindow */ case 14: /* wxSplitterWindow */ + case 34: /* wxStaticBox */ case 35: /* wxMenuBar */ case 36: /* wxMenu */ case 38: /* wxToolBar */ case 39: /* wxStatusBar */ + case 42: /* wxChoicebook */ + case 43: /* wxListbook */ + case 44: /* wxSimplebook */ + case 45: /* wxToolbook */ + case 46: /* wxTreebook */ + case 47: /* wxScrolled<wxPanel> */ { } break; default: { $? "! not applicable" /* Warning: Attribute not applicable to this class! */ - dkct_to_log_1(gui->psrc, 1, DK3_LL_WARNING, 56); + dkct_to_log_1(gui->psrc, 1, DK3_LL_WARNING, 125); } break; } for(szp = 0; szp < 16; szp++) { p[szp] = NULL; } @@ -3153,13 +3274,15 @@ dkct_gui_set_direction(DKCT_GUI *gui, char *il) if(p1) { dk3str_c8_next(p1, NULL); switch(el->cln) { - case 5: /* box sizer */ - case 9: /* static box sizer */ - case 25: /* spin button */ - case 26: /* spin control */ - case 13: /* scrolled window */ - case 30: /* gauge */ - case 33: /* static line */ + case 5: /* box sizer */ + case 9: /* static box sizer */ + case 24: /* scrollbar */ + case 25: /* spin button */ + case 26: /* spin control */ + case 27: /* slider control */ + case 13: case 47: /* scrolled window */ + case 30: /* gauge */ + case 33: /* static line */ { } break; default: { $? "! not applicable" @@ -3177,7 +3300,7 @@ dkct_gui_set_direction(DKCT_GUI *gui, char *il) back = 1; } break; case 2: { - if(el->cln == 13) { + if((el->cln == 13) || (el->cln == 47)) { el->direction = DKCT_GUI_DIRECTION_BOTH; back = 1; } else { @@ -3641,7 +3764,13 @@ dkct_gui_set_notebook_style(DKCT_GUI *gui, char *il) el = gui->c_el; if(el) { switch(el->cln) { - case 12: { + case 12: + case 42: /* 2018-05-29 Further books added */ + case 43: + case 44: + case 45: + case 46: + { } break; default: { $? "! not applicable" /* Warning: Attribute not applicable for class! */ @@ -5020,11 +5149,13 @@ dkct_set_minimum_size(DKCT_GUI *gui, char *pv) */ static int -dkct_int_compare(void const *l, void const *r, int cr) +dkct_int_compare(void const *l, void const *r, int DK3_ARG_UNUSED(cr) ) { int const *pl; int const *pr; int back = 0; + + DK3_UNUSED_ARG(cr) pl = (int const *)l; pr = (int const *)r; if(pl) { if(pr) { @@ -5561,6 +5692,25 @@ dkct_gui_report_illegal_parent_child( +static +int +dkct_gui_is_stock_element(DKCT_GUI_ELEMENT *el) +{ + int back = 0; + $? "+ dkct_gui_is_stock_element" + if ((15 == el->cln) || (37 == el->cln)) { $? ". cln = %d", el->cln + if (NULL != el->idname) { $? ". idname = \"%s\"", el->idname + if (0 < dk3str_c8_array_index(dkct_gui_stock_item_names, el->idname, 1)) { + back = 1; $? ". idname in list" + } + } + } + $? "- dkct_gui_is_stock_element %d", back + return back; +} + + + /** Check GUI element setup. @param el Element to check. @param psrc Source structure. @@ -5586,6 +5736,7 @@ dkct_gui_element_check(DKCT_GUI_ELEMENT *el, DKCT_SRC *psrc) case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 35: case 36: case 38: + case 42: case 43: case 44: case 45: case 46: case 47: /* 2018-05-29 */ { back = 0; nco = dkct_gui_get_number_contents(el); @@ -5621,12 +5772,23 @@ dkct_gui_element_check(DKCT_GUI_ELEMENT *el, DKCT_SRC *psrc) || (el->menuItemStyle != DKCT_GUI_MENU_ITEM_SEPARATOR) ) { - if(el->cln == 28) { - /* ERROR: Missing text! */ + if((el->cln == 28) || (0 != dkct_gui_is_stock_element(el))) { + /* Info: Missing text! */ + $? ". no text (info)" +#if 0 + /* 2018-05-28 Removed + Do not issue message about wxTextCtrl, wxMenuItem, wxButton + without text. + For wxTextCtrl the field is empty, user should type text. + For wxMenuItem and wxButton create stock objects if + no text present. + */ dkct_to_log_1(psrc, 1, DK3_LL_INFO, 49); +#endif } else { back = 0; $? "! missing text" /* ERROR: Missing text! */ + $? "! no text, no stock element" dkct_to_log_1(psrc, 1, DK3_LL_ERROR, 49); } } @@ -5703,7 +5865,11 @@ dkct_gui_element_check(DKCT_GUI_ELEMENT *el, DKCT_SRC *psrc) */ if(back) { switch(el->cln) { - case 12: case 13: case 28: { + /* + 2018-05-29 Removed case 12 branch + Requiring a size is not necessary for a wxNotebook. + */ + case 13: case 47: case 28: { if(!((el->sizex > 0) && (el->sizey > 0))) { $? "! missing size" if(el->cln == 28) { /* @@ -6284,12 +6450,13 @@ dkct_gui_add_object_to_sizer( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *pa, DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { char bu[64]; /* Buffer for integer values. */ int det = 0; /* Details to use. */ $? "+ dkct_gui_add_object_to_sizer" + DK3_UNUSED_ARG(gui) /* Last modifications to object before adding it to parent. */ @@ -6459,14 +6626,21 @@ dkct_gui_set_parents_sizer( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *pa, DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { char const *pname = NULL; /* Parent object name. */ $? "+ dkct_gui_set_parents_sizer" + DK3_UNUSED_ARG(gui) if(pa) { pname = pa->name; } if(!(pname)) { - if(pa->cln != 1) { pname = dkct_gui_out_kw[30]; } + if (pa) { + if(pa->cln != 1) { + pname = dkct_gui_out_kw[30]; + } + } else { + pname = dkct_gui_out_kw[30]; + } } fputs(dkct_gui_out_kw[8], psrc->fipo); if(pname) { @@ -6550,9 +6724,13 @@ dkct_gui_write_idname(DKCT_GUI_ELEMENT *co, DKCT_SRC *psrc) */ static void -dkct_gui_write_size(DKCT_SRC *psrc, int w, int h, int rec, DKCT_GUI_ELEMENT *co) +dkct_gui_write_size( + DKCT_SRC *psrc, int w, int h, int rec, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(co) +) { char bu[256]; + DK3_UNUSED_ARG(co) if((w > 0) && (h > 0)) { sprintf(bu, "%d, %d", w, h); fputs(dkct_gui_out_kw[81], psrc->fipo); @@ -6575,7 +6753,7 @@ static void dkct_gui_constructor_frame_dialog( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -6583,6 +6761,7 @@ dkct_gui_constructor_frame_dialog( { int det = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if(co->text) det = 1; if((co->sizex > 0) && (co->sizey > 0)) det = 2; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -6619,12 +6798,15 @@ static void dkct_gui_constructor_boxsizer( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) fputs(dkct_gui_out_kw[2], psrc->fipo); switch(co->direction) { case DKCT_GUI_DIRECTION_VERTICAL: { @@ -6673,10 +6855,10 @@ static void dkct_gui_constructor_gridsizer( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { char bu[256]; /* Buffer for integer values. */ @@ -6685,6 +6867,9 @@ dkct_gui_constructor_gridsizer( int y = 0; /* Start row. */ int x = 0; /* Start column. */ + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) c = co->gridcolumns; r = co->gridrows; x = co->gridgapx; @@ -6722,16 +6907,19 @@ static void dkct_gui_constructor_gridbagsizer( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { char bu[128]; /* Buffer for integer values. */ + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) bu[0] = '\0'; - if((co->gridgapy > -1) || (co->gridgapy > -1)) { + if((co->gridgapx > -1) || (co->gridgapy > -1)) { fputs(dkct_gui_out_kw[2], psrc->fipo); if(co->gridgapx > -1) { sprintf( @@ -6760,12 +6948,13 @@ static void dkct_gui_constructor_staticboxsizer( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui ) { + DK3_UNUSED_ARG(dp) fputs(dkct_gui_out_kw[2], psrc->fipo); fputs(dkct_gui_out_kw[(co->direction) ? 35 : 34], psrc->fipo); dkct_gui_next_argument(psrc); @@ -6790,7 +6979,7 @@ static void dkct_gui_constructor_panel( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -6798,6 +6987,7 @@ dkct_gui_constructor_panel( { int det = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); @@ -6827,7 +7017,7 @@ static void dkct_gui_constructor_notebook( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -6836,6 +7026,7 @@ dkct_gui_constructor_notebook( int det = 0; /* Details level. */ int fe = 0; /* Flag: Found elements. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->notebookStyle) det = 2; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -6849,36 +7040,89 @@ dkct_gui_constructor_notebook( dkct_gui_write_size(psrc, co->sizex, co->sizey, 0, co); if(det > 1) { if((co->notebookStyle) & DKCT_GUI_NB_TOP) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[113], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_LEFT) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[114], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_RIGHT) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[115], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_BOTTOM) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[116], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_FIXEDWIDTH) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[117], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_MULTILINE) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[118], psrc->fipo); - } - if((co->notebookStyle) & DKCT_GUI_NB_NOPAGETHEME) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[119], psrc->fipo); + switch (co->cln) { + case 12: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[113], psrc->fipo); + } break; + case 42: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[221], psrc->fipo); + } break; + case 43: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[222], psrc->fipo); + } break; + } + } else { + if((co->notebookStyle) & DKCT_GUI_NB_LEFT) { + switch (co->cln) { + case 12: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[114], psrc->fipo); + } break; + case 42: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[223], psrc->fipo); + } break; + case 43: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[224], psrc->fipo); + } break; + } + } else { + if((co->notebookStyle) & DKCT_GUI_NB_RIGHT) { + switch (co->cln) { + case 12: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[115], psrc->fipo); + } break; + case 42: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[225], psrc->fipo); + } break; + case 43: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[226], psrc->fipo); + } break; + } + } else { + if((co->notebookStyle) & DKCT_GUI_NB_BOTTOM) { + switch (co->cln) { + case 12: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[116], psrc->fipo); + } break; + case 42: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[227], psrc->fipo); + } break; + case 43: { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[228], psrc->fipo); + } break; + } + } + } + } } - if((co->notebookStyle) & DKCT_GUI_NB_FLAT) { - if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; - fputs(dkct_gui_out_kw[120], psrc->fipo); + if (12 == co->cln) { + if((co->notebookStyle) & DKCT_GUI_NB_FIXEDWIDTH) { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[117], psrc->fipo); + } + if((co->notebookStyle) & DKCT_GUI_NB_MULTILINE) { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[118], psrc->fipo); + } + if((co->notebookStyle) & DKCT_GUI_NB_NOPAGETHEME) { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[119], psrc->fipo); + } + if((co->notebookStyle) & DKCT_GUI_NB_FLAT) { + if(fe) { fputs(dkct_gui_out_kw[44], psrc->fipo); } fe = 1; + fputs(dkct_gui_out_kw[120], psrc->fipo); + } } if(!(fe)) { fputs(dkct_gui_out_kw[52], psrc->fipo); } } @@ -6899,7 +7143,7 @@ static void dkct_gui_constructor_scrolledwindow( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -6907,6 +7151,7 @@ dkct_gui_constructor_scrolledwindow( { int det = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->direction != DKCT_GUI_DIRECTION_BOTH) det = 2; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -6949,7 +7194,7 @@ static void dkct_gui_constructor_splitterwindow( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -6958,6 +7203,7 @@ dkct_gui_constructor_splitterwindow( int det = 0; /* Details level. */ int fe = 0; /* Flag: Found an element. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->splitterStyle != DKCT_GUI_SPLITTERW_3D) det = 2; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -7027,7 +7273,7 @@ static void dkct_gui_constructor_button( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7036,6 +7282,7 @@ dkct_gui_constructor_button( int det = 0; /* Details level. */ int fe = 0; /* Flag: Found an entry. */ + DK3_UNUSED_ARG(dp) if(co->text) det = 1; if((co->sizex > 0) && (co->sizey > 0)) det = 2; if(co->buttonStyle) det = 3; @@ -7109,7 +7356,7 @@ static void dkct_gui_constructor_bitmapbutton( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7118,6 +7365,7 @@ dkct_gui_constructor_bitmapbutton( int det = 0; /* Details level. */ int fe = 0; /* Flag: Found entry. */ + DK3_UNUSED_ARG(dp) if(co->bitmapVarName) { det = 1; if((co->sizex > 0) && (co->sizey > 0)) det = 2; @@ -7184,7 +7432,7 @@ static void dkct_gui_constructor_choice_combo( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui, @@ -7193,6 +7441,7 @@ dkct_gui_constructor_choice_combo( { char bu[64]; /* Buffer for integer values. */ int details = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) /* parent, id, pos, size (1) , n (2), texts (3), validator (4) parent, id, text, pos, size (1), n (2), texts (3), validator (4) @@ -7254,7 +7503,7 @@ static void dkct_gui_constructor_checkbox( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7262,6 +7511,7 @@ dkct_gui_constructor_checkbox( { int need_full_arguments = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if(co->text) need_full_arguments = 1; if((co->sizex > 0) && (co->sizey > 0)) { need_full_arguments = 2; } if(co->nStates == 0x03) { @@ -7326,7 +7576,7 @@ static void dkct_gui_constructor_listbox( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7334,6 +7584,7 @@ dkct_gui_constructor_listbox( { char bu[64]; /* Buffer for numeric values. */ + DK3_UNUSED_ARG(dp) fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); dkct_gui_next_argument(psrc); @@ -7409,7 +7660,7 @@ static void dkct_gui_constructor_radiobox( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7422,6 +7673,7 @@ dkct_gui_constructor_radiobox( int det = 0; /* Details level. */ char bu[64]; /* Buffer for numeric values. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if((co->nChoices > 0) || (co->nChoices == -1)) det = 2; if(co->choices) det = 3; @@ -7495,7 +7747,7 @@ static void dkct_gui_constructor_radiobutton( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7503,6 +7755,7 @@ dkct_gui_constructor_radiobutton( { int det = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->startGroup) det = 2; if(co->validator) det = 3; @@ -7550,7 +7803,7 @@ static void dkct_gui_constructor_scrollbar( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7558,6 +7811,7 @@ dkct_gui_constructor_scrollbar( { int must_write_details = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); dkct_gui_next_argument(psrc); @@ -7606,7 +7860,7 @@ static void dkct_gui_constructor_spinbutton( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7614,6 +7868,7 @@ dkct_gui_constructor_spinbutton( { int need_details = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if(co->sizex > 0) { need_details = 1; } if(co->sizey > 0) { need_details = 1; } if(co->direction != DKCT_GUI_DIRECTION_HORIZONTAL) { need_details = 2; } @@ -7659,7 +7914,7 @@ static void dkct_gui_constructor_spincontrol( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7668,6 +7923,7 @@ dkct_gui_constructor_spincontrol( char bu[64]; /* Buffer for numeric values. */ int need_details = 0; /* Details level. */ + DK3_UNUSED_ARG(dp) if(co->text) { need_details = 1; } if((co->sizex > 0) && (co->sizey > 0)) { need_details = 2; } if(co->useKeys) { need_details = 3; } @@ -7757,7 +8013,7 @@ static void dkct_gui_constructor_slider( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7767,6 +8023,7 @@ dkct_gui_constructor_slider( /* parent, id, value, min, max, pos, size (1), style (2), validator (3) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->sliderStyle) det = 2; if(co->direction != DKCT_GUI_DIRECTION_HORIZONTAL) det = 2; @@ -7787,6 +8044,7 @@ dkct_gui_constructor_slider( dkct_gui_next_argument(psrc); dkct_gui_write_size(psrc, co->sizex, co->sizey, 0, co); if(det > 1) { + dkct_gui_next_argument(psrc); if(co->direction == DKCT_GUI_DIRECTION_HORIZONTAL) { fputs(dkct_gui_out_kw[103], psrc->fipo); } else { @@ -7838,7 +8096,7 @@ static void dkct_gui_constructor_textctrl( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7849,6 +8107,7 @@ dkct_gui_constructor_textctrl( /* parent, id, value (1), pos, size (2), style (3), validator (4) */ + DK3_UNUSED_ARG(dp) if(co->text) det = 1; if((co->sizex > 0) && (co->sizey > 0)) det = 2; if(co->textStyle) det = 3; @@ -7959,7 +8218,7 @@ static void dkct_gui_constructor_togglebutton( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -7969,6 +8228,7 @@ dkct_gui_constructor_togglebutton( /* parent, id, label, pos, size (1), style (2), validator (3) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->validator) det = 3; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -8010,7 +8270,7 @@ static void dkct_gui_constructor_gauge( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8021,6 +8281,7 @@ dkct_gui_constructor_gauge( /* parent, id, range, pos, size (1), style (2), validator (3) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->direction != DKCT_GUI_DIRECTION_HORIZONTAL) det = 2; if(co->gaugeStyle) det = 2; @@ -8069,7 +8330,7 @@ static void dkct_gui_constructor_statictext( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8081,6 +8342,7 @@ dkct_gui_constructor_statictext( /* parent, id, label, pos, size (1), style (2) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; mask = DKCT_GUI_TEXT_LEFT; mask |= DKCT_GUI_TEXT_CENTRE; @@ -8139,7 +8401,7 @@ static void dkct_gui_constructor_staticbitmap( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8149,6 +8411,7 @@ dkct_gui_constructor_staticbitmap( /* parent, id, bitmap, pos, size (1), style (2) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->bitmapVarName) { fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -8183,7 +8446,7 @@ static void dkct_gui_constructor_staticline( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8193,6 +8456,7 @@ dkct_gui_constructor_staticline( /* parent, id, pos, size (1), style (2) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->direction != DKCT_GUI_DIRECTION_HORIZONTAL) det = 2; fputs(dkct_gui_out_kw[2], psrc->fipo); @@ -8229,7 +8493,7 @@ static void dkct_gui_constructor_staticbox( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT *DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8239,11 +8503,18 @@ dkct_gui_constructor_staticbox( /* parent, id, label, pos, size (1), style (2) */ + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); dkct_gui_next_argument(psrc); dkct_gui_write_idname(co, psrc); + dkct_gui_next_argument(psrc); + if (NULL != co->text) { + fputs(co->text, psrc->fipo); + } else { + fputs(dkct_gui_out_kw[73], psrc->fipo); + } if(det) { dkct_gui_next_argument(psrc); fputs(dkct_gui_out_kw[74], psrc->fipo); @@ -8267,16 +8538,21 @@ dkct_gui_constructor_staticbox( static void dkct_gui_constructor_menubar( - DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, - DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(co), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), + DKCT_SRC * DK3_SILENCE_ARG_UNUSED(psrc), + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { /* No constructor arguments. */ + DK3_UNUSED_ARG(co) + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(psrc) + DK3_UNUSED_ARG(gui) } @@ -8291,16 +8567,21 @@ dkct_gui_constructor_menubar( static void dkct_gui_constructor_menu( - DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, - DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(co), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), + DKCT_SRC * DK3_SILENCE_ARG_UNUSED(psrc), + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { /* No constructor arguments. */ + DK3_UNUSED_ARG(co) + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(psrc) + DK3_UNUSED_ARG(gui) } @@ -8317,14 +8598,16 @@ void dkct_gui_constructor_menuitem( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { /* parent->Append(id, label, helpstring, kind); */ + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) #if 0 fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); @@ -8431,14 +8714,16 @@ void dkct_gui_constructor_toolbartoolbase( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { /* id, text, bitmap, disbitmap (1), kind (2), tip (3) */ + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) fputs(dkct_gui_out_kw[8], psrc->fipo); if(co->menuItemStyle != DKCT_GUI_MENU_ITEM_SEPARATOR) { fputs(co->name, psrc->fipo); @@ -8502,15 +8787,17 @@ void dkct_gui_constructor_toolbar( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { int det = 0; /* Details level. */ /* parent, id, pos, size (1), style (2) */ + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) if((co->sizex > 0) && (co->sizey > 0)) det = 1; if(co->direction != DKCT_GUI_DIRECTION_HORIZONTAL) det = 2; if(co->toolbarStyle != DKCT_GUI_TOOLBAR_FLAT) det = 2; @@ -8593,7 +8880,7 @@ static void dkct_gui_constructor_grid( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui @@ -8601,6 +8888,7 @@ dkct_gui_constructor_grid( { /* parent, id, pos, size (1), style, name */ int det = 0; + DK3_UNUSED_ARG(dp) if((co->sizex > 0) && (co->sizey > 0)) det = 1; fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); @@ -8726,10 +9014,10 @@ static void dkct_gui_finalize_after_constructor( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, - DKCT_GUI *gui + DKCT_GUI * DK3_SILENCE_ARG_UNUSED(gui) ) { DKCT_GRID_HEAD *gh = NULL; @@ -8738,6 +9026,9 @@ dkct_gui_finalize_after_constructor( int rows = 0; int columns= 0; $? "+ dkct_gui_finalize_after_constructor" + DK3_UNUSED_ARG(dp) + DK3_UNUSED_ARG(pw) + DK3_UNUSED_ARG(gui) /* Jump to end if construction failed. if(!(object)) { @@ -8922,7 +9213,7 @@ dkct_gui_finalize_after_constructor( } break; case 12: { $? ". wxNotebook" } break; - case 13: { $? ". wxScrolledWindow" + case 13: case 47: { $? ". wxScrolledWindow or wxScrolled<wxPanel>" /* Set size */ } break; case 14: { $? ". wxSplitterWindow" @@ -9113,6 +9404,16 @@ dkct_gui_finalize_after_constructor( fputs(dkct_gui_out_kw[0], psrc->fipo); } } break; + case 42: { $? ". wxChoicebook" + } break; + case 43: { $? ". wxListbook" + } break; + case 44: { $? ". wxSimplebook" + } break; + case 45: { $? ". wxToolbook" + } break; + case 46: { $? ". wxTreebook" + } break; } /* Minimal size, if any. @@ -9142,13 +9443,14 @@ static void dkct_gui_constructor_constructor( DKCT_GUI_ELEMENT *co, - DKCT_GUI_ELEMENT *dp, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(dp), DKCT_GUI_ELEMENT *pw, DKCT_SRC *psrc, DKCT_GUI *gui, int comma ) { + DK3_UNUSED_ARG(dp) fputs(dkct_gui_out_kw[2], psrc->fipo); dkct_gui_write_parent_name(pw, psrc, gui); fputs(dkct_gui_out_kw[209], psrc->fipo); @@ -9214,13 +9516,14 @@ dkct_gui_write_element_constructor( case 37: { if(dp) { if(dp->cln == 36) { - if(co->text) { + if((NULL != co->text) || (0 != dkct_gui_is_stock_element(co))) { dkct_gui_constructor_menuitem(co, dp, pw, psrc, gui); if(co->menuItemStyle != DKCT_GUI_MENU_ITEM_SEPARATOR) { dkct_gui_finalize_after_constructor(co, dp, pw, psrc, gui); } } else { /* ERROR: No text specified */ + $? "! no text, no stock element" dkct_to_log_1(gui->psrc, 1, DK3_LL_ERROR, 49); } } else { $? "! illegal parent/child" @@ -9244,6 +9547,7 @@ dkct_gui_write_element_constructor( } } else { /* ERROR: No text */ + $? "! not text" dkct_to_log_1(gui->psrc, 1, DK3_LL_ERROR, 49); } } else { @@ -9322,7 +9626,7 @@ dkct_gui_write_element_constructor( case 12: { $? ". wxNotebook" dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); } break; - case 13: { $? ". wxScrolledWindow" + case 13: case 47 : { $? ". wxScrolledWindow wxScrolled<wxPanel>" dkct_gui_constructor_scrolledwindow(co, dp, pw, psrc, gui); } break; case 14: { $? ". wxSplitterWindow" @@ -9406,9 +9710,24 @@ dkct_gui_write_element_constructor( } break; case 39: { $? ". wxStatusBar" } break; - case 41: { + case 41: { $? ". wxGrid" dkct_gui_constructor_grid(co, dp, pw, psrc, gui); } break; + case 42: { $? ". wxChoicebook" + dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); + } break; + case 43: { $? ". wxListbook" + dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); + } break; + case 44: { $? ". wxSimplebook" + dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); + } break; + case 45: { $? ". wxToolbook" + dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); + } break; + case 46: { $? ". wxTreebook" + dkct_gui_constructor_notebook(co, dp, pw, psrc, gui); + } break; default: { if(!(co->compConst)) { dkct_gui_constructor_constructor(co,dp,pw,psrc,gui,0); @@ -9437,13 +9756,14 @@ void dkct_gui_add_pseudo_object( DKCT_GUI_ELEMENT *co, DKCT_GUI_ELEMENT *dp, - DKCT_GUI_ELEMENT *pw, + DKCT_GUI_ELEMENT * DK3_SILENCE_ARG_UNUSED(pw), DKCT_SRC *psrc, DKCT_GUI *gui ) { char bu[256]; /* Buffer for numeric values. */ $? "+ dkct_gui_add_pseudo_object \"%!8s\"", TR_8STR(co->name) + DK3_UNUSED_ARG(pw) if(dp) { switch(dp->cln) { case 7: { /* gridbag sizer */ @@ -10091,6 +10411,7 @@ dkct_gui_write_members(DKCT_SRC *psrc, DKCT_GUI *gui) default: { pcln = -1; if(dp) { pcln = dp->cln; } + $? ". pcln = %d", pcln switch(pcln) { case 35: { /* Appending to a menu bar. */ switch(co->cln) { @@ -10192,6 +10513,26 @@ dkct_gui_write_members(DKCT_SRC *psrc, DKCT_GUI *gui) the splitter window. */ } break; + case 12: case 42: case 43: case 44: case 45: case 46: { + /* Parent is wxNotebook */ + if ( + (NULL != co->name) && (NULL != dp->name) + && (NULL != co->text)) + { + fputs(dkct_gui_out_kw[8], psrc->fipo); + fputs(dp->name, psrc->fipo); + fputs(dkct_gui_out_kw[220], psrc->fipo); + fputs(co->name, psrc->fipo); + fputs(dkct_gui_out_kw[55], psrc->fipo); + fputs(co->text, psrc->fipo); + fputs(dkct_gui_out_kw[24], psrc->fipo); + fputs(dkct_gui_out_kw[0], psrc->fipo); + } + else { + /* ERROR: Missing text */ + dkct_to_log_1(gui->psrc, 1, DK3_LL_ERROR, 124); + } + } break; default: { if((co->number) && (co->parent)) { char const *pname; @@ -10222,6 +10563,40 @@ dkct_gui_write_members(DKCT_SRC *psrc, DKCT_GUI *gui) +/** Complain if an element is not in the contents of a parent object. + @param psrc Source structure. + @param el Element to complain about. +*/ +static +void +complain_about_missing_parent( + DKCT_SRC *gpsrc, DKCT_SRC *psrc, DKCT_GUI_ELEMENT *el +) +{ + DKCT_SRC *xpsrc; + unsigned long oldlineno; + int must_complain; + + $? "+ complain_about_missing_parent" + /* + Check element el whether complaint is really necessary + */ + must_complain = 1; + /* + Write warning + */ + xpsrc = ((NULL != gpsrc) ? (gpsrc) : (psrc)); + if ((0 != must_complain) && (NULL != xpsrc)) { + oldlineno = xpsrc->lineno; + xpsrc->lineno = el->lndef; + dkct_to_log_3(xpsrc, 1, DK3_LL_WARNING, 126, 127, el->name); + xpsrc->lineno = oldlineno; + } + $? "- complain_about_missing_parent" +} + + + /** Write top level class constructor. @param psrc Source structure. */ @@ -10257,6 +10632,9 @@ dkct_gui_write_constructor(DKCT_SRC *psrc) fputs(dkct_gui_out_kw[8], psrc->fipo); fputs(el->name, psrc->fipo); fputs(dkct_gui_out_kw[14], psrc->fipo); + if (NULL == el->parent) { + complain_about_missing_parent(gui->psrc, psrc, el); + } } } } |