#include <bars.h>
Inheritance diagram for InformationBarOp:
Public Member Functions | |
InformationBarOp (CCRuntimeClass *Class=NULL) | |
InformationBarOp constructor (Identical to DialogOp). | |
InformationBarOp (String_32 &NewName, CCRuntimeClass *Class=NULL) | |
InformationBarOp constructor (Identical to DialogOp). | |
BOOL | Create () |
The InformationBarOps Create method This method has been overridden to de-specialize the DialogBarOp. | |
void | MakeCurrent () |
void | Delete () |
The InformationBarOps Delete method Stores info bar data and calls DialogBarOp::Delete(). | |
void | SetInfo () |
Stores info bar data. | |
void | GetInfo () |
Stores info bar data in Static variables. | |
virtual void | CloseProfileDialog (CBiasGainGadget &Gadget) |
Handles the closing of the profile gadgets corrensponding profile dialog. | |
Static Public Member Functions | |
static BOOL | IsVisible () |
Used by the tool bar customize system to find out if a tool info bar is visible or not. | |
static BOOL | IsHidden () |
static void | SetVisibility (BOOL Open, BOOL Force=FALSE) |
Used by the tool bar customize system to open and close a tool bar. | |
static BOOL | Read (CCLexFile &file) |
Read InfoBar Data from Ini file. | |
static BOOL | WriteStatic (CCLexFile &file) |
Write the Infobar static data to the file in a tokenized form. | |
static BOOL | Read (HKEY hSubKey) |
read the Infobar static data from the registry | |
static BOOL | Write (HKEY hSubKey) |
Write the Infobar static data to the registry. | |
Protected Member Functions | |
virtual MsgResult | Message (Msg *pMsg) |
The InformationBars message handler is used to handle class wide events, such as broadcasting a message when an infobar is closed, etc. | |
virtual void | HandleProfileButtonClick (CBiasGainGadget &Gadget, CGadgetID ProfileGadgetID) |
Handles the opening/closing of the profile gadgets corrensponding profile dialog when clicked. | |
virtual void | HandleProfileSelChangingMsg (CBiasGainGadget &Gadget, CGadgetID ProfileGadgetID) |
Handles the updating/closing of the profile gadgets corrensponding profile dialog when a SelChangingMsg is received. This function does one of three things:. | |
virtual CProfileBiasGain * | GetProfileFromSelection (CGadgetID ProfileGadgetID, BOOL *bMany, BOOL *bAllSameType) |
Is responsible for determining which of conditions 1-3 apply as detailed within HandleProfileSelChangingMsg (). The (correct) implementation of this function is NOT trivial!!!! This function MUST be overidden in every derived InformationBarOp class that encorperates profiles since this base class one ONLY returns NULL. | |
Static Private Attributes | |
static DockBarType | Dock = DOCKBAR_TOP |
static UINT32 | Slot = DEFAULT_TOOL_INFOBAR_SLOT |
static UINT32 | Offset = 0 |
static wxPoint | FloatPos |
static InformationBarOp * | CurrentInfoBarOp = NULL |
static BOOL | Visible = TRUE |
static BOOL | Hidden = FALSE |
Definition at line 853 of file bars.h.
|
InformationBarOp constructor (Identical to DialogOp). / InformationBarOp methods /*!
Definition at line 6171 of file bars.cpp. 06171 : DialogBarOp(Class) 06172 { 06173 }
|
|
InformationBarOp constructor (Identical to DialogOp).
Definition at line 6191 of file bars.cpp. 06191 : 06192 DialogBarOp(NewName, Class) 06193 { 06194 }
|
|
Handles the closing of the profile gadgets corrensponding profile dialog.
Definition at line 6458 of file bars.cpp. 06459 { 06460 if (Gadget.IsDialogOpen ()) 06461 { 06462 Gadget.CloseDialog (); 06463 } 06464 }
|
|
The InformationBarOps Create method This method has been overridden to de-specialize the DialogBarOp.
Reimplemented from DialogOp. Definition at line 6483 of file bars.cpp. 06484 { 06485 if (Tool::IsToolChanging()||GetMainFrame()->IsChangingViewMode()) 06486 { 06487 SetDockBarType(InformationBarOp::Dock); 06488 SetSlot(InformationBarOp::Slot); 06489 SetOffset(InformationBarOp::Offset); 06490 SetFloatingCPoint(InformationBarOp::FloatPos); 06491 } 06492 06493 InformationBarOp::CurrentInfoBarOp = this; 06494 06495 if (InformationBarOp::Visible) 06496 return (DialogOp::Create()); 06497 else 06498 return TRUE; 06499 }
|
|
The InformationBarOps Delete method Stores info bar data and calls DialogBarOp::Delete().
Reimplemented from DialogBarOp. Definition at line 6590 of file bars.cpp. 06591 { 06592 if (WindowID != NULL) 06593 { 06594 06595 PORTNOTETRACE("dialog", "Warning - InformationBarOp::Delete called"); 06596 #ifndef EXCLUDE_FROM_XARALX 06597 KernelBarPos* pKernelBarPos; 06598 DockBarType Dock; 06599 if (GetMainFrame()->GetBarPosInfo(WindowID,&Dock,&pKernelBarPos)) 06600 { 06601 SetDockBarType(Dock); 06602 if (Dock == DOCKBAR_FLOAT) 06603 SetFloatingCPoint(wxPoint(pKernelBarPos->x,pKernelBarPos->y)); 06604 else 06605 { 06606 SetSlot(pKernelBarPos->Slot); 06607 SetOffset(pKernelBarPos->Position); 06608 } 06609 } 06610 06611 // Save this info bar's data in the static vars 06612 // These vars are used by 06613 InformationBarOp::Dock = GetDockBarType(); 06614 InformationBarOp::Slot = GetSlot(); 06615 InformationBarOp::Offset = GetOffset(); 06616 InformationBarOp::FloatPos = GetFloatingCPoint(); 06617 #endif 06618 DialogBarOp::Delete(); 06619 } 06620 }
|
|
Stores info bar data in Static variables.
Definition at line 6542 of file bars.cpp. 06543 { 06544 #pragma message( __LOCMSG__ "InformationBarOp::GetInfo - do nothing" ) 06545 TRACE( _T("Warning - InformationBarOp::GetInfo called") ); 06546 /* KernelBarPos* pKernelBarPos; 06547 DockBarType Dock; 06548 06549 if (WindowID != NULL) 06550 { 06551 if (GetMainFrame()->GetBarPosInfo(WindowID,&Dock,&pKernelBarPos)) 06552 { 06553 SetDockBarType(Dock); 06554 if (Dock == DOCKBAR_FLOAT) 06555 SetFloatingCPoint(wxPoint(pKernelBarPos->x,pKernelBarPos->y)); 06556 else 06557 { 06558 SetSlot(pKernelBarPos->Slot); 06559 SetOffset(pKernelBarPos->Position); 06560 } 06561 } 06562 06563 // Save this info bar's data in the static vars 06564 // These vars are used by 06565 InformationBarOp::Dock = GetDockBarType(); 06566 InformationBarOp::Slot = GetSlot(); 06567 InformationBarOp::Offset = GetOffset(); 06568 InformationBarOp::FloatPos = GetFloatingCPoint(); 06569 } */ 06570 }
|
|
Is responsible for determining which of conditions 1-3 apply as detailed within HandleProfileSelChangingMsg (). The (correct) implementation of this function is NOT trivial!!!! This function MUST be overidden in every derived InformationBarOp class that encorperates profiles since this base class one ONLY returns NULL.
1) First things first, you MUST scan (in a loop) each object within the current selection. 2) The first object scanned MUST have its profile stored (as a basis for comparison). 3) The first objects profile MUST be compared against each other objects profile; AND if found to be different for ANY one, *bMany = TRUE. If the loop terminates successfully (i.e. not executing *bMany = TRUE); then *bMany = FALSE. This requirement handles conditions 1-2. 4) In parallel with 3), the function MUST also check to if the scanned object is of the same type as the first; AND if they are different sets bAllSameType = FALSE. Otherwise, upon successful loop termination, bAllSameType = TRUE. This requirement handles condition 3. Requirement 4, is non-trivial due to the fashion in which NodeShadow (and like) exist within the Camelot tree. Take a look at tools.cpp for a robust implementation of this function (which I also wrote). The implementation of the function should also give some thought to the ID of the gadget - so that you may distingush between the profile value to read on infobars that have multiple profile gadgets. Again take a look at tools.cpp for an example of this. NOTE: IF YOU DO NOT DO AS I HAVE OUTLAID ABOVE, THEN YOUR PROFILE GAGDET WILL NOT WORK AS DESIRED, AND TO BE HONEST I AM GETTING TIRED OF SEEING CODE THAT DOES NOT FOLLOW ANY STANDARD APPROACH FOR COMMON FEATURES WITHIN INFOBARS, WHICH I AM FORCING PEOPLE TO USE THESE FUNCTIONS WITHIN INFOBARS.
Reimplemented in BlendInfoBarOp, ContourInfoBarOp, GradInfoBarOp, and TranspInfoBarOp. Definition at line 6433 of file bars.cpp. 06434 { 06435 return (NULL); 06436 }
|
|
Handles the opening/closing of the profile gadgets corrensponding profile dialog when clicked.
Definition at line 6263 of file bars.cpp. 06264 { 06265 if (!(Gadget.IsDialogOpen ())) 06266 { 06267 CBiasGainDlg* pDialog_m = new CBiasGainDlg(); 06268 BOOL bMany = FALSE, bAllSameType = TRUE; 06269 06270 CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType); 06271 06272 if (bAllSameType != FALSE) 06273 { 06274 pDialog_m->InvokeVia (Gadget, appliedBiasGain, bMany); 06275 } 06276 } 06277 else 06278 { 06279 Gadget.CloseDialog (); 06280 } 06281 }
|
|
Handles the updating/closing of the profile gadgets corrensponding profile dialog when a SelChangingMsg is received. This function does one of three things:.
These three things are also held when we are dealing with more than two objects. The ability to detect these three cases is integrated within GetProfileFromSelection () - which is called internally. This function also posses the ability to close the profile dialog under the following circumstances: 1) Selecting no objects. 2) Selecting a single object (of a different type to the previous). WARNING: this function behaves funny when trying to debug it!
Definition at line 6327 of file bars.cpp. 06328 { 06329 BOOL bMany = FALSE, bAllSameType = TRUE; 06330 CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType); 06331 06332 if (Gadget.IsDialogOpen ()) 06333 { 06334 if ((appliedBiasGain != NULL) || (bMany == TRUE)) 06335 { 06336 if (bAllSameType == TRUE) 06337 { 06338 // handles case where we click on another blend 06339 Gadget.ReInitialiseDialog (appliedBiasGain, bMany); 06340 } 06341 else 06342 { 06343 // handles case where we click on a non-blend object 06344 Gadget.CloseDialog (); 06345 EnableGadget (ProfileGadgetID, FALSE); 06346 } 06347 } 06348 else 06349 { 06350 // CGS: wo there! when selecting another object, everything is deselected - and then just that node 06351 // selected. This is a problem, since if we proceed regardless, the profile dialog closes (when it 06352 // possibly shouldn't have). As such, I now check for this occurring .... 06353 06354 if (bAllSameType) 06355 { 06356 if (!SelectorTool::GetNormalClick_CheckProfileDialog ()) 06357 { 06358 // user click on no object at all - close the profile dialog .... 06359 Gadget.CloseDialog (); 06360 EnableGadget (ProfileGadgetID, FALSE); 06361 } 06362 } 06363 else 06364 { 06365 // handles case where we click on a non-same type object 06366 Gadget.CloseDialog (); 06367 EnableGadget (ProfileGadgetID, FALSE); 06368 } 06369 } 06370 } 06371 else if (bAllSameType == TRUE) 06372 { 06373 // EnableGadget (ProfileGadgetID, TRUE); 06374 } 06375 else if (bAllSameType == FALSE) 06376 { 06377 EnableGadget (ProfileGadgetID, FALSE); 06378 } 06379 }
|
|
Definition at line 866 of file bars.h. 00866 { return Hidden;};
|
|
Used by the tool bar customize system to find out if a tool info bar is visible or not.
Reimplemented from DialogOp. Definition at line 6976 of file bars.cpp. 06977 { 06978 return (InformationBarOp::Visible); 06979 }
|
|
Definition at line 861 of file bars.h. 00861 { InformationBarOp::CurrentInfoBarOp = this;};
|
|
The InformationBars message handler is used to handle class wide events, such as broadcasting a message when an infobar is closed, etc.
Reimplemented from DialogBarOp. Reimplemented in BevelInfoBarOp, BezToolInfoBarOp, BlendInfoBarOp, BlankInfoBarOp, ContourInfoBarOp, GradInfoBarOp, TranspInfoBarOp, FreeHandInfoBarOp, GridInfoBarOp, LiveEffectsInfoBarOp, MouldInfoBarOp, PenToolInfoBarOp, QuickShapeBaseInfoBarOp, SelectorInfoBarOp, SliceInfoBarOp, TextInfoBarOp, and ZoomInfoBarOp. Definition at line 6213 of file bars.cpp. 06214 { 06215 // if (IsUserName("MarkN")) TRACE( _T("InformationBarOp::Message()\n")); 06216 06217 if (IS_OUR_DIALOG_MSG(Message)) 06218 { 06219 DialogMsg* Msg = (DialogMsg*)Message; 06220 06221 // Check if the message is a CANCEL 06222 if (Msg->DlgMsg == DIM_CANCEL) 06223 { 06224 06225 //if (IsUserName("MarkN")) TRACE( _T("InformationBarOp::Message(DIM_CANCEL)\n")); 06226 06227 InformationBarOp::Visible = FALSE; 06228 06229 // Report bar is closing to interested parties 06230 BROADCAST_TO_CLASS(BarMsg(BAR_CLOSE,this),DialogOp); 06231 } 06232 else if (Msg->DlgMsg == DIM_CREATE) 06233 { 06234 } 06235 06236 return (DLG_EAT_IF_HUNGRY(Msg)); 06237 } 06238 else if (MESSAGE_IS_A(Message,DeathMsg)) // We must destroy the dialog if the application is dying 06239 { 06240 End(); 06241 return OK; 06242 } 06243 06244 // Not a message for our dialog 06245 return OK; 06246 }
|
|
read the Infobar static data from the registry
Definition at line 6826 of file bars.cpp. 06827 { 06828 #pragma message( __LOCMSG__ "InformationBarOp::Read - do nothing" ) 06829 TRACE( _T("Warning - InformationBarOp::Read called") ); 06830 /* // Create our main token under the information bar name 06831 HKEY hRegKey = OpenRegKey(hSubKey, TokenTable[TOKEN_INFO_BAR].Token); 06832 if (hRegKey == NULL) 06833 { 06834 //ERROR3("InformationBarOp::Read failed to get registry key"); 06835 return FALSE; 06836 } 06837 06838 BOOL ok = TRUE; 06839 DockBarType Dock = (DockBarType)GetRegInt(hRegKey, TEXT("Dock")); 06840 // check that the value read in is ok 06841 switch (Dock) 06842 { 06843 case DOCKBAR_TOP: 06844 case DOCKBAR_BOTTOM: 06845 case DOCKBAR_LEFT: 06846 case DOCKBAR_RIGHT: 06847 case DOCKBAR_FLOAT: 06848 InformationBarOp::Dock = Dock; 06849 break; 06850 default : 06851 ok = FALSE; 06852 TRACE( _T("Unrecognised Info bar position : '%d'"),Dock); 06853 break; 06854 } 06855 06856 if (Dock == DOCKBAR_FLOAT) 06857 { 06858 InformationBarOp::FloatPos.x = GetRegDword(hRegKey, TEXT("x")); 06859 InformationBarOp::FloatPos.y = GetRegDword(hRegKey, TEXT("y")); 06860 } 06861 else 06862 { 06863 InformationBarOp::Slot = GetRegDword(hRegKey, TEXT("Slot")); 06864 InformationBarOp::Offset = GetRegDword(hRegKey, TEXT("Offset")); 06865 } 06866 06867 // get the visibility of the bar 06868 InformationBarOp::Visible = GetRegBool(hRegKey, TEXT("Visibility")); 06869 06870 // Shut down our use of the key 06871 CloseRegKey(hRegKey); 06872 06873 // if things were ok then set this information as the current set 06874 if (ok && CurrentInfoBarOp) 06875 CurrentInfoBarOp->SetInfo(); 06876 06877 if (CurrentInfoBarOp && CurrentInfoBarOp->WindowID ) 06878 { 06879 KernelBarPos NewPos; 06880 if (CurrentInfoBarOp->Dock == DOCKBAR_FLOAT) 06881 { 06882 NewPos.x = InformationBarOp::FloatPos.x; 06883 NewPos.y = InformationBarOp::FloatPos.y; 06884 06885 } 06886 else 06887 { 06888 NewPos.Slot = InformationBarOp::Slot; 06889 NewPos.Position = InformationBarOp::Offset; 06890 } 06891 GetMainFrame()->MoveBar(CurrentInfoBarOp->WindowID, InformationBarOp::Dock,NewPos); 06892 } 06893 06894 return ok; */ 06895 06896 return false; 06897 }
|
|
Read InfoBar Data from Ini file.
Reimplemented from DialogBarOp. Definition at line 6637 of file bars.cpp. 06638 { 06639 #pragma message( __LOCMSG__ "InformationBarOp::Read - do nothing" ) 06640 TRACE( _T("Warning - InformationBarOp::Read called") ); 06641 /* TokenIndex Token; 06642 const TCHAR* TokenBuf = file.GetTokenBuf(); 06643 BOOL ok; 06644 06645 // Read the bar's docking position 06646 ok = file.GetSimpleToken(); 06647 06648 if (ok) 06649 { 06650 Token = FindToken(TokenBuf); 06651 switch (Token) 06652 { 06653 case TOKEN_DOCKBAR_TOP : InformationBarOp::Dock = DOCKBAR_TOP; break; 06654 case TOKEN_DOCKBAR_BOTTOM : InformationBarOp::Dock = DOCKBAR_BOTTOM; break; 06655 case TOKEN_DOCKBAR_LEFT : InformationBarOp::Dock = DOCKBAR_LEFT; break; 06656 case TOKEN_DOCKBAR_RIGHT : InformationBarOp::Dock = DOCKBAR_RIGHT; break; 06657 case TOKEN_DOCKBAR_FLOAT : InformationBarOp::Dock = DOCKBAR_FLOAT; break; 06658 06659 default : 06660 ok = FALSE; 06661 TRACE( _T("Unrecognised Info bar position : '%s'"),TokenBuf); 06662 break; 06663 } 06664 06665 if (ok) 06666 { 06667 // If the bar is floating, then read in the floating X and Y coords 06668 // Otherwise, read in the bar's docked slot and offset. 06669 if (InformationBarOp::Dock == DOCKBAR_FLOAT) 06670 { 06671 ok = file.GetSimpleToken(); 06672 if (ok) 06673 { 06674 ok = (camSscanf(TokenBuf,"%li",&InformationBarOp::FloatPos.x) == 1); 06675 if (!ok) TRACE( _T("Expected the Infobar's floating x pos, but got '%s'\n"),TokenBuf); 06676 } 06677 06678 if (ok) ok = file.GetSimpleToken(); 06679 if (ok) 06680 { 06681 ok = (camSscanf(TokenBuf,"%li",&InformationBarOp::FloatPos.y) == 1); 06682 if (!ok) TRACE( _T("Expected the Infobar's floating y pos, but got '%s'\n"),TokenBuf); 06683 } 06684 } 06685 else 06686 { 06687 ok = file.GetSimpleToken(); 06688 if (ok) 06689 { 06690 ok = (camSscanf(TokenBuf,"%li",&InformationBarOp::Slot) == 1); 06691 if (!ok) TRACE( _T("Expected the Infobar's slot, but got '%s'\n"),TokenBuf); 06692 } 06693 06694 if (ok) ok = file.GetSimpleToken(); 06695 if (ok) 06696 { 06697 ok = (camSscanf(TokenBuf,"%li",&InformationBarOp::Offset) == 1); 06698 if (!ok) TRACE( _T("Expected the Infobar's offset, but got '%s'\n"),TokenBuf); 06699 } 06700 } 06701 } 06702 if (ok) 06703 { 06704 ok = file.GetSimpleToken(); 06705 if (ok) 06706 { 06707 Token = FindToken(TokenBuf); 06708 switch (Token) 06709 { 06710 case TOKEN_VISIBLE : InformationBarOp::Visible = TRUE; break; 06711 case TOKEN_INVISIBLE : InformationBarOp::Visible = FALSE; break; 06712 default : 06713 ok = FALSE; 06714 TRACE( _T("Expected '%s' or '%s', but got '%s'\n"),TokenTable[TOKEN_VISIBLE].Token,TokenTable[TOKEN_INVISIBLE].Token,TokenBuf); 06715 break; 06716 } 06717 } 06718 } 06719 } 06720 if(ok) 06721 if(CurrentInfoBarOp) 06722 CurrentInfoBarOp->SetInfo(); 06723 06724 if(CurrentInfoBarOp && CurrentInfoBarOp->WindowID ) 06725 { 06726 KernelBarPos NewPos; 06727 if (CurrentInfoBarOp->Dock == DOCKBAR_FLOAT) 06728 { 06729 NewPos.x=InformationBarOp::FloatPos.x; 06730 NewPos.y=InformationBarOp::FloatPos.y; 06731 06732 } 06733 else 06734 { 06735 NewPos.Slot= InformationBarOp::Slot; 06736 NewPos.Position= InformationBarOp::Offset; 06737 } 06738 GetMainFrame()->MoveBar(CurrentInfoBarOp->WindowID,InformationBarOp::Dock,NewPos); 06739 } 06740 return ok; */ 06741 06742 return false; 06743 }
|
|
Stores info bar data.
Definition at line 6517 of file bars.cpp. 06518 { 06519 06520 SetDockBarType(InformationBarOp::Dock); 06521 SetSlot(InformationBarOp::Slot); 06522 SetOffset(InformationBarOp::Offset); 06523 SetFloatingCPoint(InformationBarOp::FloatPos); 06524 }
|
|
Used by the tool bar customize system to open and close a tool bar.
Definition at line 7029 of file bars.cpp. 07030 { 07031 07032 if (Open) 07033 { 07034 if (!InformationBarOp::Visible || Force) 07035 { 07036 InformationBarOp::Visible = TRUE; 07037 if (InformationBarOp::CurrentInfoBarOp != NULL) 07038 { 07039 InformationBarOp::CurrentInfoBarOp->Create(); 07040 } 07041 } 07042 } 07043 else 07044 { 07045 if (InformationBarOp::Visible || Force) 07046 { 07047 #ifndef STANDALONE 07048 SelectorTool::UnCacheInfoBar(TRUE); 07049 #endif 07050 if (InformationBarOp::CurrentInfoBarOp != NULL) 07051 { 07052 InformationBarOp::CurrentInfoBarOp->Delete(); 07053 } 07054 InformationBarOp::Visible = FALSE; 07055 } 07056 } 07057 }
|
|
Write the Infobar static data to the registry.
Definition at line 6914 of file bars.cpp. 06915 { 06916 #pragma message( __LOCMSG__ "InformationBarOp::Write - do nothing" ) 06917 TRACE( _T("Warning - InformationBarOp::Write called") ); 06918 /* // Ensure the section is blank before we start saving any data 06919 DeleteRegKey(hSubKey, TokenTable[TOKEN_INFO_BAR].Token); 06920 06921 // Create our main token under the information bar name 06922 HKEY hRegKey = CreateRegKey(hSubKey, TokenTable[TOKEN_INFO_BAR].Token); 06923 if (hRegKey == NULL) 06924 { 06925 ERROR3("InformationBarOp::Write failed to get registry key"); 06926 return FALSE; 06927 } 06928 06929 if (IsVisible()) 06930 { 06931 if (CurrentInfoBarOp) 06932 CurrentInfoBarOp->GetInfo(); 06933 } 06934 06935 BOOL ok = TRUE; 06936 ok = ok && SetRegInt(hRegKey, TEXT("Dock"), InformationBarOp::Dock); 06937 06938 if (Dock == DOCKBAR_FLOAT) 06939 { 06940 ok = ok && SetRegDword(hRegKey, TEXT("x"), InformationBarOp::FloatPos.x); 06941 ok = ok && SetRegDword(hRegKey, TEXT("y"), InformationBarOp::FloatPos.y); 06942 } 06943 else 06944 { 06945 ok = ok && SetRegDword(hRegKey, TEXT("Slot"), InformationBarOp::Slot); 06946 ok = ok && SetRegDword(hRegKey, TEXT("Offset"), InformationBarOp::Offset); 06947 } 06948 06949 // save the visibility of the bar 06950 ok = ok && SetRegBool(hRegKey, TEXT("Visibility"), IsVisible()); 06951 06952 // Shut down our use of the key 06953 CloseRegKey(hRegKey); 06954 06955 return ok; */ 06956 06957 return false; 06958 }
|
|
Write the Infobar static data to the file in a tokenized form.
Definition at line 6761 of file bars.cpp. 06762 { 06763 BOOL ok = TRUE; 06764 String_256 str; 06765 06766 if (ok) ok = file.PutToken(TokenTable[TOKEN_INFO_BAR].Token); 06767 06768 if(IsVisible()) 06769 { 06770 if(CurrentInfoBarOp) 06771 CurrentInfoBarOp->GetInfo(); 06772 } 06773 switch (InformationBarOp::Dock) 06774 { 06775 case DOCKBAR_TOP : str = TokenTable[TOKEN_DOCKBAR_TOP].Token; break; 06776 case DOCKBAR_BOTTOM : str = TokenTable[TOKEN_DOCKBAR_BOTTOM].Token; break; 06777 case DOCKBAR_LEFT : str = TokenTable[TOKEN_DOCKBAR_LEFT].Token; break; 06778 case DOCKBAR_RIGHT : str = TokenTable[TOKEN_DOCKBAR_RIGHT].Token; break; 06779 case DOCKBAR_FLOAT : str = TokenTable[TOKEN_DOCKBAR_FLOAT].Token; break; 06780 default : ok = FALSE; break; 06781 } 06782 06783 if (ok) ok = file.PutToken(str); 06784 06785 if (Dock == DOCKBAR_FLOAT) 06786 { 06787 if (ok) ok = file.PutToken(InformationBarOp::FloatPos.x); 06788 if (ok) ok = file.PutToken(InformationBarOp::FloatPos.y); 06789 } 06790 else 06791 { 06792 if (ok) ok = file.PutToken(InformationBarOp::Slot); 06793 if (ok) ok = file.PutToken(InformationBarOp::Offset); 06794 } 06795 06796 if(IsVisible()) 06797 { 06798 if (ok) ok = file.PutToken(TokenTable[TOKEN_VISIBLE].Token); 06799 } 06800 else 06801 { 06802 if (ok) ok = file.PutToken(TokenTable[TOKEN_INVISIBLE].Token); 06803 } 06804 06805 if (ok) ok = file.PutNewLine(); 06806 if (ok) ok = file.PutNewLine(); 06807 06808 return ok; 06809 }
|
|
|
|
Reimplemented from DialogBarOp. |
|
Reimplemented from DialogBarOp. |
|
|
|
Reimplemented from DialogBarOp. |
|
Reimplemented from DialogBarOp. |
|
|