User forums > Using Code::Blocks
Does Code::Blocks support multiple monitor editing?
ollydbg:
I did some hack on this issue.
The idea is to create a new cbAuiNotebook control, which can be "float" or docked. The original notebook is centered. I have to "Menu-View->Perspective->Delete current" to see the new added notebook window.
Here is the result screen shot and the patch file.
The issue here are:
I see that cbAuiNotebook can't be focused?
I mean when loading a file to a new editor, I would like to put the new editor to the "active cbAuiNotebook", but it just failed. So, I just toggle a "bool" variable, so half of the files were added to the original cbAuiNotebook, and the other files were added to another notebook.
Another issue is that I have enabled the option "wxAUI_NB_TAB_EXTERNAL_MOVE". When I am using the wxAui sample code, I see that editors can be dragged from one Notebook to another. But in my changes, I see can't see I can drag editors from one to another.
There are still many other things to handle, but I see this could be a simple hack and start.
Any ideas?
Thanks.
ollydbg:
This is some improved patch v2, the new cbAuiNotebook has a default "start page". I can drag the editors between the two notebook now.
But there are other issues, such as when a project get closed, C::B will hang. Because there are two many code which is handling the first(default) cbAuiNotebook.
ollydbg:
This is the v3 patch.
It can load a project and close a project without crash, and I can drag the source file from one notebook to another.
Our "Start here" page is a very special editor we must handle it carefully. I try to fix some crashed here and there.
The remaining issue is that some plugins such as the CodeCompletion's toolbar does not work well(disabled) when I drag a file from the first notebook to the second notebook.
Another issue is that I can't drag a file to an empty notebook, see my bug report here: I can not drag a panel to an empty wxAuiNotebook from another wxAuiNotebook
EDIT
--- Code: ---EditorBase* EditorManager::GetActiveEditor()
{
// find which is the active cbAuiNotebook
cbAuiNotebook* activeNotebook = m_pNotebook;
// if (m_pNotebook2->IsActive())
// {
// activeNotebook = m_pNotebook2;
// }
// else
// {
// activeNotebook = m_pNotebook;
// }
// @fixme how can we determine which notebook is active?
if (activeNotebook->GetPageCount() > 0)
{
return InternalGetEditorBase(activeNotebook, activeNotebook->GetSelection());
}
return nullptr;
}
--- End code ---
The issue is that I don't know which is the "active" notebook. Any idea on how to solve this issue?
ollydbg:
v4 version, I can get the "active editor" correctly.
--- Quote ---The remaining issue is that some plugins such as the CodeCompletion's toolbar does not work well(disabled) when I drag a file from the first notebook to the second notebook.
--- End quote ---
This issue is solved. :)
omlk:
--- Quote from: ollydbg on December 09, 2023, 05:34:32 am ---v4 version, I can get the "active editor" correctly.
--- Quote ---The remaining issue is that some plugins such as the CodeCompletion's toolbar does not work well(disabled) when I drag a file from the first notebook to the second notebook.
--- End quote ---
This issue is solved. :)
--- End quote ---
Are you intrigued as to how to implement synchronization between two cbAuiNotebook's so that files of the same project, opened or moved between two cbAuiNotebook`s, are parsed and compiled?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version