本文整理汇总了C++中wxArrayPtrVoid::GetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ wxArrayPtrVoid::GetCount方法的具体用法?C++ wxArrayPtrVoid::GetCount怎么用?C++ wxArrayPtrVoid::GetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxArrayPtrVoid
的用法示例。
在下文中一共展示了wxArrayPtrVoid::GetCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void wxSpeedButton::SetAllUp(wxSpeedButton *inButton) {
int i,n;
wxSpeedButton *b;
// no button?
if (inButton == NULL) return;
// simple button
if (inButton->mGroupIndex == 0) {
inButton->mButtonDown = false;
inButton->Refresh(false);
}
// toggle button
else if (inButton->mGroupIndex == -1) {
inButton->mButtonDown = false;
inButton->Refresh(false);
}
// group button, grouped by immediate parent
else if (inButton->mGroupIndex == -2) {
n = sbgArray.GetCount();
for(i=0; i<n; i++) {
b = (wxSpeedButton *) sbgArray.Item(i);
if (b->mParent == inButton->mParent) {
b->mButtonDown = false;
b->Refresh(false);
};
};
}
// all else is a group toggle button, grouped by index and top-level parent
else {
n = sbgArray.GetCount();
for(i=0; i<n; i++) {
b = (wxSpeedButton *) sbgArray.Item(i);
if ((b->mGroupIndex == inButton->mGroupIndex) && (b->mTopParent == inButton->mTopParent)) {
b->mButtonDown = false;
b->Refresh(false);
};
};
};
}
示例2: FancyTable
// Colored table
void FancyTable(wxArrayString& header, wxArrayPtrVoid& data)
{
// Colors, line width and bold font
SetFillColour(wxColour(255,0,0));
SetTextColour(255);
SetDrawColour(wxColour(128,0,0));
SetLineWidth(.3);
SetFont(wxS(""),wxS("B"));
//Header
double w[4] = {40,35,40,45};
size_t i;
for (i = 0; i < header.GetCount(); i++)
{
Cell(w[i],7,header[i],wxPDF_BORDER_FRAME, 0, wxPDF_ALIGN_CENTER, 1);
}
Ln();
// Color and font restoration
SetFillColour(wxColour(224,235,255));
SetTextColour(0);
SetFont(wxS(""));
// Data
int fill = 0;
size_t j;
for (j = 0; j < data.GetCount(); j++)
{
wxArrayString* row = (wxArrayString*) data[j];
Cell(w[0],6,(*row)[0],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_LEFT,fill);
Cell(w[1],6,(*row)[1],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_LEFT,fill);
Cell(w[2],6,(*row)[2],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_RIGHT,fill);
Cell(w[3],6,(*row)[3],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_RIGHT,fill);
Ln();
fill = 1 - fill;
}
Cell((w[0]+w[1]+w[2]+w[3]),0,wxS(""),wxPDF_BORDER_TOP);
}
示例3: ImprovedTable
// Better table
void ImprovedTable(wxArrayString& header,wxArrayPtrVoid& data)
{
// Column widths
double w[4] = {40,35,40,45};
// Header
size_t i;
for (i = 0; i <header.GetCount(); i++)
{
Cell(w[i],7,header[i],wxPDF_BORDER_FRAME,0,wxPDF_ALIGN_CENTER);
}
Ln();
// Data
size_t j;
for (j = 0; j < data.GetCount(); j++)
{
wxArrayString* row = (wxArrayString*) data[j];
Cell(w[0],6,(*row)[0],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT);
Cell(w[1],6,(*row)[1],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT);
Cell(w[2],6,(*row)[2],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_RIGHT);
Cell(w[3],6,(*row)[3],wxPDF_BORDER_LEFT | wxPDF_BORDER_RIGHT,0,wxPDF_ALIGN_RIGHT);
Ln();
}
// Closure line
Cell((w[0]+w[1]+w[2]+w[3]),0,wxS(""),wxPDF_BORDER_TOP);
}
示例4: BasicTable
// Simple table
void BasicTable(wxArrayString& header,wxArrayPtrVoid& data)
{
size_t j;
// Header
for (j = 0; j < header.GetCount(); j++)
{
Cell(40,7,header[j],wxPDF_BORDER_FRAME);
}
Ln();
// Data
for (j = 0; j < data.GetCount(); j++)
{
wxArrayString* row = (wxArrayString*) data[j];
size_t k;
for (k = 0; k < (*row).GetCount(); k++)
{
Cell(40,6,(*row)[k],wxPDF_BORDER_FRAME);
}
Ln();
}
}
示例5: OnbtnImportClick
virtual void OnbtnImportClick( wxCommandEvent& event )
{
wxString strInputPath = m_textCtrlVSPrjPath->GetValue();
TiXmlDocument doc(strInputPath);
wxFileName fn(strInputPath);
int i;
wxString strSavePath =wxString::Format("%s\\%s.import.vcproj", fn.GetPath(), fn.GetName());
// 获取多个Filter的信息
DoGetGridInfoString();
int num = m_GridInfoPtr.GetCount();
if (num<=0) {
wxMessageBox("Not Import Path");
return;
}
m_strInfo.empty();
for (i=0; i<num; i++) {
// 多个Filter
m_iTreeLevel = 0;
CGridInfo *pInfo = (CGridInfo*)m_GridInfoPtr[i];
pInfo->pElement = newFilter(pInfo->strFilterName);
dirTrace(pInfo->strFilterPath, pInfo->pElement);
}
m_textCtrlInfo->AppendText(m_strInfo);
if (!doc.LoadFile()) {
wxMessageBox(wxT("Load Fail"));
return;
}
// 删除重复的多个Filter
TiXmlElement* root = doc.FirstChildElement("VisualStudioProject");
if (root) {
TiXmlElement *files = root->FirstChildElement("Files");
if (files) {
TiXmlElement* filter = files->FirstChildElement("Filter");
while(filter) {
wxString str = filter->Attribute("Name");
for (i=0; i<num; i++) {
CGridInfo *pInfo = (CGridInfo*)m_GridInfoPtr[i];
if (str == pInfo->strFilterName) {
files->RemoveChild(filter);
break;
}
}
filter = filter->NextSiblingElement("Filter");
}
for (i=0; i<num; i++) {
CGridInfo *pInfo = (CGridInfo*)m_GridInfoPtr[i];
files->LinkEndChild(pInfo->pElement);
}
}
}
doc.SaveFile(strSavePath);
m_textCtrlInfo->AppendText("\n ** Output Project Path: " + strSavePath);
/*
<Files>
<Filter
Name="源文件"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\main.cpp"
>
</File>
</Filter>
<Filter
Name="头文件"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="资源文件"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>*/
}