I have take some time to implement this feature, so that user can change it.
Index: ccoptionsdlg.cpp
===================================================================
--- ccoptionsdlg.cpp (revision 7639)
+++ ccoptionsdlg.cpp (working copy)
@@ -155,6 +155,11 @@
XRCCTRL(*this, "chkTreeMembers", wxCheckBox)->SetValue(m_Parser.ClassBrowserOptions().treeMembers);
XRCCTRL(*this, "chkScopeFilter", wxCheckBox)->SetValue(cfg->ReadBool(_T("/scope_filter"), true));
+
+
+ XRCCTRL(*this, "spnChoiceScopeLength", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/toolbar_scope_length"),286));
+ XRCCTRL(*this, "spnChoiceFunctionLength", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/toolbar_function_length"),660));
+
// m_Parser.ParseBuffer(g_SampleClasses, true);
// m_Parser.BuildTree(*XRCCTRL(*this, "treeClasses", wxTreeCtrl));
}
@@ -220,6 +225,9 @@
m_Parser.ClassBrowserOptions().treeMembers = XRCCTRL(*this, "chkTreeMembers", wxCheckBox)->GetValue();
cfg->Write(_T("/scope_filter"), (bool) XRCCTRL(*this, "chkScopeFilter", wxCheckBox)->GetValue());
+ cfg->Write(_T("/toolbar_scope_length"), (int) XRCCTRL(*this, "spnChoiceScopeLength", wxSpinCtrl)->GetValue());
+ cfg->Write(_T("/toolbar_function_length"), (int) XRCCTRL(*this, "spnChoiceFunctionLength", wxSpinCtrl)->GetValue());
+
// Now write the parser options and re-read them again to make sure they are up-to-date
m_Parser.WriteOptions();
m_NativeParsers->RereadParserOptions();
Index: codecompletion.cpp
===================================================================
--- codecompletion.cpp (revision 7639)
+++ codecompletion.cpp (working copy)
@@ -88,6 +88,7 @@
#endif
static wxCriticalSection s_HeadersCriticalSection;
+/** scopes choice name for global functions in CC's toolbar */
static wxString g_GlobalScope(_T("<global>"));
// this auto-registers the plugin
@@ -597,11 +598,14 @@
{
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("code_completion"));
bool showScope = cfg->ReadBool(_T("/scope_filter"), true);
+ int choice_scope_length = cfg->ReadInt(_T("/toolbar_scope_length"), 286);
+ int choice_function_length = cfg->ReadInt(_T("/toolbar_function_length"), 660);
if (showScope && !m_Scope)
{
- m_Scope = new wxChoice(m_ToolBar, wxNewId(), wxPoint(0, 0), wxSize(280, -1), 0, 0);
+ m_Scope = new wxChoice(m_ToolBar, wxNewId(), wxPoint(0, 0), wxSize(100, -1), 0, 0);
m_ToolBar->InsertControl(0, m_Scope);
+ m_Function->SetSize(wxSize(choice_function_length,-1));
}
else if (!showScope && m_Scope)
{
@@ -609,8 +613,15 @@
m_Scope = NULL;
}
else
+ {
+ m_Scope->SetSize(wxSize(choice_scope_length,-1));
+ m_Function->SetSize(wxSize(choice_function_length,-1));
+ m_ToolBar->Realize();
+ m_ToolBar->SetInitialSize();
return;
+ }
+
m_ToolBar->Realize();
m_ToolBar->SetInitialSize();
}
@@ -1551,6 +1562,9 @@
ed->GetControl()->CallTipShow(pos, definition);
if (start != 0 && end > start)
ed->GetControl()->CallTipSetHighlight(start, end);
+ //Manager::Get()->GetLogManager()->DebugLog(F(_T("start=%d, end=%d"), start, end));
+ //Manager::Get()->GetLogManager()->DebugLog(F(_T("definition=%s"), definition.wx_str()));
+
}
int CodeCompletion::DoClassMethodDeclImpl()
Index: resources/settings.xrc
===================================================================
--- resources/settings.xrc (revision 7639)
+++ resources/settings.xrc (working copy)
@@ -530,6 +530,56 @@
<border>5</border>
<option>1</option>
</object>
+ <object class="sizeritem">
+ <object class="wxBoxSizer">
+ <object class="sizeritem">
+ <object class="wxStaticText" name="ID_STATICTEXT8">
+ <label>Scope choice length</label>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxSpinCtrl" name="spnChoiceScopeLength">
+ <value>286</value>
+ <min>100</min>
+ <max>600</max>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxBoxSizer">
+ <object class="sizeritem">
+ <object class="wxStaticText" name="ID_STATICTEXT9">
+ <label>Function choice length</label>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxSpinCtrl" name="spnChoiceFunctionLength">
+ <value>660</value>
+ <min>1</min>
+ <max>800</max>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ </object>
+ <flag>wxALL|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
</object>
<flag>wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
<border>8</border>