From 76404a08459460e3387fc40beceb3b5e87b99e56 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 13 Nov 2008 11:19:48 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : xvaga Ricompilazione Demo : [ ] Commento : 0000928: Acceleratori Non tutti i tasti di funzione della toolbar hanno gli acceleratori (Esempio Fine, Annulla). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0000846: Anomalia utilizzo tasti spostamento Archivio causali contabili - posizionandosi sul riferimento al sottoconto e collegandosi all'archivio piano dei conti , viene visualizzato il conto ma non รจ possibile spostarsi , non funzionano i tasti freccia in alto . git-svn-id: svn://10.65.10.50/trunk@17620 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvaga.cpp | 2 +- xvaga/xvtctl.cpp | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index efa671157..e922d26e8 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -1615,7 +1615,7 @@ RCT* xvt_dwin_get_clip(WINDOW win, RCT* rct) return rct; } -DRAW_CTOOLS* xvt_dwin_get_draw_ctools(WINDOW win, DRAW_CTOOLS *ctoolsp) +DRAW_CTOOLS* xvt_dwin_get_draw_ctools(WINDOW win, DRAW_CTOOLS* ctoolsp) { CAST_TDC(win, dc); memcpy(ctoolsp, &dc._dct, sizeof(DRAW_CTOOLS)); diff --git a/xvaga/xvtctl.cpp b/xvaga/xvtctl.cpp index 660307314..3cbd30fe9 100755 --- a/xvaga/xvtctl.cpp +++ b/xvaga/xvtctl.cpp @@ -183,7 +183,7 @@ WINDOW xvt_ctl_create_def(WIN_DEF* win_def_p, WINDOW parent_win, long app_data) { wxASSERT(win_def_p != NULL); const wxRect rct = NormalizeRCT(&win_def_p->rct); - wxWindow* pParent = (wxWindow*)parent_win; + wxWindow* pParent = wxStaticCast((wxObject*)parent_win, wxWindow); const wxWindowID id = win_def_p->v.ctl.ctrl_id; WINDOW win = NULL_WIN; @@ -222,8 +222,7 @@ WINDOW xvt_ctl_create_def(WIN_DEF* win_def_p, WINDOW parent_win, long app_data) } else { // Bottone figo con immagini - wxBitmap bmp; - pb = new wxBitmapButton(pParent, id, bmp, rct.GetPosition(), rct.GetSize()); + pb = new wxBitmapButton(pParent, id, wxNullBitmap, rct.GetPosition(), rct.GetSize()); } win = (WINDOW)pb; } @@ -276,12 +275,15 @@ WINDOW xvt_ctl_create_def(WIN_DEF* win_def_p, WINDOW parent_win, long app_data) if (flags & CTL_FLAG_DISABLED) w.Disable(); XVT_FNTID font_id = win_def_p->v.ctl.font_id; - if (font_id == NULL) + const bool bDestroyFont = font_id == NULL; + if (bDestroyFont) font_id = xvt_dwin_get_font(parent_win); if (font_id != NULL) { - const wxFont& font = ((TFontId*)font_id)->Font(NULL, win); + const wxFont& font = wxStaticCast(font_id, TFontId)->Font(NULL, win); w.SetFont(font); + if (bDestroyFont) + xvt_font_destroy(font_id); } xvt_ctl_set_colors(win, win_def_p->ctlcolors, XVT_COLOR_ACTION_SET); } @@ -486,7 +488,6 @@ XVTDLL int xvt_pane_manager_save_perspective(WINDOW win, char* perspective, int return nSize; } - XVTDLL BOOLEAN xvt_pane_set_size_range(WINDOW win, int min_size, int best_size, int max_size) { BOOLEAN ok = FALSE; @@ -529,6 +530,7 @@ XVTDLL BOOLEAN xvt_pane_set_size_range(WINDOW win, int min_size, int best_size, /////////////////////////////////////////////////////////// // Notebook interface /////////////////////////////////////////////////////////// + class TwxAuiDefaultTabArt : public wxAuiDefaultTabArt { public: @@ -1492,9 +1494,10 @@ protected: DECLARE_EVENT_TABLE() void OnTool(wxCommandEvent& evt); virtual bool SetBackgroundColour(const wxColour& colour); - TwxToolBar() : TwxToolBarBase(NULL, wxID_ANY) { } + TwxToolBar() : TwxToolBarBase(NULL, wxID_ANY) { wxASSERT(false); } public: + void ShowTool(int id, bool on); TwxToolBar(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style); }; @@ -1581,6 +1584,17 @@ BOOLEAN xvt_toolbar_add_control(WINDOW win, int cid, TOOL_TYPE type, const char if (acc >= 'A' && acc <= 'Z') tip << "\n(Alt+" << acc << ")"; } + else + { + switch (ico) // Gestione bottoni speciali + { + case 102: tip << "\n(Esc)"; break; + case 114: tip << "\n(Alt+F4)"; break; + case 162: tip << "\n(F2)"; break; + case 163: tip << "\n(F1)"; break; + default: break; + } + } #ifdef wxAuiToolBar tb.AddTool(cid, cap, bmp, wxNullBitmap, wxItemKind(type), tip, tip, NULL); @@ -1694,16 +1708,23 @@ void xvt_toolbar_realize(WINDOW win) UnlockPane(win); } } + ptb->UpdateWindowUI(); } } void xvt_toolbar_show_control(WINDOW win, int cid, BOOLEAN on) { + wxASSERT(on); // Per ora non so come si faccia + /* TwxToolBar* ptb = Win2Bar(win); if (ptb != NULL && cid > 0) - ptb->EnableTool(cid, on != 0); // Per ora non so come si faccia + { + // ???? + } + */ } +// Funzione di utilita' un po' fuori posto (per poter accedere alla _GetToolResource) void xvt_dwin_draw_tool(WINDOW win, int x, int y, int rid, int size) { const wxBitmap& bmp = _GetToolResource(rid, size);