本文整理汇总了C++中BCheckBox::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ BCheckBox::Name方法的具体用法?C++ BCheckBox::Name怎么用?C++ BCheckBox::Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BCheckBox
的用法示例。
在下文中一共展示了BCheckBox::Name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MessageReceived
void YabWindow::MessageReceived(BMessage *message)
{
// if(message) message->PrintToStream();
switch(message->what)
{
case YABBUTTON:
{
BString tmpMessage("");
BButton *myButtonPressed;
message->FindPointer("source",(void **) &myButtonPressed);
tmpMessage += myButtonPressed->Name();
tmpMessage += "|";
messageString += tmpMessage;
}
break;
case YABMENU:
{
BString tmpMessage("");
BMenuItem *mySelectedMenu;
message->FindPointer("source",(void **) &mySelectedMenu);
BMenu *myMenu = mySelectedMenu->Menu();
tmpMessage += ((BMenuBar*)myMenu->Supermenu())->Parent()->Name();
tmpMessage += ":";
tmpMessage += myMenu->Name();
tmpMessage += ":";
tmpMessage += mySelectedMenu->Label();
tmpMessage += "|";
messageString += tmpMessage;
}
break;
case YABSUBMENU:
{
BString tmpMessage("");
BMenuItem *mySelectedMenu;
message->FindPointer("source",(void **) &mySelectedMenu);
BMenu *myMenu = mySelectedMenu->Menu();
tmpMessage += ((BMenuBar*)myMenu->Supermenu()->Supermenu())->Parent()->Name();
tmpMessage += ":";
tmpMessage += myMenu->Supermenu()->Name();
tmpMessage += ":";
tmpMessage += myMenu->Name();
tmpMessage += ":";
tmpMessage += mySelectedMenu->Label();
tmpMessage += "|";
messageString += tmpMessage;
}
break;
case YABTEXTCONTROL:
{
BString tmpMessage("");
BTextControl *myTextControl;
message->FindPointer("source",(void **) &myTextControl);
tmpMessage += myTextControl->Name();
tmpMessage += ":";
tmpMessage += myTextControl->Text();
tmpMessage += "|";
messageString += tmpMessage;
}
break;
case YABCHECKBOX:
{
BString tmpMessage("");
BCheckBox *myCheckBox;
message->FindPointer("source",(void **) &myCheckBox);
tmpMessage += myCheckBox->Name();
tmpMessage += ":";
if(myCheckBox->Value()==B_CONTROL_ON)
tmpMessage += "ON|";
else
tmpMessage += "OFF|";
messageString += tmpMessage;
}
break;
case YABRADIOBUTTON:
{
BString tmpMessage("");
BRadioButton *myRadioButton;
message->FindPointer("source",(void **) &myRadioButton);
tmpMessage += myRadioButton->Name();
tmpMessage += "|";
messageString += tmpMessage;
}
break;
case YABLISTBOXINVOKE:
{
BListView *myList;
message->FindPointer("source",(void **) &myList);
int i = myList->CurrentSelection();
if(i>=0)
{
BString tmpMessage("");
tmpMessage += myList->Name();
tmpMessage += ":_Invoke:";
// tmpMessage += ((BStringItem*)(myList->ItemAt(i)))->Text();
tmpMessage << i+1;
tmpMessage += "|";
messageString += tmpMessage;
}
}
break;
//.........这里部分代码省略.........