本文整理汇总了C++中AddFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ AddFrame函数的具体用法?C++ AddFrame怎么用?C++ AddFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AddFrame函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BackPaint
DockCont::DockCont()
{
dragging = false;
dockstate = STATE_NONE;
base = NULL;
waitsync = false;
ignoreminsize = false;
usersize.cx = usersize.cy = Null;
BackPaint();
#ifdef PLATFORM_WIN32
ToolWindow();
#endif
NoCenter().Sizeable(true).MaximizeBox(false).MinimizeBox(false);
AddFrame(FieldFrame());
AddFrame(tabbar);
AddFrame(handle);
tabbar.AutoHideMin(1);
tabbar.WhenCursor = THISBACK(TabSelected);
tabbar.WhenDrag = THISBACK(TabDragged);
tabbar.WhenContext = THISBACK(TabContext);
tabbar.WhenClose = THISBACK(TabClosed);
tabbar.WhenCloseAll = THISBACK(RefreshLayout);
tabbar.SetBottom();
handle << close << autohide << windowpos;
handle.WhenContext = THISBACK(WindowMenu);
handle.WhenLeftDrag = THISBACK(MoveBegin);
close.Tip(t_("Close")) <<= THISBACK(CloseAll);
autohide.Tip(t_("Auto-Hide")) <<= THISBACK(AutoHide);
windowpos.Tip(t_("Window Menu")) <<= THISBACK(WindowMenu);
WhenClose = THISBACK(CloseAll);
}
示例2: GI
Apple::Apple(int rXPx, int rYPx)
{
APPLESZX = GI("APPLESZX");
APPLESZY = GI("APPLESZY");
APPLE_BRTM = GF("APPLE_BRTM");
mSizeX = APPLESZX;
mSizeY = APPLESZY;
mX = rXPx;
mY = rYPx;
mZ = 1.0f;
mNo = 0;
mTimer = 0.0f;
mBaseStatus = NORMAL;
// あたり判定
AddFrame(FR_NORMAL);
AddCircle(FR_NORMAL, SP->GRID_BOGYO, 20, 20, 15);
AddFrame(FR_DISABLE);
SetCurFrame(FR_DISABLE);
}
示例3: TGMainFrame
RtMainFrame::RtMainFrame(const TGWindow* p) :
TGMainFrame(p, 800, 600)
{
// Create canvas
TRootEmbeddedCanvas* eCanvas = new TRootEmbeddedCanvas("Embedded canvas",this,800,600);
m_canvas = eCanvas->GetCanvas();
AddFrame(eCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,
10, 10, 10, 1));
// ========================================
// Tooltip
m_canvas->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"RtMainFrame", this, "eventHandler(Int_t,Int_t,Int_t,TObject*)");
m_tip = new TGToolTip( gClient->GetDefaultRoot(), eCanvas, "", 0 );
// ========================================
// Buttons
TGHorizontalFrame *hframe= new TGHorizontalFrame(this, 200,40);
// Exit button
hframe->AddFrame( new TGTextButton(hframe, "&Quit", "gApplication->Terminate()")
, new TGLayoutHints(kLHintsCenterX,5,5,3,4));
// Save button
TGTextButton* buttonPDF = new TGTextButton(hframe, "Save &PDF");
TQObject::Connect(buttonPDF, "Clicked()",
"RtMainFrame", this, "savePDF()" );
hframe->AddFrame( buttonPDF
, new TGLayoutHints(kLHintsCenterX,5,5,3,4));
AddFrame(hframe,new TGLayoutHints(kLHintsCenterX,2,2,2,2));
// Sets window name and shows the main frame
SetWindowName("RT-Biplot");
MapSubwindows();
Resize(GetDefaultSize());
MapWindow();
}
示例4: AddFrame
void AtmelSWIAnalyzer::ParsePacket(const SWI_Block& block, size_t block_ndx, const std::vector<std::pair<U64, U64> >& ByteSamples)
{
const U8 Count = block.GetCount();
// is this a status/response block?
if (Count == 4)
{
// make a status block frame
AddFrame(ByteSamples[1].first, ByteSamples[1].second, FramePacketSegment, 0, 0x100000000ull | (U64)block_ndx);
} else {
int offset = 1; // I/O block offset - we are skipping the Count byte
int param_cnt = 0;
SWI_PacketParam* param;
for (param_cnt = 0; PacketParams[param_cnt].Name != NULL; ++param_cnt)
{
param = PacketParams + param_cnt;
if (param->IsCommand == block.IsCommand && param->ForOpcode == block.Opcode
&& (Count == param->ValidIfCount || param->ValidIfCount == 0))
{
// pack the offset and block index into mData2
U64 data2 = offset;
data2 <<= 32;
data2 |= block_ndx;
AddFrame(ByteSamples[offset].first, ByteSamples[offset + param->Length - 1].second, FramePacketSegment,
param_cnt, data2);
offset += param->Length;
}
param++;
}
}
}
示例5: Size
Puzzle::Puzzle()
{
size = Size(4, 4);
AddFrame(menu);
AddFrame(status);
lang = LNG_ENGLISH;
Init();
}
示例6: AddedToFrameCallback
void ZFrame_MemoryMonitor::AddedToFrameCallback(ZFrame * Frame)
{
ULong i;
for (i=0;i<8;i++) AddFrame(&Digits[i]);
for (i=0;i<ZFRAME_MEMORYMONITOR_DISPLAYLINES;i++) AddFrame(&MemLines[i]);
for (i=0;i<3;i++) AddFrame(&DispSize[i]);
}
示例7: AddDialogFrame
GtkWidget * AddDialogFrame( GtkWidget * parent )
{
GtkWidget * frame;
frame=AddFrame( NULL,GTK_SHADOW_IN,parent,1 );
gtk_container_set_border_width( GTK_CONTAINER( frame ),1 );
frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,frame,1 );
frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
return frame;
}
示例8: parser
void Animation::LoadFromFile(std::string _file)
{
Parser parser(_file);
int isSpriteSheet = parser.retrieveContent("isSpriteSheet").getInt();
int nbFrames = parser.retrieveContent("nbFrames").getInt();
if( parser.retrieveContent("isLoop").getInt() )
m_isLoop = true;
else
m_isLoop = false;
if( isSpriteSheet )
{
ParserContent spriteSheetConfig = parser.retrieveContent("spriteSheetConfig");
int width = spriteSheetConfig.getInt();
int height = spriteSheetConfig.getInt();
int nbWidth = spriteSheetConfig.getInt();
int nbHeight = spriteSheetConfig.getInt();
int w = width / nbWidth;
int h = height / nbHeight;
ParserContent frames = parser.retrieveContent("frames");
for( int i = 0; i < nbFrames; i++ )
{
ParserContent frame = frames.getLineAsContent();
std::string filePath = frame.getString();
float duration = frame.getFloat();
int x = i%nbWidth;
int y = i / nbWidth;
AddFrame(filePath, duration, sf::IntRect(x * w, y * h, w, h));
}
}
else
{
ParserContent frames = parser.retrieveContent("frames");
for( int i = 0; i < nbFrames; i++ )
{
ParserContent frame = frames.getLineAsContent();
std::string filePath = frame.getString();
float duration = frame.getFloat();
AddFrame(filePath, duration);
}
}
}
示例9: AddFrame
void FileTabsExample::OnAllAlign()
{
if (allalign) {
for (int i = 1; i < 4; i++)
AddFrame(bar[i]);
}
else {
for (int i = 0; i < 4; i++)
bar[i].Remove();
ClearFrames();
AddFrame(bar[0]);
}
}
示例10: GetSize
void DockBase::InitFrameWork()
{
panesize = GetSize();
int cx = panesize.cx / 4;
int cy = panesize.cy / 3;
AddFrame(hide[0]);
AddFrame(hide[1]);
AddFrame(hide[2]);
AddFrame(hide[3]);
hide[0].SetLayout(DockCtrlCustomFrame::LAYOUT_LEFT);
hide[2].SetLayout(DockCtrlCustomFrame::LAYOUT_RIGHT);
hide[1].SetLayout(DockCtrlCustomFrame::LAYOUT_TOP);
hide[3].SetLayout(DockCtrlCustomFrame::LAYOUT_BOTTOM);
AddFrame(pane[0]);
AddFrame(pane[2]);
AddFrame(pane[1]);
AddFrame(pane[3]);
pane[0].SetLayout(this, PaneFrame::LEFT, cx);
pane[2].SetLayout(this, PaneFrame::RIGHT, cx);
pane[1].SetLayout(this, PaneFrame::TOP, cy);
pane[3].SetLayout(this, PaneFrame::BOTTOM, cy);
}
示例11: AddFrame
void CMoveList::NewMove( const CBotMove& rMove, const CVector& vDelta )
{
CMoveData* pNewMoveData;
double nRenderTime;
CVector vTemp;
// Deal with the rendering time
nRenderTime = m_tLastSent.Elapsed();
m_tLastSent.SetCurrent();
m_nTotalTime += (float)nRenderTime;
m_nTotalMoves++;
// Prepare the new CMoveData object
pNewMoveData = new CMoveData;
rMove.PrepareMoveData( pNewMoveData, vDelta );
pNewMoveData->SetMilliseconds( (BYTE)(nRenderTime * 1000) );
AddFrame( pNewMoveData );
// If this CBotMove moves the bot, record with a CSentMove
if ( rMove.GetMove().Length() )
{
CSentMove* pNewSentMove = new CSentMove( rMove );
pNewSentMove->SetDuration( nRenderTime );
pNewSentMove->Delta( vTemp );
m_vDeltaOrigin += vTemp;
m_lstSentMoves.AddTail( pNewSentMove );
}
}
示例12: AddFrame
void IKTimelineModel::AddData(float time, float mix, bool isBlendPositive, Math::TweenType tweenType, const List<float>& args)
{
mMixes.Add(mix);
mBlendPositives.Add(isBlendPositive);
AddFrame(time, (uint)mMixes.Count() - 1, tweenType, args);
}
示例13: AddFrame
Animation::Animation()
{
max_width = 0.0f;
max_height = 0.0f;
error_frame = AddFrame(0,0,0,0,0,0, true);
}
示例14: ParseTile
// Parse a 'TILE' chunk and any image bearing chunks that immediately follow.
// 'tile_chunk_size' is the previously validated, padded chunk size.
static ParseStatus ParseTile(WebPDemuxer* const dmux,
uint32_t tile_chunk_size) {
const int has_tiles = !!(dmux->feature_flags_ & TILE_FLAG);
const uint32_t min_size = tile_chunk_size + CHUNK_HEADER_SIZE;
int added_tile = 0;
MemBuffer* const mem = &dmux->mem_;
Frame* frame;
ParseStatus status =
NewFrame(mem, min_size, TILE_CHUNK_SIZE, tile_chunk_size, &frame);
if (status != PARSE_OK) return status;
frame->is_tile_ = 1;
frame->x_offset_ = 2 * GetLE24s(mem);
frame->y_offset_ = 2 * GetLE24s(mem);
Skip(mem, tile_chunk_size - TILE_CHUNK_SIZE); // skip any trailing data.
// Store a (potentially partial) tile only if the tile flag is set
// and the tile contains some data.
status = StoreFrame(dmux->num_frames_, mem, frame);
if (status != PARSE_ERROR && has_tiles && frame->frame_num_ > 0) {
// Note num_frames_ is incremented only when all tiles have been consumed.
added_tile = AddFrame(dmux, frame);
if (!added_tile) status = PARSE_ERROR;
}
if (!added_tile) free(frame);
return status;
}
示例15: AddFrame
HelpViewer::HelpViewer()
{
// adds toolbar
AddFrame(toolBar);
// setups splitter and its contents
Add(splitter);
splitter.Horz(tocPane, contentsPane).SetPos(2500);
contentsPane.AutoHideSb();
contentsPane.SetZoom(Zoom(1,1));
contentsPane.HMargins(20);
tocPane.Add(mainTocTree.NoRoot().SizePos());
// setup TOC link callback
mainTocTree.WhenSel = THISBACK(tocLinkCb);
contentsPane.WhenLink << THISBACK(contentLinkCb);
// initialize link stack
stack.Clear();
tos = -1;
Sizeable().Zoomable();
// loads toolbar
toolBar.Set(THISBACK(toolBarCb));
}