Ejemplo n.º 1
0
//------------------------------------------------------------------------------
Barycenter::Barycenter(const std::string &itsName) :
   CalculatedPoint("Barycenter", itsName),
   builtInSP      (NULL)
{
   objectTypes.push_back(Gmat::BARYCENTER);
   objectTypeNames.push_back("Barycenter");
   parameterCount = BarycenterParamCount;
   
   // Set default colors
   if (itsName == GmatSolarSystemDefaults::SOLAR_SYSTEM_BARYCENTER_NAME)
      SetDefaultColors(GmatColor::TEAL, GmatColor::DARK_GRAY);
   else
      SetDefaultColors(GmatColor::GOLD, GmatColor::DARK_GRAY);
}
Ejemplo n.º 2
0
CButtonST::CButtonST()
{
	m_bMouseOnButton = false;
	FreeResources(false);
	// Default type is "flat" button
	m_bIsFlat = true; 
	// By default draw border in "flat" button 
	m_bDrawBorder = true; 
	// By default icon is aligned horizontally
	m_nAlign = ST_ALIGN_HORIZ; 
	// By default, for "flat" button, don't draw the focus rect
	m_bDrawFlatFocus = false;
	// By default the button is not the default button
	m_bIsDefault = false;
	// By default the button is not a checkbox
	m_bIsCheckBox = false;
	m_nCheck = false;
	// Set default colors
	SetDefaultColors(false);
	// No tooltip created
	m_ToolTip.m_hWnd = 0;
	// Do not draw as a transparent button
	m_bDrawTransparent = false;
	m_pbmpOldBk = 0;
	// No URL defined
	::ZeroMemory(&m_szURL, sizeof(m_szURL));
	// No cursor defined
	m_hCursor = 0;
	// No autorepeat
	m_bAutoRepeat = false;
	m_dwPeriodAutoRepeat = 100;
	m_bIsPressed = false;
	m_bIsFocused = false;
	m_bIsDisabled = false;
}
Ejemplo n.º 3
0
CPPNumEdit::CPPNumEdit()
{
	m_bValidValue = TRUE;
	m_bNotificate = TRUE;

	SetDefaultColors(FALSE);
}
Ejemplo n.º 4
0
CButtonST::CButtonST()
{
	m_bIsPressed		= FALSE;
	m_bIsFocused		= FALSE;
	m_bIsDisabled		= FALSE;
	m_bMouseOnButton	= FALSE;

	FreeResources(FALSE);

	// Default type is "flat" button
	m_bIsFlat = TRUE;
	// Button will be tracked also if when the window is inactive (like Internet Explorer)
	m_bAlwaysTrack = TRUE;
  
	// By default draw border in "flat" button 
	m_bDrawBorder = TRUE; 
  
	// By default icon is aligned horizontally
//	m_byAlign = ST_ALIGN_HORIZ; 
  
	// By default, for "flat" button, don't draw the focus rect
	m_bDrawFlatFocus = FALSE;

	// By default the button is not the default button
	m_bIsDefault = FALSE;
	// Invalid value, since type still unknown
	m_nTypeStyle = BS_TYPEMASK_01;

	// By default the button is not a checkbox
	m_bIsCheckBox = FALSE;
	m_nCheck = 0;

	// Set default colors
	SetDefaultColors(FALSE);

	// No tooltip created
	m_ToolTip.m_hWnd = NULL;

	// Do not draw as a transparent button
	m_bDrawTransparent = FALSE;
	m_pbmpOldBk = NULL;


	// No cursor defined
	m_hCursor = NULL;

	// No associated menu
#ifndef	BTNST_USE_BCMENU
	m_hMenu = NULL;
#endif
	m_hParentWndMenu = NULL;
	m_bMenuDisplayed = FALSE;

	m_bShowDisabledBitmap = TRUE;
} // End of CButtonST
Ejemplo n.º 5
0
//---------------------------------------------------------------------------
GroundStation::GroundStation(const std::string &itsName) :
   GroundstationInterface    ("GroundStation", itsName),
   stationId                 ("StationId"),
   minElevationAngle         (7.0)						// 7 degree
{
   objectTypeNames.push_back("GroundStation");
   parameterCount = GroundStationParamCount;
   
   // Set default colors
   SetDefaultColors(GmatColor::THISTLE, GmatColor::DARK_GRAY);
   
   bfcsName   = "EarthFixed";
   mj2kcsName = "EarthMJ2000Eq";
}
Ejemplo n.º 6
0
bool Tapplication::Start()
{
	TRACE("Tapplication::Start\n");

	SetDefaultColors();
	// Load application defaults
	IniFile file;
	if ( file.Load("default.ini") )
	{
		string skinName;
		if ( file.GetValue( "Skin", skinName ) )
			LoadSkin( skinName );
		short screenOffsetX = 0, screenOffsetY = 0;
		file.GetValue( "ScreenOffsetX", screenOffsetX );
		file.GetValue( "ScreenOffsetY", screenOffsetY );
		Rect::SetOffset( screenOffsetX, screenOffsetY );
	}
	return false;
}
Ejemplo n.º 7
0
CButtonST::CButtonST()
{
    m_bBigDaddy = FALSE;
    m_bIsPressed        = FALSE;
    m_bIsFocused        = FALSE;
    m_bIsDisabled        = FALSE;
    m_bMouseOnButton    = FALSE;

	m_buttonpressed = FALSE;

    FreeResources(FALSE);

    // Default type is "flat" button
    m_bIsFlat = TRUE; 
  
    // By default draw border in "flat" button 
    m_bDrawBorder = FALSE; //为TRUE时显示按钮边框,当前为不显示边框//modify by liub for Tabbutton
  
    // By default icon is aligned horizontally
    //文字与图标的排列方式
    //m_nAlign = ST_ALIGN_HORIZ;
    m_nAlign = ST_ALIGN_VERT;
	
  
    // By default, for "flat" button, don't draw the focus rect
    m_bDrawFlatFocus = FALSE;

    // By default the button is not the default button
    m_bIsDefault = FALSE;

    // By default the button is not a checkbox
    m_bIsCheckBox = FALSE;
    m_nCheck = 0;

    // Set default colors
    SetDefaultColors(FALSE);

    // No tooltip created
    m_ToolTip.m_hWnd = NULL;

    // Do not draw as a transparent button
    //m_bDrawTransparent = FALSE;
    //Modifyed by liugz 2006-07-04
    //标题按钮背景改为不透明
    m_bDrawTransparent = FALSE;
    m_pbmpOldBk = NULL;

    // No URL defined
    ::ZeroMemory(&m_szURL, sizeof(m_szURL));

    // No cursor defined
    m_hCursor = NULL;    

    // No autorepeat
    m_bAutoRepeat = FALSE;
    m_hWndAutoRepeat = NULL;
    m_nMsgAutoRepeat = WM_APP;
    m_dwPeriodAutoRepeat = 100;

    m_wndCurrentWnd=NULL;
    m_wndLastWnd=NULL;
} // End of CButtonST
void
CBEditTextPrefsDialog::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == this && message.Is(JXDialogDirector::kDeactivated))
		{
		const JXDialogDirector::Deactivated* info =
			dynamic_cast<const JXDialogDirector::Deactivated*>(&message);
		assert( info != NULL );
		if (info->Successful())
			{
			UpdateSettings();
			}
		}

	else if (sender == itsHelpButton && message.Is(JXButton::kPushed))
		{
		(JXGetHelpManager())->ShowSection(kCBEditorPrefsHelpName);
		}

	else if ((sender == itsCreateBackupCB || sender == itsBalanceWhileTypingCB) &&
			 message.Is(JXCheckbox::kPushed))
		{
		UpdateDisplay();
		}

	else if (sender == itsFontMenu && message.Is(JXChooseMonoFont::kFontChanged))
		{
		UpdateSampleText();
		}
	else if (sender == itsRightMarginCB && message.Is(JXCheckbox::kPushed))
		{
		UpdateSampleText();
		}

	else if (message.Is(JXButton::kPushed) && HandleColorButton(sender))
		{
		// function did all the work
		}

	else if (sender == itsChooseColorDialog &&
			 message.Is(JXDialogDirector::kDeactivated))
		{
		const JXDialogDirector::Deactivated* info =
			dynamic_cast<const JXDialogDirector::Deactivated*>(&message);
		assert( info != NULL );
		if (info->Successful())
			{
			ChangeColor(itsChooseColorIndex, itsChooseColorDialog->GetColor());
			}
		itsChooseColorDialog = NULL;
		}

	else if (sender == itsDefColorsButton && message.Is(JXButton::kPushed))
		{
		SetDefaultColors();
		}
	else if (sender == itsInvColorsButton && message.Is(JXButton::kPushed))
		{
		SetReverseVideoColors();
		}

	else if (sender == itsEmulatorMenu && message.Is(JXMenu::kItemSelected))
		{
		const JXMenu::ItemSelected* info =
			dynamic_cast<const JXMenu::ItemSelected*>(&message);
		assert( info != NULL );
		itsEmulatorIndex = info->GetIndex();
		}

	else
		{
		JXDialogDirector::Receive(sender, message);
		}
}