wxFrame::CreateToolBar() stuff

wxDC::SetBackground from Chris Breeze
zillions of compile fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-07-24 19:05:25 +00:00
parent d602f1d8b6
commit 46dc76ba35
53 changed files with 645 additions and 376 deletions

View File

@@ -106,9 +106,17 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
bool wxToolBar::OnLeftClick( int toolIndex, bool toggleDown )
{
wxCommandEvent event( wxEVENT_TYPE_MENU_COMMAND, toolIndex );
event.SetEventObject( this );
event.SetInt( toolIndex );
event.SetExtraLong( (long) toggleDown);
/*
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, toolIndex);
event.SetEventObject(this);
event.SetInt( toolIndex );
event.SetExtraLong((long) toggleDown);
*/
GetEventHandler()->ProcessEvent(event);
@@ -117,8 +125,9 @@ bool wxToolBar::OnLeftClick( int toolIndex, bool toggleDown )
void wxToolBar::OnRightClick( int toolIndex, float WXUNUSED(x), float WXUNUSED(y) )
{
wxCommandEvent event(wxEVT_COMMAND_TOOL_RCLICKED, toolIndex);
event.SetEventObject(this);
wxCommandEvent event( wxEVENT_TYPE_MENU_COMMAND, toolIndex );
event.SetEventObject( this );
event.SetInt( toolIndex );
GetEventHandler()->ProcessEvent(event);
};
@@ -127,6 +136,7 @@ void wxToolBar::OnMouseEnter( int toolIndex )
{
wxCommandEvent event(wxEVT_COMMAND_TOOL_ENTER, toolIndex);
event.SetEventObject(this);
event.SetInt( toolIndex );
GetEventHandler()->ProcessEvent(event);
};
@@ -169,6 +179,29 @@ void wxToolBar::ClearTools(void)
{
};
void wxToolBar::Layout(void)
{
m_x = 0;
m_y = 0;
m_width = 100;
m_height = 0;
wxNode *node = m_tools.First();
while (node)
{
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
if (tool->m_bitmap1.Ok())
{
int tool_height = tool->m_bitmap1.GetHeight();
if (tool_height > m_height) m_height = tool_height;
};
node = node->Next();
};
m_height += 10;
};
void wxToolBar::EnableTool(int toolIndex, bool enable)
{
};